summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-11-18 20:39:48 -0800
committerGabe Black <gabeblack@google.com>2017-11-27 22:08:50 +0000
commit85168c4e96ed8e3cbad0013102fa021561df49cd (patch)
treeb8ad6c64e8750040beae2c4016228493d3c6a01c /src/python
parentf8816180fd920b444d5ae19f22aff8350e23d8e5 (diff)
downloadgem5-85168c4e96ed8e3cbad0013102fa021561df49cd.tar.xz
scons: Switch from "guards" to "tags" on source files.
Tags are just arbitrary strings which are attached to source files which mark them as having some property. By default, all source files have the "gem5 lib" tag added to them which marks them as part of the gem5 library, the primary component of the gem5 binary but also a seperable component for use in, for example, system C. The tags can be completely overridden by setting the "tags" parameter on Source, etc., functions, and can be augmented by setting "add_tags" which are tags that will be added, or alternatively additional tags. It's possible to specify both, in which case the tags will be set to the union of tags and add_tags. add_tags is supposed to be a way to add extra tags to the default without actually overriding the default. Both tags and add_tags can be a list/tuple/etc of tags, or a single string which will be converted into a set internally. Other existing tags include: 1. "python" for files that need or are used with python and are excluded when the --without-python option is set 2. "main" for the file(s) which implement the gem5 binary's main function. 3. The name of a unit test to group its files together. 4. Tags which group source files for partial linking. By grouping the "tags" into a single parameter instead of taking all extra parameters as tags, the extra parameters can, in the future, be passed to the underlying scons environment. Also, the tags are either present or not. With guards, they could be present and True, present and False, or not present at all. Change-Id: I6d0404211a393968df66f7eddfe019897b6573a2 Reviewed-on: https://gem5-review.googlesource.com/5822 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/python')
-rw-r--r--src/python/SConscript10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python/SConscript b/src/python/SConscript
index 1e7746930..cfd2afeff 100644
--- a/src/python/SConscript
+++ b/src/python/SConscript
@@ -64,8 +64,8 @@ PySource('m5.util', 'm5/util/pybind.py')
PySource('m5.internal', 'm5/internal/__init__.py')
PySource('m5.internal', 'm5/internal/params.py')
-Source('pybind11/core.cc', skip_no_python=True)
-Source('pybind11/debug.cc', skip_no_python=True)
-Source('pybind11/event.cc', skip_no_python=True)
-Source('pybind11/pyobject.cc', skip_no_python=True)
-Source('pybind11/stats.cc', skip_no_python=True)
+Source('pybind11/core.cc', add_tags='python')
+Source('pybind11/debug.cc', add_tags='python')
+Source('pybind11/event.cc', add_tags='python')
+Source('pybind11/pyobject.cc', add_tags='python')
+Source('pybind11/stats.cc', add_tags='python')