scons: Use env and not main in SConscripts.
"env" is the environment for the current variant, where "main" is the environment that was derived from. Change-Id: I71e30684aa82a297241820502f204400c89c80cf Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56890 Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
@@ -35,7 +35,7 @@ Source('storage.cc')
|
||||
Source('text.cc')
|
||||
|
||||
if env['HAVE_HDF5']:
|
||||
if main['GCC']:
|
||||
if env['GCC']:
|
||||
Source('hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated-copy'})
|
||||
else:
|
||||
Source('hdf5.cc')
|
||||
|
||||
@@ -65,7 +65,7 @@ if env['USE_SYSTEMC']:
|
||||
Source('python.cc')
|
||||
Source('sc_main_python.cc')
|
||||
append = {}
|
||||
with gem5_scons.Configure(main) as conf:
|
||||
with gem5_scons.Configure(env) as conf:
|
||||
for flag in ('-Wno-self-assign-overloaded', '-Wno-self-assign'):
|
||||
if conf.CheckCxxFlag(flag, autoadd=False):
|
||||
append['CCFLAGS'] = [flag]
|
||||
@@ -73,7 +73,7 @@ if env['USE_SYSTEMC']:
|
||||
Source('sc_time_python.cc', append=append)
|
||||
|
||||
# Disable the false positive warning for the event members of the scheduler.
|
||||
with gem5_scons.Configure(main) as conf:
|
||||
with gem5_scons.Configure(env) as conf:
|
||||
flag = '-Wno-free-nonheap-object'
|
||||
append = {}
|
||||
if conf.CheckCxxFlag(flag, autoadd=False):
|
||||
|
||||
@@ -28,7 +28,7 @@ Import('*')
|
||||
from gem5_scons.util import compareVersions
|
||||
|
||||
if env['USE_SYSTEMC']:
|
||||
if main['GCC'] and compareVersions(main['CXXVERSION'], '10.0') >= 0:
|
||||
if env['GCC'] and compareVersions(env['CXXVERSION'], '10.0') >= 0:
|
||||
disable_false_positives = {
|
||||
"CCFLAGS": [ "-Wno-array-bounds",
|
||||
"-Wno-stringop-overflow" ]
|
||||
|
||||
Reference in New Issue
Block a user