summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-04-05 12:43:47 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2012-04-05 17:32:02 +0100
commit490beb166be0eecb18761c5f798245ab66bf3470 (patch)
treee09f016a847f3b5449cfe9f320d5a1f3261488af /morph
parentf42f67359297348eef109c80b5cb6476fe8edbc8 (diff)
downloadmorph-490beb166be0eecb18761c5f798245ab66bf3470.tar.gz
morph: hash the toolchain .meta files in ccache
We need the entire toolchain to be part of the hash that determines ccache objects, as if any of them differ it could generate different output. ccache can have the cache-key depend on arbitrary files with the CCACHE_EXTRAFILES environment variable, which is a : separates list of files to hash. So add the .meta files of our toolchain to CCACHE_EXTRAFILES if they exist. Extra work needs to be done to ensure the toolchain is properly hashed however, the .meta files will need the cache-key to be included.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph5
1 files changed, 5 insertions, 0 deletions
diff --git a/morph b/morph
index c3f051f4..13a67348 100755
--- a/morph
+++ b/morph
@@ -694,6 +694,11 @@ class Morph(cliapp.Application):
# FIXME: This needs to be made working, but it doesn't really, right now:
# the tempdir is not available inside the staging chroot.
# env['CCACHE_BASEDIR'] = self.tempdir.dirname
+ env['CCACHE_EXTRAFILES'] = ':'.join(
+ f for f in ('/baserock/binutils.meta',
+ '/baserock/eglibc.meta',
+ '/baserock/gcc.meta') if os.path.exists(f)
+ )
if not self.settings['no-distcc']:
env['CCACHE_PREFIX'] = 'distcc'