diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-09-06 19:06:09 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-09-06 19:06:09 -0700 |
| commit | bd1fb60133c6449f339c594e3c5ed074f4ff5c78 (patch) | |
| tree | 217f03cdbd06d7853d525cf43b246394b54fd4cb /src/bootstrap | |
| parent | 35a5541fd90c96564d483eee248daabc6b133de3 (diff) | |
| download | rust-bd1fb60133c6449f339c594e3c5ed074f4ff5c78.tar.gz rust-bd1fb60133c6449f339c594e3c5ed074f4ff5c78.zip | |
Ship libLLVM.dylib on OSX
Previously we just weren't shipping this at all as we were only looking for the Linux version!
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/dist.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index c3282275f6f..167e4a78eda 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1902,6 +1902,16 @@ fn maybe_install_llvm_dylib(builder: &Builder, let src_libdir = builder .llvm_out(target) .join("lib"); + let dst_libdir = image.join("lib/rustlib").join(&*target).join("lib"); + t!(fs::create_dir_all(&dst_libdir)); + + if target.contains("apple-darwin") { + let llvm_dylib_path = src_libdir.join("libLLVM.dylib"); + if llvm_dylib_path.exists() { + builder.install(&llvm_dylib_path, &dst_libdir, 0o644); + } + return + } // Usually libLLVM.so is a symlink to something like libLLVM-6.0.so. // Since tools link to the latter rather than the former, we have to @@ -1913,8 +1923,6 @@ fn maybe_install_llvm_dylib(builder: &Builder, llvm_dylib_path.display(), e); }); - let dst_libdir = image.join("lib/rustlib").join(&*target).join("lib"); - t!(fs::create_dir_all(&dst_libdir)); builder.install(&llvm_dylib_path, &dst_libdir, 0o644); } |
