Skip to content

Commit d3ce133

Browse files
committed
[clang] Do not override libclang.so's SOVERSION if CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION
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. Differential Revision: https://reviews.llvm.org/D135701
1 parent ec1a419 commit d3ce133

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/tools/libclang/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
# TODO: This should probably not be a option going forward but we
1010
# we should commit to a way to do it. But due to getting this out
1111
# in LLVM 15.x we opted for a option.
12+
set(LIBCLANG_SOVERSION_ARG)
1213
if(NOT CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION)
13-
set(LIBCLANG_SOVERSION 13)
14-
else()
15-
set(LIBCLANG_SOVERSION ${CLANG_VERSION_MAJOR})
14+
set(LIBCLANG_SOVERSION_ARG SOVERSION 13)
1615
endif()
1716

1817
# TODO: harmonize usage of LIBCLANG_SOVERSION / LIBCLANG_LIBARY_VERSION
@@ -195,7 +194,7 @@ if(ENABLE_SHARED)
195194

196195
set_target_properties(libclang PROPERTIES
197196
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
198-
SOVERSION ${LIBCLANG_SOVERSION})
197+
${LIBCLANG_SOVERSION_ARG})
199198
endif()
200199
endif()
201200

0 commit comments

Comments
 (0)