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:
@@ -56,18 +56,18 @@ Import('*')
|
||||
#
|
||||
#################################################################
|
||||
|
||||
env.TagImplies(env.subst('${TARGET_ISA} isa'), 'gem5 lib')
|
||||
env.TagImplies(env.subst('${CONF["TARGET_ISA"]} isa'), 'gem5 lib')
|
||||
|
||||
env.SwitchingHeaders(
|
||||
Split('''
|
||||
isa.hh
|
||||
vecregs.hh
|
||||
'''),
|
||||
env.subst('${TARGET_ISA}'))
|
||||
env.subst('${CONF["TARGET_ISA"]}'))
|
||||
|
||||
amdgpu_isa = ['gcn3', 'vega']
|
||||
|
||||
if env['BUILD_GPU']:
|
||||
if env['CONF']['BUILD_GPU']:
|
||||
env.SwitchingHeaders(
|
||||
Split('''
|
||||
gpu_decoder.hh
|
||||
@@ -75,8 +75,9 @@ if env['BUILD_GPU']:
|
||||
gpu_registers.hh
|
||||
gpu_types.hh
|
||||
'''),
|
||||
'{}'.format('amdgpu/' if env['TARGET_GPU_ISA'] in amdgpu_isa else '')+
|
||||
env.subst('${TARGET_GPU_ISA}'))
|
||||
'{}'.format('amdgpu/' if
|
||||
env['CONF']['TARGET_GPU_ISA'] in amdgpu_isa else '') +
|
||||
env.subst('${CONF["TARGET_GPU_ISA"]}'))
|
||||
|
||||
#################################################################
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user