systemc: fix -Wno-free-nonheap-object for building scheduler.cc
-Wno-free-nonheap-object can happen at compile or link time depending on the versions. To better disable this false alarm, we move the memory management part into .cc file, so the check is always done at link time. This change also removes the global flags so other code is still checked with the flags. Change-Id: I8f1e20197b25c90b5f439e2ecc474bd99e4f82ed Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67237 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Yu-hsin Wang <yuhsingw@google.com> Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -447,10 +447,6 @@ for variant_path in variant_paths:
|
||||
error('gcc version 7 or newer required.\n'
|
||||
'Installed version:', env['CXXVERSION'])
|
||||
|
||||
with gem5_scons.Configure(env) as conf:
|
||||
# This warning has a false positive in the systemc in g++ 11.1.
|
||||
conf.CheckCxxFlag('-Wno-free-nonheap-object')
|
||||
|
||||
# Add the appropriate Link-Time Optimization (LTO) flags if
|
||||
# `--with-lto` is set.
|
||||
if GetOption('with_lto'):
|
||||
|
||||
Reference in New Issue
Block a user