about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/builder.rs4
-rw-r--r--src/bootstrap/config.rs6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index d469f7c1722..db2c6dfeb9f 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -127,9 +127,7 @@ impl StepDescription {
 
         // Determine the targets participating in this rule.
         let targets = if self.only_hosts {
-            // If --target was specified but --host wasn't specified, don't run
-            // any host-only tests.
-            if build.config.hosts.is_empty() && !build.config.targets.is_empty() {
+            if build.config.run_host_only {
                 &[]
             } else if self.only_build {
                 build.build_triple()
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 3ec1c205dc0..aa688fc66e2 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -56,6 +56,8 @@ pub struct Config {
     pub profiler: bool,
     pub ignore_git: bool,
 
+    pub run_host_only: bool,
+
     pub on_fail: Option<String>,
     pub stage: Option<u32>,
     pub keep_stage: Option<u32>,
@@ -305,6 +307,9 @@ impl Config {
         config.incremental = flags.incremental;
         config.keep_stage = flags.keep_stage;
 
+        // If --target was specified but --host wasn't specified, don't run any host-only tests.
+        config.run_host_only = flags.host.is_empty() && !flags.target.is_empty();
+
         let toml = file.map(|file| {
             let mut f = t!(File::open(&file));
             let mut contents = String::new();
@@ -351,6 +356,7 @@ impl Config {
             config.targets
         };
 
+
         config.nodejs = build.nodejs.map(PathBuf::from);
         config.gdb = build.gdb.map(PathBuf::from);
         config.python = build.python.map(PathBuf::from);