Commit dd2ce3d
authored
[LLVM] Add per-target runtime directory to rpath (llvm#199755)
Summary:
This simply adds the LLVM_DEFAULT_TARGET_TRIPLE to the LLVM build's
rpath if present. This keeps things hermetic for the library (offload)
that depends on it.
The reason this is required is because `llvm-gpu-loader` calls
`DynamicLibrary` on the Offload runtime. However, in a shared library
build the actual call is in libLLVMSupport.so, which does not have this
RPath, so `dlopen` delegates to that which does not know how to find it.
The only options to fix this are to use `dlopen` directly in the loader,
or add the rpath to the LLVM binaries.
I think this makes sense for LLVM, because the target-specific directory
can contain LLVM related libraries.1 parent b65a71d commit dd2ce3d
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
2694 | 2698 | | |
2695 | 2699 | | |
2696 | 2700 | | |
| |||
0 commit comments