Skip to content

Commit 6ff8f4a

Browse files
committed
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
1 parent ccc7e95 commit 6ff8f4a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bootstrap/build/step.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,14 @@ impl<'a> Step<'a> {
343343
vec![self.rustc(stage)]
344344
}
345345
Source::DistStd { compiler } => {
346-
vec![self.libtest(compiler)]
346+
// We want to package up as many target libraries as possible
347+
// for the `rust-std` package, so if this is a host target we
348+
// depend on librustc and otherwise we just depend on libtest.
349+
if build.config.host.iter().any(|t| t == self.target) {
350+
vec![self.librustc(compiler)]
351+
} else {
352+
vec![self.libtest(compiler)]
353+
}
347354
}
348355

349356
Source::Dist { stage } => {

0 commit comments

Comments
 (0)