scons: Record the sim_objects and enums passed into SimObject().
We'll use those to tell SCons what params headers, etc, to generate. Change-Id: Iedc9c6a8cdfc2201e85bc7ba1d420dfa08b90cab Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49423 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -145,6 +145,9 @@ class SimObject(PySource):
|
||||
|
||||
fixed = False
|
||||
|
||||
sim_objects = dict()
|
||||
enums = dict()
|
||||
|
||||
def __init__(self, source, *, sim_objects=[], enums=[],
|
||||
tags=None, add_tags=None):
|
||||
'''Specify the source file and any tags (automatically in
|
||||
@@ -153,6 +156,8 @@ class SimObject(PySource):
|
||||
if self.fixed:
|
||||
raise AttributeError("Too late to call SimObject now.")
|
||||
|
||||
SimObject.sim_objects[self.modpath] = sim_objects
|
||||
SimObject.enums[self.modpath] = enums
|
||||
|
||||
# This regular expression is simplistic and assumes that the import takes up
|
||||
# the entire line, doesn't have the keyword "public", uses double quotes, has
|
||||
|
||||
Reference in New Issue
Block a user