mem-ruby, scons: Add ProtocolInfo.hh files in build targets

- In the new MultiRuby system, the generated ProtocolInfo header files were not being correctly added to the build targets in SCons.

- As a result, when building gem5 with the --duplicate-sources option, these files were mistakenly deleted by SCons.
This happened because SCons treated them as source files instead of generated build targets.

- This commit ensures that the ProtocolInfo header files are explicitly included in the build targets, preventing their unintended removal and fixing the build issue.
This commit is contained in:
Harshil Patel
2024-12-02 11:22:12 -08:00
committed by Bobby R. Bruce
parent dee42f1867
commit 02a5ddaeac

View File

@@ -91,6 +91,14 @@ def slicc_emitter(target, source, env):
files.update([output_dir.File(f) for f in sorted(slicc.files())])
# Dynamically determine protocol and add ProtocolInfo.hh to the list of
# files to be built
protocol_name = os.path.splitext(os.path.basename(filepath))[0]
protocol_file = output_dir.File(
f"{protocol_name}/{protocol_name}ProtocolInfo.hh"
)
files.update([protocol_file])
return list(files), source