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

Generalize the removal of compiler argument options during indexing #1314

Merged
merged 1 commit into from
May 20, 2024

Conversation

ahoppen
Copy link
Collaborator

@ahoppen ahoppen commented May 17, 2024

The existing ad-hoc logic was not quite correct because it didn’t eg. remove -MT/depfile because it assumed that -MT was followed by a space. It also didn’t take into account that serialize-diagnostics can be spelled with a single dash or two dashes.

Create a CompilerCommandLineOption type that forces decisions to be made about the dash spelling and argument styles, which should help avoid problems like this in the future.

@ahoppen
Copy link
Collaborator Author

ahoppen commented May 17, 2024

@swift-ci Please test

@ahoppen ahoppen mentioned this pull request May 17, 2024
The existing ad-hoc logic was not quite correct because it didn’t eg. remove `-MT/depfile` because it assumed that `-MT` was followed by a space. It also didn’t take into account that `serialize-diagnostics` can be spelled with a single dash or two dashes.

Create a `CompilerCommandLineOption` type that forces decisions to be made about the dash spelling and argument styles, which should help avoid problems like this in the future.
@ahoppen ahoppen force-pushed the command-line-sanitization branch from cd33fbf to 5bad2c5 Compare May 17, 2024 21:16
@ahoppen
Copy link
Collaborator Author

ahoppen commented May 17, 2024

@swift-ci Please test

@ahoppen
Copy link
Collaborator Author

ahoppen commented May 17, 2024

@swift-ci Please test Windows

2 similar comments
@ahoppen
Copy link
Collaborator Author

ahoppen commented May 17, 2024

@swift-ci Please test Windows

@ahoppen
Copy link
Collaborator Author

ahoppen commented May 20, 2024

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 0da0527 into apple:main May 20, 2024
3 checks passed
@ahoppen ahoppen deleted the command-line-sanitization branch May 20, 2024 20:40
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.

None yet

3 participants