aboutsummaryrefslogtreecommitdiff
path: root/tools/build/options/WITH_CCACHE_BUILD
blob: 4e29c9ab6d52e0ce38eb1ed44dfaf68dd8686399 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.\" $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
.Pa $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.
.Pp
Sharing a cache between multiple work directories requires using a layout
similar to
.Pa /some/prefix/src
.Pa /some/prefix/obj
and an environment such as:
.Bd -literal -offset indent
CCACHE_BASEDIR='${SRCTOP:H}' MAKEOBJDIRPREFIX='${SRCTOP:H}/obj'
.Ed
.Pp
See
.Xr ccache 1
for more configuration options.