Skip to content

Conversation

bonzini
Copy link
Collaborator

@bonzini bonzini commented Oct 9, 2025

On Windows, rustc searches both FOO.lib and libFOO.a when passed -lfoo. This means that the check for nonstandard names is too struct, and indeed it breaks passing for example -lkernel32 (which adds kernel32.lib to the link).

Fix this by special casing Windows. Extract the logic to the Rust compiler class for clarity.

This fixes a semantic conflict between PRs #14991 and #15024.

@bonzini bonzini force-pushed the rustc-windows-lib branch 4 times, most recently from ccaecfd to 9710afa Compare October 9, 2025 19:10
The variable for the .a here is called "a", not "lib".

Signed-off-by: Paolo Bonzini <[email protected]>
@bonzini bonzini force-pushed the rustc-windows-lib branch from 9710afa to e38d52d Compare October 9, 2025 20:12
On Windows, rustc searches both FOO.lib and libFOO.a when passed -lfoo.
This means that the check for nonstandard names in the Unix sense is
too struct, and indeed it breaks passing for example -lkernel32 (which
adds kernel32.lib to the link).

Fix this by special casing Windows.  Extract the logic to the Rust
compiler class for clarity.

Signed-off-by: Paolo Bonzini <[email protected]>
@bonzini bonzini force-pushed the rustc-windows-lib branch from e38d52d to 5f83e44 Compare October 9, 2025 20:12
@bonzini bonzini marked this pull request as ready for review October 10, 2025 07:56
@bonzini bonzini added this to the 1.9.2 milestone Oct 11, 2025
@dcbaker dcbaker merged commit f27ba93 into mesonbuild:master Oct 11, 2025
32 of 36 checks passed
@xclaesse
Copy link
Member

I see it's already merged, but I was going to give me +1 too. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants