summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-05-01 21:58:41 -0700
committerGabe Black <gabeblack@google.com>2017-05-10 16:52:24 +0000
commit8ee95f3d1164b3320fee3595f7ec9d8c9687dcad (patch)
treef917a83b092ca8ed557838dd7ad2e56ec54c39f2 /src
parent942e2957994fc6779a5540c3b94a8756258e3149 (diff)
downloadgem5-8ee95f3d1164b3320fee3595f7ec9d8c9687dcad.tar.xz
scons: arch: Generalize the switching header code.
Factor out the ISA ness of the switching header generating function. Also turn it into a SCons builder which builds a single header, and a wrapping method which uses the builder on a group of header files which all target the same subdirectory. Change-Id: I87705f97b6ebd9baebd4ebcfea19cc1218a64ad0 Reviewed-on: https://gem5-review.googlesource.com/2983 Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src')
-rw-r--r--src/arch/SConscript10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/arch/SConscript b/src/arch/SConscript
index 54d97a4d9..891a5a29a 100644
--- a/src/arch/SConscript
+++ b/src/arch/SConscript
@@ -43,8 +43,8 @@ Import('*')
#
#################################################################
-# List of headers to generate
-isa_switch_hdrs = Split('''
+env.SwitchingHeaders(
+ Split('''
decoder.hh
interrupts.hh
isa.hh
@@ -63,10 +63,8 @@ isa_switch_hdrs = Split('''
types.hh
utility.hh
vtophys.hh
- ''')
-
-# Set up this directory to support switching headers
-make_switching_dir('arch', isa_switch_hdrs, env)
+ '''),
+ env.subst('${TARGET_ISA}'))
if env['BUILD_GPU']:
gpu_isa_switch_hdrs = Split('''