]> git.lizzy.rs Git - rust.git/commitdiff
rustbuild: Package librustc & co for cross-hosts
authorAlex Crichton <alex@alexcrichton.com>
Fri, 15 Apr 2016 20:51:50 +0000 (13:51 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 15 Apr 2016 20:55:25 +0000 (13:55 -0700)
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

src/bootstrap/build/step.rs

index 07cfb96c30d5769bbd0707cca15943a45cb87d0c..48afa9fdcad4893280aa877f9fd995eefe0f89d8 100644 (file)
@@ -343,7 +343,14 @@ pub fn deps(&self, build: &'a Build) -> Vec<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 } => {