From f37e85112f6e1ce670bc50963f79b392c6af30bb Mon Sep 17 00:00:00 2001 From: "evanm@google.com" Date: Sun, 7 Sep 2008 15:49:12 +0000 Subject: Since the compiler line looks like "$CXXFLAGS $CFLAGS", there's no way to disable a C++-specific warning when -Wall is in CFLAGS. (You disable the warning, then -Wall turns it back on.) Since we only write C++ code and we're only looking for warnings there for now, just put everything in CXXFLAGS. Also disable one more warning (which is the one that bit me here.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1827 0039d316-1c4b-4281-b951-d872f2087c98 --- build/SConscript.main | 9 ++++++--- third_party/bspatch/SConscript | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build/SConscript.main b/build/SConscript.main index 8563107..5d4ace6 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -338,6 +338,7 @@ elif env['PLATFORM'] == 'posix': excluded_warnings = [ '-Wno-unknown-pragmas', # TODO: remove all the Windows-specific #pragmas. '-Wno-unused-function', # TODO: there's just one Skia function. + '-Wno-unused-variable', # TODO: there's just one v8 function. '-Wno-switch', # TODO: this is likely masking real bugs. '-Wno-sign-compare', # TODO: this is likely masking real bugs. '-Wno-missing-braces', # TODO: just a file in net. @@ -345,11 +346,13 @@ elif env['PLATFORM'] == 'posix': # Not TODO: This is technically nonstandard, but a lot of the image # decoding code depends on it and osx wants this. '-Wno-multichar', + + '-Wno-deprecated', # Needed for using ext/hash_map on GCC 4.3 + '-Wno-reorder', # TODO: many tedious small fixes. ] env.Replace( - CCFLAGS = ['-m32', '-g', '-pthread', '-Wall', '-Werror'] + excluded_warnings, - # Needed for using ext/hash_map on GCC 4.3 - CXXFLAGS = ['-Wno-deprecated'], + CCFLAGS = ['-m32', '-g', '-pthread'], + CXXFLAGS = ['-Wall', '-Werror'] + excluded_warnings, LINKFLAGS = ['-m32', '-pthread'], # We need rt for clock_gettime. LIBS = ['rt'], diff --git a/third_party/bspatch/SConscript b/third_party/bspatch/SConscript index d7eef03..646e388 100644 --- a/third_party/bspatch/SConscript +++ b/third_party/bspatch/SConscript @@ -53,9 +53,9 @@ if env['PLATFORM'] == 'win32': ], ) elif env['PLATFORM'] == 'posix': - if '-Wall' in env['CCFLAGS']: + if '-Wall' in env['CXXFLAGS']: # We're not responsible for bad warning hygiene in this third party code. - env['CCFLAGS'].remove('-Wall') + env['CXXFLAGS'].remove('-Wall') input_files = [ 'mbspatch.cc', -- cgit v1.1