Fix mingw build fail caused by c57f8a4 #421
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
c57f8a4 changes to
src/ninja.cc
break the mingw builds due to incorrect macro usage. MinGW based toolchains define_WIN32
andWIN32
so_MSC_VER
should be used to determine if building with VC'scl
and friends.FYI, if you're doing Windows patches and need an easy, all-in-one MinGW toolchain to test with, I maintain a few different flavors of "DevKit's" at TheCodeShop download page
This occurs because the
build.ninja
rule forlibninja.a
(correctly) doesn't include the VC needed parts.This patch works for me using both mingw-based GCC 4.7.1 and WinSDK 7.1 toolchains on my Win7 32bit system. Below is the output from building using WinSDK 7.1 cmd line tools: