[PATCH] D130571: [compiler-rt][Sanitizer] Link sanitizer libs with -latomic on SPARC
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 03:30:51 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0b2d5fd48bc2: [compiler-rt][Sanitizer] Link sanitizer libs with -latomic on SPARC (authored by ro).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130571/new/
https://reviews.llvm.org/D130571
Files:
compiler-rt/CMakeLists.txt
Index: compiler-rt/CMakeLists.txt
===================================================================
--- compiler-rt/CMakeLists.txt
+++ compiler-rt/CMakeLists.txt
@@ -479,6 +479,12 @@
append_list_if(C_SUPPORTS_NODEFAULTLIBS_FLAG -nodefaultlibs SANITIZER_COMMON_LINK_FLAGS)
append_list_if(COMPILER_RT_HAS_Z_TEXT -Wl,-z,text SANITIZER_COMMON_LINK_FLAGS)
+# Only necessary for 32-bit SPARC. Solaris 11.2+ ld uses -z ignore/-z record
+# natively, but supports --as-needed/--no-as-needed for GNU ld compatibility.
+if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "sparc")
+ list(APPEND SANITIZER_COMMON_LINK_LIBS -Wl,--as-needed atomic -Wl,--no-as-needed)
+endif()
+
if (COMPILER_RT_USE_BUILTINS_LIBRARY)
string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130571.447984.patch
Type: text/x-patch
Size: 809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220727/aaf17171/attachment.bin>
More information about the llvm-commits
mailing list