misc: Re-add -Werror for the gem5 20.2 development
authorBobby R. Bruce <bbruce@ucdavis.edu>
Thu, 1 Oct 2020 03:53:14 +0000 (20:53 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 1 Oct 2020 11:06:28 +0000 (11:06 +0000)
This reverts commit 2a4357bfd0c688a19cfd6b1c600bb2d2d6fa6151,
https://gem5-review.googlesource.com/c/public/gem5/+/35455

Change-Id: I10de506658bcad542abbb6d2b4f0c416d55bc121
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35495
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
SConstruct

index ce9e9b6c5f4256b5636c18d2fbe6d6842475f503..8e7ec3481ec138eeff17b86f91ecce4e466c6a4d 100755 (executable)
@@ -337,6 +337,12 @@ if main['GCC'] or main['CLANG']:
     main.Append(PSHLINKFLAGS=shared_partial_flags)
     main.Append(PLINKFLAGS=shared_partial_flags)
 
+    # Treat warnings as errors but white list some warnings that we
+    # want to allow (e.g., deprecation warnings).
+    main.Append(CCFLAGS=['-Werror',
+                         '-Wno-error=deprecated-declarations',
+                         '-Wno-error=deprecated',
+                        ])
 else:
     error('\n'.join((
           "Don't know what compiler options to use for your compiler.",