From be0d73afec845d938899bf153a092d675288c79a Mon Sep 17 00:00:00 2001 From: Zalathar Date: Wed, 25 Oct 2023 19:06:04 +1100 Subject: Don't provide `rust-demangler` to run-make tests The demangler was only needed by coverage tests, but those tests were migrated into their own custom test mode in #112300. This avoids having to build the demangler just for run-make tests. It will still be built as needed by run-coverage tests or for other purposes. --- src/bootstrap/src/core/build_steps/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 27eac212b14..f2284b8a4ba 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1567,7 +1567,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--coverage-dump-path").arg(coverage_dump); } - if mode == "run-make" || mode == "run-coverage" { + if mode == "run-coverage" { let rust_demangler = builder .ensure(tool::RustDemangler { compiler, -- cgit 1.4.1-3-g733a5 From 36c3f90173f404b84174a19ba76a33dbfd6ad985 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Wed, 25 Oct 2023 22:33:40 +1100 Subject: For run-coverage tests, build `rust-demangler` with the stage 0 compiler This avoids useless rebuilds of the demangler when modifying the compiler. --- src/bootstrap/src/core/build_steps/test.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/bootstrap') 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(), }) -- cgit 1.4.1-3-g733a5