Skip to content

Commit

Permalink
rustbuild: only plan from build triple for dist
Browse files Browse the repository at this point in the history
We only want to package each host/target once for `dist`. The obvious
solution takes the form of step dependency, which is implemented at
least for the `dist-rustc` step. Unfortunately since the steps are
created from `hosts x targets` during planning and *not* de-duplicated
afterwards, the problem still persists.

We therefore move the check inside `plan()` instead, to avoid creating
the duplicate steps in the first place.
  • Loading branch information
xen0n committed Dec 20, 2016
1 parent 0102127 commit 46d74ea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/bootstrap/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,16 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
let hosts = if self.build.flags.host.len() > 0 {
&self.build.flags.host
} else {
&self.build.config.host
if kind == Kind::Dist {
// For 'dist' steps we only distribute artifacts built from
// the build platform, so only consider that in the hosts
// array.
// NOTE: This relies on the fact that the build triple is
// always placed first, as done in `config.rs`.
&self.build.config.host[..1]
} else {
&self.build.config.host
}
};
let targets = if self.build.flags.target.len() > 0 {
&self.build.flags.target
Expand Down

0 comments on commit 46d74ea

Please sign in to comment.