xref: /freebsd/tools/build/options/WITH_CCACHE_BUILD (revision b2c76c41be32f904179efed29c0ca04d53f3996c)
1*9d178c92SEd MasteUse
29160419cSBryan Drewery.Xr ccache 1
39160419cSBryan Dreweryfor the build.
49160419cSBryan DreweryNo configuration is required except to install the
59160419cSBryan Drewery.Sy devel/ccache
69160419cSBryan Drewerypackage.
77a206c31SWarren BlockWhen using with
87a206c31SWarren Block.Xr distcc 1 ,
97a206c31SWarren Blockset
109160419cSBryan Drewery.Sy CCACHE_PREFIX=/usr/local/bin/distcc .
119160419cSBryan DreweryThe default cache directory of
129160419cSBryan Drewery.Pa $HOME/.ccache
139160419cSBryan Drewerywill be used, which can be overridden by setting
149160419cSBryan Drewery.Sy CCACHE_DIR .
159160419cSBryan DreweryThe
169160419cSBryan Drewery.Sy CCACHE_COMPILERCHECK
179160419cSBryan Dreweryoption defaults to
189160419cSBryan Drewery.Sy content
199160419cSBryan Drewerywhen using the in-tree bootstrap compiler,
209160419cSBryan Dreweryand
219160419cSBryan Drewery.Sy mtime
229160419cSBryan Drewerywhen using an external compiler.
239160419cSBryan DreweryThe
249160419cSBryan Drewery.Sy CCACHE_CPP2
259160419cSBryan Dreweryoption is used for Clang but not GCC.
269160419cSBryan Drewery.Pp
279160419cSBryan DrewerySharing a cache between multiple work directories requires using a layout
289160419cSBryan Drewerysimilar to
299160419cSBryan Drewery.Pa /some/prefix/src
309160419cSBryan Drewery.Pa /some/prefix/obj
319160419cSBryan Dreweryand an environment such as:
329160419cSBryan Drewery.Bd -literal -offset indent
339160419cSBryan DreweryCCACHE_BASEDIR='${SRCTOP:H}' MAKEOBJDIRPREFIX='${SRCTOP:H}/obj'
349160419cSBryan Drewery.Ed
359160419cSBryan Drewery.Pp
369160419cSBryan DrewerySee
379160419cSBryan Drewery.Xr ccache 1
389160419cSBryan Dreweryfor more configuration options.
39