summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-11-08 17:35:22 -0800
committerGabe Black <gabeblack@google.com>2017-11-10 13:16:36 +0000
commit25e43169c4f0597960bd9888770283af96d59298 (patch)
treedbe81d4379118c486e8c9f95cfb5dc84e59b9b6b /SConstruct
parentb67ea8fb3a7d27540cef4c2de78608134bbcdae7 (diff)
downloadgem5-25e43169c4f0597960bd9888770283af96d59298.tar.xz
scons: Override the "default" tool to set up the default env.
This imports various environment variables into the scons environment, and sets some general properties on it. These are basically just copied directly from the SConstruct and have the same behavior here. gem5_tool_list will be used later on to add scons "tools" which should be automatically added to new Environment objects. Change-Id: Ib255955090c7b1e1cb80c703c18a9c867fcf1c9e Reviewed-on: https://gem5-review.googlesource.com/5562 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct28
1 files changed, 1 insertions, 27 deletions
diff --git a/SConstruct b/SConstruct
index 49bf3475c..7cf2c9c83 100755
--- a/SConstruct
+++ b/SConstruct
@@ -183,33 +183,7 @@ termcap = get_termcap(GetOption('use_colors'))
#
########################################################################
-# export TERM so that clang reports errors in color
-use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
- 'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PROTOC',
- 'PYTHONPATH', 'RANLIB', 'TERM' ])
-
-use_prefixes = [
- "ASAN_", # address sanitizer symbolizer path and settings
- "CCACHE_", # ccache (caching compiler wrapper) configuration
- "CCC_", # clang static analyzer configuration
- "DISTCC_", # distcc (distributed compiler wrapper) configuration
- "INCLUDE_SERVER_", # distcc pump server settings
- "M5", # M5 configuration (e.g., path to kernels)
- ]
-
-use_env = {}
-for key,val in sorted(os.environ.iteritems()):
- if key in use_vars or \
- any([key.startswith(prefix) for prefix in use_prefixes]):
- use_env[key] = val
-
-# Tell scons to avoid implicit command dependencies to avoid issues
-# with the param wrappes being compiled twice (see
-# http://scons.tigris.org/issues/show_bug.cgi?id=2811)
-main = Environment(ENV=use_env, IMPLICIT_COMMAND_DEPENDENCIES=0)
-main.Decider('MD5-timestamp')
-main.root = Dir(".") # The current directory (where this file lives).
-main.srcdir = Dir("src") # The source directory
+main = Environment()
main_dict_keys = main.Dictionary().keys()