blob: d58c8f6e57a01a70e9f0f8810aa1989509528c6a [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
2export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003CCACHE_DISABLE[unexport] = "1"
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005# We need to stop ccache considering the current directory or the
6# debug-prefix-map target directory to be significant when calculating
7# its hash. Without this the cache would be invalidated every time
8# ${PV} or ${PR} change.
9export CCACHE_NOHASHDIR ?= "1"
10
11DEPENDS_append_class-target = " ccache-native"
12DEPENDS[vardepvalueexclude] = " ccache-native"
13
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014do_configure[dirs] =+ "${CCACHE_DIR}"
15do_kernel_configme[dirs] =+ "${CCACHE_DIR}"