xref: /freebsd/tools/build/options/WITH_CCACHE_BUILD (revision 02e9120893770924227138ba49df1edb3896112a)
1Use
2.Xr ccache 1
3for the build.
4No configuration is required except to install the
5.Sy devel/ccache
6package.
7When using with
8.Xr distcc 1 ,
9set
10.Sy CCACHE_PREFIX=/usr/local/bin/distcc .
11The default cache directory of
12.Pa $HOME/.ccache
13will be used, which can be overridden by setting
14.Sy CCACHE_DIR .
15The
16.Sy CCACHE_COMPILERCHECK
17option defaults to
18.Sy content
19when using the in-tree bootstrap compiler,
20and
21.Sy mtime
22when using an external compiler.
23The
24.Sy CCACHE_CPP2
25option is used for Clang but not GCC.
26.Pp
27Sharing a cache between multiple work directories requires using a layout
28similar to
29.Pa /some/prefix/src
30.Pa /some/prefix/obj
31and an environment such as:
32.Bd -literal -offset indent
33CCACHE_BASEDIR='${SRCTOP:H}' MAKEOBJDIRPREFIX='${SRCTOP:H}/obj'
34.Ed
35.Pp
36See
37.Xr ccache 1
38for more configuration options.
39