diff options
author | Gabe Black <gabeblack@google.com> | 2017-11-18 20:39:48 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-11-27 22:08:50 +0000 |
commit | 85168c4e96ed8e3cbad0013102fa021561df49cd (patch) | |
tree | b8ad6c64e8750040beae2c4016228493d3c6a01c /src/sim/SConscript | |
parent | f8816180fd920b444d5ae19f22aff8350e23d8e5 (diff) | |
download | gem5-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/sim/SConscript')
-rw-r--r-- | src/sim/SConscript | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sim/SConscript b/src/sim/SConscript index a3d5464e8..996a3324a 100644 --- a/src/sim/SConscript +++ b/src/sim/SConscript @@ -48,12 +48,12 @@ Source('cxx_config.cc') Source('cxx_manager.cc') Source('cxx_config_ini.cc') Source('debug.cc') -Source('py_interact.cc', skip_no_python=True) +Source('py_interact.cc', add_tags='python') Source('eventq.cc') Source('global_event.cc') -Source('init.cc', skip_no_python=True) +Source('init.cc', add_tags='python') Source('init_signals.cc') -Source('main.cc', main=True, skip_lib=True) +Source('main.cc', tags='main') Source('root.cc') Source('serialize.cc') Source('drain.cc') @@ -63,7 +63,7 @@ Source('sub_system.cc') Source('ticked_object.cc') Source('simulate.cc') Source('stat_control.cc') -Source('stat_register.cc', skip_no_python=True) +Source('stat_register.cc', add_tags='python') Source('clock_domain.cc') Source('voltage_domain.cc') Source('se_signal.cc') |