[llvm] r226862 - Don't use -z,defs on FreeBSD.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jan 22 12:57:30 PST 2015
Author: rafael
Date: Thu Jan 22 14:57:30 2015
New Revision: 226862
URL: http://llvm.org/viewvc/llvm-project?rev=226862&view=rev
Log:
Don't use -z,defs on FreeBSD.
Looks like environ is defined only in the main binary.
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=226862&r1=226861&r2=226862&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Thu Jan 22 14:57:30 2015
@@ -106,8 +106,9 @@ 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) AND
- NOT LLVM_USE_SANITIZER)
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR
+ ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
+ NOT LLVM_USE_SANITIZER)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
endif()
More information about the llvm-commits
mailing list