From cf327c2068549194a29160499c2ecafa9061e46e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:44:19 +0200 Subject: [PATCH] Disable rpath for lld when requested (unrelated to getting rustc to compile for wasi) --- src/bootstrap/src/core/build_steps/llvm.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 24f6cf965bf43..13809b35ecd52 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -1212,6 +1212,9 @@ impl Step for Lld { // `$ORIGIN` would otherwise be expanded when the `LdFlags` are passed verbatim to // cmake. ldflags.push_all("-Wl,-rpath,'$ORIGIN/../../../'"); + } else { + // CMake defaults to building executables with rpath enabled. + cfg.define("CMAKE_SKIP_RPATH", "ON"); } configure_cmake(builder, target, &mut cfg, true, ldflags, &[]);