about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-04-15 13:51:50 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-04-15 13:55:25 -0700
commit6ff8f4a34aef7fa94900743e233ec41845738fc0 (patch)
treedc83f81cc4c683ae274266c23124f3117c38d327 /src/bootstrap
parentccc7e95a964ece830caf66ad537e89ae6fb397a6 (diff)
downloadrust-6ff8f4a34aef7fa94900743e233ec41845738fc0.tar.gz
rust-6ff8f4a34aef7fa94900743e233ec41845738fc0.zip
rustbuild: Package librustc & co for cross-hosts
Currently the `rust-std` package produced by rustbuild only contains the
standard library plus libtest, but the makefiles actually produce a `rust-std`
package with all known target libraries (including libsyntax, librustc, etc).
Tweak the behavior so the dependencies of the `dist-docs` step in rustbuild
depend on the compiler libraries as well (so that they're all packaged).

Closes #32984
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/build/step.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bootstrap/build/step.rs b/src/bootstrap/build/step.rs
index 07cfb96c30d..48afa9fdcad 100644
--- a/src/bootstrap/build/step.rs
+++ b/src/bootstrap/build/step.rs
@@ -343,7 +343,14 @@ impl<'a> Step<'a> {
                 vec![self.rustc(stage)]
             }
             Source::DistStd { compiler } => {
-                vec![self.libtest(compiler)]
+                // We want to package up as many target libraries as possible
+                // for the `rust-std` package, so if this is a host target we
+                // depend on librustc and otherwise we just depend on libtest.
+                if build.config.host.iter().any(|t| t == self.target) {
+                    vec![self.librustc(compiler)]
+                } else {
+                    vec![self.libtest(compiler)]
+                }
             }
 
             Source::Dist { stage } => {