[PATCH] D23975: Support of kfreebsd & GNU Hurd in llvm-shlib

Sylvestre Ledru via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 28 14:08:40 PDT 2016


sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: beanz.
sylvestre.ledru added a subscriber: llvm-commits.
sylvestre.ledru set the repository for this revision to rL LLVM.

Use the right link flags, so the resulting libLLVM-X.Y has all the proper symbols

Repository:
  rL LLVM

https://reviews.llvm.org/D23975

Files:
  tools/llvm-shlib/CMakeLists.txt

Index: tools/llvm-shlib/CMakeLists.txt
===================================================================
--- tools/llvm-shlib/CMakeLists.txt
+++ tools/llvm-shlib/CMakeLists.txt
@@ -39,7 +39,7 @@
 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"
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # 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")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23975.69520.patch
Type: text/x-patch
Size: 750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160828/d85e5703/attachment.bin>


More information about the llvm-commits mailing list