summaryrefslogtreecommitdiffstats
path: root/meta/classes/ccache.bbclass
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2017-03-15 12:29:16 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-17 16:53:06 (GMT)
commite987f620097df16c155303668e2b8093071fe75f (patch)
tree5e8a86f619a74d83c3ba4fd1c43d8d8b30930b7f /meta/classes/ccache.bbclass
parentb6971f52dc940b9c5a5f741a2df57873e886a10e (diff)
downloadpoky-e987f620097df16c155303668e2b8093071fe75f.tar.gz
ccache: Disable CCACHE_HASHDIR by default
As of ccache-3.3, ccache tries to ensure that the paths in the debug information are always correct. It does this by including the current directory in the hash if debug output is enabled. It includes support for detecting remapping via a single -fdebug-prefix-map argument uses the remapped directory in the hash instead. The DEBUG_PREFIX_MAP in bitbake.conf remaps the source directory, target sysroot and native sysroot separately which results in multiple -fdebug-prefix-map arguments. Although ccache passes all these arguments through to the compiler, it only enables the special behaviour described above if the last one matches the current directory. (See https://github.com/ccache/ccache/issues/163 ) Even if ccache did correctly honour each of the remapping arguments, the hashes would still be different every time ${PV} or ${PR} change because the default DEBUG_PREFIX_MAP contains maps to paths including them. So it seems that for ccache to be of any use with this configuration, CCACHE_NOHASHDIR needs to be set. (From OE-Core rev: fb7a5cdcff19bb44a25a51e20de0440c1ebcc057) Signed-off-by: Mike Crowe <mac@mcrowe.com> Helped-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/ccache.bbclass')
-rw-r--r--meta/classes/ccache.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 76c8828..9713fea 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -2,6 +2,12 @@ CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
2export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}" 2export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
3CCACHE_DISABLE[unexport] = "1" 3CCACHE_DISABLE[unexport] = "1"
4 4
5# 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
5DEPENDS_append_class-target = " ccache-native" 11DEPENDS_append_class-target = " ccache-native"
6DEPENDS[vardepvalueexclude] = " ccache-native" 12DEPENDS[vardepvalueexclude] = " ccache-native"
7 13