[PATCH] D94941: Add minor version to libclang.so and libclang-cpp.so SONAME

Tom Stellard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 18 20:19:20 PST 2021


tstellar created this revision.
tstellar added a reviewer: sylvestre.ledru.
Herald added a subscriber: mgorny.
tstellar requested review of this revision.
Herald added a project: clang.

This patch is for the release/11.x branch.  We need to bump the SONAME, because
the ABI of the shared library is changing


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94941

Files:
  clang/CMakeLists.txt
  clang/tools/clang-shlib/CMakeLists.txt
  clang/tools/libclang/CMakeLists.txt


Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -150,6 +150,7 @@
   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.
Index: clang/tools/clang-shlib/CMakeLists.txt
===================================================================
--- clang/tools/clang-shlib/CMakeLists.txt
+++ clang/tools/clang-shlib/CMakeLists.txt
@@ -48,3 +48,7 @@
                   ${_OBJECTS}
                   LINK_LIBS
                   ${_DEPS})
+
+    set_target_properties(clang-cpp
+      PROPERTIES
+      SOVERSION ${LIBCLANG_LIBRARY_VERSION})
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -509,7 +509,7 @@
     "${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)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94941.317454.patch
Type: text/x-patch
Size: 1447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210119/0f7e0a99/attachment.bin>


More information about the cfe-commits mailing list