[all-commits] [llvm/llvm-project] 01d683: [mlir] Don't set RPATH for libMLIR
Maksim Levental via All-commits
all-commits at lists.llvm.org
Thu Dec 26 22:04:33 PST 2024
Branch: refs/heads/users/makslevental/no-install-rpath-libmlir
Home: https://github.com/llvm/llvm-project
Commit: 01d683b6a91a33bda5b2dcf82575be0c1e5449e8
https://github.com/llvm/llvm-project/commit/01d683b6a91a33bda5b2dcf82575be0c1e5449e8
Author: Maksim Levental <maksim.levental at gmail.com>
Date: 2024-12-27 (Fri, 27 Dec 2024)
Changed paths:
M mlir/tools/mlir-shlib/CMakeLists.txt
Log Message:
-----------
[mlir] Don't set RPATH for libMLIR
By default [`llvm_add_library`](https://github.com/llvm/llvm-project/blob/94837c8b5761d20310947be5d2e1e568f67e8c0c/llvm/cmake/modules/AddLLVM.cmake#L681) calls `llvm_setup_rpath`, which has the strange effect that even libs inside of `install/lib` have non-empty self-referential `RPATH`s; e.g., on Mac
```
$ llvm-install/lib/libMLIR.dylib | grep RPATH -A4
cmd LC_RPATH
cmdsize 32
path @loader_path/../lib (offset 12)
```
which is bad/awkward if you want to move `libMLIR` (like into a wheel...).
Now possibly we want to do this for all shlibs but I think we definitely want to do this for `libMLIR` because it should have no runtime lib deps (at least until [this](https://github.com/llvm/llvm-project/issues/108253) lands).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list