If you modify a file under src/python
, then a rebuild is necessary, unlike modifications to configs/
That makes making changes under that directory very painful, since even the clean rebuild takes several seconds.
Is there a way to avoid the rebuild?
M5_OVERRIDE_PY_SOURCE=true
If you export that environment variable for the run, and gem5 uses the Python source code directly.
This likely exists because by default, gem5 packs up Python object files inside the
gem5.opt
binary so allows users to run it without changing theirPYTHON_PATH
.How
M5_OVERRIDE_PY_SOURCE
works is described here at 252dd80.Tested on: https://gem5.googlesource.com/public/gem5/+/91295ff980c17efb3ad013b9636017b58e49c071