From a45289dee8bc5fb325cab1429c6730dcaf86c58d Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Wed, 13 Dec 2017 14:29:39 +0000 Subject: 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 Reviewed-by: Jack Travaglini Reviewed-on: https://gem5-review.googlesource.com/6641 Reviewed-by: Jason Lowe-Power Reviewed-by: Gabe Black --- src/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SConscript b/src/SConscript index a98fbc433..1c53160d2 100755 --- a/src/SConscript +++ b/src/SConscript @@ -1092,7 +1092,7 @@ def makeEnv(env, label, objsfx, strip=False, disable_partial=False, **kwargs): 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: -- cgit v1.2.3