Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bootstrap/download-ci-llvm-stamp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Change this file to make users of the `download-ci-llvm` configuration download
a new version of LLVM from CI, even if the LLVM submodule hasn鈥檛 changed.

Last change is for: https://github.com/rust-lang/rust/pull/163954
Last change is for: https://github.com/rust-lang/rust/pull/164064
18 changes: 18 additions & 0 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,24 @@ impl CommandLineStep for Llvm {
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
// Keep the pre-LLVM23 behavior for now.
cfg.define("LLVM_VERSIONED_DYLIB_NAME_ON_DARWIN", "OFF");

// `llvm-objcopy` is also shipped in the `rustc` component as
// "$root/lib/rustlib/$host/bin/rust-objcopy", where the default rpath of
// "$ORIGIN/../lib" does not reach the LLVM shared library distributed at "$root/lib".
// Add the same rpath entry as `Lld::run` does for `rust-lld`, so `rust-objcopy` can
// be invoked without rustup's library path overrides or the `llvm-tools` component.
//
// Be careful when changing this path, we need to ensure it's quoted or escaped:
// `$ORIGIN` would otherwise be expanded when the `LdFlags` are passed verbatim to
// cmake.
if builder.config.rpath_enabled(target) && helpers::use_host_linker(target) {
if target.contains("linux") {
ldflags.exe.push(" -Wl,-rpath,'$ORIGIN/../../../'");
}
if target.contains("apple-darwin") {
ldflags.exe.push(" -Wl,-rpath,'@loader_path/../../../'");
}
}
}

if (target.starts_with("csky")
Expand Down
Loading