diff options
author | Nathan Binkert <nate@binkert.org> | 2009-04-21 08:17:36 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-04-21 08:17:36 -0700 |
commit | b0489d18ed74b542e311a2a7238cd5e19bd4b2ab (patch) | |
tree | 60cc3e6d53617603b318bcad1a962b820c058567 | |
parent | 97b6947eb767ba1a7750525123c0c517223cee43 (diff) | |
download | gem5-b0489d18ed74b542e311a2a7238cd5e19bd4b2ab.tar.xz |
SCons: Export export_vars so SConsopts files can add to them
-rw-r--r-- | SConstruct | 11 | ||||
-rw-r--r-- | src/SConscript | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct index 1c7f09515..baa4864a9 100644 --- a/SConstruct +++ b/SConstruct @@ -654,6 +654,10 @@ Export('all_cpu_list', 'default_cpus') sticky_vars = Variables(args=ARGUMENTS) Export('sticky_vars') +# Sticky variables that should be exported +export_vars = [] +Export('export_vars') + # Non-sticky variables only apply to the current build. nonsticky_vars = Variables(args=ARGUMENTS) Export('nonsticky_vars') @@ -698,10 +702,9 @@ nonsticky_vars.AddVariables( ) # These variables get exported to #defines in config/*.hh (see src/SConscript). -env.ExportVariables = ['FULL_SYSTEM', 'USE_FENV', \ - 'USE_MYSQL', 'NO_FAST_ALLOC', 'FAST_ALLOC_DEBUG', \ - 'FAST_ALLOC_STATS', 'SS_COMPATIBLE_FP', \ - 'USE_CHECKER', 'TARGET_ISA', 'CP_ANNOTATE'] +export_vars += ['FULL_SYSTEM', 'USE_FENV', 'USE_MYSQL', + 'NO_FAST_ALLOC', 'FAST_ALLOC_DEBUG', 'FAST_ALLOC_STATS', + 'SS_COMPATIBLE_FP', 'USE_CHECKER', 'TARGET_ISA', 'CP_ANNOTATE'] ################################################### # diff --git a/src/SConscript b/src/SConscript index c02bf239d..20d454f03 100644 --- a/src/SConscript +++ b/src/SConscript @@ -48,7 +48,7 @@ Import('*') # Children need to see the environment Export('env') -build_env = dict([(opt, env[opt]) for opt in env.ExportVariables]) +build_env = dict([(opt, env[opt]) for opt in export_vars]) def sort_list(_list): """return a sorted copy of '_list'""" @@ -242,7 +242,7 @@ for extra_dir in extras_dir_list: build_dir = joinpath(env['BUILDDIR'], root[prefix_len:]) SConscript(joinpath(root, 'SConscript'), build_dir=build_dir) -for opt in env.ExportVariables: +for opt in export_vars: env.ConfigFile(opt) ######################################################################## |