Skip to content

Commit 32cf6e6

Browse files
committed
Ensure dist::Std for every libstd target. (Closes: #42320)
This fixes cross-compile installation. Half of the logic is actually in there already in install.rs:install_std but it fails with an error like: sh: 0: Can't open /<<BUILDDIR>>/rustc-1.21.0+dfsg1/build/tmp/dist/rust-std-1.21.0-powerpc64le-unknown-linux-gnu/install.sh because the target-arch dist tarball wasn't built as well.
1 parent 54bbd56 commit 32cf6e6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/bootstrap/install.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
2727
install_sh(builder, "docs", "rust-docs", stage, Some(host));
2828
}
2929

30-
pub fn install_std(builder: &Builder, stage: u32) {
31-
for target in &builder.build.targets {
32-
install_sh(builder, "std", "rust-std", stage, Some(*target));
33-
}
30+
pub fn install_std(builder: &Builder, stage: u32, target: Interned<String>) {
31+
install_sh(builder, "std", "rust-std", stage, Some(target));
3432
}
3533

3634
pub fn install_cargo(builder: &Builder, stage: u32, host: Interned<String>) {
@@ -175,11 +173,13 @@ install!((self, builder, _config),
175173
install_docs(builder, self.stage, self.target);
176174
};
177175
Std, "src/libstd", true, only_hosts: true, {
178-
builder.ensure(dist::Std {
179-
compiler: builder.compiler(self.stage, self.host),
180-
target: self.target
181-
});
182-
install_std(builder, self.stage);
176+
for target in &builder.build.targets {
177+
builder.ensure(dist::Std {
178+
compiler: builder.compiler(self.stage, self.host),
179+
target: *target
180+
});
181+
install_std(builder, self.stage, *target);
182+
}
183183
};
184184
Cargo, "cargo", _config.extended, only_hosts: true, {
185185
builder.ensure(dist::Cargo { stage: self.stage, target: self.target });

0 commit comments

Comments
 (0)