File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -977,7 +977,7 @@ impl<'a> Builder<'a> {
977977
978978 /// Similar to `compiler`, except handles the full-bootstrap option to
979979 /// 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.
981981 ///
982982 /// Note that this does *not* have the side effect of creating
983983 /// `compiler(stage, host)`, unlike `compiler` above which does have such
@@ -992,7 +992,9 @@ impl<'a> Builder<'a> {
992992 host : TargetSelection ,
993993 target : TargetSelection ,
994994 ) -> 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) {
996998 self . compiler ( 2 , self . config . build )
997999 } else if self . build . force_use_stage1 ( stage, target) {
9981000 self . compiler ( 1 , self . config . build )
Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ pub struct Config {
184184
185185 pub on_fail : Option < String > ,
186186 pub stage : u32 ,
187+ /// Indicates whether `--stage` was explicitly used or not.
188+ pub explicit_stage : bool ,
187189 pub keep_stage : Vec < u32 > ,
188190 pub keep_stage_std : Vec < u32 > ,
189191 pub src : PathBuf ,
@@ -1216,6 +1218,7 @@ impl Config {
12161218 config. incremental = flags. incremental ;
12171219 config. dry_run = if flags. dry_run { DryRun :: UserSelected } else { DryRun :: Disabled } ;
12181220 config. dump_bootstrap_shims = flags. dump_bootstrap_shims ;
1221+ config. explicit_stage = flags. stage . is_some ( ) ;
12191222 config. keep_stage = flags. keep_stage ;
12201223 config. keep_stage_std = flags. keep_stage_std ;
12211224 config. color = flags. color ;
You can’t perform that action at this time.
0 commit comments