about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-18 04:15:26 +0000
committerbors <bors@rust-lang.org>2022-04-18 04:15:26 +0000
commit74582acd3b49c0f44d53cfafa20d26595a1ae278 (patch)
tree636e32fe85f56e47c54214ac875a7d3061616e14 /src
parent7b5408d3fbfc4bcb7c5b2b2f08369156406dc03b (diff)
parent070bd644339ad11d687211c6294c12dff9a26e99 (diff)
downloadrust-74582acd3b49c0f44d53cfafa20d26595a1ae278.tar.gz
rust-74582acd3b49c0f44d53cfafa20d26595a1ae278.zip
Auto merge of #96000 - jyn514:faster-doctests, r=Mark-Simulacrum
Make `x test --stage 2 compiler/rustc_XXX` faster to run

Previously, bootstrap unconditionally rebuilt the stage 2 compiler,
even if it had previously built stage 1. This changes it to reuse stage 1 if possible.
In particular, it no longer runs the following step:
```
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) -> x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu))
```
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/test.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index f60766bde72..39bcf4e8516 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1892,7 +1892,8 @@ impl Step for CrateLibrustc {
 
     fn make_run(run: RunConfig<'_>) {
         let builder = run.builder;
-        let compiler = builder.compiler(builder.top_stage, run.build_triple());
+        let host = run.build_triple();
+        let compiler = builder.compiler_for(builder.top_stage, host, host);
         let krate = builder.crate_paths[&run.path];
         let test_kind = builder.kind.into();
 
@@ -1929,7 +1930,8 @@ impl Step for Crate {
 
     fn make_run(run: RunConfig<'_>) {
         let builder = run.builder;
-        let compiler = builder.compiler(builder.top_stage, run.build_triple());
+        let host = run.build_triple();
+        let compiler = builder.compiler_for(builder.top_stage, host, host);
         let test_kind = builder.kind.into();
         let krate = builder.crate_paths[&run.path];