Skip to content

Commit

Permalink
Disable rpath for lld when requested
Browse files Browse the repository at this point in the history
(unrelated to getting rustc to compile for wasi)
  • Loading branch information
bjorn3 committed Sep 26, 2024
1 parent b6277b0 commit 4e69f65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, &[]);
Expand Down

0 comments on commit 4e69f65

Please sign in to comment.