diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-04-05 12:43:47 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-04-05 17:32:02 +0100 |
commit | 490beb166be0eecb18761c5f798245ab66bf3470 (patch) | |
tree | e09f016a847f3b5449cfe9f320d5a1f3261488af /morph | |
parent | f42f67359297348eef109c80b5cb6476fe8edbc8 (diff) | |
download | morph-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-x | morph | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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' |