[PATCH] D11347: Fix building with cmake 2.8.4 or greater under cygwin hosts

Martell Malone martellmalone at gmail.com
Mon Jul 20 00:15:23 PDT 2015


martell created this revision.
martell added a reviewer: yaron.keren.
martell added a subscriber: llvm-commits.

As of cmake 2.8.4 the cygwin target no longer defines WIN32
The -z option must still be avoided however for cygwin targets


http://reviews.llvm.org/D11347

Files:
  cmake/modules/HandleLLVMOptions.cmake

Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -131,7 +131,7 @@

 # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
 # build might work on ELF but fail on MachO/COFF.
-if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN
         ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11347.30133.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150720/d6c37236/attachment.bin>


More information about the llvm-commits mailing list