scons: Don't accumulate SLICC_INCLUDES.

Presumably, these are fixed for whatever protocol that gets selected. We
don't need to accumulate includes, we need to set includes to something
in particular. If there is a common include which always needs to be
used, we can handle that in the SConscript separately from
SLICC_INCLUDES.

Change-Id: I996d08566944e38e388dc287f644c40366ebba0d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56754
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
This commit is contained in:
Gabe Black
2022-02-10 23:54:24 -08:00
parent f1dce36f97
commit f10fe51e18
2 changed files with 4 additions and 4 deletions

View File

@@ -60,13 +60,15 @@ slicc_scanner = Classic("SliccScanner", ['.sm', '.slicc'], "SLICC_PATH",
r'''include[ \t]["'](.*)["'];''')
env.Append(SCANNERS=slicc_scanner)
slicc_includes = ['mem/ruby/slicc_interface/RubySlicc_includes.hh'] + \
env['SLICC_INCLUDES']
def slicc_emitter(target, source, env):
assert len(source) == 1
filepath = source[0].srcnode().abspath
slicc = SLICC(filepath, protocol_base.abspath, verbose=False)
slicc.process()
slicc.writeCodeFiles(output_dir.abspath, env['SLICC_INCLUDES'])
slicc.writeCodeFiles(output_dir.abspath, slicc_includes)
if env['SLICC_HTML']:
slicc.writeHTMLFiles(html_dir.abspath)
@@ -79,7 +81,7 @@ def slicc_action(target, source, env):
slicc = SLICC(filepath, protocol_base.abspath, verbose=True)
slicc.process()
slicc.writeCodeFiles(output_dir.abspath, env['SLICC_INCLUDES'])
slicc.writeCodeFiles(output_dir.abspath, slicc_includes)
if env['SLICC_HTML']:
slicc.writeHTMLFiles(html_dir.abspath)

View File

@@ -51,5 +51,3 @@ main.Append(PROTOCOL_DIRS=[Dir('.')])
protocol_base = Dir('.')
Export('protocol_base')
main.Append(SLICC_INCLUDES=['mem/ruby/slicc_interface/RubySlicc_includes.hh'])