From bc9688f4e4f2760ce0bf00dfb13cbdd5542bae4b Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 16 Dec 2021 13:19:13 -0800 Subject: [PATCH] [sanitizer] Define SANITIZER_ARM SANITIZER_X64 SANITIZER_ARM64 --- .../lib/sanitizer_common/sanitizer_platform.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h index 23d3fc5a1b6b..8de765cf6669 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -138,6 +138,12 @@ # define SANITIZER_X32 0 #endif +#if defined(__x86_64__) || defined(_M_X64) +# define SANITIZER_X64 1 +#else +# define SANITIZER_X64 0 +#endif + #if defined(__i386__) || defined(_M_IX86) # define SANITIZER_I386 1 #else @@ -207,12 +213,18 @@ # define SANITIZER_PPC64V2 0 #endif -#if defined(__arm__) +#if defined(__arm__) || defined(_M_ARM) # define SANITIZER_ARM 1 #else # define SANITIZER_ARM 0 #endif +#if defined(__aarch64__) || defined(_M_ARM64) +# define SANITIZER_ARM64 1 +#else +# define SANITIZER_ARM64 0 +#endif + #if SANITIZER_SOLARIS && SANITIZER_WORDSIZE == 32 # define SANITIZER_SOLARIS32 1 #else