Skip to content

Commit cf327c2

Browse files
committed
Disable rpath for lld when requested
(unrelated to getting rustc to compile for wasi)
1 parent a3975a3 commit cf327c2

File tree

1 file changed

+3
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-0
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,9 @@ impl Step for Lld {
12121212
// `$ORIGIN` would otherwise be expanded when the `LdFlags` are passed verbatim to
12131213
// cmake.
12141214
ldflags.push_all("-Wl,-rpath,'$ORIGIN/../../../'");
1215+
} else {
1216+
// CMake defaults to building executables with rpath enabled.
1217+
cfg.define("CMAKE_SKIP_RPATH", "ON");
12151218
}
12161219

12171220
configure_cmake(builder, target, &mut cfg, true, ldflags, &[]);

0 commit comments

Comments
 (0)