Skip to content

Commit b48411b

Browse files
authored
Rollup merge of rust-lang#123186 - onur-ozkan:llvm-library-bug, r=Kobzol
copy any file from stage0/lib to stage0-sysroot/lib With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not. This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway. Fixes rust-lang#122913
2 parents 73a4208 + 5fe364a commit b48411b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,13 @@ impl Step for StdLink {
643643
t!(fs::create_dir_all(&sysroot_bin_dir));
644644
builder.cp_link_r(&stage0_bin_dir, &sysroot_bin_dir);
645645

646-
// Copy all *.so files from stage0/lib to stage0-sysroot/lib
646+
// Copy all files from stage0/lib to stage0-sysroot/lib
647647
let stage0_lib_dir = builder.out.join(host).join("stage0/lib");
648648
if let Ok(files) = fs::read_dir(stage0_lib_dir) {
649649
for file in files {
650650
let file = t!(file);
651651
let path = file.path();
652-
if path.is_file() && is_dylib(&file.file_name().into_string().unwrap()) {
652+
if path.is_file() {
653653
builder
654654
.copy_link(&path, &sysroot.join("lib").join(path.file_name().unwrap()));
655655
}

0 commit comments

Comments
 (0)