Skip to content

Commit

Permalink
Auto merge of rust-lang#76708 - Mark-Simulacrum:lld-macos, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

Always try to promote shared LLVM to the sysroot

Even when LLVM is not generally participating in a shared link with rustc, we
will likely still link to the shared dylib from rust-lld, so we still need to
promote it.

This reverts part of rust-lang#76349; my expectation that the link-shared rule was sufficient was likely wrong.

Hopefully fixes rust-lang#76698.

r? `@alexcrichton`
  • Loading branch information
bors committed Sep 15, 2020
2 parents 4c1966f + f001a0c commit 27a45d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ impl Step for Llvm {
Err(m) => m,
};

if builder.config.llvm_link_shared && target.contains("windows") {
panic!("shared linking to LLVM is not currently supported on Windows");
}

builder.info(&format!("Building LLVM for {}", target));
t!(stamp.remove());
let _time = util::timeit(&builder);
Expand Down
7 changes: 7 additions & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level-std=1"

# If we're distributing binaries, we want a shared LLVM link. We're already
# going to link LLVM to the LLVM tools dynamically, so we need to ship a
# libLLVM library anyway.
if !isWindows; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.link-shared=true"
fi

if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions"
elif [ "$DEPLOY_ALT" != "" ]; then
Expand Down

0 comments on commit 27a45d0

Please sign in to comment.