[ccache] direct mode design bug
ams at codesourcery.com
Thu Nov 8 13:38:13 MST 2012
On 08/11/12 19:25, Mathias De Maré wrote:
>> Is it safe?
>> Yes. The most important aspect of a compiler cache is to always produce exactly the same output that the real compiler would produce. This includes providing exactly the same object files and exactly the same compiler warnings that would be produced if you use the real compiler. The only way you should be able to tell that you are using ccache is the speed.
> Performance is an important aspect, but it seems better to me to
> prefer the safe option (right now, that's preprocessing made, perhaps
> in the future it can be a 'safe direct mode'), rather than the fast
> Application defaults (this is my personal opinion of course) benefit
> from being safe. It's always possible for users to go with a more
> advanced option if they do feel confident.
The above statement remains true if you do not change the
toolchain/library installation without also wiping the cache.
If you do change the installation, without telling ccache, then ccache
produces the exact same output that the real compiler *used to* produce.
To me, the question is whether that is broken enough to disable, by
default, a feature that is such a huge performance win?
So, to answer this, I thought of who cares about the distinction, and
decided that only the power users are likely to trip over the problem.
Based on this I decided that a good first step would be to simply
document the problem.
In any case, I do believe that that's only an interim measure, it is a
problem that could well affect my users, and that's why I've been giving
some thought to how best to solve it, properly.
More information about the ccache