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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user