-
Notifications
You must be signed in to change notification settings - Fork 552
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
Response file parsing for GCC and Clang #1781
Response file parsing for GCC and Clang #1781
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1781 +/- ##
==========================================
- Coverage 29.46% 29.38% -0.08%
==========================================
Files 49 50 +1
Lines 17844 17872 +28
Branches 8631 8625 -6
==========================================
- Hits 5257 5252 -5
- Misses 7347 7356 +9
- Partials 5240 5264 +24
☔ View full report in Codecov by Sentry. |
rustfmt isn't happy, could you please fix it? thanks |
40624f9
to
27b601f
Compare
Ran |
4b14306
to
b985902
Compare
@@ -0,0 +1,165 @@ | |||
/// An iterator over the arguments in a response file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would prefer the move to be done into a single commit
and then, modifications into a second commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll rewrite the commit into two commits in that order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alexei-Barnes ping ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow action here - I've been pulled into a work project that's eating my free time. I should get back to this soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you still going to work on this? thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, sorry for the mega wait - I'm working on this again now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is split into two separate commits now. The first commit just moves the code, with minimal changes necessary to do so. The second change modifies it, adds tests, and uses it in the GCC module. The final code is unchanged from when you last looked at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now also merged main into this branch, to keep it up to date. No merge conflicts.
* Moves the MSVC response file code into a new module * Makes no† changes to the response file code † Had to make `SplitMsvcResponseFileArgs` `pub`, so that it can be used.
* Remove anything specific about MSVC from the response file code (which is just the name and a comment) * Add unit tests to the module * Enable use of the response file code in gcc/clang (via the gcc module, clang defaults to this behaviour)
b985902
to
1562001
Compare
sorry but it will need to be rebase :( |
What is the value of parsing an response file instead of just hashing it? Is this ensures we are invariant to order of flags in the response file? |
For the same reasons we don't just hash command line arguments:
|
Makes sense. My feedback would be we should extend |
no activity for a while, closing |
This fixes #1780
This moves the response file parsing code implemented by @temportalflux out of the MSVC compiler and shares it for all compilers. This enables GCC and Clang to use response files with quoted arguments.
I've added some lib tests to the response file module, so that it can be reasoned about, separately from the compilers using it.