Skip to content

Commit 71fed3a

Browse files
committed
Don't package up libLLVM.so with libstd
It's only meant for rustc, so we should only install it once!
1 parent fa4f014 commit 71fed3a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/bootstrap/dist.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -671,10 +671,18 @@ impl Step for Std {
671671
let mut src = builder.sysroot_libdir(compiler, target).to_path_buf();
672672
src.pop(); // Remove the trailing /lib folder from the sysroot_libdir
673673
builder.cp_filtered(&src, &dst, &|path| {
674-
let name = path.file_name().and_then(|s| s.to_str());
675-
name != Some(builder.config.rust_codegen_backends_dir.as_str()) &&
676-
name != Some("bin")
677-
674+
if let Some(name) = path.file_name().and_then(|s| s.to_str()) {
675+
if name == builder.config.rust_codegen_backends_dir.as_str() {
676+
return false
677+
}
678+
if name == "bin" {
679+
return false
680+
}
681+
if name.contains("LLVM") {
682+
return false
683+
}
684+
}
685+
true
678686
});
679687

680688
let mut cmd = rust_installer(builder);

0 commit comments

Comments
 (0)