rustbuild: fix host-only rules ignoring targets in dist steps
`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.
This commit is contained in:
parent
3991046d52
commit
cf89453506
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user