(draft) Fix CMake files for MinGW #9
Draft
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.
Fixing CMake files to build Windows executables with MinGW.
Error in compiling 32-bit Windows executable
libANGLE requires SSE2 for compiling but it it not enable in
gcc's default configuration. And CMakeLists.txt doesn't work as intended becauseCMAKE_SYSTEM_PROCESSORis not defined in MinGW 32-bit configuration. As a result,-mfpmath=sse -msse2was not added to the C flags.So define
CMAKE_SYSTEM_PROCESSORin cmake/Toolchain_mingw32.cmake .Error in linking 64-bit Windows executable
The
ldwhen linking 64-bit executable doesn't accept--large-address-awareoption introduced in d6e1b23 .So apply it only when linking 32-bit by checking
CMAKE_SYSTEM_PROCESSORdescribed in the above section.NOTE: No need to edit Visual Studio option because
/LARGEADDRESSAWAREalways accepted without any errors (but no effect; enabled on default for 64-bit linking).