about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-08-10 21:17:42 +0500
committerMark Simulacrum <mark.simulacrum@gmail.com>2017-08-13 05:15:43 +0500
commit657196830fd7fdc03eab87b8afa21601faf07975 (patch)
tree183c45842b9a67864a2aede2ebe3ae39d14487eb /src/bootstrap
parentcec68167fd3787500194f261e2fcbb14381cd317 (diff)
downloadrust-657196830fd7fdc03eab87b8afa21601faf07975.tar.gz
rust-657196830fd7fdc03eab87b8afa21601faf07975.zip
Correct code to not run host-only tests.
Diffstat (limited to 'src/bootstrap')
-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);