Skip to content

Sema: Stop adding Windows implib link inputs for extern "..." syntax. #24146

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Jun 11, 2025

Closes #23971.

Release Notes

When encountering a declaration such as

pub extern "ws2_32" fn closesocket(s: SOCKET) callconv(.winapi) i32;

the Zig compiler will no longer automatically add the import library for ws2_32.dll as a link input. Users will need to manually link ws2_32 either by passing -lws2_32 on the command line, or by calling b.linkSystemLibrary("ws2_32") in a build script.

@alexrp alexrp added breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes. labels Jun 11, 2025
@alexrp alexrp requested a review from mlugg June 11, 2025 12:48
@alexrp alexrp force-pushed the sema-link-inputs branch 15 times, most recently from 49ca419 to b8fff6c Compare June 14, 2025 17:08
@alexrp alexrp force-pushed the sema-link-inputs branch 2 times, most recently from 1856883 to 202754f Compare June 21, 2025 20:57
@alexrp alexrp force-pushed the sema-link-inputs branch from 202754f to 7226a16 Compare June 22, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Free Sema from worrying about link inputs
2 participants