[Lldb-commits] [PATCH] D18520: Initialize ProcessWindowsLive when building LLDB with MinGW

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 28 12:52:15 PDT 2016

zturner added inline comments.

Comment at: source/API/SystemInitializerFull.cpp:90
@@ -89,3 +89,3 @@
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__)
 #include "lldb/Host/windows/windows.h"
eran.ifrah wrote:
> zturner wrote:
> > Just use `LLVM_ON_WIN32` for both of these places, otherwise looks good.
> I tried using  `LLVM_ON_WIN32` but it does not defined with MinGW ( to confirm this, I placed an `#error` directive to ensure that it does not reach there, so I ended up using `__MINGW32__` which is defined for both MinGW32 and 64
Strange, I looked at the CMake code in `HandleLLVMOptions.cmake` and it says this:
    set(LLVM_ON_WIN32 0)
    set(LLVM_ON_UNIX 1)
    set(LLVM_ON_WIN32 1)
    set(LLVM_ON_UNIX 0)

So it `LLVM_ON_WIN32` should be false only if you are building from inside of Cygwin.  Is that the case for you?

What if you use `#if defined(_WIN32)`?


More information about the lldb-commits mailing list