Skip to content
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

link.Coff: Pass -lldmingw to LLD earlier and regardless of -lc. #21898

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Nov 3, 2024

The -lldmingw option affects a lot of logic throughout LLD. We need to pass it for *-windows-gnu even when we're not actually linking MinGW since we're still using the MinGW ABI with all that that entails. (One particular problem we would run into is missing handling of stdcall-decorated symbols for 32-bit x86.) Also, various other LLD options are sensitive to this option, so it's best to pass it as early as possible.

Closes #11817.

The -lldmingw option affects a lot of logic throughout LLD. We need to pass it
for *-windows-gnu even when we're not actually linking MinGW since we're still
using the MinGW ABI with all that that entails. (One particular problem we would
run into is missing handling of stdcall-decorated symbols for 32-bit x86.) Also,
various other LLD options are sensitive to this option, so it's best to pass it
as early as possible.

Closes ziglang#11817.
@alexrp alexrp requested a review from kubkon November 3, 2024 14:38
@alexrp alexrp merged commit 814a41b into ziglang:master Nov 4, 2024
10 checks passed
@alexrp alexrp deleted the lld-mingw branch November 4, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zig fails to compile dynamic library with target i386-windows-gnu on windows.
2 participants