scons: Put all config variables in an env['CONF'] sub-dict.
This makes what are configuration and what are internal SCons variables explicit and separate, and makes it unnecessary to call out what variables to export to C++. These variables will also be plumbed into and out of kconfiglib in later changes. Change-Id: Iaf5e098d7404af06285c421dbdf8ef4171b3f001 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56892 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['USE_SYSTEMC']:
|
||||
if not env['CONF']['USE_SYSTEMC']:
|
||||
Return()
|
||||
|
||||
env.UseSystemcCheck(warn=True)
|
||||
|
||||
@@ -44,5 +44,7 @@ def use_systemc_check(env, warn=False):
|
||||
|
||||
main.AddMethod(use_systemc_check, 'UseSystemcCheck')
|
||||
|
||||
main['CONF']['USE_SYSTEMC'] = main.UseSystemcCheck()
|
||||
|
||||
sticky_vars.Add(BoolVariable('USE_SYSTEMC', 'Enable SystemC API support',
|
||||
main.UseSystemcCheck()))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('messages.cc')
|
||||
Source('sc_clock.cc')
|
||||
Source('sc_event_queue.cc')
|
||||
|
||||
@@ -27,7 +27,7 @@ import gem5_scons
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
SimObject('SystemC.py', sim_objects=[
|
||||
'SystemC_Kernel', 'SystemC_ScObject', 'SystemC_ScModule'])
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('sc_mempool.cc')
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('messages.cc')
|
||||
Source('sc_bit.cc')
|
||||
Source('sc_bv_base.cc')
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('messages.cc')
|
||||
Source('sc_fxcast_switch.cc')
|
||||
Source('sc_fxdefs.cc')
|
||||
|
||||
@@ -27,7 +27,7 @@ Import('*')
|
||||
|
||||
from gem5_scons.util import compareVersions
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
if env['GCC'] and compareVersions(env['CXXVERSION'], '10.0') >= 0:
|
||||
disable_false_positives = {
|
||||
"CCFLAGS": [ "-Wno-array-bounds",
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('sc_concatref.cc')
|
||||
Source('sc_value_base.cc')
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['USE_SYSTEMC'] or not env['USE_PYTHON']:
|
||||
if not env['CONF']['USE_SYSTEMC'] or not env['USE_PYTHON']:
|
||||
Return()
|
||||
|
||||
PySource('m5', 'systemc.py')
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC'] and GetOption('with_systemc_tests'):
|
||||
if env['CONF']['USE_SYSTEMC'] and GetOption('with_systemc_tests'):
|
||||
|
||||
from gem5_scons import Transform
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['USE_SYSTEMC']:
|
||||
if not env['CONF']['USE_SYSTEMC']:
|
||||
Return()
|
||||
|
||||
SimObject('TlmBridge.py', sim_objects=[
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('gp.cc')
|
||||
Source('phase.cc')
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('global_quantum.cc')
|
||||
if env['USE_PYTHON']:
|
||||
Source('global_quantum_python.cc')
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('convenience_socket_bases.cc')
|
||||
Source('instance_specific_extensions.cc')
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if env['CONF']['USE_SYSTEMC']:
|
||||
Source('functions.cc')
|
||||
Source('messages.cc')
|
||||
Source('report.cc')
|
||||
|
||||
Reference in New Issue
Block a user