about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-01-15 22:41:39 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2021-01-16 10:07:09 -0500
commit53989e449d540ea0fbf9468bb133502835e07125 (patch)
tree22d6eac6038303df5e1a9ccc8f6831a728a11fe2 /src/bootstrap
parentc17ed34da1b3298ec428aa9655fd5a0e18ecbaf8 (diff)
downloadrust-53989e449d540ea0fbf9468bb133502835e07125.tar.gz
rust-53989e449d540ea0fbf9468bb133502835e07125.zip
Allow configuring the default stage for `x.py check`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/config.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index f4d89a89c14..8072df795ca 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -377,6 +377,7 @@ struct Build {
     configure_args: Option<Vec<String>>,
     local_rebuild: Option<bool>,
     print_step_timings: Option<bool>,
+    check_stage: Option<u32>,
     doc_stage: Option<u32>,
     build_stage: Option<u32>,
     test_stage: Option<u32>,
@@ -676,6 +677,7 @@ impl Config {
 
         // See https://github.com/rust-lang/compiler-team/issues/326
         config.stage = match config.cmd {
+            Subcommand::Check { .. } => flags.stage.or(build.check_stage).unwrap_or(0),
             Subcommand::Doc { .. } => flags.stage.or(build.doc_stage).unwrap_or(0),
             Subcommand::Build { .. } => flags.stage.or(build.build_stage).unwrap_or(1),
             Subcommand::Test { .. } => flags.stage.or(build.test_stage).unwrap_or(1),
@@ -685,7 +687,6 @@ impl Config {
             // These are all bootstrap tools, which don't depend on the compiler.
             // The stage we pass shouldn't matter, but use 0 just in case.
             Subcommand::Clean { .. }
-            | Subcommand::Check { .. }
             | Subcommand::Clippy { .. }
             | Subcommand::Fix { .. }
             | Subcommand::Run { .. }