scons,python: Move the marshal.py script into build_tools.

It's really a part of the build system and not part of gem5, and so it
should probably live outside of the main tree. It would be confusing to
have a bunch of python scripts which don't end up inside gem5 alongside
a bunch of ones that do in src/python.

The directory is called build_tools instead of build so it doesn't get
confused with an actual build output directory.

Change-Id: Ie12475a15517508dc2044f0ca4db71a601b7ab6d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49393
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2021-08-14 05:06:36 -07:00
parent dfec508976
commit 6cc3b4f6c1
2 changed files with 3 additions and 1 deletions

View File

@@ -77,11 +77,13 @@ def GdbXml(xml_id, symbol):
class Source(SourceFile):
pass
build_tools = Dir('#build_tools')
# Build a small helper that marshals the Python code using the same version
# of Python as gem5. This is in an unorthodox location to avoid building it
# for every variant.
gem5py = gem5py_env.Program('gem5py', 'python/gem5py.cc')[0]
marshal_py = Dir('python').File('marshal.py')
marshal_py = build_tools.File('marshal.py')
# Embed python files. All .py files that have been indicated by a
# PySource() call in a SConscript need to be embedded into the M5