Skip to content

Commit 3a82823

Browse files
committed
Add minor version to libclang.so and libclang-cpp.so SONAME
This patch is for the release/11.x branch. We need to bump the SONAME, because the ABI of the shared library is changing Reviewed By: sylvestre.ledru, cuviper Differential Revision: https://reviews.llvm.org/D94941
1 parent 9bbcb55 commit 3a82823

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

clang/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ set(CLANG_EXECUTABLE_VERSION
509509
"${CLANG_VERSION_MAJOR}" CACHE STRING
510510
"Major version number that will be appended to the clang executable name")
511511
set(LIBCLANG_LIBRARY_VERSION
512-
"${CLANG_VERSION_MAJOR}" CACHE STRING
512+
"${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
513513
"Major version number that will be appended to the libclang library")
514514
mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
515515

clang/tools/clang-shlib/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ add_clang_library(clang-cpp
4848
${_OBJECTS}
4949
LINK_LIBS
5050
${_DEPS})
51+
52+
set_target_properties(clang-cpp
53+
PROPERTIES
54+
VERSION ${LIBCLANG_LIBRARY_VERSION}
55+
SOVERSION ${LIBCLANG_LIBRARY_VERSION})

clang/tools/libclang/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ if(ENABLE_SHARED)
150150
else()
151151
set_target_properties(libclang
152152
PROPERTIES
153+
SOVERSION ${LIBCLANG_LIBRARY_VERSION}
153154
VERSION ${LIBCLANG_LIBRARY_VERSION}
154155
DEFINE_SYMBOL _CINDEX_LIB_)
155156
# FIXME: _CINDEX_LIB_ affects dllexport/dllimport on Win32.

0 commit comments

Comments
 (0)