diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 13:05:39 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 13:05:39 -0500 |
commit | 4c06be60fce383be08aaaf21fc4059dcc0f8a23a (patch) | |
tree | 8fb13a84f119400a7b592bc6a45f6fbc0a86bc89 | |
parent | 694a81e9942724544024266378604fb7d6b3dd40 (diff) | |
download | gem5-4c06be60fce383be08aaaf21fc4059dcc0f8a23a.tar.xz |
scons: Whitelist useful environment variables
Scons normally removes all environment variables that aren't
whitelisted from the build environment. This messes up things like
ccache, distcc, and the clang static analyzer. This changeset adds the
DISTCC_, CCACHE_, and CCC_ prefixes to the environment variable
whitelist.
-rwxr-xr-x | SConstruct | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index a51acb159..22b63f02f 100755 --- a/SConstruct +++ b/SConstruct @@ -183,9 +183,17 @@ use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH', 'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PYTHONPATH', 'RANLIB', 'SWIG' ]) +use_prefixes = [ + "M5", # M5 configuration (e.g., path to kernels) + "DISTCC_", # distcc (distributed compiler wrapper) configuration + "CCACHE_", # ccache (caching compiler wrapper) configuration + "CCC_", # clang static analyzer configuration + ] + use_env = {} for key,val in os.environ.iteritems(): - if key in use_vars or key.startswith("M5"): + if key in use_vars or \ + any([key.startswith(prefix) for prefix in use_prefixes]): use_env[key] = val main = Environment(ENV=use_env) |