Skip to content

Commit 5bcf07e

Browse files
aperezkusmour
authored andcommitted
Revert versioning changes in library SONAMEs
Summary: This reverts the following upstream commits: - llvm@91a3846 - llvm@10c48a7 which change how SONAMEs for toolchain libraries are created. This change has the potential to [break existing applications (such as coredumper)](D54233371) that rely on, e.g., `/opt/llvm/compat/lib/liblldb.15.so` as it no longer exists - in favor of `liblldb.15.so.0`. --- Reverted the commits mentioned above by doing: ``` $ git show 10c48a7 | git apply -R $ git show 91a3846 | git apply -R ``` Test Plan: Built the toolchain: ``` make DESTDIR=$PWD/install/Prod/usr BuildType=Release+Distribution toolchain ``` and confirmed that the .so names follow the old pattern: ``` $ ls install/Prod/usr/lib/ clang libclang.so libclang.so.15.0.0 liblldb.so.15 libLTO.so libmimalloc.so libmimalloc.so.2.0 python3.10 cmake libclang.so.15 liblldb.so liblldb.so.15.0.0 libLTO.so.15 libmimalloc.so.2 pkgconfig python3.8 ``` Reviewers: wanyi, hyubo, #lldb_team Reviewed By: hyubo Subscribers: pdepetro, #lldb_team Differential Revision: https://phabricator.intern.facebook.com/D54286076
1 parent b50e6c3 commit 5bcf07e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

llvm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ endif()
2828

2929
if(NOT DEFINED LLVM_SHLIB_SYMBOL_VERSION)
3030
# "Symbol version prefix for libLLVM.so"
31-
set(LLVM_SHLIB_SYMBOL_VERSION "LLVM_${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
31+
set(LLVM_SHLIB_SYMBOL_VERSION "LLVM_${LLVM_VERSION_MAJOR}")
3232
endif()
3333

3434
if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (MSVC_TOOLSET_VERSION LESS 142) AND (CMAKE_GENERATOR_TOOLSET STREQUAL ""))

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function(add_llvm_symbol_exports target_name export_file)
123123
COMMAND "${Python3_EXECUTABLE}" "-c"
124124
"import sys; \
125125
lines = [' ' + l.rstrip() for l in sys.stdin] + [' local: *;']; \
126-
print('LLVM_${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR} {'); \
126+
print('LLVM_${LLVM_VERSION_MAJOR} {'); \
127127
print(' global:') if len(lines) > 1 else None; \
128128
print(';\\n'.join(lines) + '\\n};')"
129129
< ${export_file} > ${native_export_file}
@@ -723,9 +723,9 @@ function(llvm_add_library name)
723723
if(UNIX AND NOT APPLE AND NOT ARG_SONAME)
724724
set_target_properties(${name}
725725
PROPERTIES
726-
# Since 18.1.0, the ABI version is indicated by the major and minor version.
727-
SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}
728-
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX})
726+
# Since 4.0.0, the ABI version is indicated by the major version
727+
SOVERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}
728+
VERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX})
729729
endif()
730730
endif()
731731

llvm/tools/llvm-shlib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,5 @@ if(LLVM_BUILD_LLVM_C_DYLIB AND MSVC)
190190
# Make sure we search LLVMSupport first, before the CRT libs
191191
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -INCLUDE:malloc")
192192
endif()
193-
193+
194194
endif()

0 commit comments

Comments
 (0)