[ccache] New ccache User - Got Some Questions

Naqib Khan naqibn at nortel.com
Tue Jul 11 15:43:52 GMT 2006


Martin,

Much appreciate the reply & useful INFO you've provided.  Can you
clarify what is meant by:  "It only works with gcc or compilers that
have similar external behaviour".  Is the "similiar external behavior"
you are referring to the "-E" option?  

Said in another way, how do I indentify which compilers will work with
ccache?


Thank you,
Naqib


-----Original Message-----
From: Martin Pool [mailto:mbp at canonical.com] 
Sent: Monday, July 10, 2006 7:21 PM
To: Khan, Naqib (RICH2:2V90)
Cc: ccache at lists.samba.org
Subject: Re: [ccache] New ccache User - Got Some Questions


On 11/07/2006, at 2:55 AM, Naqib Khan wrote:

> Hi,
>
> I'm new to ccache - it does appear to be an extremely useful tool for 
> compiling software.  I have read through all the archives, but don't 
> seem to specifically find the answers I'm looking for - here they are:
>
> 1) Does ccache only work with gcc... or can I also use it with any 
> arbitrary compiler?  If not, which other compilers does it
> specifically
> support?  (Note:  I did see a similar question in the archives, but  
> that
> was about 2 years ago).

It only works with gcc or compilers that have similar external  
behaviour.  (There are some niche compilers based on gcc, and the  
intel cc tries to be like gcc, but apparently is not close enough.)

> 2) ccache usage - the documentation / information on the web indicates

> that ccache is best suited for:  C/C++ compiles; "clean" builds.  My 
> question is are those the type of builds I should be targeting (i.e. 
> C/C++ compiles; "clean" builds)?  It would appear that ccache
> should be
> able to speed up compiles in general regardless, due to it's
> sophistication (i.e. hashing versus plain old timestamp checking).

It's useful in general; it just will give the biggest proportional  
win when you do "make; make clean; make"

> 3) In-house we also use clearmake (DOs & wink-ins) - does anybody have

> experience with incorporating ccache in this type of environment? 
> Specifically...
> 3a) I assume since ccache creates it's own object files, that ccache 
> would essentially _replace_ clearmake, correct?

Yes, they're trying to do the same thing at different levels.   
Clearmake (as I understand) can cache all kinds of output, not just C/ 
C++ compilation; ccache is a bit simpler and doesn't depend on
clearmake or clearcase, and can work with distcc for an even bigger win.

> 3b) Just checking here (just in case) - before I get started on this 
> journey :)  - has anyone successfully used ccache with clearmake?

I haven't.  Maybe someone else has.



-- 
Martin





More information about the ccache mailing list