-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mingw-w64 to latest git commit #16109
Merged
Merged
Conversation
This file contains 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
667bed4
to
402fe56
Compare
402fe56
to
e9a1801
Compare
Upstream commit dddccbc3ef50ac52bf00723fd2f68d98140aab80 Martin Storsjö suggested synchronizing with git snapshots rather than waiting for tagged releases. Let's try this for a few releases of Zig and see how we like it. These headers were configured with `--with-default-msvcrt=ucrt`. See related issue #18477.
Upstream commit dddccbc3ef50ac52bf00723fd2f68d98140aab80 * adds ucrtbase.def.in * mingwex: replace mingw crt files with ucrt files * adds missing mingw-w64 ucrt files The rules that govern which set of files are included or excluded is contained in the logic for tools/update_mingw.zig
Martin Storsjö kindly took the time to discuss things at length with me, and the results are that this status quo is correct. I added comments so that I don't think it should be changed later.
This makes C/C++ files when targeting mingw-w64 choose to depend on ucrt for stdio.
prevents it from being defined twice when building mingw-w64 libs.
We would rather use the ucrt for these, but sometimes dependencies on the mingw stdio functions creep in. 仕方ない. The cost is only paid if they are used; otherwise the symbols are garbage-collected at link time.
Separate commits for the zig logic and the copied files.
The tarballs have to be rebuilt because now we want to use the ucrt.
I observed a duplicate symbol linker error; pow was defined both by mingwex.lib and ucrtbase.dll.
e9a1801
to
9a4a74e
Compare
Contains the mingw upgrade to use ucrt.
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.
Originally, this branch updated to v11.0.1, however @mstorsjo suggested synchronizing with git snapshots rather than waiting for tagged releases, so this updates to the latest mingw-w64 git commit at the time of writing which is
dddccbc3ef50ac52bf00723fd2f68d98140aab80
. Let's try this for a few releases of Zig and see how we like it.Notably, this changes our mingw-w64 build to default to using ucrtbase.dll as much as possible.
This branch also includes a new tool which can be invoked like this:
This streamlines updating the C runtime portion of mingw-w64 upgrades, making it slightly easier to keep up with git snapshots. It also encodes the rules about what files are included or excluded, making it easier for people other than me to perform this upgrade.
This branch requires all the CI zip files for Windows to be updated because those zip files contain pre-built LLVM, which needed to be built against the new mingw-w64 SDK.
While working on this I discovered a potential installation size optimization:
v11.0.1 Upstream Changelog
APIs.
compiler support, clang only at this time.
now optional when _FORTIFY_SOURCE or -fstack-protector-strong is used.
supported by the compiler (gcc 12 or later).
removed for MSVCR*, UCRT only for now.
source