[ccache] Re: trouble with icc

Jason Lunz lunz at falooley.org
Mon Mar 13 23:59:48 GMT 2006

rwa000 at gmail.com said:
> Can anyone help out here?  I am working in an absolutely huge software
> project and ccache would be a boon if I could just make it work with icc.

I gave up on using ccache for icc. afaict, ccache assumes (reasonably)
that a compiler's output should be the same regardless of whether
preprocessing and compilation are done as one step or two. That is,
since one of ccache's cache hit tests is to preprocess and md5sum the
source to be compiled (iirc), it saves time to pass the
already-preprocessed code to the compiler for compilation when there's a
cache miss. That way preprocessing isn't done twice on cache misses.

Unfortunately, the enormous icc frontend seems to be filled with magic
undocumented hacks that turn on various internal workarounds depending
on the input. The best I could tell, the set of hacks that gets enabled
is different when you feed it already-preprocessed code.

To see this, you can replace the icc backend (mcpcom) with a wrapper
that saves a copy of the mcpcom's response file input before invoking
the real mcpcom. The icc frontend generates a tempfile of this input
each time it runs mcpcom, and by saving this and looking at it you can
see what it's really doing. In fact, you may be able to discern from
this what magic input options are required to get the frontend to always
compile your code the same way, and that could allow you to use ccache.

As for me, I developed a healthy Fear of icc after investigating this
far and stopped trying to use it with ccache.


More information about the ccache mailing list