scons: Marshal Python sources using the same Python as gem5
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 13 Feb 2019 11:32:23 +0000 (11:32 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 26 Feb 2019 10:27:07 +0000 (10:27 +0000)
commitc38a6523ab4df2b57337be0b2446bd9d30be94b4
tree5368ad678884e60d740226a6a5f459b9065ba08b
parent8138663e2f569f1ca9c236c623278cc395045f2a
scons: Marshal Python sources using the same Python as gem5

We currently use the Python version used by scons to marshal Python
code. This doesn't work when building gem5 with Python 3 support since
scons typically runs in Python 2.7. Add a custom marshal helper that
links with the same library as gem5 to generate byte code that is
guaranteed to work in gem5's Python interpreter.

Change-Id: I665b0f2078726d4c055d74a3e668a580fc613b59
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/16422
Reviewed-by: Gabe Black <gabeblack@google.com>
src/SConscript
src/python/marshal.cc [new file with mode: 0644]