[Lldb-commits] [PATCH] D27759: Fix build for mingw.

Hafiz Abid Qadeer via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 14 09:47:21 PST 2016


abidh added a comment.

> BTW, I am curious, are you planning on building python with mingw as well? If you are, I'd be interested in knowing how that works out.

I would like to do it but have not done it yet. I will keep you posted.



================
Comment at: cmake/modules/LLDBConfig.cmake:246
+if (MSVC)
+    add_definitions( /D _UNICODE /D UNICODE )
+elseif (MINGW)
----------------
zturner wrote:
> labath wrote:
> > Could you check if it's enough to pass `-DFOO` regardless of the platform. This is the only usage of the `/D` version in the llvm codebase, which leads me to believe that msvc will accept the `-D` version as well (or cmake will somehow convert in for him.
> I think the -D syntax works on both, so I would change this back to the original condition, and just change the / to a -
> 
> For example, right above this line you can see things like `-wd4150`, and right below this line you can see things like `-D_LARGEFILE_SOURCE`
OK. I will change it accordingly.


================
Comment at: source/Core/Mangled.cpp:12
 #include <cstddef>
-#if defined(_MSC_VER)
+#if defined(_WIN32)
 #include "lldb/Host/windows/windows.h"
----------------
labath wrote:
> Should we use LLVM_ON_WIN32 here? That seems to be the llvm preffered solution...
Do you mean use LLVM_ON_WIN32 everywhere instead of _WIN32 or just here?


https://reviews.llvm.org/D27759





More information about the lldb-commits mailing list