[PATCH] D105594: cmake: Allow shared libraries to customize the soname using LLVM_ABI_REVISION
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 21 09:21:14 PDT 2021
dim added inline comments.
================
Comment at: clang/tools/clang-shlib/CMakeLists.txt:5
+set(LLVM_ABI_REVISION 0)
+
# Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off
----------------
Is this actually needed? This CMakeLists.txt calls `add_clang_library()` in `clang/cmake/modules/AddClang.cmake`, which calls `add_llvm_library()` in `llvm/cmake/modules/AddLLVM.cmake`, which calls the confusingly named `llvm_add_library()` in the same file. That last function is already updated below to set `LLVM_ABI_REVISION` to 0 is it is unset.
================
Comment at: llvm/tools/llvm-shlib/CMakeLists.txt:9
+set(LLVM_ABI_REVISION 0)
+
set(SOURCES
----------------
Similar here, this CMakeLists.txt calls `add_llvm_library` which already sets the `LLVM_ABI_REVISION` to 0.
================
Comment at: llvm/tools/llvm-shlib/CMakeLists.txt:78
+ PROPERTIES
+ SOVERSION ${LLVM_ABI_REVISION})
endif()
----------------
I think this is also handled via `add_llvm_library`/`llvm_add_library`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105594/new/
https://reviews.llvm.org/D105594
More information about the llvm-commits
mailing list