Skip to content

Commit

Permalink
rustbuild: fix host-only rules ignoring targets in dist steps
Browse files Browse the repository at this point in the history
`arr` is the actual list of targets participating in steps construction,
but due to #38468 the hosts array now consists of only the build triple
for the `dist` steps, hence all non-build-triple targets are lost for
the host-only rules.

Fix this by using the original non-shadowed hosts array in `arr`
calculation. This should unbreak the nightly packaging process.

Fixes #38637.
  • Loading branch information
xen0n committed Dec 28, 2016
1 parent 3991046 commit cf89453
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/bootstrap/step.rs
Expand Up @@ -839,14 +839,20 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
&self.build.config.target
};
// Determine the actual targets participating in this rule.
// NOTE: We should keep the full projection from build triple to
// the hosts for the dist steps, now that the hosts array above is
// truncated to avoid duplication of work in that case. Therefore
// the original non-shadowed hosts array is used below.
let arr = if rule.host {
// If --target was specified but --host wasn't specified,
// don't run any host-only tests
if self.build.flags.target.len() > 0 &&
self.build.flags.host.len() == 0 {
// don't run any host-only tests. Also, respect any `--host`
// overrides as done for `hosts`.
if self.build.flags.host.len() > 0 {
&self.build.flags.host[..]
} else if self.build.flags.target.len() > 0 {
&[]
} else {
hosts
&self.build.config.host[..]
}
} else {
targets
Expand Down

0 comments on commit cf89453

Please sign in to comment.