[llvm-branch-commits] [openmp] 280653d - [OpenMP] support build on msys2/mingw with clang or gcc

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 5 10:34:57 PDT 2020


Author: Adrian Pop
Date: 2020-08-05T19:34:41+02:00
New Revision: 280653d2ea4a40f2968b3f4662aa7c6d254c6cb9

URL: https://github.com/llvm/llvm-project/commit/280653d2ea4a40f2968b3f4662aa7c6d254c6cb9
DIFF: https://github.com/llvm/llvm-project/commit/280653d2ea4a40f2968b3f4662aa7c6d254c6cb9.diff

LOG: [OpenMP] support build on msys2/mingw with clang or gcc

RTM Adaptive Locks are supported on msys2/mingw for clang and gcc.

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

(cherry picked from commit bf2aa74e51997ee190f3b34dd26a1b564e59e267)

Added: 
    

Modified: 
    openmp/runtime/src/kmp_lock.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_lock.cpp b/openmp/runtime/src/kmp_lock.cpp
index 8bf7ef2deb71..775693253db2 100644
--- a/openmp/runtime/src/kmp_lock.cpp
+++ b/openmp/runtime/src/kmp_lock.cpp
@@ -1706,7 +1706,8 @@ static void __kmp_set_queuing_lock_flags(kmp_queuing_lock_t *lck,
 
 #if (KMP_COMPILER_ICC && __INTEL_COMPILER >= 1300) ||                          \
     (KMP_COMPILER_MSVC && _MSC_VER >= 1700) ||                                 \
-    (KMP_COMPILER_CLANG && KMP_MSVC_COMPAT)
+    (KMP_COMPILER_CLANG && (KMP_MSVC_COMPAT || __MINGW32__)) ||                \
+    (KMP_COMPILER_GCC && __MINGW32__)
 
 #include <immintrin.h>
 #define SOFT_ABORT_MASK (_XABORT_RETRY | _XABORT_CONFLICT | _XABORT_EXPLICIT)


        


More information about the llvm-branch-commits mailing list