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:
Gabe Black
2022-02-15 22:23:43 -08:00
parent caa5f12e21
commit e6c0ba97db
87 changed files with 211 additions and 233 deletions

View File

@@ -40,31 +40,31 @@
Import('*')
if env['PROTOCOL'] == 'None':
if env['CONF']['PROTOCOL'] == 'None':
Return()
env.Append(CPPDEFINES=['PROTOCOL_' + env['PROTOCOL']])
env.Append(CPPDEFINES=['PROTOCOL_' + env['CONF']['PROTOCOL']])
if env['PROTOCOL'] in env['NEED_PARTIAL_FUNC_READS']:
if env['CONF']['PROTOCOL'] in env['NEED_PARTIAL_FUNC_READS']:
env.Append(CPPDEFINES=['PARTIAL_FUNC_READS'])
if env['BUILD_GPU']:
if env['CONF']['BUILD_GPU']:
SimObject('GPUCoalescer.py', sim_objects=['RubyGPUCoalescer'])
SimObject('RubySystem.py', sim_objects=['RubySystem'])
SimObject('Sequencer.py', sim_objects=[
'RubyPort', 'RubyPortProxy', 'RubySequencer', 'RubyHTMSequencer',
'DMASequencer'])
if env['BUILD_GPU']:
if env['CONF']['BUILD_GPU']:
SimObject('VIPERCoalescer.py', sim_objects=['VIPERCoalescer'])
Source('CacheRecorder.cc')
Source('DMASequencer.cc')
if env['BUILD_GPU']:
if env['CONF']['BUILD_GPU']:
Source('GPUCoalescer.cc')
Source('HTMSequencer.cc')
Source('RubyPort.cc')
Source('RubyPortProxy.cc')
Source('RubySystem.cc')
Source('Sequencer.cc')
if env['BUILD_GPU']:
if env['CONF']['BUILD_GPU']:
Source('VIPERCoalescer.cc')