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.
This commit is contained in:
Joshua Nelson
2022-04-12 22:26:49 -05:00
parent 52ca603da7
commit 070bd64433
+4 -2
View File
@@ -1899,7 +1899,8 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
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();
@@ -1936,7 +1937,8 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
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];