fastmodel: Make ArmFastModelComponent-s take a tags parameter.

ArmFastModelComponents must *minimally* be guarded by "arm fastmodel"
tags, but may actually be covered by a more specific tag which is a
subset of "arm fastmodel", for instance if they are controlled by a
kconfig variable and may or may not be included in "gem5 lib"
independently of other sources which are part of "arm fastmodel".

The contents set up by ArmFastModelComponent are already guarded by a
fixed tag, so this change just needs to plumb through the tag as
specified when the ArmFastModelComponent is created instead.

Change-Id: I619c31107acda378a5439718e32938843f024e74
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59473
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Gabe Black
2022-05-07 00:51:19 -07:00
committed by Gabe Black
parent fd250dbed3
commit 67f1ec7f5b

View File

@@ -304,7 +304,10 @@ for header in common_headers:
Command(header_target, header_src, Copy('${TARGET}', '${SOURCE}'))
class ArmFastModelComponent(object):
def __init__(self, project_file, *extra_deps):
def __init__(self, project_file, *extra_deps, tags=None):
if not tags:
tags = ['arm fastmodel']
self.tags = tags
project_file = File(project_file)
project_file_dir = project_file.Dir('.')
@@ -403,7 +406,7 @@ class ArmFastModelComponent(object):
env.Append(CPPPATH=self.headerpaths)
# Put these libraries earlier in the list by setting priority.
for lib in self.libs:
SourceLib(lib, priority=1, tags='arm fastmodel')
SourceLib(lib, priority=1, tags=self.tags)
def simgen_builder(self, target, source, env):
cmd = self.simgen_cmd