[HOWTO] buildworld using clang + ccache

Very cool thread. Up until now I never paid much attention to clang and its history, but since I'm in the process of upgrading to FreeBSD 9.2-RELEASE using the source tree I figured that I might as well look into the compiler as well. I like doing things "the way they're intended" :)

I'm happy to say (though I'm probably stating the obvious) that it is perfectly doable to build the world and kernel of FreeBSD-9.2. The whole upgrade was pretty straightforward and without issues. I'm currently even using clang to rebuild some of my ports (just in case) and things work flawlessly.

Thanks for the great tips, much appreciated.

Edit: null-edit & respect the Clang! :h
 
jozze said:
After that I ran
Code:
# cd /usr/src
# time make -j16 buildworld
# time make -j16 buildworld

The first time it took me ~40 min to build (from 22:24 to 22:04). The second time it took considerably less: ~13 minutes (from 22:14 to 22:27).

Thanks for the info.

One caveat, I think you'll find your times less impressive if you rm -rf /usr/obj/usr and possibly make clean between your time make -j16 buildworld commands. Since you are running them consecutively, I'm willing to bet that all you are actually building is just the world build tool-chain. Since the rest of world was built in the first occurrence, your next build just checks to see if the existing objects in /usr/obj/usr are complete, right?
 
Back
Top