From 5e96fe905bb5e1b0362c58fa2e037a8a88b2b4d6 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 4 Nov 2015 23:11:12 +0000 Subject: [CMake] Bug 25059 - CMake libllvm.so.$MAJOR.$MINOR shared object name not compatible with ldconfig Summary: This change makes the CMake build system generate libraries for Linux and Darwin matching the makefile build system. Linux libraries follow the pattern lib${name}.${MAJOR}.${MINOR}.so so that ldconfig won't pick it up incorrectly. Darwin libraries are not versioned. Note: On linux the non-versioned symlink is generated at install-time not build time. I plan to fix that eventually, but I expect that is good enough for the purposes of fixing this bug. Reviewers: loladiro, tstellarAMD Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D13841 llvm-svn: 252093 --- llvm/tools/llvm-shlib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/tools/llvm-shlib') diff --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt index b4fdcd5bf1d..2356103a9cd 100644 --- a/llvm/tools/llvm-shlib/CMakeLists.txt +++ b/llvm/tools/llvm-shlib/CMakeLists.txt @@ -38,7 +38,7 @@ if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE) add_custom_target(libLLVMExports DEPENDS ${LLVM_EXPORTED_SYMBOL_FILE}) endif() -add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB ${SOURCES}) +add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES}) list(REMOVE_DUPLICATES LIB_NAMES) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf" -- cgit v1.2.3