scons: Use source filters to exclude python source if --without-python.

We were simply not declaring the source files for PySource files if
built --without-python. Instead, we should declare them, but then
explicitly exclude them if that option is set.

Since we're already doing that, we can simply remove the check from the
PySource constructor.

Change-Id: I437ebeee1082fa00065bedd61f91d5721b915ae5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49389
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
This commit is contained in:
Gabe Black
2021-08-05 00:05:55 -07:00
parent 6bbaceca91
commit 977b9d7521

View File

@@ -176,8 +176,7 @@ class PySource(SourceFile):
MakeAction(embedPyFile, Transform("EMBED PY"),
varlist=overrides.keys()),
**overrides)
if main['USE_PYTHON']:
Source(cpp, tags=self.tags, add_tags='python')
Source(cpp, tags=self.tags, add_tags='python')
class SimObject(PySource):
'''Add a SimObject python file as a python source object and add