[llvm] r242993 - Avoid using -Wl,-z,defs on Cygwin.
Yaron Keren
yaron.keren at gmail.com
Thu Jul 23 01:06:12 PDT 2015
Author: yrnkrn
Date: Thu Jul 23 03:06:12 2015
New Revision: 242993
URL: http://llvm.org/viewvc/llvm-project?rev=242993&view=rev
Log:
Avoid using -Wl,-z,defs on Cygwin.
Prior to CMAKE 2.8.4 that was covered by the WIN32 conditional but
from 2.8.4 CMAKE no longer defined WIN32 when running under Cygwin
and it needs its own test.
Patch by Martell Malone!
http://reviews.llvm.org/D11347
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=242993&r1=242992&r2=242993&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Thu Jul 23 03:06:12 2015
@@ -131,7 +131,7 @@ endif()
# 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 OR
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
NOT LLVM_USE_SANITIZER)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
More information about the llvm-commits
mailing list