Skip to content

Commit 2ae11a9

Browse files
committed
Auto merge of #54018 - alexcrichton:omg-fix-again, r=Mark-Simulacrum
Ship libLLVM.dylib on OSX Previously we just weren't shipping this at all as we were only looking for the Linux version!
2 parents 9804689 + bd1fb60 commit 2ae11a9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/bootstrap/dist.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,16 @@ fn maybe_install_llvm_dylib(builder: &Builder,
19021902
let src_libdir = builder
19031903
.llvm_out(target)
19041904
.join("lib");
1905+
let dst_libdir = image.join("lib/rustlib").join(&*target).join("lib");
1906+
t!(fs::create_dir_all(&dst_libdir));
1907+
1908+
if target.contains("apple-darwin") {
1909+
let llvm_dylib_path = src_libdir.join("libLLVM.dylib");
1910+
if llvm_dylib_path.exists() {
1911+
builder.install(&llvm_dylib_path, &dst_libdir, 0o644);
1912+
}
1913+
return
1914+
}
19051915

19061916
// Usually libLLVM.so is a symlink to something like libLLVM-6.0.so.
19071917
// Since tools link to the latter rather than the former, we have to
@@ -1913,8 +1923,6 @@ fn maybe_install_llvm_dylib(builder: &Builder,
19131923
llvm_dylib_path.display(), e);
19141924
});
19151925

1916-
let dst_libdir = image.join("lib/rustlib").join(&*target).join("lib");
1917-
t!(fs::create_dir_all(&dst_libdir));
19181926

19191927
builder.install(&llvm_dylib_path, &dst_libdir, 0o644);
19201928
}

0 commit comments

Comments
 (0)