logo       

Re: ccache: msg#00885

linux.region.israel

Subject: Re: ccache

Mark Veltzer <mark-zMkqr+MLrVdAfugRpC6u6w@xxxxxxxxxxxxxxxx> writes:

> If you think that this does not take H files into consideration you are
> wrong. As Muli rightly states ccache takes the output of gcc -M which means
> the ENTIRE source that the compiler sees (H files and all AFTER
> preprocessor). In addition, it also stores the flags used for the compilation
> in the cache. I would rarely see a situation where you would say that YOU DO
> want the object recompiled unless you switched compilers (I'm not sure but I
> think that there are plans for ccache to store the compiler version too so if
> you switch compilers it will detect it and not use the cache. Muli ?!?).

I know all that, and I wrote myself ccache worked on preprocessed
files. But what if for some reason I made the file dependent on
something that is not under the compiler's control - a file that is
not C. Then if that file changed, make would recompile, but ccache
would grab the existing object from the cache.

Why would I want that? For instance, because I would want a generated
compilation timestamp to change... I can't really think of good
examples, but ccache works, AFAIK, on the basis of MD5 of the
preprocessed C sources, and make can update the build on the basis of
timestamps of dependencies external to C sources as well.

--
Oleg Goldshmidt | ogoldshmidt-PAF1oyTKKOFOm2FXKvvI6EB+6BGkLq7r@xxxxxxxxxxxxxxxx
=================================================================
"... Of theoretical physics and programming, programming embodied
the greater intellectual challenge." [E.W.Dijkstra, 1930 - 2002.]

=================================================================
To unsubscribe, send mail to
linux-il-request-Xh+NVF5n0LIQhDRD3CWCHA@xxxxxxxxxxxxxxxx with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request-Xh+NVF5n0LIQhDRD3CWCHA@xxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise