Skip to content

Commit

Permalink
Since the compiler line looks like "$CXXFLAGS $CFLAGS", there's no wa…
Browse files Browse the repository at this point in the history
…y 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
  • Loading branch information
evanm@google.com committed Sep 7, 2008
1 parent 06c6a6c commit f37e851
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions build/SConscript.main
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,21 @@ 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.

# 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'],
Expand Down
4 changes: 2 additions & 2 deletions third_party/bspatch/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f37e851

Please sign in to comment.