From da057512b956a23255477e86efadf2a2a5ada005 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 17 Aug 2021 21:20:53 -0700 Subject: [PATCH] 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 Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/SConscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SConscript b/src/SConscript index d566010445..c390b812f7 100644 --- a/src/SConscript +++ b/src/SConscript @@ -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