Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/5985
Change subject: scons: Minor cleanup of how partial linking is handled in
makeEnv.
......................................................................
scons: Minor cleanup of how partial linking is handled in makeEnv.
Git rid of the unused partial_objs variable, and change append to
extend since the result of builders is a list of nodes and not
individual nodes, even if there's only one target.
Change-Id: Ie51225d3ea699eb7da18199ac3bf3e868e3994a6
---
M src/SConscript
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/SConscript b/src/SConscript
index 28ae354..2930bab 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -968,42 +968,40 @@
static_objs.append(make_static(s))
shared_objs.append(make_shared(s))
- partial_objs = []
-
for group in Source.source_groups:
srcs = lib_sources.with_tag(Source.link_group_tag(group))
if not srcs:
continue
+ group_static = [ make_static(s) for s in srcs ]
+ group_shared = [ make_shared(s) for s in srcs ]
+
# If partial linking is disabled, add these sources to the build
# directly, and short circuit this loop.
if disable_partial:
- for s in srcs:
- static_objs.append(make_static(s))
- shared_objs.append(make_shared(s))
+ static_objs.extend(group_static)
+ shared_objs.extend(group_shared)
continue
# Set up the static partially linked objects.
- source_objs = [ make_static(s) for s in srcs ]
file_name = new_env.subst("${OBJPREFIX}lib${OBJSUFFIX}.partial")
target = File(joinpath(group, file_name))
- partial = env.PartialStatic(target=target, source=source_objs)
- static_objs.append(partial)
+ partial = env.PartialStatic(target=target, source=group_static)
+ static_objs.extend(partial)
# Set up the shared partially linked objects.
- source_objs = [ make_shared(s) for s in srcs ]
file_name =
new_env.subst("${SHOBJPREFIX}lib${SHOBJSUFFIX}.partial")
target = File(joinpath(group, file_name))
- partial = env.PartialShared(target=target, source=source_objs)
- shared_objs.append(partial)
+ partial = env.PartialShared(target=target, source=group_shared)
+ shared_objs.extend(partial)
static_date = make_static(date_source)
new_env.Depends(static_date, static_objs)
- static_objs.append(static_date)
+ static_objs.extend(static_date)
shared_date = make_shared(date_source)
new_env.Depends(shared_date, shared_objs)
- shared_objs.append(shared_date)
+ shared_objs.extend(shared_date)
# First make a library of everything but main() so other programs can
# link against m5.
--
To view, visit https://gem5-review.googlesource.com/5985
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: Ie51225d3ea699eb7da18199ac3bf3e868e3994a6
Gerrit-Change-Number: 5985
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev