Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shahms
Copy link
Contributor

@shahms shahms commented Oct 25, 2023

Rather than removing and appending, replace the "action" argument with -fsyntax-only to preserve its relative location. There are some flags for which Clang will interpret a subsequent argument which doesn't start with - as an argument to that flag rather than a standalone argument (such as the source file). While removing any argument runs the risk of causing this problem, the source file path generally follows the action argument so we can mitigate this problem by preserving its location when replacing it with -fsyntax-only.

It's likely we want to use a smarter mechanism such that when we remove a single - argument, if the subsequent argument does not start with - it gets moved to the end or something, this should improve the situation for now.

@shahms shahms requested review from a team, jaysachs and zrlk October 25, 2023 17:06
@shahms shahms merged commit 5a76596 into kythe:master Oct 25, 2023
@shahms shahms deleted the cxx-extract-preserve-action-order branch October 25, 2023 17:32
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