xref: /freebsd/tools/build/options/WITH_CCACHE_BUILD (revision 9160419c7a948786ef010cc398df0b857f714db3)
$FreeBSD$
Set to use .Xr ccache 1 for the build. No configuration is required except to install the .Sy devel/ccache package. Using with .Xr distcc 1 should set .Sy CCACHE_PREFIX=/usr/local/bin/distcc . The default cache directory of

a $HOME/.ccache will be used, which can be overridden by setting .Sy CCACHE_DIR . The .Sy CCACHE_COMPILERCHECK option defaults to .Sy content when using the in-tree bootstrap compiler, and .Sy mtime when using an external compiler. The .Sy CCACHE_CPP2 option is used for Clang but not GCC. ccache works best when combined with the .Sy WITH_FAST_DEPEND option.

p Sharing a cache between multiple work directories requires using a layout similar to

a /some/prefix/src

a /some/prefix/obj and an environment such as: d -literal -offset indent CCACHE_BASEDIR='${SRCTOP:H}' MAKEOBJDIRPREFIX='${SRCTOP:H}/obj' .Ed

p See .Xr ccache 1 for more configuration options.