[ccache] Why not cache compile failures?
Andrew Stubbs
ams at codesourcery.com
Fri Oct 5 03:17:47 MDT 2012
On 04/10/12 01:50, Shentino wrote:
> Would snooping on the compiler's own error messages help weed out
> transient failures like out of memory, disk full, and so on?
>
> I recently compiled webkit-gtk and it managed to exhaust all of my
> memory AND swap.
This does raise an interesting choice!
On the one hand, the scheme Martin has suggested for not caching
failures due to signals should mean that this result would not be cached
(an out-of-memory condition *could* be reported by the compiler as a
malloc failure, but overcommit makes it more likely to show up as a
SIGTERM/SIGKILL).
But on the other hand, if you're not sharing a cache with others, and
it's physically impossible to compile a given file on your machine, it
might be better to fail instantly rather than kill your machine
everytime you run it by mistake!
On balance, I prefer the first answer though: not caching memory or disk
exhaustion. (Disk full is harder to detect though, as it's not a signal.)
Andrew
More information about the ccache
mailing list