@@ -93,7 +93,6 @@ pub struct Config {
93
93
pub ccache : Option < String > ,
94
94
/// Call Build::ninja() instead of this.
95
95
pub ninja_in_file : bool ,
96
- pub verbose : usize ,
97
96
pub submodules : Option < bool > ,
98
97
pub compiler_docs : bool ,
99
98
pub library_docs_private_items : bool ,
@@ -528,7 +527,7 @@ impl Config {
528
527
extended,
529
528
tools,
530
529
tool,
531
- verbose,
530
+ verbose : build_verbose ,
532
531
sanitizers,
533
532
profiler,
534
533
cargo_native_static,
@@ -586,6 +585,12 @@ impl Config {
586
585
}
587
586
}
588
587
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
+
589
594
let mut paths: Vec < PathBuf > = flags_skip. into_iter ( ) . chain ( flags_exclude) . collect ( ) ;
590
595
if let Some ( exclude) = exclude {
591
596
paths. extend ( exclude) ;
@@ -741,7 +746,6 @@ impl Config {
741
746
set ( & mut config. extended , extended) ;
742
747
config. tools = tools;
743
748
set ( & mut config. tool , tool) ;
744
- set ( & mut config. verbose , verbose) ;
745
749
set ( & mut config. sanitizers , sanitizers) ;
746
750
set ( & mut config. profiler , profiler) ;
747
751
set ( & mut config. cargo_native_static , cargo_native_static) ;
@@ -750,8 +754,6 @@ impl Config {
750
754
set ( & mut config. print_step_timings , print_step_timings) ;
751
755
set ( & mut config. print_step_rusage , print_step_rusage) ;
752
756
753
- config. verbose = cmp:: max ( config. verbose , flags_verbose as usize ) ;
754
-
755
757
// Verbose flag is a good default for `rust.verbose-tests`.
756
758
config. verbose_tests = config. is_verbose ( ) ;
757
759
0 commit comments