Skip to content

Commit

Permalink
Add minor version to libclang.so and libclang-cpp.so SONAME
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tstellar committed Jan 21, 2021
1 parent 9bbcb55 commit 3a82823
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ set(CLANG_EXECUTABLE_VERSION
"${CLANG_VERSION_MAJOR}" CACHE STRING
"Major version number that will be appended to the clang executable name")
set(LIBCLANG_LIBRARY_VERSION
"${CLANG_VERSION_MAJOR}" CACHE STRING
"${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
"Major version number that will be appended to the libclang library")
mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)

Expand Down
5 changes: 5 additions & 0 deletions clang/tools/clang-shlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ add_clang_library(clang-cpp
${_OBJECTS}
LINK_LIBS
${_DEPS})

set_target_properties(clang-cpp
PROPERTIES
VERSION ${LIBCLANG_LIBRARY_VERSION}
SOVERSION ${LIBCLANG_LIBRARY_VERSION})
1 change: 1 addition & 0 deletions clang/tools/libclang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ if(ENABLE_SHARED)
else()
set_target_properties(libclang
PROPERTIES
SOVERSION ${LIBCLANG_LIBRARY_VERSION}
VERSION ${LIBCLANG_LIBRARY_VERSION}
DEFINE_SYMBOL _CINDEX_LIB_)
# FIXME: _CINDEX_LIB_ affects dllexport/dllimport on Win32.
Expand Down

0 comments on commit 3a82823

Please sign in to comment.