[ccache] ccache on generated C++ files...
bernd at tuxoid.at
Tue Jun 25 21:24:42 UTC 2019
On 25/06/2019 00:28, Malfettone, Kris via ccache wrote:
> So what I seem to be observing is only when I do a ninja -t clean or make clean. This removes all of my generated files (.h and .cpp files) and of course the normal build outputs. A subsequent run is then mostly cache misses. If I say manually do a rm $(find -name "*.o") then I get a 100% cache hit rate. I had assumed it was due to the fact that the generated files would have a newer mtime and ctime. My assumption must be wrong.
TTBOMK ccache ignores mtime/ctime/... (as make/ninja/... use that anyway
before) but only the preprocessed content matters.
IIUC, the `make clean` removes all *.o and all generated .h/.c/.hpp/.cpp
The rm $(find -name "*.o") removes only *.o.
So the analysis above is at least incomplete.
Are you really sure the newly generated .h/.c/.hpp/.cpp files are
No static variables or expanded preprocessor #defines with the build
date+time or similar in there?
[ Fullquote deleted ]
Bernd Petrovitsch Email : bernd at petrovitsch.priv.at
LUGA : http://www.luga.at
More information about the ccache