[Openmp-commits] [PATCH] D137743: [openmp] Fix building in debug mode with mingw

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 9 14:26:08 PST 2022


mstorsjo created this revision.
mstorsjo added reviewers: AndreyChurbanov, JonChesterfield, natgla.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

Mingw doesn't provide the _malloc_dbg/_free_dbg functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137743

Files:
  openmp/runtime/src/kmp_wrapper_malloc.h


Index: openmp/runtime/src/kmp_wrapper_malloc.h
===================================================================
--- openmp/runtime/src/kmp_wrapper_malloc.h
+++ 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137743.474362.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221109/61e9b456/attachment.bin>


More information about the Openmp-commits mailing list