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!postnews.google.com!not-for-mail From: i-google-iasuhdkajsh@rf.risimo.net Newsgroups: comp.lang.ada Subject: Re: How to cache output of the compiler aka ccache Date: 17 Mar 2005 22:58:18 -0800 Organization: http://groups.google.com Message-ID: <7f8cfe1b.0503172258.2ef3b9f6@posting.google.com> References: <1111085641.211767.56950@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: 84.137.249.202 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1111129099 24685 127.0.0.1 (18 Mar 2005 06:58:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 18 Mar 2005 06:58:19 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:9583 Date: 2005-03-17T22:58:18-08:00 List-Id: i-google-iasuhdkajsh@rf.risimo.net wrote in message news:<1111085641.211767.56950@f14g2000cwb.googlegroups.com>... > Hi > > I have a 1mio LOC project and it takes multiple hours to > build and rebuild. The C/C++ world has a nice tools (ccache > is well known here) which cache the output of the compiler. > This especially speeds up the time for a "make clean;make". > > Is there such a thing for Ada in general and gcc's gnat > specially? Any other way to speed up the compilation? Thanks for your input. I'm more a C/C++ guy than an Ada one. So please correct anything below. There are two main gains scenarios where a cache helps. 1) make clean;make You think that there are no reason for this. 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 - you have changed the configuration somehow (adding sound support for example) - poor/bad make files for non-Ada code 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. 2) Sharing between trees I also want to give here two examples. The first is when a group of local developers share such a cache. If now an external CVS change comes in only one developer has to wait. In the best case you could do a background cache filling based on new CVS code with cron and co. The second case for sharing is multiple tress. Let me give you an example: $ cd tree.clean $ make $ cd ..;cp -a tree.clean tree.patched; cd tree.patched $ patch -p1 <.... $ make # nothing gained so far. Two days later however there # is an external CVS change. $ cd ../tree.clean $ cvs up;make # testing ... ok. Let's test the patched version $ cd ../tree.patched $ cvs up $ make # The last make should really be speed up. So you see there are more or less valid reasons for a compile cache. Thanks for the -m switch hint. I will try it. Thomas