Skip to content

Commit 8e38b2d

Browse files
committed
rustbuild: package src only once for build triple
1 parent 46d74ea commit 8e38b2d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/bootstrap/dist.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,14 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
346346
}
347347

348348
/// Creates the `rust-src` installer component and the plain source tarball
349-
pub fn rust_src(build: &Build) {
349+
pub fn rust_src(build: &Build, host: &str) {
350350
println!("Dist src");
351+
352+
if host != build.config.build {
353+
println!("\tskipping, not a build host");
354+
return
355+
}
356+
351357
let plain_name = format!("rustc-{}-src", package_vers(build));
352358
let name = format!("rust-src-{}", package_vers(build));
353359
let image = tmpdir(build).join(format!("{}-image", name));

src/bootstrap/step.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ pub fn build_rules(build: &Build) -> Rules {
499499
rules.dist("dist-src", "src")
500500
.default(true)
501501
.host(true)
502-
.run(move |_| dist::rust_src(build));
502+
.run(move |s| dist::rust_src(build, s.target));
503503
rules.dist("dist-docs", "src/doc")
504504
.default(true)
505505
.dep(|s| s.name("default:doc"))

0 commit comments

Comments
 (0)