blob: 960902065c41e370494d034ecf79a1b008781fe7 [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 -05003
Brad Bishop6e60e8b2018-02-01 10:27:11 -05004# We need to stop ccache considering the current directory or the
5# debug-prefix-map target directory to be significant when calculating
6# its hash. Without this the cache would be invalidated every time
7# ${PV} or ${PR} change.
8export CCACHE_NOHASHDIR ?= "1"
9
10DEPENDS_append_class-target = " ccache-native"
11DEPENDS[vardepvalueexclude] = " ccache-native"