about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-10-25 22:33:40 +1100
committerZalathar <Zalathar@users.noreply.github.com>2023-10-27 17:18:47 +1100
commit36c3f90173f404b84174a19ba76a33dbfd6ad985 (patch)
treed023cc1dfb8cd780c195b69d8b30c2cd6503a226
parentbe0d73afec845d938899bf153a092d675288c79a (diff)
downloadrust-36c3f90173f404b84174a19ba76a33dbfd6ad985.tar.gz
rust-36c3f90173f404b84174a19ba76a33dbfd6ad985.zip
For run-coverage tests, build `rust-demangler` with the stage 0 compiler
This avoids useless rebuilds of the demangler when modifying the compiler.
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index f2284b8a4ba..0668d07ed06 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -1568,9 +1568,11 @@ note: if you're sure you want to do this, please open an issue as to why. In the
         }
 
         if mode == "run-coverage" {
+            // The demangler doesn't need the current compiler, so we can avoid
+            // unnecessary rebuilds by using the bootstrap compiler instead.
             let rust_demangler = builder
                 .ensure(tool::RustDemangler {
-                    compiler,
+                    compiler: compiler.with_stage(0),
                     target: compiler.host,
                     extra_features: Vec::new(),
                 })