[clang] d3ce133 - [clang] Do not override libclang.so's SOVERSION if CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 11 22:14:51 PDT 2022
Author: Michał Górny
Date: 2022-10-12T07:14:28+02:00
New Revision: d3ce1339264dff3ea5571e9d5cf53d41e49a0879
URL: https://github.com/llvm/llvm-project/commit/d3ce1339264dff3ea5571e9d5cf53d41e49a0879
DIFF: https://github.com/llvm/llvm-project/commit/d3ce1339264dff3ea5571e9d5cf53d41e49a0879.diff
LOG: [clang] Do not override libclang.so's SOVERSION if CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION
Instead of setting libclang.so's SOVERSION to CLANG_MAJOR_VERSION
when CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION is enabled, do not override
it and let LLVM set the correct SOVERSION. This fixes libclang.so
missing LLVM_VERSION_SUFFIX, and harmonizes the SOVERSION with other
shared libraries.
Differential Revision: https://reviews.llvm.org/D135701
Added:
Modified:
clang/tools/libclang/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index c6b3b44a76334..3bfa78a28856b 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -9,10 +9,9 @@
# TODO: This should probably not be a option going forward but we
# we should commit to a way to do it. But due to getting this out
# in LLVM 15.x we opted for a option.
+set(LIBCLANG_SOVERSION_ARG)
if(NOT CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION)
- set(LIBCLANG_SOVERSION 13)
-else()
- set(LIBCLANG_SOVERSION ${CLANG_VERSION_MAJOR})
+ set(LIBCLANG_SOVERSION_ARG SOVERSION 13)
endif()
# TODO: harmonize usage of LIBCLANG_SOVERSION / LIBCLANG_LIBARY_VERSION
@@ -195,7 +194,7 @@ if(ENABLE_SHARED)
set_target_properties(libclang PROPERTIES
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
- SOVERSION ${LIBCLANG_SOVERSION})
+ ${LIBCLANG_SOVERSION_ARG})
endif()
endif()
More information about the cfe-commits
mailing list