Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/48129 )
Change subject: scons: Use sets instead of lists to track needed target
environments.
......................................................................
scons: Use sets instead of lists to track needed target environments.
This simple change intrinsically collapses away duplicates.
Change-Id: I697c21897a81c47cbf540caa49806413dce80dba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48129
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/SConscript
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/SConscript b/src/SConscript
index ee4c776..76e78a8 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1407,7 +1407,7 @@
# need. We try to identify the needed environment for each target; if
# we can't, we fall back on instantiating all the environments just to
# be safe.
-target_types = ['debug', 'opt', 'fast', 'prof', 'perf']
+target_types = {'debug', 'opt', 'fast', 'prof', 'perf'}
obj2target = {'do': 'debug', 'o': 'opt', 'fo': 'fast', 'po': 'prof',
'gpo' : 'perf'}
@@ -1419,9 +1419,9 @@
return obj2target[ext]
return 'all'
-needed_envs = [identifyTarget(target) for target in BUILD_TARGETS]
+needed_envs = {identifyTarget(target) for target in BUILD_TARGETS}
if 'all' in needed_envs:
- needed_envs += target_types
+ needed_envs = target_types
# Debug binary
if 'debug' in needed_envs:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48129
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I697c21897a81c47cbf540caa49806413dce80dba
Gerrit-Change-Number: 48129
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s