File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ impl Build {
521
521
. env ( format ! ( "CFLAGS_{}" , target) , self . cflags ( target) . join ( " " ) ) ;
522
522
}
523
523
524
- if self . config . channel == "nightly" && compiler. stage == 2 {
524
+ if self . config . channel == "nightly" && compiler. is_final_stage ( self ) {
525
525
cargo. env ( "RUSTC_SAVE_ANALYSIS" , "api" . to_string ( ) ) ;
526
526
}
527
527
@@ -922,4 +922,13 @@ impl<'a> Compiler<'a> {
922
922
fn is_snapshot ( & self , build : & Build ) -> bool {
923
923
self . stage == 0 && self . host == build. config . build
924
924
}
925
+
926
+ /// Returns if this compiler should be treated as a final stage one in the
927
+ /// current build session.
928
+ /// This takes into account whether we're performing a full bootstrap or
929
+ /// not; don't directly compare the stage with `2`!
930
+ fn is_final_stage ( & self , build : & Build ) -> bool {
931
+ let final_stage = if build. config . full_bootstrap { 2 } else { 1 } ;
932
+ self . stage >= final_stage
933
+ }
925
934
}
You can’t perform that action at this time.
0 commit comments