Response files created by "swift-frontend.exe" on Windows include "/LIB" which causes linking failures #76548
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
On Windows, when compiling/linking many files, the swiftc compiler ends up putting the command line parameters for the link step into a temporary response file. The first linker parameter in the response file is "/LIB", which (according to the linker) is supposed to be the first parameter of the linker command. However, because "/LIB" is in the response file, it is not interpreted properly by the linker as the first parameter, and the link step fails. If "/LIB" is taken out of the response file, and put onto the linker command line, then the link step works as expected.
Reproduction
A reproducible testcase can be found at:
https://github.com/sienkewits/swiftc-link-issue
Expected behavior
The provided testcase should compile and link successfully.
Environment
This issue has been reproduced with swiftc version 5.8.1 and 5.10.1 on Windows.
Additional information
No response
The text was updated successfully, but these errors were encountered: