[llvm] r307607 - [cmake] Check for Haiku when setting LIB_NAMES for GNU ld

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 18:17:44 PDT 2017


Author: axw
Date: Mon Jul 10 18:17:44 2017
New Revision: 307607

URL: http://llvm.org/viewvc/llvm-project?rev=307607&view=rev
Log:
[cmake] Check for Haiku when setting LIB_NAMES for GNU ld

Haiku uses GNU ld for linking, but is not captured in the
conditional when setting LIB_NAMES. This causes a shared
library with no symbols on Haiku. This patch simply adds
a check for whether the CMake system name is Haiku in
addition to the existing checks.

Patch by Jérôme Duval.

Differential Revision: https://reviews.llvm.org/D34998


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=307607&r1=307606&r2=307607&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-shlib/CMakeLists.txt Mon Jul 10 18:17:44 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) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
+if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
   configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
   ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)




More information about the llvm-commits mailing list