scons: Narrow the scope of the -Wno-parentheses flag.
This was added to avoid warnings from code generated as part of Ruby's AST. Instead of applying this to all of gem5, apply it only to files generated by Ruby. Change-Id: I2b11d2df3cb631debdc594059d9d480a0e695c59 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40958 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -374,9 +374,7 @@ elif main['CLANG']:
|
||||
error('clang version 3.9 or newer required.\n'
|
||||
'Installed version:', main['CXXVERSION'])
|
||||
|
||||
# clang has a few additional warnings that we disable, extraneous
|
||||
# parantheses are allowed due to Ruby's printing of the AST.
|
||||
main.Append(CCFLAGS=['-Wno-parentheses'])
|
||||
# clang has a few additional warnings that we disable.
|
||||
conf.CheckCxxFlag('-Wno-c99-designator')
|
||||
conf.CheckCxxFlag('-Wno-defaulted-function-deleted')
|
||||
|
||||
|
||||
@@ -105,10 +105,13 @@ env.Append(BUILDERS={'SLICC' : slicc_builder})
|
||||
nodes = env.SLICC([], sources)
|
||||
env.Depends(nodes, slicc_depends)
|
||||
|
||||
append = {}
|
||||
if env['CLANG']:
|
||||
append['CCFLAGS'] = '-Wno-parentheses'
|
||||
for f in nodes:
|
||||
s = str(f)
|
||||
if s.endswith('.cc'):
|
||||
Source(f)
|
||||
Source(f, append=append)
|
||||
elif s.endswith('.py'):
|
||||
SimObject(f)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user