From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,206547e68a60b0e7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How to cache output of the compiler aka ccache Date: 18 Mar 2005 08:33:08 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1111085641.211767.56950@f14g2000cwb.googlegroups.com> <7f8cfe1b.0503172258.2ef3b9f6@posting.google.com> NNTP-Posting-Host: shell01-e.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1111152788 11376 69.38.147.31 (18 Mar 2005 13:33:08 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 18 Mar 2005 13:33:08 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:9595 Date: 2005-03-18T08:33:08-05:00 List-Id: 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