[compiler-rt] 20f38d0 - [compiler-rt] add SANITIZER_OSX
Emily Shi via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 12 11:45:52 PDT 2021
Author: Emily Shi
Date: 2021-04-12T11:45:45-07:00
New Revision: 20f38d01420e5091c076e99be6b9c5ce5aaef064
URL: https://github.com/llvm/llvm-project/commit/20f38d01420e5091c076e99be6b9c5ce5aaef064
DIFF: https://github.com/llvm/llvm-project/commit/20f38d01420e5091c076e99be6b9c5ce5aaef064.diff
LOG: [compiler-rt] add SANITIZER_OSX
This will allow us to make osx specific changes easier. Because apple silicon macs also run on aarch64, it was easy to confuse it with iOS.
rdar://75302812
Reviewed By: yln
Differential Revision: https://reviews.llvm.org/D100157
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_platform.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
index 96c01bad870d1..bcbb36009eba3 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -59,6 +59,11 @@
#if defined(__APPLE__)
# define SANITIZER_MAC 1
# include <TargetConditionals.h>
+# if TARGET_OS_OSX
+# define SANITIZER_OSX 1
+# else
+# define SANITIZER_OSX 0
+# endif
# if TARGET_OS_IPHONE
# define SANITIZER_IOS 1
# else
@@ -73,6 +78,7 @@
# define SANITIZER_MAC 0
# define SANITIZER_IOS 0
# define SANITIZER_IOSSIM 0
+# define SANITIZER_OSX 0
#endif
#if defined(__APPLE__) && TARGET_OS_IPHONE && TARGET_OS_WATCH
More information about the llvm-commits
mailing list