Skip to content

Commit 070bd64

Browse files
committed
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.
1 parent 52ca603 commit 070bd64

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
@@ -1899,7 +1899,8 @@ impl Step for CrateLibrustc {
18991899

19001900
fn make_run(run: RunConfig<'_>) {
19011901
let builder = run.builder;
1902-
let compiler = builder.compiler(builder.top_stage, run.build_triple());
1902+
let host = run.build_triple();
1903+
let compiler = builder.compiler_for(builder.top_stage, host, host);
19031904
let krate = builder.crate_paths[&run.path];
19041905
let test_kind = builder.kind.into();
19051906

@@ -1936,7 +1937,8 @@ impl Step for Crate {
19361937

19371938
fn make_run(run: RunConfig<'_>) {
19381939
let builder = run.builder;
1939-
let compiler = builder.compiler(builder.top_stage, run.build_triple());
1940+
let host = run.build_triple();
1941+
let compiler = builder.compiler_for(builder.top_stage, host, host);
19401942
let test_kind = builder.kind.into();
19411943
let krate = builder.crate_paths[&run.path];
19421944

0 commit comments

Comments
 (0)