Skip to content

[Driver] Always parse response files as GNU command line arguments #77080

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

Closed
wants to merge 1 commit into from

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Oct 17, 2024

clang parses response files in GNU mode, even on Windows except

  • If you explicitly pass --rsp-quoting=windows in the command line invocation or
  • If no --rsp-quoting is specified and clang is running cl mode, which is the case if clang is invoked as cl or clang-cl, which is the compatibility mode to Window’s cl compiler as far as I can tell.

The Swift driver always outputs response files in GNU mode (swiftlang/swift-driver#1000).

Since Swift does not need to support a compatibility mode with another compiler, there is no need for it to parse response files in Windows mode. We should unconditionally parse the response files in GNU mode.

@ahoppen ahoppen requested a review from artemcm as a code owner October 17, 2024 18:02
@ahoppen
Copy link
Member Author

ahoppen commented Oct 17, 2024

@swift-ci Please smoke test

clang parses response files in GNU mode, even on Windows except
- If you explicitly pass `--rsp-quoting=windows` in the command line invocation or
- If no `--rsp-quoting` is specified and clang is running `cl` mode, which is the case if clang is invoked as `cl` or `clang-cl`, which is the compatibility mode to Window’s `cl` compiler as far as I can tell.

The Swift driver always outputs response files in GNU mode (swiftlang/swift-driver#1000).

Since Swift does not need to support a compatibility mode with another compiler, there is no need for it to parse response files in Windows mode. We should unconditionally parse the response files in GNU mode.
@ahoppen
Copy link
Member Author

ahoppen commented Oct 17, 2024

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Oct 17, 2024

This PR also changed the old driver’s behavior to accept POSIX-style response files but CMake outputs Windows-style response files. Closing in favor of swiftlang/swift-driver#1716, which changes the driver to output Windows-style response files, keeping the frontend’s behavior the same.

@ahoppen ahoppen closed this Oct 17, 2024
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