[PATCH] D143306: [Driver] Default to -fno-openmp-implicit-rpath
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 4 11:52:16 PST 2023
MaskRay added a comment.
In D143306#4104208 <https://reviews.llvm.org/D143306#4104208>, @JonChesterfield wrote:
> Added some people I can remember from the original discussion.
>
> The effect of this patch will be that clang -fopenmp foo.cpp will build an executable that doesn't know where its runtime libraries are. If it finds the right ones anyway that'll be fine. If it finds ones from some unrelated toolchain, that application usually won't work.
>
> This is likely to be more painful for people with multiple toolchains installed.
>
> How do the other projects deal with this hazard?
For libc++.so libc++abi.so libunwind.so users, there is no implicit `-Wl,-rpath=`. The user should ensure the built executable will get correct libraries at run-time.
Some build systems may provide some rpath mechanism.
As already mentioned, you can set `-Wl,-rpath` in your Clang configuration file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143306/new/
https://reviews.llvm.org/D143306
More information about the cfe-commits
mailing list