Skip to content

clang_Driver_getExternalActionsForCommand_v0 does not expand response files #10441

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

Open
cwakamo opened this issue Apr 7, 2025 · 1 comment · May be fixed by #10486
Open

clang_Driver_getExternalActionsForCommand_v0 does not expand response files #10441

cwakamo opened this issue Apr 7, 2025 · 1 comment · May be fixed by #10486
Assignees

Comments

@cwakamo
Copy link

cwakamo commented Apr 7, 2025

clang_Driver_getExternalActionsForCommand_v0 exists as a function to get a list of actions that would be performed given a set of clang driver arguments. However, it does not currently expand response files, which is a difference between it and the real clang driver.

This means that response files get treated as inputs, I believe, and passed on to other actions. (For instance, a response file with -Wl,<arg> gets passed as-is to the linker, which causes it to fail because the linker doesn't understand -Wl.)

clang_Driver_getExternalActionsForCommand_v0 should be updated to expand response files.

@cwakamo cwakamo self-assigned this Apr 7, 2025
@cwakamo
Copy link
Author

cwakamo commented Apr 7, 2025

Snagging this because it should be relatively straightforward.

cwakamo added a commit to cwakamo/llvm-project that referenced this issue Apr 13, 2025
…lActionsForCommand_v0.

This is necessary because build systems like SwiftBuild may pass arguments to the Clang driver via response files.
Without this, the response files are treated as inputs and passed along to the external actions themselves, which is incorrect.

This resolves swiftlang#10441.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant