[ccache] request document.
mbp at sourcefrog.net
Wed Jun 8 07:55:45 GMT 2005
On 8 Jun 2005, Andrew Tridgell <tridge at osdl.org> wrote:
> > I could find multiple copies of same file in ccache directory, each
> > prepended with a different hash. could not understand it.
> It is quite possible for different C files to produce different cpp
> output and still produce the same object file. This is especially
> likely if you don't use the compilers -g to enable debugging
> information, but it can happen in ether case.
> The hash is based on the cpp output, so this is how you end up with
> the same object file, but different hashes.
As I'm sure tridge knows, you could avoid this by adding an extra
input_sha -> output_sha -> output
which would require something like a tdb to hold the mapping -- or you
could just do it with hardlinks. I'm not sure if the number of
duplicates is such that, by reducing cache pressure, it would help
More information about the ccache