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+kokoro@google.com> Maintainer: Gabe Black <gabe.black@gmail.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
@@ -141,10 +141,8 @@ main.Tool(SCons.Tool.FindTool(['g++', 'clang++'], main))
|
||||
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 @@ main['TCMALLOC_CCFLAGS'] = []
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user