Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/40963 )

Change subject: scons: Eliminate CXX_V and main_dict_keys in SConstruct.
......................................................................

scons: Eliminate CXX_V and main_dict_keys in SConstruct.

CXX_V isn't used by anything, and main_dict_keys is unnecessary because
using "in" with the whole main environment (which acts like a dict)
checks against the keys without needing a temporary variable.

Change-Id: Iab07246c00b1969858659043cead1dd657b1707b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40963
Tested-by: kokoro <noreply+kok...@google.com>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M SConstruct
1 file changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index 915c112..b63e2cc 100755
--- a/SConstruct
+++ b/SConstruct
@@ -141,10 +141,8 @@
 from gem5_scons.util import get_termcap
 termcap = get_termcap()

-main_dict_keys = main.Dictionary().keys()
-
 # Check that we have a C/C++ compiler
-if not ('CC' in main_dict_keys and 'CXX' in main_dict_keys):
+if not ('CC' in main and 'CXX' in main):
     error("No C++ compiler installed (package g++ on Ubuntu and RedHat)")

 ###################################################
@@ -302,8 +300,7 @@
 # builds under a given build root run on the same host platform.
 conf = gem5_scons.Configure(main)

-CXX_version = readCommand([main['CXX'],'--version'], exception=False)
-CXX_V = readCommand([main['CXX'],'-V'], exception=False)
+CXX_version = readCommand([main['CXX'], '--version'], exception=False)

 main['GCC'] = CXX_version and CXX_version.find('g++') >= 0
 main['CLANG'] = CXX_version and CXX_version.find('clang') >= 0



7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40963
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: Iab07246c00b1969858659043cead1dd657b1707b
Gerrit-Change-Number: 40963
Gerrit-PatchSet: 12
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to