I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there.
Details
Diff Detail
Event Timeline
I'll leave Zachary to approve, but it seems reasonable.
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.
cmake/modules/LLDBConfig.cmake | ||
---|---|---|
247 | 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. | |
source/Core/Mangled.cpp | ||
12 | Should we use LLVM_ON_WIN32 here? That seems to be the llvm preffered solution... |
cmake/modules/LLDBConfig.cmake | ||
---|---|---|
247 | 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 |
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.
cmake/modules/LLDBConfig.cmake | ||
---|---|---|
247 | OK. I will change it accordingly. | |
source/Core/Mangled.cpp | ||
12 | Do you mean use LLVM_ON_WIN32 everywhere instead of _WIN32 or just here? |
Yeah, I meant using it everywhere as a generic "am I on windows, regardless of the compiler" check. (Assuming Zach is fine with that)
OK. If Zachary is fine with that then I can do that in a separate commit.
@zturner
Do you have any other comment on this patch ?
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.