about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-04-13 13:29:00 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-04-13 13:29:00 +0000
commit4ece6d0e4427bc8691e135715867b4bd296a8e7b (patch)
treeb6201315ee86cb7f72b6cffbff97f426813f56d9
parent41866bf2f4a7ca12e095ce4782445fae67ad53a4 (diff)
downloadrust-4ece6d0e4427bc8691e135715867b4bd296a8e7b.tar.gz
rust-4ece6d0e4427bc8691e135715867b4bd296a8e7b.zip
Minor build perf optimization
-rw-r--r--build_system/tests.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/build_system/tests.rs b/build_system/tests.rs
index a9a192242cf..0ca8eedee33 100644
--- a/build_system/tests.rs
+++ b/build_system/tests.rs
@@ -2,7 +2,6 @@ use super::build_sysroot;
 use super::config;
 use super::path::{Dirs, RelPath};
 use super::prepare::GitRepo;
-use super::rustc_info::get_host_triple;
 use super::utils::{spawn_and_wait, spawn_and_wait_with_input, CargoProject, Compiler};
 use super::SysrootKind;
 use std::env;
@@ -230,8 +229,11 @@ pub(crate) fn run_tests(
             target_triple.clone(),
         );
 
-        let runner =
-            TestRunner::new(dirs.clone(), target_compiler, get_host_triple() == target_triple);
+        let runner = TestRunner::new(
+            dirs.clone(),
+            target_compiler,
+            bootstrap_host_compiler.triple == target_triple,
+        );
 
         BUILD_EXAMPLE_OUT_DIR.ensure_fresh(dirs);
         runner.run_testsuite(NO_SYSROOT_SUITE);
@@ -252,8 +254,11 @@ pub(crate) fn run_tests(
             target_triple.clone(),
         );
 
-        let runner =
-            TestRunner::new(dirs.clone(), target_compiler, get_host_triple() == target_triple);
+        let runner = TestRunner::new(
+            dirs.clone(),
+            target_compiler,
+            bootstrap_host_compiler.triple == target_triple,
+        );
 
         if run_base_sysroot {
             runner.run_testsuite(BASE_SYSROOT_SUITE);