[ccache] direct mode
andrew_stubbs at mentor.com
Mon Oct 28 03:36:15 MDT 2013
On 27/10/13 20:03, Joel Rosdahl wrote:
> Assume that /example/foo/foo/bar.h doesn't exist and that
> /example/foo/bar.h exists. The preprocessed output will indicate that
> /example/foo/bar.h was read. Which directories where the header wasn't
> found should we store in the manifest? The correct answer is
> "/example/foo", which I don't see how ccache can conclude from the
> available information.
Sigh, I had hoped that there'd be only false-negatives, and no missed
I think there's enough line-number information in the preprocessed
source to locate the #include directive in the original source file. The
data has to be read from disk anyway, but all that extra processing
might make a cache-miss very expensive.
> Regarding how to know whether we can pass compiler-specific options like
> -v, I have had some thoughts about that some years ago, see comment 3 on
Agreed, capturing and caching the identity of any given compiler should
not be too hard. "cc --version" is one way, or it might just be easier
to load the binary into memory and memmem your way to victory. The
result can be cached and indexed by a hash of the path and mtime.
More information about the ccache