File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -975,9 +975,9 @@ impl<'a> Builder<'a> {
975
975
self . ensure ( compile:: Assemble { target_compiler : Compiler { stage, host } } )
976
976
}
977
977
978
- /// Similar to `compiler`, except handles the full-bootstrap option to
978
+ /// Similar to `compiler`, except handles the full-bootstrap option to
979
979
/// silently use the stage1 compiler instead of a stage2 compiler if one is
980
- /// requested.
980
+ /// requested. This behaviour is ignored if `--stage` is explicitly set.
981
981
///
982
982
/// Note that this does *not* have the side effect of creating
983
983
/// `compiler(stage, host)`, unlike `compiler` above which does have such
@@ -992,7 +992,9 @@ impl<'a> Builder<'a> {
992
992
host : TargetSelection ,
993
993
target : TargetSelection ,
994
994
) -> Compiler {
995
- if self . build . force_use_stage2 ( stage) {
995
+ if self . config . explicit_stage {
996
+ self . compiler ( stage, host)
997
+ } else if self . build . force_use_stage2 ( stage) {
996
998
self . compiler ( 2 , self . config . build )
997
999
} else if self . build . force_use_stage1 ( stage, target) {
998
1000
self . compiler ( 1 , self . config . build )
Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ pub struct Config {
184
184
185
185
pub on_fail : Option < String > ,
186
186
pub stage : u32 ,
187
+ /// Indicates whether `--stage` was explicitly used or not.
188
+ pub explicit_stage : bool ,
187
189
pub keep_stage : Vec < u32 > ,
188
190
pub keep_stage_std : Vec < u32 > ,
189
191
pub src : PathBuf ,
@@ -1216,6 +1218,7 @@ impl Config {
1216
1218
config. incremental = flags. incremental ;
1217
1219
config. dry_run = if flags. dry_run { DryRun :: UserSelected } else { DryRun :: Disabled } ;
1218
1220
config. dump_bootstrap_shims = flags. dump_bootstrap_shims ;
1221
+ config. explicit_stage = flags. stage . is_some ( ) ;
1219
1222
config. keep_stage = flags. keep_stage ;
1220
1223
config. keep_stage_std = flags. keep_stage_std ;
1221
1224
config. color = flags. color ;
You can’t perform that action at this time.
0 commit comments