diff --git a/SConstruct b/SConstruct index 5b3e76112e..ae4c86a74f 100755 --- a/SConstruct +++ b/SConstruct @@ -322,6 +322,12 @@ if main['GCC'] or main['CLANG']: if GetOption('gold_linker'): main.Append(LINKFLAGS='-fuse-ld=gold') + # 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.",