Skip to content

Only pass --rsp-quoting=windows to clang #1717

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

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Oct 22, 2024

We were unconditionally passing --rsp-quoting to the linker on Windows. As far as I can tell, there are three different linkers we invoke on Windows:

  • clang.exe: This is what this fix is intended to cover
  • lld-link.exe: Defaults to Windows quoting style in response files and --rsp-quoting=windows is a no-op.
  • link.exe: Does not accept --rsp-quoting=windows

Move --rsp-quoting=windows to the point where we decide to use clang.exe as the linker on Windows and only pass it to clang.exe.

We were unconditionally passing `--rsp-quoting` to the linker on Windows. As far as I can tell, there are three different linkers we invoke on Windows:
- `clang.exe`: This is what this fix is intended to cover
- `lld-link.exe`: Defaults to Windows quoting style in response files and `--rsp-quoting=windows` is a no-op.
- `link.exe`: Does not accept `--rsp-quoting=windows`

Move `--rsp-quoting=windows` to the point where we decide to use `clang.exe` as the linker on Windows and only pass it to `clang.exe`.
@ahoppen
Copy link
Member Author

ahoppen commented Oct 22, 2024

@swift-ci Please test

@ahoppen ahoppen requested a review from artemcm October 23, 2024 16:15
@ahoppen ahoppen merged commit 63cac0b into swiftlang:main Oct 25, 2024
3 checks passed
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