| Index: build/common.gypi | 
| diff --git a/build/common.gypi b/build/common.gypi | 
| index c3bc3dff43c892f8930db4e60954bdfab835a581..99f36e030acf67088323b70974efe042ac98976a 100644 | 
| --- a/build/common.gypi | 
| +++ b/build/common.gypi | 
| @@ -3141,11 +3141,8 @@ | 
| 'conditions': [ | 
| [ 'os_posix==1 and OS!="mac" and OS!="ios"', { | 
| # We don't want to get warnings from third-party code, | 
| -            # so remove any existing warning-enabling flags like -Wall. | 
| -            'cflags!': [ | 
| -              '-Wall', | 
| -              '-Wextra', | 
| -            ], | 
| +            # so remove any existing warning-enabling flags like -Wextra. | 
| +            'cflags!': [ '-Wextra' ], | 
| 'cflags_cc': [ | 
| # Don't warn about hash_map in third-party code. | 
| '-Wno-deprecated', | 
| @@ -3155,10 +3152,11 @@ | 
| # This is off by default in gcc but on in Ubuntu's gcc(!). | 
| '-Wno-format', | 
| ], | 
| -            'cflags_cc!': [ | 
| -              # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). | 
| -              '-Wsign-compare', | 
| -            ] | 
| +          }], | 
| +          [ 'os_posix==1 and clang!=1 and OS!="mac" and OS!="ios"', { | 
| +            # When we don't control the compiler, don't use -Wall for | 
| +            # third-party code either. | 
| +            'cflags!': [ '-Wall' ], | 
| }], | 
| # TODO: Fix all warnings on chromeos too. | 
| [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { | 
| @@ -3210,7 +3208,7 @@ | 
|  | 
| [ 'OS=="mac" or OS=="ios"', { | 
| 'xcode_settings': { | 
| -              'WARNING_CFLAGS!': ['-Wall', '-Wextra'], | 
| +              'WARNING_CFLAGS!': ['-Wextra'], | 
| }, | 
| 'conditions': [ | 
| ['buildtype=="Official"', { | 
| @@ -3723,6 +3721,10 @@ | 
| 'variables': { | 
| 'werror%': '-Werror', | 
| 'libraries_for_target%': '', | 
| +          'conditions' : [ | 
| +            # Enable -Wextra when we control the compiler. | 
| +            ['clang==1', { 'wextra': '-Wextra' }, { 'wextra': '-Wno-extra' }], | 
| +          ], | 
| }, | 
| 'defines': [ | 
| '_FILE_OFFSET_BITS=64', | 
| @@ -3732,6 +3734,7 @@ | 
| '-pthread', | 
| '-fno-strict-aliasing',  # See http://crbug.com/32204 | 
| '-Wall', | 
| +          '<(wextra)', | 
| # Don't warn about unused function params.  We use those everywhere. | 
| '-Wno-unused-parameter', | 
| # Don't warn about the "struct foo f = {0};" initialization pattern. | 
| @@ -3748,9 +3751,6 @@ | 
| # Make inline functions have hidden visiblity by default. | 
| # Surprisingly, not covered by -fvisibility=hidden. | 
| '-fvisibility-inlines-hidden', | 
| -          # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, | 
| -          # so we specify it explicitly.  (llvm.org/PR10448, crbug.com/90453) | 
| -          '-Wsign-compare', | 
| ], | 
| 'ldflags': [ | 
| '-pthread', '-Wl,-z,noexecstack', | 
|  |