Skip to content

Commit c6eb61a

Browse files
committed
Auto merge of #117197 - Zalathar:demangler, r=onur-ozkan
Avoid unnecessary builds/rebuilds of `rust-demangler` This is a combination of two loosely-related changes: - Don't build `rust-demangler` as a dependency of `tests/run-make`, because after #112300 none of the remaining run-make tests actually use it. (If future run-make tests ever do need the demangler, it'll be easy to add it back.) - For `tests/run-coverage`, build the demangler with the stage 0 compiler instead of the current-stage compiler. This avoids having to uselessly rebuild the demangler after modifying and rebuilding the compiler itself.
2 parents 6f349cd + 36c3f90 commit c6eb61a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/bootstrap/src/core/build_steps/test.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1567,10 +1567,12 @@ note: if you're sure you want to do this, please open an issue as to why. In the
15671567
cmd.arg("--coverage-dump-path").arg(coverage_dump);
15681568
}
15691569

1570-
if mode == "run-make" || mode == "run-coverage" {
1570+
if mode == "run-coverage" {
1571+
// The demangler doesn't need the current compiler, so we can avoid
1572+
// unnecessary rebuilds by using the bootstrap compiler instead.
15711573
let rust_demangler = builder
15721574
.ensure(tool::RustDemangler {
1573-
compiler,
1575+
compiler: compiler.with_stage(0),
15741576
target: compiler.host,
15751577
extra_features: Vec::new(),
15761578
})

src/tools/compiletest/src/runtest.rs

-4
Original file line numberDiff line numberDiff line change
@@ -3546,10 +3546,6 @@ impl<'test> TestCx<'test> {
35463546
cmd.env("RUSTDOC", cwd.join(rustdoc));
35473547
}
35483548

3549-
if let Some(ref rust_demangler) = self.config.rust_demangler_path {
3550-
cmd.env("RUST_DEMANGLER", cwd.join(rust_demangler));
3551-
}
3552-
35533549
if let Some(ref node) = self.config.nodejs {
35543550
cmd.env("NODE", node);
35553551
}

0 commit comments

Comments
 (0)