diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index d469f7c1722a5..db2c6dfeb9f74 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 3ec1c205dc002..aa688fc66e267 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, pub stage: Option, pub keep_stage: Option, @@ -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);