[ccache] Why not cache link commands?
Andrew Stubbs
ams at codesourcery.com
Tue Sep 18 10:32:13 MDT 2012
On 18/09/12 16:37, Justin Lebar wrote:
> ldcache would hash object files and spit out linked files. It would
> use an entirely separate cache. Its handling of command-line options
> would be entirely different. Its processing of input files would be
> entirely different. ISTM that very little would be shared.
It takes multiple input files and returns a single output file, plus
stderr. This much is the same.
An input object file is just as hashable as an input header file, you
just find them a different way. I think the manifest file would need
little or no modification.
Similarly, the output file is just as cacheable. There's probably no
need to even use a different suffix in the cache.
I've yet to get into the precise details, but I think the file discovery
mechanism would need to be abstracted out a little, but that's the
biggest change.
The command line parsing would need a once over, of course. The biggest
change there is that it's more normal to list multiple input files on
the command line, and there's no "language" to determine.
> Since this is targeting a niche use-case and is a large change to
> ccache, I'd be hesitant to take this change upstream, if I were Joel.
Right, as little churn as possible, and no extra overhead in the most
common cases.
Andrew
More information about the ccache
mailing list