@@ -93,7 +93,6 @@ pub struct Config {
9393 pub ccache : Option < String > ,
9494 /// Call Build::ninja() instead of this.
9595 pub ninja_in_file : bool ,
96- pub verbose : usize ,
9796 pub submodules : Option < bool > ,
9897 pub compiler_docs : bool ,
9998 pub library_docs_private_items : bool ,
@@ -528,7 +527,7 @@ impl Config {
528527 extended,
529528 tools,
530529 tool,
531- verbose,
530+ verbose : build_verbose ,
532531 sanitizers,
533532 profiler,
534533 cargo_native_static,
@@ -586,6 +585,12 @@ impl Config {
586585 }
587586 }
588587
588+ // Prefer CLI verbosity flags if set (`flags_verbose` > 0), otherwise take the value from
589+ // TOML.
590+ config
591+ . exec_ctx
592+ . set_verbosity ( cmp:: max ( build_verbose. unwrap_or_default ( ) as u8 , flags_verbose) ) ;
593+
589594 let mut paths: Vec < PathBuf > = flags_skip. into_iter ( ) . chain ( flags_exclude) . collect ( ) ;
590595 if let Some ( exclude) = exclude {
591596 paths. extend ( exclude) ;
@@ -741,7 +746,6 @@ impl Config {
741746 set ( & mut config. extended , extended) ;
742747 config. tools = tools;
743748 set ( & mut config. tool , tool) ;
744- set ( & mut config. verbose , verbose) ;
745749 set ( & mut config. sanitizers , sanitizers) ;
746750 set ( & mut config. profiler , profiler) ;
747751 set ( & mut config. cargo_native_static , cargo_native_static) ;
@@ -750,8 +754,6 @@ impl Config {
750754 set ( & mut config. print_step_timings , print_step_timings) ;
751755 set ( & mut config. print_step_rusage , print_step_rusage) ;
752756
753- config. verbose = cmp:: max ( config. verbose , flags_verbose as usize ) ;
754-
755757 // Verbose flag is a good default for `rust.verbose-tests`.
756758 config. verbose_tests = config. is_verbose ( ) ;
757759
0 commit comments