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

Execution: special case the first two arguments in RSP mode #1540

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Feb 4, 2024

The second argument is often treated specially as a mode specifier for tools. This is particularly important for Windows where -lib or /lib passed to link or ld.lld-link will change the linker to the librarian. This argument may not be sunk into the response file as it is not treated as the mode specifier then. Special case the first two arguments to ensure that the mode switch parameter is always passed for any tools.

@compnerd compnerd requested a review from artemcm February 4, 2024 19:09
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2024

@artemcm, yes, this is dumb. I don't know of a good way to handle this without special casing. I'm open to alternative ideas.

@compnerd
Copy link
Member Author

compnerd commented Feb 5, 2024

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Feb 5, 2024

@swift-ci please test

The second argument is often treated specially as a mode specifier for
tools. This is particularly important for Windows where `-lib` or `/lib`
passed to `link` or `ld.lld-link` will change the linker to the
librarian. This argument may not be sunk into the response file as it is
not treated as the mode specifier then. Special case the first two
arguments to ensure that the mode switch parameter is always passed for
any tools.
@compnerd
Copy link
Member Author

compnerd commented Feb 6, 2024

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2024

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2024

Going to merge this for now. If we come up with a better solution, we can revisit this.

@compnerd compnerd merged commit 7578683 into swiftlang:main Feb 7, 2024
3 checks passed
@compnerd compnerd deleted the mode branch February 7, 2024 22:58
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.

2 participants