File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -919,9 +919,9 @@ impl<'a> Builder<'a> {
919919 host : TargetSelection ,
920920 target : TargetSelection ,
921921 ) -> Compiler {
922- if self . build . force_use_stage2 ( ) {
922+ if self . build . force_use_stage2 ( stage ) {
923923 self . compiler ( 2 , self . config . build )
924- } else if self . build . force_use_stage1 ( Compiler { stage, host } , target) {
924+ } else if self . build . force_use_stage1 ( stage, target) {
925925 self . compiler ( 1 , self . config . build )
926926 } else {
927927 self . compiler ( stage, host)
Original file line number Diff line number Diff line change @@ -1204,19 +1204,20 @@ impl Build {
12041204 ///
12051205 /// When all of these conditions are met the build will lift artifacts from
12061206 /// the previous stage forward.
1207- fn force_use_stage1 ( & self , compiler : Compiler , target : TargetSelection ) -> bool {
1207+ fn force_use_stage1 ( & self , stage : u32 , target : TargetSelection ) -> bool {
12081208 !self . config . full_bootstrap
1209- && compiler. stage >= 2
1209+ && !self . config . download_rustc ( )
1210+ && stage >= 2
12101211 && ( self . hosts . iter ( ) . any ( |h| * h == target) || target == self . build )
12111212 }
12121213
12131214 /// Checks whether the `compiler` compiling for `target` should be forced to
12141215 /// use a stage2 compiler instead.
12151216 ///
1216- /// When we download the pre-compiled version of rustc it should be forced to
1217- /// use a stage2 compiler.
1218- fn force_use_stage2 ( & self ) -> bool {
1219- self . config . download_rustc ( )
1217+ /// When we download the pre-compiled version of rustc and compiler stage is >= 2,
1218+ /// it should be forced to use a stage2 compiler.
1219+ fn force_use_stage2 ( & self , stage : u32 ) -> bool {
1220+ self . config . download_rustc ( ) && stage >= 2
12201221 }
12211222
12221223 /// Given `num` in the form "a.b.c" return a "release string" which
You can’t perform that action at this time.
0 commit comments