[PATCH] D138254: [llvm] Remove LLVM_VERSION_SUFFIX from created shared library names
Brad Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 19:18:35 PST 2022
brad created this revision.
brad added reviewers: thieta, tstellar, beanz.
brad added a project: LLVM.
Herald added a subscriber: krytarowski.
Herald added a project: All.
brad requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This fixes building on OpenBSD. Having a string at the end of a filename (.e.g. libclang.so.15.0.0git) of a library like this is not valid and breaks linking.
https://github.com/llvm/llvm-project/issues/53932
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138254
Files:
clang/tools/libclang/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
llvm/tools/llvm-config/CMakeLists.txt
Index: llvm/tools/llvm-config/CMakeLists.txt
===================================================================
--- llvm/tools/llvm-config/CMakeLists.txt
+++ llvm/tools/llvm-config/CMakeLists.txt
@@ -61,7 +61,7 @@
set(LLVM_CXXFLAGS "${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION} ${LLVM_CXX_STDLIB_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
set(LLVM_BUILD_SYSTEM cmake)
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
-set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
+set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}")
# Use the C++ link flags, since they should be a superset of C link flags.
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -639,8 +639,8 @@
set_target_properties(${name}
PROPERTIES
# Since 4.0.0, the ABI version is indicated by the major version
- SOVERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}
- VERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX})
+ SOVERSION ${LLVM_VERSION_MAJOR}
+ VERSION ${LLVM_VERSION_MAJOR})
endif()
endif()
Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -193,7 +193,7 @@
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map)
set_target_properties(libclang PROPERTIES
- VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
+ VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
${LIBCLANG_SOVERSION_ARG})
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138254.476317.patch
Type: text/x-patch
Size: 1871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221118/0eaa5c04/attachment-0001.bin>
More information about the llvm-commits
mailing list