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 positives.
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 https://bugzilla.samba.org/show_bug.cgi?id=7556#c3.
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.
Andrew _______________________________________________ ccache mailing list ccache@lists.samba.org https://lists.samba.org/mailman/listinfo/ccache