File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,16 @@ fn main() {
8282 // avoid. rustc-perf can accept the higher cost of always verifying hashes,
8383 // and we currently prefer to avoid exposing a means of hard-disabling
8484 // verification.
85- args. push ( OsString :: from ( "-Zincremental-verify-ich" ) ) ;
85+ //
86+ // Only pass this for incremental compiles. For non-incremental compiles
87+ // the flag only triggers a costly query key verification sweep.
88+ let is_incremental = args. iter ( ) . any ( |arg| {
89+ arg. to_str ( )
90+ . is_some_and ( |a| a. starts_with ( "incremental=" ) || a. starts_with ( "-Cincremental=" ) )
91+ } ) ;
92+ if is_incremental {
93+ args. push ( OsString :: from ( "-Zincremental-verify-ich" ) ) ;
94+ }
8695
8796 if let Some ( pos) = args. iter ( ) . position ( |arg| arg == "--wrap-rustc-with" ) {
8897 // Strip out the flag and its argument, and run rustc under the wrapper
You can’t perform that action at this time.
0 commit comments