Hello Giacomo Travaglini,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/6641

to review the following change.


Change subject: scons, tests: Fix occasional linking error
......................................................................

scons, tests: Fix occasional linking error

There are some cases where scons incorrectly adds the same object
multiple times to the linker command line. This seems to be caused by
the test's source list being updated in place when determining test
framework dependencies. Fix this by explicitly copying the source list
and manipulate the copy.

Without this change, the following command fails:
scons ./build/ARM/unittests.opt/base/pixeltest.xml

Whereas this command succeeds:
scons ./build/ARM/base/pixeltest.opt

Change-Id: I642efdf9d62a5478e49ba51efe1a3a5ba453e21f
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-by: Jack Travaglini <giacomo.travagl...@arm.com>
---
M src/SConscript
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/SConscript b/src/SConscript
index a98fbc4..1c53160 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1092,7 +1092,7 @@
     gtestlib_sources = Source.all.with_tag('gtest lib')
     gtest_out_dir = Dir(new_env['BUILDDIR']).Dir('unittests.%s' % label)
     for test in GTest.all:
-        test_sources = test.sources
+        test_sources = list(test.sources)
         if not test.skip_lib:
             test_sources += gtestlib_sources
         for f in test.filters:

--
To view, visit https://gem5-review.googlesource.com/6641
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I642efdf9d62a5478e49ba51efe1a3a5ba453e21f
Gerrit-Change-Number: 6641
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to