[PATCH] Add minor version to libclang.so and libclang-cpp.so SONAME
authorTom Stellard <tstellar@redhat.com>
Thu, 21 Jan 2021 19:35:48 +0000 (11:35 -0800)
committerGianfranco Costamagna <locutusofborg@debian.org>
Tue, 28 Sep 2021 10:06:50 +0000 (11:06 +0100)
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

Gbp-Pq: Name 0001-Add-minor-version-to-libclang.so-and-libclang-cpp.so.patch

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

index bb4b801f01c84ea940f8f83793b17914cfbabf53..2e06c5fd9028b71935a18ae99a3797d5c5a13cbf 100644 (file)
@@ -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}.${CLANG_VERSION_MINOR}" CACHE STRING
+    "${CLANG_VERSION_MAJOR}" CACHE STRING
     "Major version number that will be appended to the libclang library")
 mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
 
index 47ff80418bb01b3d3d6bff69b8c7c450936301ed..5949223fc8e34766262fb75b4ff6aeae10289964 100644 (file)
@@ -48,8 +48,3 @@ add_clang_library(clang-cpp
                   ${_OBJECTS}
                   LINK_LIBS
                   ${_DEPS})
-
-    set_target_properties(clang-cpp
-      PROPERTIES
-      VERSION ${LIBCLANG_LIBRARY_VERSION}
-      SOVERSION ${LIBCLANG_LIBRARY_VERSION})
index 195ed5b6fbb7a70cd0b71308a223d611ad322f47..512e0ceeea79dade5426bc3bd1578e0a267ac53e 100644 (file)
@@ -150,7 +150,6 @@ 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.