using clang (was: Re: ps, clang and make variables)

Warren Block wblock at wonkity.com
Sun Apr 1 23:57:41 UTC 2012


On Sun, 1 Apr 2012, Conrad J. Sabatier wrote:

> On Sun, 1 Apr 2012 14:11:29 -0500
> "Conrad J. Sabatier" <conrads at cox.net> wrote:
>
>> On Sun, 1 Apr 2012 12:29:45 -0600 (MDT)
>> Warren Block <wblock at wonkity.com> wrote:
>>>
>>> Have you tried clang with ccache?  Any tricks?
>>
>> No, I haven't tried that.  Actually, I don't believe I've ever even
>> tried using ccache at all (at least, not that I can recall).  :-)
>>
>
> You've piqued my curiosity here.  :-)
>
> I'm doing a buildworld at the moment using ccache with clang.  So far,
> all is well, no problems.  Didn't do anything special to get started,
> just "ccache make -DNO_CLEAN -j8 buildworld" (I have all that
> clang-enabling stuff already in /etc/make.conf).  I know this first run
> won't really show me much, other than that it *will* compile OK.
> Subsequent runs should be interesting, though.  :-)

A few tests earlier today showed that with everything in cache, it took 
about 1.5 to 2 times as long to build with clang versus gcc 4.2.1.  It 
was faster with a full cache than without, of course: clang took 38 
minutes with nothing in cache, about 12 minutes with everything cached, 
and gcc buildworlds have been as fast as six minutes.  A gcc all-cached 
test I just tried was 7:47.

For some reason, buildworlds on this Core I5 are much faster when 
running powerd -a hadp than without.  And somewhat variable.


More information about the freebsd-questions mailing list