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 @@ -1204,19 +1204,20 @@ impl Build {
1204
1204
///
1205
1205
/// When all of these conditions are met the build will lift artifacts from
1206
1206
/// 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 {
1208
1208
!self . config . full_bootstrap
1209
- && compiler. stage >= 2
1209
+ && !self . config . download_rustc ( )
1210
+ && stage >= 2
1210
1211
&& ( self . hosts . iter ( ) . any ( |h| * h == target) || target == self . build )
1211
1212
}
1212
1213
1213
1214
/// Checks whether the `compiler` compiling for `target` should be forced to
1214
1215
/// use a stage2 compiler instead.
1215
1216
///
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
1220
1221
}
1221
1222
1222
1223
/// 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