Gabe Black has uploaded this change for review. ( 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
---
M SConstruct
1 file changed, 2 insertions(+), 5 deletions(-)



diff --git a/SConstruct b/SConstruct
index 1f6493e..535e8b1 100755
--- a/SConstruct
+++ b/SConstruct
@@ -133,10 +133,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)")

 ###################################################
@@ -295,8 +293,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

--
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: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
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