File tree Expand file tree Collapse file tree
src/bootstrap/src/core/builder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1252,23 +1252,15 @@ impl Builder<'_> {
12521252 // when compiling the standard library, since this might be linked into the final outputs
12531253 // produced by rustc. Since this mitigation is only available on Windows, only enable it
12541254 // for the standard library in case the compiler is run on a non-Windows platform.
1255- // This is not needed for stage 0 artifacts because these will only be used for building
1256- // the stage 1 compiler.
1257- if cfg ! ( windows)
1258- && mode == Mode :: Std
1259- && self . config . control_flow_guard
1260- && compiler. stage >= 1
1261- {
1255+ if cfg ! ( windows) && mode == Mode :: Std && self . config . control_flow_guard {
12621256 rustflags. arg ( "-Ccontrol-flow-guard" ) ;
12631257 }
12641258
12651259 // If EHCont Guard is enabled, pass the `-Zehcont-guard` flag to rustc when compiling the
12661260 // standard library, since this might be linked into the final outputs produced by rustc.
12671261 // Since this mitigation is only available on Windows, only enable it for the standard
12681262 // library in case the compiler is run on a non-Windows platform.
1269- // This is not needed for stage 0 artifacts because these will only be used for building
1270- // the stage 1 compiler.
1271- if cfg ! ( windows) && mode == Mode :: Std && self . config . ehcont_guard && compiler. stage >= 1 {
1263+ if cfg ! ( windows) && mode == Mode :: Std && self . config . ehcont_guard {
12721264 rustflags. arg ( "-Zehcont-guard" ) ;
12731265 }
12741266
You can’t perform that action at this time.
0 commit comments