scons: Disable spurious "array-bounds" warnings for protobuf cc files.
authorGabe Black <gabeblack@google.com>
Thu, 30 Jan 2020 07:47:03 +0000 (23:47 -0800)
committerGabe Black <gabeblack@google.com>
Sat, 1 Feb 2020 09:25:15 +0000 (09:25 +0000)
These files are generated and so, even if they're wrong, there isn't
anything we can do about it.

Change-Id: I933057a04f09dd1c22b525a102278bbdc5fbc22b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24924
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/SConscript

index d1b2cfcbbebc309f0725ade693096682981aa3c0..3ffaeef7852abbe2a371280ae5d73dce446d52a7 100644 (file)
@@ -1027,7 +1027,8 @@ if env['HAVE_PROTOC'] and env['HAVE_PROTOBUF']:
                                Transform("PROTOC")))
 
         # Add the C++ source file
-        Source(proto.cc_file, tags=proto.tags)
+        Source(proto.cc_file, tags=proto.tags,
+                append={'CXXFLAGS': '-Wno-array-bounds'})
 elif ProtoBuf.all:
     error('Got protobuf to build, but lacks support!')