summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-11-20 18:26:29 -0800
committerGabe Black <gabeblack@google.com>2017-11-27 22:10:21 +0000
commit08d60882d72e50498536b7d02f4b8838db8d81c4 (patch)
treea6670d8ffeb9c417e12af9ec7529c89e4b31b0e6 /SConstruct
parent316ef3d9be995c3e625266386afeeb037a255180 (diff)
downloadgem5-08d60882d72e50498536b7d02f4b8838db8d81c4.tar.xz
scons: Get rid of a flag which makes Werror optional.
This flag wasn't being used. Also move the Werror code to the SConstruct now that it's being applied universally. Change-Id: I18b00d4b41bc1add9271ca299c020c14970a6926 Reviewed-on: https://gem5-review.googlesource.com/5982 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct7
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 36db2162c..09c3476d7 100755
--- a/SConstruct
+++ b/SConstruct
@@ -359,6 +359,13 @@ if main['GCC'] or main['CLANG']:
shared_partial_flags = ['-r', '-nostdlib']
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:
print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal,
print "Don't know what compiler options to use for your compiler."