about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-15 01:57:19 +0200
committerGitHub <noreply@github.com>2020-05-15 01:57:19 +0200
commit77096880df3ac6f32d554e0eacea14967c1aeae0 (patch)
tree08a5f56fa24412acce2598ea08fcaa8e22784a90
parent24cd42781fdf65dcd28e12b48d0ad9895dc29d0d (diff)
parent2b42a2b541e04164428e83a4adfc4c120a482f82 (diff)
downloadrust-77096880df3ac6f32d554e0eacea14967c1aeae0.tar.gz
rust-77096880df3ac6f32d554e0eacea14967c1aeae0.zip
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
-rw-r--r--src/bootstrap/flags.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
index fb380af0a47..646b9e05d99 100644
--- a/src/bootstrap/flags.rs
+++ b/src/bootstrap/flags.rs
@@ -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")),