[PATCH] D135701: [clang] Do not override libclang.so's SOVERSION if CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 11 11:04:27 PDT 2022
mgorny created this revision.
mgorny added reviewers: thieta, h-vetinari, tstellar, MaskRay, thesamesam.
Herald added subscribers: StephenFan, kristof.beyls.
Herald added a project: All.
mgorny requested review of this revision.
Instead of setting libclang.so's SOVERSION to CLANG_MAJOR_VERSION
when CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION is enabled, do not override
it and let LLVM set the correct SOVERSION. This fixes libclang.so
missing LLVM_VERSION_SUFFIX, and harmonizes the SOVERSION with other
shared libraries.
https://reviews.llvm.org/D135701
Files:
clang/tools/libclang/CMakeLists.txt
Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -9,10 +9,9 @@
# TODO: This should probably not be a option going forward but we
# we should commit to a way to do it. But due to getting this out
# in LLVM 15.x we opted for a option.
+set(LIBCLANG_SOVERSION_ARG)
if(NOT CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION)
- set(LIBCLANG_SOVERSION 13)
-else()
- set(LIBCLANG_SOVERSION ${CLANG_VERSION_MAJOR})
+ set(LIBCLANG_SOVERSION_ARG SOVERSION 13)
endif()
# TODO: harmonize usage of LIBCLANG_SOVERSION / LIBCLANG_LIBARY_VERSION
@@ -195,7 +194,7 @@
set_target_properties(libclang PROPERTIES
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
- SOVERSION ${LIBCLANG_SOVERSION})
+ ${LIBCLANG_SOVERSION_ARG})
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135701.466867.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221011/c576d1e5/attachment.bin>
More information about the cfe-commits
mailing list