Page MenuHomePhabricator

Make build work on MinGW
Needs ReviewPublic

Authored by loladiro on Jul 30 2014, 8:42 PM.
This revision needs review, but there are no reviewers specified.



I was building LLDB under mingw (x64-4.8.1-posix-seh-rev5) today and these are the changes I needed to make the build work. It would be good if people with different windows configurations could make sure this doesn't break something else.

I also fixed the Makefile in Interpreter. It used to check for DISABLE_PYTHON but was then changed to check for MinGw (DISABLE_PYTHON is defined automatically for MinGW, but I think it's a valid use case to define it even on other platforms). It now checks for both and actually disables the build of LLDWrapPython if requested to do so (before it would still call the target).

Diff Detail

Event Timeline

loladiro updated this revision to Diff 12054.Jul 30 2014, 8:42 PM
loladiro retitled this revision from to Make build work on MinGW.
loladiro updated this object.
loladiro edited the test plan for this revision. (Show Details)
loladiro set the repository for this revision to rL LLVM.
loladiro added a subscriber: Unknown Object (MLST).

Assuming you created this diff with git, would it be possible to use -U999999 in the future? It helps to be able to browse the rest of the file to get more context.


Is this supposed to be #ifndef instead of #ifdef? As it stands, this changes the behavior on native Win32.


Little confused about what's going on here and why we're messing with pid_t in two different places (this file and win32.h) with different conditions. Is it possible to centralize all the logic about what's going on with pid_t into win32.h?


Can win32.h contain a definition of mkstemp? Not a fan of pre-processor directives in source files, where avoidable.

Yeah, I usually do the -U999999 thing, but forgot this time.


Yes, I think you might be right about that.


Yes, I think that would be a good idea. I was trying to do the inverse condition of the one in win32.h here, to avoid it being defined twice. I think we should unify it in win32.h if possible.


Sure, that doesn't sound like a bad idea.

I actually think a better solution is to just stop building PseudoTerminal
stuff on Windows. That's a larger change, but I suspect I'll do it at some
point in the future.