Skip to content

Commit 6571968

Browse files
Correct code to not run host-only tests.
1 parent cec6816 commit 6571968

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/bootstrap/builder.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ impl StepDescription {
127127

128128
// Determine the targets participating in this rule.
129129
let targets = if self.only_hosts {
130-
// If --target was specified but --host wasn't specified, don't run
131-
// any host-only tests.
132-
if build.config.hosts.is_empty() && !build.config.targets.is_empty() {
130+
if build.config.run_host_only {
133131
&[]
134132
} else if self.only_build {
135133
build.build_triple()

src/bootstrap/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ pub struct Config {
5656
pub profiler: bool,
5757
pub ignore_git: bool,
5858

59+
pub run_host_only: bool,
60+
5961
pub on_fail: Option<String>,
6062
pub stage: Option<u32>,
6163
pub keep_stage: Option<u32>,
@@ -305,6 +307,9 @@ impl Config {
305307
config.incremental = flags.incremental;
306308
config.keep_stage = flags.keep_stage;
307309

310+
// If --target was specified but --host wasn't specified, don't run any host-only tests.
311+
config.run_host_only = flags.host.is_empty() && !flags.target.is_empty();
312+
308313
let toml = file.map(|file| {
309314
let mut f = t!(File::open(&file));
310315
let mut contents = String::new();
@@ -351,6 +356,7 @@ impl Config {
351356
config.targets
352357
};
353358

359+
354360
config.nodejs = build.nodejs.map(PathBuf::from);
355361
config.gdb = build.gdb.map(PathBuf::from);
356362
config.python = build.python.map(PathBuf::from);

0 commit comments

Comments
 (0)