[ccache] Why not cache link commands?
vapier at gentoo.org
Tue Sep 18 14:04:59 MDT 2012
On Tuesday 18 September 2012 08:44:29 Andrew Stubbs wrote:
> Clearly there are some technical challenges in doing this: we'd have to
> hash all the object files and libraries (a la direct mode), but those
> problems are surmountable, I think.
or just re-use build-id ...
> The linker does not use any libraries not listed with "gcc '-###' whatever".
mmm different gcc flags can implicitly expand into -l### or different crt
objects, so you can't cache linking at the compiler driver level w/out re-
implementing much of the guts of gcc, and even then you'd break with
moderately patched gcc versions.
> I'm also aware that it's not that interesting for many incremental
> builds, where the final link will always be different, but my use case
> is accelerating rebuilds of projects that my have many outputs, most of
> which are likely to be unaffected by small code changes. It's also worth
> noting that incremental builds are not the target use case for ccache in
gold should already support incremental linking (ala build-id), so i don't
think that's already a fixed problem
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the ccache