comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: How to cache output of the compiler aka ccache
Date: 18 Mar 2005 08:33:08 -0500
Date: 2005-03-18T08:33:08-05:00	[thread overview]
Message-ID: <wccpsxxkrjf.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 7f8cfe1b.0503172258.2ef3b9f6@posting.google.com

i-google-iasuhdkajsh@rf.risimo.net writes:

> There are two main gains scenarios where a cache helps.
> 
> 1) make clean;make
> You think that there are no reason for this.

I don't think that.   I just think it's rare.  In my normal work, I
don't use "make clean"; I can arrange for any necessary "make clean"s to
happen at night, while I'm sleeping, and everything is rebuilt by the
time I wake up.

> However I disagree. There are cases you need to rerun
> configure and afterwards the make clean;make idoim. Reasons 
> for this could be:
>  - you have changed the version/flags of tools you use

...in which case ccache will flush its cache and recompile everything,
which is what you want!

I guess the advantage here is that when you switch back to the previous
version/flags, the stuff is still there in the cache, so the rebuild is
quick.  In Ada, I use separate build areas for separate versions/flags,
which accomplishes the same thing "by hand".

>  - you have changed the configuration somehow (adding 
>    sound support for example)

OK.  Seems similar to the version/flags case.

>  - poor/bad make files for non-Ada code

OK; that's the case I speculated upon.

> In my project are multiple compilper generators and 
> C/C++ and Java source code. So there is a configure and
> make clean;make is a good way to make sure you have a
> good build.

Makes sense for C and C++ compilers, and various other tools.
But I think Java compilers can be trusted to rebuild
properly, just like Ada compilers.

> 2) Sharing between trees

That's a good point; I hadn't thought of that.

I believe the Rational (IBM) Ada compiler supports sharing between
trees.  I suspect making a ccache-like tool for Ada would require
some compiler-specific knowledge, because unlike C, the Ada compiler
is required to store version information and prevent linking of
version-skewed programs.

> So you see there are more or less valid reasons for a compile cache.

Yes, I agree.

- Bob



  reply	other threads:[~2005-03-18 13:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 18:54 How to cache output of the compiler aka ccache i-google-iasuhdkajsh
2005-03-17 19:40 ` Robert A Duff
2005-03-17 20:04   ` Ludovic Brenta
2005-03-17 21:27     ` Marius Amado Alves
2005-03-18  1:24       ` Ludovic Brenta
2005-03-18  2:08         ` Robert A Duff
2005-03-17 19:47 ` Ludovic Brenta
2005-03-18 19:22   ` Simon Wright
2005-03-18 20:04     ` Randy Brukardt
2005-03-18 22:10       ` Florian Weimer
2005-03-19  3:25       ` Larry Kilgallen
2005-03-18  6:58 ` i-google-iasuhdkajsh
2005-03-18 13:33   ` Robert A Duff [this message]
2005-03-18 14:01     ` Vinzent 'Gadget' Hoefler
2005-03-18 14:41       ` Florian Weimer
2005-03-18 15:08         ` Vinzent 'Gadget' Hoefler
2005-03-18 16:24           ` Florian Weimer
2005-03-21  8:16             ` Vinzent 'Gadget' Hoefler
2005-03-21  8:54               ` Florian Weimer
2005-03-21 11:26                 ` Vinzent 'Gadget' Hoefler
2005-03-18  8:07 ` Martin Krischik
2005-03-18 18:50 ` i-google-iasuhdkajsh
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox