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:
@@ -44,7 +44,7 @@ DebugFlag('DMA')
|
||||
SimObject('Platform.py', sim_objects=['Platform'])
|
||||
Source('platform.cc')
|
||||
|
||||
if env['TARGET_ISA'] == 'null':
|
||||
if env['CONF']['TARGET_ISA'] == 'null':
|
||||
Return()
|
||||
|
||||
SimObject('BadDevice.py', sim_objects=['BadDevice'])
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['BUILD_GPU']:
|
||||
if not env['CONF']['BUILD_GPU']:
|
||||
Return()
|
||||
|
||||
# Controllers
|
||||
|
||||
@@ -63,7 +63,7 @@ SimObject('EnergyCtrl.py', sim_objects=['EnergyCtrl'], tags='arm isa')
|
||||
SimObject('NoMali.py', sim_objects=['NoMaliGpu', 'CustomNoMaliGpu'],
|
||||
enums=['NoMaliGpuType'], tags='arm isa')
|
||||
SimObject('VirtIOMMIO.py', sim_objects=['MmioVirtIO'], tags='arm isa')
|
||||
if env['USE_ARM_FASTMODEL']:
|
||||
if env['CONF']['USE_ARM_FASTMODEL']:
|
||||
SimObject('VExpressFastmodel.py', sim_objects=[], tags='arm isa')
|
||||
|
||||
Source('a9scu.cc', tags='arm isa')
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if not env['BUILD_GPU']:
|
||||
if not env['CONF']['BUILD_GPU']:
|
||||
Return()
|
||||
|
||||
SimObject('HSADevice.py', sim_objects=['HSAPacketProcessor'])
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['TARGET_ISA'] == 'null':
|
||||
if env['CONF']['TARGET_ISA'] == 'null':
|
||||
Return()
|
||||
|
||||
SimObject('I2C.py', sim_objects=['I2CDevice', 'I2CBus'])
|
||||
|
||||
@@ -44,7 +44,7 @@ SimObject('Ethernet.py', sim_objects=[
|
||||
'EtherLink', 'DistEtherLink', 'EtherBus', 'EtherSwitch', 'EtherTapBase',
|
||||
'EtherTapStub', 'EtherDump', 'EtherDevice', 'IGbE', 'EtherDevBase',
|
||||
'NSGigE', 'Sinic'] +
|
||||
(['EtherTap'] if env['HAVE_TUNTAP'] else []))
|
||||
(['EtherTap'] if env['CONF']['HAVE_TUNTAP'] else []))
|
||||
|
||||
# Basic Ethernet infrastructure
|
||||
Source('etherbus.cc')
|
||||
|
||||
@@ -29,9 +29,7 @@ import gem5_scons
|
||||
|
||||
with gem5_scons.Configure(main) as conf:
|
||||
# Check if the TUN/TAP driver is available.
|
||||
conf.env['HAVE_TUNTAP'] = conf.CheckHeader('linux/if_tun.h', '<>')
|
||||
conf.env['CONF']['HAVE_TUNTAP'] = conf.CheckHeader('linux/if_tun.h', '<>')
|
||||
|
||||
if not main['HAVE_TUNTAP']:
|
||||
if not main['CONF']['HAVE_TUNTAP']:
|
||||
print("Info: Compatible header file <linux/if_tun.h> not found.")
|
||||
|
||||
export_vars.append('HAVE_TUNTAP')
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['TARGET_ISA'] == 'null':
|
||||
if env['CONF']['TARGET_ISA'] == 'null':
|
||||
Return()
|
||||
|
||||
SimObject('PS2.py', sim_objects=[
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['TARGET_ISA'] == 'null':
|
||||
if env['CONF']['TARGET_ISA'] == 'null':
|
||||
Return()
|
||||
|
||||
SimObject('Serial.py', sim_objects=['SerialDevice', 'SerialNullDevice'])
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['TARGET_ISA'] == 'null':
|
||||
if env['CONF']['TARGET_ISA'] == 'null':
|
||||
Return()
|
||||
|
||||
# Controllers
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
Import('*')
|
||||
|
||||
if env['TARGET_ISA'] == 'null':
|
||||
if env['CONF']['TARGET_ISA'] == 'null':
|
||||
Return()
|
||||
|
||||
SimObject('VirtIO.py', sim_objects=[
|
||||
|
||||
Reference in New Issue
Block a user