From 28a871b0374fe6a38fa1738570ebc139e950cf7e Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Fri, 30 Dec 2022 20:11:43 +0000 Subject: [PATCH] scons: Re-add -Werror for gem5 develop branch This is removed from the stable branch to avoid build errors but should included on the develop branch to aid developers. This reverts commit 7dd61c865975862b099e1af5e867083ac9307d9b. Change-Id: I1fe249ce87aa8d70c1f092fc7db1554e6aee7355 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67052 Tested-by: kokoro Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce --- SConstruct | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SConstruct b/SConstruct index e8107ea2c7..bd26e4552e 100755 --- a/SConstruct +++ b/SConstruct @@ -420,6 +420,14 @@ for variant_path in variant_paths: conf.CheckLinkFlag('-Wl,--threads') conf.CheckLinkFlag( '-Wl,--thread-count=%d' % GetOption('num_jobs')) + + # Treat warnings as errors but white list some warnings that we + # want to allow (e.g., deprecation warnings). + env.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.",