build(win): compile eq_base with mingw-w64 - #19
Merged
Merged
Conversation
MinGW ships its Windows headers lowercase, so <Windows.h>, <Shlwapi.h> and <Wincrypt.h> are not found when cross-compiling from a case-sensitive filesystem. MSVC resolves either spelling. minwin.h needs <_mingw.h> before it typedefs __int64, which is an MSVC keyword that MinGW only provides through that header; without it every typedef below it collapses. It was also missing a Sleep declaration despite thread_pool.cc calling it, which affects MSVC too.
Force67
force-pushed
the
mingw-cross-build
branch
from
September 19, 2026 18:56
0563789 to
4276569
Compare
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.
Lets
eq_basebuild with the mingw-w64 cross toolchain. Verified by cross-compiling from Linux and running a dependent project's test suite under Wine (151 tests, all passing). The Linux build is unaffected: every change is behindOS_WINor in a_win.ccfile.MinGW ships its Windows headers lowercase, so
<Windows.h>,<Shlwapi.h>and<Wincrypt.h>are not found when cross-compiling from a case-sensitive filesystem. MSVC resolves either spelling, so lowercasing is safe both ways. That is 10 of the 12 files.The remaining two changes are both in
base/win/minwin.h:<_mingw.h>before it typedefs__int64. That is an MSVC keyword, and on MinGW it only arrives through that header, so without it every typedef below it collapses.Sleepwas never declared, even thoughbase/threading/thread_pool.cccalls::Sleep(1). This one is not toolchain-specific and applies to MSVC too, which makes me wonder whether the WindowsThreadPoolpath is currently exercised anywhere.Rebased onto current
devel5. Two fixes that were in the first push turned out to be already upstream (thebase::qualification invirtual_memory_win.ccand theplatform_file.hinclude), so they are dropped and this is now 12 files rather than 13.