Skip to content

Commit 74582ac

Browse files
committed
Auto merge of rust-lang#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)) ```
2 parents 7b5408d + 070bd64 commit 74582ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bootstrap/test.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,8 @@ impl Step for CrateLibrustc {
18921892

18931893
fn make_run(run: RunConfig<'_>) {
18941894
let builder = run.builder;
1895-
let compiler = builder.compiler(builder.top_stage, run.build_triple());
1895+
let host = run.build_triple();
1896+
let compiler = builder.compiler_for(builder.top_stage, host, host);
18961897
let krate = builder.crate_paths[&run.path];
18971898
let test_kind = builder.kind.into();
18981899

@@ -1929,7 +1930,8 @@ impl Step for Crate {
19291930

19301931
fn make_run(run: RunConfig<'_>) {
19311932
let builder = run.builder;
1932-
let compiler = builder.compiler(builder.top_stage, run.build_triple());
1933+
let host = run.build_triple();
1934+
let compiler = builder.compiler_for(builder.top_stage, host, host);
19331935
let test_kind = builder.kind.into();
19341936
let krate = builder.crate_paths[&run.path];
19351937

0 commit comments

Comments
 (0)