about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-09-03 22:54:32 +0300
committeronur-ozkan <work@onurozkan.dev>2024-09-04 10:33:09 +0300
commit9cb6d12f00426dd6fe1f32575a58fc6ef071b680 (patch)
treec6b9c0f8642e9c34f7cd72dc1b29a1f1e0afe4bc
parentd6c8169c186ab16a3404cd0d0866674018e8a19e (diff)
downloadrust-9cb6d12f00426dd6fe1f32575a58fc6ef071b680.tar.gz
rust-9cb6d12f00426dd6fe1f32575a58fc6ef071b680.zip
use the bootstrapped compiler for `test-float-parse` test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-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 84a6b26a491..0858edc690b 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -3526,11 +3526,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(