[PATCH] D64484: [CMake] Add -z defs on Solaris
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 06:43:00 PDT 2019
ro created this revision.
ro added reviewers: fedor.sergeev, chandlerc.
Herald added subscribers: mgorny, jyknight.
Herald added a project: LLVM.
Like other ELF targets, shared objects should be linked with -z defs on Solaris.
Tested on `x86_64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`. Ok for trunk?
Repository:
rL LLVM
https://reviews.llvm.org/D64484
Files:
cmake/modules/HandleLLVMOptions.cmake
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -169,7 +169,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|FreeBSD|OpenBSD|DragonFly|AIX" OR
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|FreeBSD|OpenBSD|DragonFly|AIX|SunOS" OR
WIN32 OR CYGWIN) 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: D64484.208941.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190710/f2dc5214/attachment.bin>
More information about the llvm-commits
mailing list