[PATCH] D41346: [Sanitizers, Darwin] Disable SANITIZER_SUPPORTS_WEAK_HOOKS before Mac OS X 10.9
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 15:06:59 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324284: [Sanitizers, Darwin] Disable SANITIZER_SUPPORTS_WEAK_HOOKS before Mac OS X 10.9 (authored by vitalybuka, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D41346?vs=127328&id=132894#toc
Repository:
rL LLVM
https://reviews.llvm.org/D41346
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -65,7 +65,13 @@
// SANITIZER_SUPPORTS_WEAK_HOOKS means that we support real weak functions that
// will evaluate to a null pointer when not defined.
#ifndef SANITIZER_SUPPORTS_WEAK_HOOKS
-#if (SANITIZER_LINUX || SANITIZER_MAC || SANITIZER_SOLARIS) && !SANITIZER_GO
+#if (SANITIZER_LINUX || SANITIZER_SOLARIS) && !SANITIZER_GO
+# define SANITIZER_SUPPORTS_WEAK_HOOKS 1
+// Before Xcode 4.5, the Darwin linker doesn't reliably support undefined
+// weak symbols. Mac OS X 10.9/Darwin 13 is the first release only supported
+// by Xcode >= 4.5.
+#elif SANITIZER_MAC && \
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090 && !SANITIZER_GO
# define SANITIZER_SUPPORTS_WEAK_HOOKS 1
#else
# define SANITIZER_SUPPORTS_WEAK_HOOKS 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41346.132894.patch
Type: text/x-patch
Size: 1020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180205/521de5bb/attachment.bin>
More information about the llvm-commits
mailing list