[Mlir-commits] [mlir] [mlir] Don't set RPATH for libMLIR (PR #121180)
Carlo Cabrera
llvmlistbot at llvm.org
Sun Dec 29 13:20:25 PST 2024
carlocab wrote:
> I can and did (see my workaround above).
I did see the comment, but it was not clear whether this was something you wanted to add somewhere here, or something else.
> My point is possibly this doesn't make sense - why would you have an rpath for the libs themselves that was relative to the install `../lib` instead of just `ORIGIN/loader_path`.
This is a pretty standard idiom for rpaths. For example, it allows you to use the same rpath regardless of whether you're creating an executable you install into `bin` or for a library you install into `lib`.
See:
```
❯ otool -L bin/clang
bin/clang:
@rpath/libclang-cpp.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libLLVM.dylib (compatibility version 1.0.0, current version 19.1.6)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1800.101.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
❯ otool -l bin/clang | rg -A2 LC_RPATH
cmd LC_RPATH
cmdsize 32
path @loader_path/../lib (offset 12)
```
https://github.com/llvm/llvm-project/pull/121180
More information about the Mlir-commits
mailing list