[llvm] r298798 - Add check for BSD when setting LIB_NAMES for GNU ld
Andrew Wilkins via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 25 22:58:48 PDT 2017
Author: axw
Date: Sun Mar 26 00:58:48 2017
New Revision: 298798
URL: http://llvm.org/viewvc/llvm-project?rev=298798&view=rev
Log:
Add check for BSD when setting LIB_NAMES for GNU ld
Patch by Koop Mast and Alex Arslan!
Differential Revision: https://reviews.llvm.org/D28215
Modified:
llvm/trunk/tools/llvm-shlib/CMakeLists.txt
Modified: llvm/trunk/tools/llvm-shlib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/CMakeLists.txt?rev=298798&r1=298797&r2=298798&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-shlib/CMakeLists.txt Sun Mar 26 00:58:48 2017
@@ -37,7 +37,7 @@ endif()
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
list(REMOVE_DUPLICATES LIB_NAMES)
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # FIXME: It should be "GNU ld for elf"
+if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
# GNU ld doesn't resolve symbols in the version script.
set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
More information about the llvm-commits
mailing list