libsanitizer: cherry-pick db7bca28638e from upstream
authorXi Ruoyao <xry111@mengyan1223.wang>
Fri, 11 Mar 2022 02:59:29 +0000 (10:59 +0800)
committerXi Ruoyao <xry111@mengyan1223.wang>
Mon, 14 Mar 2022 16:34:12 +0000 (00:34 +0800)
libsanitizer/

* sanitizer_common/sanitizer_atomic_clang.h: Ensures to only
include sanitizer_atomic_clang_mips.h for O32.

libsanitizer/sanitizer_common/sanitizer_atomic_clang.h

index fc13ca5..ccf18f0 100644 (file)
@@ -96,8 +96,8 @@ inline bool atomic_compare_exchange_weak(volatile T *a,
 // This include provides explicit template instantiations for atomic_uint64_t
 // on MIPS32, which does not directly support 8 byte atomics. It has to
 // proceed the template definitions above.
-#if defined(_MIPS_SIM) && defined(_ABIO32)
-  #include "sanitizer_atomic_clang_mips.h"
+#if defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32
+#  include "sanitizer_atomic_clang_mips.h"
 #endif
 
 #undef ATOMIC_ORDER