about summary refs log tree commit diff
diff options
context:
space:
mode:
authorXimin Luo <infinity0@pwned.gg>2017-11-06 11:34:18 +0100
committerXimin Luo <infinity0@pwned.gg>2017-11-06 11:38:27 +0100
commit32cf6e64c1c0437521fa13faff6359e435e490ef (patch)
tree3f4e348ff9766c78f295bef4361b4652299c4188
parent54bbd567153463ce81d3ff7f0ca980a7f73cd3af (diff)
downloadrust-32cf6e64c1c0437521fa13faff6359e435e490ef.tar.gz
rust-32cf6e64c1c0437521fa13faff6359e435e490ef.zip
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.
-rw-r--r--src/bootstrap/install.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index 608924c9c28..5ca9cb5e521 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -27,10 +27,8 @@ pub fn install_docs(builder: &Builder, stage: u32, host: Interned<String>) {
     install_sh(builder, "docs", "rust-docs", stage, Some(host));
 }
 
-pub fn install_std(builder: &Builder, stage: u32) {
-    for target in &builder.build.targets {
-        install_sh(builder, "std", "rust-std", stage, Some(*target));
-    }
+pub fn install_std(builder: &Builder, stage: u32, target: Interned<String>) {
+    install_sh(builder, "std", "rust-std", stage, Some(target));
 }
 
 pub fn install_cargo(builder: &Builder, stage: u32, host: Interned<String>) {
@@ -175,11 +173,13 @@ install!((self, builder, _config),
         install_docs(builder, self.stage, self.target);
     };
     Std, "src/libstd", true, only_hosts: true, {
-        builder.ensure(dist::Std {
-            compiler: builder.compiler(self.stage, self.host),
-            target: self.target
-        });
-        install_std(builder, self.stage);
+        for target in &builder.build.targets {
+            builder.ensure(dist::Std {
+                compiler: builder.compiler(self.stage, self.host),
+                target: *target
+            });
+            install_std(builder, self.stage, *target);
+        }
     };
     Cargo, "cargo", _config.extended, only_hosts: true, {
         builder.ensure(dist::Cargo { stage: self.stage, target: self.target });