On 9/6/24 9:41 AM, Ben Boeckel wrote:
On Fri, Sep 06, 2024 at 09:30:26 -0400, David Malcolm wrote:
On Fri, 2024-09-06 at 08:44 -0400, Ben Boeckel via Gcc wrote:
Does this have (additional) implications for caching tools and
modules?
They cache diagnostic output, but if these other paths showing up or
disappearing affects the output, the cache key should incorporate
that
as well.
What kinds of caching tools are you thinking of?
`ccache`, `sccache`, etc. These tools try to detect if the compilation
would be the same and place the object in its output location and report
the cached output on stdout/stderr as performed in the original compile
so that it acts "just like the compiler"'s execution.
I'm curious about caching of diagnostics, and how the diagnostics are
represented in the cache.
I know `sccache` just stores it as a text blob; `ccache` is probably the
same, but I haven't been in its code myself to know.
Certainly these tools are complicated when the preprocessor output isn't
enough to reproduce the compilation. It might be nice to have some
combined preprocessed form of the primary translation unit and any
interface units it depends on...
Jason