[clang] [llvm] [CMake] Version Darwin dylib identities (PR #189004)
Michal R via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 29 00:34:03 PDT 2026
vadorovsky wrote:
> With this patch, if you are building all llvm dylib with version, you are still going run into problem in your CI once you upgrade your clang/rustc to the same llvm version, and it is going to be broken on Linux as well.
We will not, because we are using the `-DLLVM_VERSION_SUFFIX` and linking to the dynamic library with that specific suffix. That's a bulletproof solution on Linux, that is used also by Rust compiler as well. If you look at the latest libLLVM tarballs that Rust uses (e.g. https://ci-artifacts.rust-lang.org/rustc-builds/80d0e4be6f15899649ba31669077c59a986f96cc/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz), you can see:
```
lrwxrwxrwx 1 vad vad 28 Mar 26 18:52 libLLVM-22-bpf-linker-0.so -> libLLVM.so.22.1-bpf-linker-0
lrwxrwxrwx 1 vad vad 28 Mar 26 18:52 libLLVM.so -> libLLVM.so.22.1-bpf-linker-0
-rwxr-xr-x 1 vad vad 793501688 Mar 26 18:51 libLLVM.so.22.1-bpf-linker-0
```
We would like to use that trick on macOS too.
> This should not be the default unless the community prefers this behavior on macOS.
That would work for us as well.
https://github.com/llvm/llvm-project/pull/189004
More information about the cfe-commits
mailing list