Skip to content

Commit 7709688

Browse files
authored
Rollup merge of #72172 - Mark-Simulacrum:check-no-stage, r=alexcrichton
Forbid stage arguments to check Users generally expect that check builds are fast, and that's only true in stage 0 (stages beyond that need us to build a compiler, which is slow). Closes #69337 r? @alexcrichton
2 parents 24cd427 + 2b42a2b commit 7709688

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/bootstrap/flags.rs

+14
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,20 @@ Arguments:
503503
}
504504
};
505505

506+
if let Subcommand::Check { .. } = &cmd {
507+
if matches.opt_str("stage").is_some() {
508+
println!("{}", "--stage not supported for x.py check, always treated as stage 0");
509+
process::exit(1);
510+
}
511+
if matches.opt_str("keep-stage").is_some() {
512+
println!(
513+
"{}",
514+
"--keep-stage not supported for x.py check, only one stage available"
515+
);
516+
process::exit(1);
517+
}
518+
}
519+
506520
Flags {
507521
verbose: matches.opt_count("verbose"),
508522
stage: matches.opt_str("stage").map(|j| j.parse().expect("`stage` should be a number")),

0 commit comments

Comments
 (0)