[openmp] Use GCC style intrinsics for atomics on Clang-cl on aarch64 too
authorMartin Storsjö <martin@martin.st>
Wed, 16 Nov 2022 09:42:16 +0000 (11:42 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 28 Nov 2022 20:40:01 +0000 (22:40 +0200)
This fixes compilation in the Clang-cl configuration on aarch64;
Clang doesn't implement all the aarch64 MSVC atomic intrinsics yet.

Differential Revision: https://reviews.llvm.org/D138737

openmp/runtime/src/kmp_os.h

index 7972a12..76fcbb8 100644 (file)
@@ -456,7 +456,7 @@ enum kmp_mem_fence_type {
 
 // Synchronization primitives
 
-#if KMP_ASM_INTRINS && KMP_OS_WINDOWS && !((KMP_ARCH_AARCH64 || KMP_ARCH_ARM) && defined(__GNUC__))
+#if KMP_ASM_INTRINS && KMP_OS_WINDOWS && !((KMP_ARCH_AARCH64 || KMP_ARCH_ARM) && (KMP_COMPILER_CLANG || KMP_COMPILER_GCC))
 
 #if KMP_MSVC_COMPAT && !KMP_COMPILER_CLANG
 #pragma intrinsic(InterlockedExchangeAdd)