fix: enable MinGW/GCC build on Windows - #312
Merged
PeterStaar-IBM merged 2 commits intoAug 8, 2026
Merged
Conversation
- CMakeLists.txt: add /bigobj for MSVC to handle large object files - local_build.py: force Release build type (ensures /O2 and release CRT) - cmake/extlib_lcms2.cmake: build lcms2 via vendored CMake on all Windows (MSVC and MinGW) instead of autotools; autotools requires sh/make which fails under Ninja/MinGW on Windows - src/third_party/pdfium_jbig2: allow std::is_class types in FxPartitionAllocAllocator and use __debugbreak() instead of inline asm (int3/ud2) which MSVC/Clang-Cl reject and GCC 16 warns on Allows building with GCC 16.1 at C:/msys64/mingw64/bin via PATH=/c/msys64/mingw64/bin:$PATH ZLIB_ROOT=C:/msys64/mingw64 CC=gcc CXX=g++ CMAKE_GENERATOR=Ninja python local_build.py Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
✅ DCO Check Passed Thanks @yonikremer, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
I, yoni kremer <yoni.kremer@gmail.com>, hereby add my Signed-off-by to this commit: 154575e Signed-off-by: yoni kremer <yoni.kremer@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enables building with GCC 16.1 (MSYS2 MinGW64) on Windows.
Changes (5 files, independent of memory fix):
CMakeLists.txt:/bigobjfor MSVC (large object files hit limit without it)local_build.py: force-DCMAKE_BUILD_TYPE=Release(ensures/O2+ release CRT via--config Release)cmake/extlib_lcms2.cmake: build lcms2 via vendoredCMakeLists.txton all Windows (was MSVC-only, else autotools). Autotools requiressh/makeand fails underNinja/MinGWon Windows ('.\configure' is not recognized). Produceslcms2.lib(MSVC) orliblcms2.a(MinGW).src/third_party/pdfium_jbig2/core/fxcrt/fx_memory_wrappers.h: allowstd::is_classinFxPartitionAllocAllocator(GCC 16 strictness)src/third_party/pdfium_jbig2/core/fxcrt/immediate_crash.h:__debugbreak()instead ofasm volatile("int3"/"ud2")for non-ARM64 (MSVC rejects inline asm, Clang-Cl/GCC warn)Verified:
Independent of the
page_cellsmemory PR — can be reviewed/merged separately.🤖 Generated with Claude Code