[llvmlinux] Compiling LLVMLinux with distcc or ccache

Behan Webster behanw at converseincode.com
Tue Jul 29 16:42:00 UTC 2014


On 07/29/14 04:29, Renato Golin wrote:
> HI,
>
> I was trying to use ccache or distcc on your tree and the build
> scripts try to create directories for "distcc" or "ccache", since
> that's what `basename $CC` returns.
ccache is already heavily used in our build scripts; just set 
USE_CCACHE=1 in your environment (or top level local.mk file) and it 
gets used in all places that gcc is employed. We explicitly don't use it 
for compiling the kernel with clang however (not that we don't trust 
ccache, but since it is clang that we are testing, we don't want 
anything else to generate a false positive).

Since we set CC internally to choose between gcc and clang, anything 
that ccache does from outside the build system is overridden (it plays 
with the same env variables we do). That and we maintain seperate 
$CCACHE_DIR per build tree (which can be shared between builds on the 
same server by setting a common CCACHE_ROOT=/path/to/shared/ccache/root

Jan-Simon uses icecc/icecream, which is a nextgen distcc project from 
openSuse. So it works with that to my knowledge too.

> Since using those wrappers is a good idea on large projects
> (especially when youhave to compiler LLVM *and* the kernel), it'd be
> good to have a solution working around that, maybe using recursive
> readlink (since distcc can point to ccache)?
Which is why we've supported these things since near the beginning.

I hope this helps!

Behan

-- 
Behan Webster
behanw at converseincode.com



More information about the LLVMLinux mailing list