-
Notifications
You must be signed in to change notification settings - Fork 580
Reword and correct the preprocessor cache mode documentation #2362
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
Conversation
1fb6e20
to
fae1c11
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2362 +/- ##
==========================================
- Coverage 67.06% 67.06% -0.01%
==========================================
Files 64 64
Lines 34718 34718
==========================================
- Hits 23285 23284 -1
- Misses 11433 11434 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0c44acb
to
ba85488
Compare
Draft because: The second commit needs review from someone who understands preprocessor cache mode! I think this explanation is much clearer, but I don't know if it is actually true. The previous text mentioned "caching the preprocessor result", but that doesn't seem to make any sense. If the preprocessor result is the same, compilation can be trivially skipped as well (except if only the compiler ID changed, seems to be a bit of a long shot). So I think what is actually happening is skipping from input files to output files directly if there is a cached result, not skipping anything if there is a cache miss. |
docs/Local.md
Outdated
|
||
In order to cache the preprocessor step, [sccache] needs to remember, among other things, all files included by a given input file. To quote ccache's documentation: | ||
To ensure that the cached outputs for a source file correspond to the un-preprocessed inputs, [sccache] needs to remember, among other things, all files included by that source file (i.e. the complete set of inputs). To quote ccache's documentation: |
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'd be explicit about the issue with __TIME__
and __DATE__
macros and the config flag that allows one to handle the trade-off.
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.
Well, have a look now, I now mention the full list in two places but not everywhere.
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 think it needs one more pass to achieve its goal, the direction is good!
Thank you!
If you take a look into the code (older ref) Line 335 in cbe79c9
Box<dyn Compilation> type utilizing the preprocessor output as input for the C compiler.
|
f8f6125
to
56dbedb
Compare
56dbedb
to
5d0838b
Compare
@ahartmetz is this ready for a review pass? |
The correction is that there is a *long* list of compiler options that disable preprocessor cache mode.
Most importantly, group similar things together. Also improve some of the wording and document previously undocumented restrictions. The list of restrictions is a little ridiculous at this point, but I'm trying to do something about it.
5d0838b
to
ffc6335
Compare
It is now. |
The correction is that there is a long list of compiler options that disable preprocessor cache mode.