about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-05 19:43:49 +0200
committerGitHub <noreply@github.com>2024-09-05 19:43:49 +0200
commit57d85fa0cb467bca705467d7c82fc1bbc6192f14 (patch)
tree8decfae8169463933b42f6477f32c424c72124d1
parent95c580d653d11fbce6193ad8fc1b6891fb17fe21 (diff)
parent9cb6d12f00426dd6fe1f32575a58fc6ef071b680 (diff)
downloadrust-57d85fa0cb467bca705467d7c82fc1bbc6192f14.tar.gz
rust-57d85fa0cb467bca705467d7c82fc1bbc6192f14.zip
Rollup merge of #129943 - onur-ozkan:test-float-parse-compiler, r=Kobzol
use the bootstrapped compiler for `test-float-parse` test

Fixes https://github.com/rust-lang/rust/pull/122709#issuecomment-2327259336.

Blocker for https://github.com/rust-lang/rust/pull/122709
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index a8e12540473..2d68ccd631b 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -3529,11 +3529,13 @@ impl Step for TestFloatParse {
 
     fn run(self, builder: &Builder<'_>) {
         let bootstrap_host = builder.config.build;
-        let compiler = builder.compiler(0, bootstrap_host);
+        let compiler = builder.compiler(builder.top_stage, bootstrap_host);
         let path = self.path.to_str().unwrap();
         let crate_name = self.path.components().last().unwrap().as_os_str().to_str().unwrap();
 
-        builder.ensure(compile::Std::new(compiler, self.host));
+        if !builder.download_rustc() {
+            builder.ensure(compile::Std::new(compiler, self.host));
+        }
 
         // Run any unit tests in the crate
         let cargo_test = tool::prepare_tool_cargo(