scons: Change an = to a += when accumulating sources from filters.
authorGabe Black <gabeblack@google.com>
Sat, 9 Feb 2019 09:37:48 +0000 (01:37 -0800)
committerGabe Black <gabeblack@google.com>
Mon, 11 Feb 2019 07:33:50 +0000 (07:33 +0000)
The loop accidentally used a = when it should have used a +=, meaning
only the sources from the final filter would be used.

Change-Id: Ie066a5f85696f05d9ad3cf61f928b12deb39475b
Reviewed-on: https://gem5-review.googlesource.com/c/16285
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/SConscript
src/systemc/tests/SConscript

index 0b66d6a62aeddf9f6da4a88b561ac82181954bd0..dcb08a3045936be59ff69e043c8992f4c062db5b 100644 (file)
@@ -472,7 +472,7 @@ class UnitTest(Executable):
     def declare(self, env):
         sources = list(self.sources)
         for f in self.filters:
-            sources = Source.all.apply_filter(f)
+            sources += Source.all.apply_filter(f)
         objs = self.srcs_to_objs(env, sources) + env['STATIC_OBJS']
         if self.main:
             objs += env['MAIN_OBJS']
index 2d713a0d8a3159ff8d363ba5e09e58c195040dca..3b0c7c3f598d4c54bee38d8a91ad934f598d95c7 100644 (file)
@@ -91,7 +91,7 @@ if env['USE_SYSTEMC']:
             env = env.Clone()
             sources = list(self.sources)
             for f in self.filters:
-                sources = Source.all.apply_filter(f)
+                sources += Source.all.apply_filter(f)
             objs = self.srcs_to_objs(env, sources)
             objs = objs + env['MAIN_OBJS']
             relpath = os.path.relpath(