diff options
author | Gabe Black <gabeblack@google.com> | 2017-05-01 22:05:00 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-05-10 16:53:05 +0000 |
commit | 9810fc67ed9d1380adfc1b60a6946f023ce60a5e (patch) | |
tree | b2260d03b1801fcaf7dd8f639de35938d4c44058 /SConstruct | |
parent | 8ee95f3d1164b3320fee3595f7ec9d8c9687dcad (diff) | |
download | gem5-9810fc67ed9d1380adfc1b60a6946f023ce60a5e.tar.xz |
scons: Use the generalized switching headers on the GPU ISA.
Now that the switching header implementation has been generalized, there's
no need to have two nearly identical implementations for the two different
groups of headers.
Change-Id: Ie7c24fcddbc672ac5ca2d69bfc35696f42c55580
Reviewed-on: https://gem5-review.googlesource.com/2984
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'SConstruct')
-rwxr-xr-x | SConstruct | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/SConstruct b/SConstruct index 1efd1068d..30f99c7b2 100755 --- a/SConstruct +++ b/SConstruct @@ -1331,8 +1331,6 @@ main.Prepend(CPPPATH=Dir('ext/pybind11/include/')) # ################################################### -main['ALL_GPU_ISA_LIST'] = all_gpu_isa_list - def build_switching_header(target, source, env): path = str(target[0]) subdir = str(source[0]) @@ -1357,35 +1355,6 @@ def switching_headers(self, headers, source): main.AddMethod(switching_headers, 'SwitchingHeaders') -def make_gpu_switching_dir(dname, switch_headers, env): - # Generate the header. target[0] is the full path of the output - # header to generate. 'source' is a dummy variable, since we get the - # list of ISAs from env['ALL_ISA_LIST']. - def gen_switch_hdr(target, source, env): - fname = str(target[0]) - - isa = env['TARGET_GPU_ISA'].lower() - - try: - f = open(fname, 'w') - print >>f, '#include "%s/%s/%s"' % (dname, isa, basename(fname)) - f.close() - except IOError: - print "Failed to create %s" % fname - raise - - # Build SCons Action object. 'varlist' specifies env vars that this - # action depends on; when env['ALL_ISA_LIST'] changes these actions - # should get re-executed. - switch_hdr_action = MakeAction(gen_switch_hdr, - Transform("GENERATE"), varlist=['ALL_ISA_GPU_LIST']) - - # Instantiate actions for each header - for hdr in switch_headers: - env.Command(hdr, [], switch_hdr_action) - -Export('make_gpu_switching_dir') - # all-isas -> all-deps -> all-environs -> all_targets main.Alias('#all-isas', []) main.Alias('#all-deps', '#all-isas') |