[Openmp-commits] [openmp] 3438ed8 - [openmp] Fix building in debug mode with mingw

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Fri Nov 11 03:55:53 PST 2022


Author: Martin Storsjö
Date: 2022-11-11T13:54:02+02:00
New Revision: 3438ed8f7e6bb81dc61d9d3da18cf5662c206862

URL: https://github.com/llvm/llvm-project/commit/3438ed8f7e6bb81dc61d9d3da18cf5662c206862
DIFF: https://github.com/llvm/llvm-project/commit/3438ed8f7e6bb81dc61d9d3da18cf5662c206862.diff

LOG: [openmp] Fix building in debug mode with mingw

Mingw doesn't provide the _malloc_dbg/_free_dbg functions.

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

Added: 
    

Modified: 
    openmp/runtime/src/kmp_wrapper_malloc.h

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_wrapper_malloc.h b/openmp/runtime/src/kmp_wrapper_malloc.h
index c027e0b297d0b..1f75e88a23b25 100644
--- a/openmp/runtime/src/kmp_wrapper_malloc.h
+++ b/openmp/runtime/src/kmp_wrapper_malloc.h
@@ -154,7 +154,7 @@
 
 #if KMP_DEBUG
 
-#if KMP_OS_WINDOWS && _DEBUG
+#if KMP_OS_WINDOWS && _DEBUG && !defined(__MINGW32__)
 // KMP_DEBUG != _DEBUG. MS debug RTL is available only if _DEBUG is defined.
 
 // Windows* OS has native memory debugging capabilities. Enable them.


        


More information about the Openmp-commits mailing list