diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2017-12-13 14:29:39 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2017-12-13 23:57:08 +0000 |
commit | a45289dee8bc5fb325cab1429c6730dcaf86c58d (patch) | |
tree | c58bd15a69830216f7f5bcc5a37ccbc59b8ddfd7 | |
parent | ed371e0fec0b40a21b5f60ccbca3e40a2e459734 (diff) | |
download | gem5-a45289dee8bc5fb325cab1429c6730dcaf86c58d.tar.xz |
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.sandberg@arm.com>
Reviewed-by: Jack Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6641
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
-rwxr-xr-x | src/SConscript | 2 |
1 files changed, 1 insertions, 1 deletions
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: |