[llvm-branch-commits] [clang] 3a82823 - Add minor version to libclang.so and libclang-cpp.so SONAME
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 21 11:37:29 PST 2021
Author: Tom Stellard
Date: 2021-01-21T11:35:49-08:00
New Revision: 3a8282376b6c2bb65a3bb580c10d4da1296d8df1
URL: https://github.com/llvm/llvm-project/commit/3a8282376b6c2bb65a3bb580c10d4da1296d8df1
DIFF: https://github.com/llvm/llvm-project/commit/3a8282376b6c2bb65a3bb580c10d4da1296d8df1.diff
LOG: 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
Added:
Modified:
clang/CMakeLists.txt
clang/tools/clang-shlib/CMakeLists.txt
clang/tools/libclang/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 2e06c5fd9028..bb4b801f01c8 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -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)
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 5949223fc8e3..47ff80418bb0 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -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})
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index a4077140acee..5cd9ac5cddc1 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -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.
More information about the llvm-branch-commits
mailing list