Skip to content

Commit

Permalink
Auto merge of #54018 - alexcrichton:omg-fix-again, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Ship libLLVM.dylib on OSX

Previously we just weren't shipping this at all as we were only looking for the
Linux version!
  • Loading branch information
bors committed Sep 7, 2018
2 parents 9804689 + bd1fb60 commit 2ae11a9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit 2ae11a9

Please sign in to comment.