Skip to content

Commit

Permalink
Rollup merge of rust-lang#72172 - Mark-Simulacrum:check-no-stage, r=a…
Browse files Browse the repository at this point in the history
…lexcrichton

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 rust-lang#69337

r? @alexcrichton
  • Loading branch information
Dylan-DPC authored May 14, 2020
2 parents 1c7eda3 + 2b42a2b commit dea22ed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,20 @@ Arguments:
}
};

if let Subcommand::Check { .. } = &cmd {
if matches.opt_str("stage").is_some() {
println!("{}", "--stage not supported for x.py check, always treated as stage 0");
process::exit(1);
}
if matches.opt_str("keep-stage").is_some() {
println!(
"{}",
"--keep-stage not supported for x.py check, only one stage available"
);
process::exit(1);
}
}

Flags {
verbose: matches.opt_count("verbose"),
stage: matches.opt_str("stage").map(|j| j.parse().expect("`stage` should be a number")),
Expand Down

0 comments on commit dea22ed

Please sign in to comment.