about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-07-13 20:18:24 -0700
committerGitHub <noreply@github.com>2024-07-13 20:18:24 -0700
commit9201f183105e9d8c03afef67d89c641cc32dac88 (patch)
treedcd5a7e4ac0f0595c40444c77a66aadd851674ef
parent285d45d299e82406a94b0a26d3eaf3e6c3958d40 (diff)
parent41070bd9381bc0604171eba9308869eecd94b20b (diff)
downloadrust-9201f183105e9d8c03afef67d89c641cc32dac88.tar.gz
rust-9201f183105e9d8c03afef67d89c641cc32dac88.zip
Rollup merge of #127677 - onur-ozkan:use-correct-modes, r=Kobzol
using correct tool mode for `run-make-support` crate

We don't need to ensure std (and rustc) for testing run-make-support's unit tests. Using stage 0 compiler is already enough and speeds up `x test run-make-support` invocations on a clean build.
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 9b4c7c91349..876ee8be151 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -682,6 +682,8 @@ impl Step for CompiletestTest {
         let mut cargo = tool::prepare_tool_cargo(
             builder,
             compiler,
+            // compiletest uses libtest internals; make it use the in-tree std to make sure it never breaks
+            // when std sources change.
             Mode::ToolStd,
             host,
             "test",
@@ -1321,13 +1323,12 @@ impl Step for CrateRunMakeSupport {
     /// Runs `cargo test` for run-make-support.
     fn run(self, builder: &Builder<'_>) {
         let host = self.host;
-        let compiler = builder.compiler(builder.top_stage, host);
+        let compiler = builder.compiler(0, host);
 
-        builder.ensure(compile::Std::new(compiler, host));
         let mut cargo = tool::prepare_tool_cargo(
             builder,
             compiler,
-            Mode::ToolStd,
+            Mode::ToolBootstrap,
             host,
             "test",
             "src/tools/run-make-support",