File tree 2 files changed +9
-8
lines changed
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> {
919
919
host : TargetSelection ,
920
920
target : TargetSelection ,
921
921
) -> Compiler {
922
- if self . build . force_use_stage2 ( ) {
922
+ if self . build . force_use_stage2 ( stage ) {
923
923
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) {
925
925
self . compiler ( 1 , self . config . build )
926
926
} else {
927
927
self . compiler ( stage, host)
Original file line number Diff line number Diff line change @@ -1198,19 +1198,20 @@ impl Build {
1198
1198
///
1199
1199
/// When all of these conditions are met the build will lift artifacts from
1200
1200
/// the previous stage forward.
1201
- fn force_use_stage1 ( & self , compiler : Compiler , target : TargetSelection ) -> bool {
1201
+ fn force_use_stage1 ( & self , stage : u32 , target : TargetSelection ) -> bool {
1202
1202
!self . config . full_bootstrap
1203
- && compiler. stage >= 2
1203
+ && !self . config . download_rustc ( )
1204
+ && stage >= 2
1204
1205
&& ( self . hosts . iter ( ) . any ( |h| * h == target) || target == self . build )
1205
1206
}
1206
1207
1207
1208
/// Checks whether the `compiler` compiling for `target` should be forced to
1208
1209
/// use a stage2 compiler instead.
1209
1210
///
1210
- /// When we download the pre-compiled version of rustc it should be forced to
1211
- /// use a stage2 compiler.
1212
- fn force_use_stage2 ( & self ) -> bool {
1213
- self . config . download_rustc ( )
1211
+ /// When we download the pre-compiled version of rustc and compiler stage is >= 2,
1212
+ /// it should be forced to use a stage2 compiler.
1213
+ fn force_use_stage2 ( & self , stage : u32 ) -> bool {
1214
+ self . config . download_rustc ( ) && stage >= 2
1214
1215
}
1215
1216
1216
1217
/// 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