Bug 1394734 - Simplify various corner cases r=glandium
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 07 Dec 2017 22:10:19 +0100
changeset 447485 8ee8daca740b3f9bc5e3164e461b0a9149ff9b35
parent 447484 e9a659f1e7a19dee5607baef6c07b386451d7bb1
child 447486 48c0628a4ef38477f115ef8b6824835970c9e024
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1394734
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1394734 - Simplify various corner cases r=glandium MozReview-Commit-ID: 4s4JdXZPvmv
accessible/atk/moz.build
config/external/icu/defs.mozbuild
dom/canvas/moz.build
dom/media/moz.build
dom/media/webrtc/moz.build
extensions/spellcheck/hunspell/src/moz.build
gfx/angle/src/libANGLE/moz.build
gfx/cairo/cairo/src/moz.build
gfx/cairo/libpixman/src/moz.build
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
gfx/vr/openvr/moz.build
js/src/moz.build
media/libaom/moz.build
media/libav/libavcommon.mozbuild
media/libopus/moz.build
media/libspeex_resampler/src/moz.build
media/libtheora/moz.build
media/libvpx/moz.build
parser/html/moz.build
security/moz.build
security/pkix/test/gtest/moz.build
security/sandbox/linux/moz.build
toolkit/components/ctypes/tests/moz.build
toolkit/components/jsoncpp/src/lib_json/moz.build
toolkit/crashreporter/crashreporter.mozbuild
--- a/accessible/atk/moz.build
+++ b/accessible/atk/moz.build
@@ -49,15 +49,15 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']
     CFLAGS += CONFIG['TK_CFLAGS']
     CXXFLAGS += CONFIG['TK_CFLAGS']
 
 if CONFIG['MOZ_ENABLE_DBUS']:
     CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Used in G_DEFINE_TYPE_EXTENDED macro, probably fixed in newer glib /
     # gobject headers. See bug 1243331 comment 3.
     CXXFLAGS += [
         '-Wno-error=shadow',
         '-Wno-unused-local-typedefs',
     ]
--- a/config/external/icu/defs.mozbuild
+++ b/config/external/icu/defs.mozbuild
@@ -42,17 +42,17 @@ if CONFIG['CC_TYPE'] == 'clang-cl':
         '-Wno-macro-redefined',
         '-Wno-microsoft-include',
     ]
     CXXFLAGS += [
         '-Wno-macro-redefined',
         '-Wno-microsoft-include',
     ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     CFLAGS += [
         '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
         '-wd4996', # The compiler encountered a deprecated declaration.
     ]
     CXXFLAGS += [
         '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
         '-wd4333', # '>>' : right shift by too large amount, data loss
         '-wd4996', # The compiler encountered a deprecated declaration.
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -184,17 +184,17 @@ UNIFIED_SOURCES += [
     'WebGLVertexAttribData.cpp',
 ]
 
 SOURCES += [
     'MurmurHash3.cpp',
 ]
 
 # Suppress warnings from third-party code.
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES['MurmurHash3.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 LOCAL_INCLUDES += [
     '/js/xpconnect/wrappers',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -291,17 +291,17 @@ if CONFIG['OS_TARGET'] == 'WINNT':
 # DecoderTraits.cpp needs to be built separately because of Mac OS X headers.
 SOURCES += [
     'CubebUtils.cpp',
     'DecoderTraits.cpp',
 ]
 
 # Some codec-related code uses multi-character constants, which GCC and clang
 # warn about. Suppress turning this warning into an error.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
   SOURCES['DecoderTraits.cpp'].flags += ['-Wno-error=multichar']
 
 EXTRA_COMPONENTS += [
     'PeerConnection.js',
     'PeerConnection.manifest',
 ]
 
 EXTRA_JS_MODULES.media += [
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -65,17 +65,17 @@ EXPORTS.mozilla.dom += [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 # Suppress some GCC/clang warnings being treated as errors:
 #  - about attributes on forward declarations for types that are already
 #    defined, which complains about important MOZ_EXPORT attributes for
 #    android API types
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CXXFLAGS += [
         '-Wno-error=attributes',
         '-Wno-error=shadow',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
--- a/extensions/spellcheck/hunspell/src/moz.build
+++ b/extensions/spellcheck/hunspell/src/moz.build
@@ -27,12 +27,12 @@ LOCAL_INCLUDES += [
     '../glue',
 ]
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
     ]
--- a/gfx/angle/src/libANGLE/moz.build
+++ b/gfx/angle/src/libANGLE/moz.build
@@ -354,17 +354,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
             '-Wno-unused-private-field',
         ]
     else:
         CXXFLAGS += [
             '-Wno-shadow-compatible-local',
             '-Wno-shadow-local',
         ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     CXXFLAGS += [
         '-wd4018', # '>' : signed/unsigned mismatch
         '-wd4530', # C++ exception handler used, without /EHsc
         '-wd5038', # C5038: initializer list order warnings
     ]
 
 if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
--- a/gfx/cairo/cairo/src/moz.build
+++ b/gfx/cairo/cairo/src/moz.build
@@ -208,47 +208,47 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
 # Normally determined by cairo's configure script.
 DEFINES['HAVE_UINT64_T'] = True
 
 if CONFIG['MOZ_TREE_FREETYPE']:
     DEFINES['HAVE_FT_LIBRARY_SETLCDFILTER'] = True
     DEFINES['FT_LCD_FILTER_H'] = '%s/modules/freetype2/include/freetype/ftlcdfil.h' % TOPSRCDIR
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += [
         '-Wno-enum-compare',
         '-Wno-int-to-pointer-cast',
         '-Wno-int-conversion',
         '-Wno-incompatible-pointer-types',
         '-Wno-sign-compare',
         '-Wno-type-limits',
         '-Wno-missing-field-initializers',
         '-Wno-conversion',
         '-Wno-narrowing',
         '-Wno-switch',
         '-Wno-unused',
         '-Wno-unused-variable',
         '-Wno-error=uninitialized',
     ]
-    if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+    if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
         CFLAGS += [
             '-Wno-absolute-value',
             '-Wno-deprecated-register',
             '-Wno-incompatible-pointer-types',
             '-Wno-macro-redefined',
             '-Wno-shift-negative-value',
             '-Wno-tautological-compare',
             '-Wno-tautological-constant-out-of-range-compare',
             '-Wno-unreachable-code',
         ]
     else:
         CFLAGS += ['-Wno-unused-but-set-variable']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     CFLAGS += [
         '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
         '-wd4018', # '>' : signed/unsigned mismatch
         '-wd4047', # different levels of indirection
         '-wd4101', # unreferenced local variable
         '-wd4133', # 'function' : incompatible types
         '-wd4146', # unary minus operator applied to unsigned type
         '-wd4311', # 'variable' : pointer truncation from 'type' to 'type'
--- a/gfx/cairo/libpixman/src/moz.build
+++ b/gfx/cairo/libpixman/src/moz.build
@@ -132,35 +132,35 @@ if use_arm_simd_gcc:
     SOURCES += ['pixman-arm-simd.c']
 
 if use_arm_neon_gcc:
     DEFINES['USE_ARM_NEON'] = True
     SOURCES += ['pixman-arm-neon.c']
     SOURCES['pixman-arm-neon.c'].flags += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += [
         '-Wno-address',
         '-Wno-missing-field-initializers',
         '-Wno-sign-compare',
         '-Wno-incompatible-pointer-types',
         '-Wno-unused',                      # too many unused warnings; ignore
     ]
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += [
         '-Wno-incompatible-pointer-types',
         '-Wno-tautological-compare',
         '-Wno-tautological-constant-out-of-range-compare',
     ]
 if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-unused-variable',
     ]
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     CFLAGS += [
         '-wd4047', # different levels of indirection
         '-wd4101', # unreferenced local variable
         '-wd4133', # 'function' : incompatible types
         '-wd4146', # unary minus operator applied to unsigned type
         '-wd4311', # 'variable' : pointer truncation from 'type' to 'type'
     ]
 
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -71,17 +71,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
     DEFINES['_UNICODE'] = True
     UNIFIED_SOURCES += [
         'skia/src/fonts/SkFontMgr_indirect.cpp',
         'skia/src/fonts/SkRemotableFontMgr.cpp',
     ]
 
 # We should autogenerate these SSE related flags.
 
-if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl'):
+if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc')):
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-mssse3']
     SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
     SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
     SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2']
@@ -108,31 +108,31 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
 
 if not CONFIG['MOZ_ENABLE_SKIA_GPU']:
     DEFINES['SK_SUPPORT_GPU'] = 0
 
 if CONFIG['MOZ_TREE_FREETYPE']:
     DEFINES['SK_CAN_USE_DLOPEN'] = 0
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CXXFLAGS += [
         '-Wno-deprecated-declarations',
         '-Wno-overloaded-virtual',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unreachable-code',
         '-Wno-unused-function',
     ]
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['CC_TYPE'] != 'clang' and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'gcc':
     CXXFLAGS += [
         '-Wno-logical-op',
         '-Wno-maybe-uninitialized',
     ]
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
         '-Wno-inconsistent-missing-override',
         '-Wno-macro-redefined',
         '-Wno-unused-private-field',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -716,17 +716,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
     DEFINES['_UNICODE'] = True
     UNIFIED_SOURCES += [
         'skia/src/fonts/SkFontMgr_indirect.cpp',
         'skia/src/fonts/SkRemotableFontMgr.cpp',
     ]
 
 # We should autogenerate these SSE related flags.
 
-if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl'):
+if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc')):
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-mssse3']
     SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
     SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
     SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2']
@@ -753,31 +753,31 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
 
 if not CONFIG['MOZ_ENABLE_SKIA_GPU']:
     DEFINES['SK_SUPPORT_GPU'] = 0
 
 if CONFIG['MOZ_TREE_FREETYPE']:
     DEFINES['SK_CAN_USE_DLOPEN'] = 0
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CXXFLAGS += [
         '-Wno-deprecated-declarations',
         '-Wno-overloaded-virtual',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unreachable-code',
         '-Wno-unused-function',
     ]
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['CC_TYPE'] != 'clang' and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'gcc':
     CXXFLAGS += [
         '-Wno-logical-op',
         '-Wno-maybe-uninitialized',
     ]
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
         '-Wno-inconsistent-missing-override',
         '-Wno-macro-redefined',
         '-Wno-unused-private-field',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
--- a/gfx/vr/openvr/moz.build
+++ b/gfx/vr/openvr/moz.build
@@ -46,14 +46,14 @@ SOURCES += [
     'src/hmderrors_public.cpp',
     'src/openvr_api_public.cpp',
     'src/pathtools_public.cpp',
     'src/sharedlibtools_public.cpp',
     'src/strtools_public.cpp',
     'src/vrpathregistry_public.cpp',
 ]
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Harmless warnings in 3rd party code
     CXXFLAGS += [
         '-Wno-error=parentheses',
         '-Wno-error=unused-variable',
     ]
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -740,17 +740,17 @@ if CONFIG['JS_HAS_CTYPES']:
         DEFINES['FFI_BUILDING'] = True
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Also disable strict-aliasing for GCC compiler, that is enabled by default
     # starting with version 7.1, see Bug 1363009
     CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 # Generate GC statistics phase data.
 GENERATED_FILES += ['gc/StatsPhasesGenerated.h']
 StatsPhasesGeneratedHeader = GENERATED_FILES['gc/StatsPhasesGenerated.h']
 StatsPhasesGeneratedHeader.script = 'gc/GenerateStatsPhases.py:generateHeader'
 GENERATED_FILES += ['gc/StatsPhasesGenerated.cpp']
 StatsPhasesGeneratedCpp = GENERATED_FILES['gc/StatsPhasesGenerated.cpp']
--- a/media/libaom/moz.build
+++ b/media/libaom/moz.build
@@ -92,43 +92,43 @@ if CONFIG['OS_TARGET'] == 'Android':
     # the OS they're on, so do it for them.
     DEFINES['__linux__'] = True
 
     if not CONFIG['MOZ_WEBRTC']:
         SOURCES += [
             '%%%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
         ]
 
-if CONFIG['CC_TYPE'] == 'clang-cl' or CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] != 'msvc':
     for f in SOURCES:
         if f.endswith('sse2.c'):
             SOURCES[f].flags += CONFIG['SSE2_FLAGS']
         elif f.endswith('ssse3.c'):
             SOURCES[f].flags += ['-mssse3']
         elif f.endswith('sse4.c'):
             SOURCES[f].flags += ['-msse4.1']
         elif f.endswith('avx.c'):
             SOURCES[f].flags += ['-mavx']
         elif f.endswith('avx2.c'):
             SOURCES[f].flags += ['-mavx2']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     for f in SOURCES:
         if f.endswith('avx.c'):
             SOURCES[f].flags += ['-arch:AVX']
         if f.endswith('avx2.c'):
             SOURCES[f].flags += ['-arch:AVX2']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-unused-function', # so many of these warnings; just ignore them
     ]
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
     ]
 
 ASFLAGS += CONFIG['VPX_ASFLAGS']
 ASFLAGS += [
     '-I.',
--- a/media/libav/libavcommon.mozbuild
+++ b/media/libav/libavcommon.mozbuild
@@ -23,29 +23,29 @@ elif CONFIG['OS_ARCH'] == 'Darwin':
     ASFLAGS += ['-Pconfig_darwin.asm', '-DPREFIX']
 else:
     # Default to unix, similar to how ASFLAGS setup works in configure.in
     ASFLAGS += ['-Pconfig_unix.asm']
 
 LOCAL_INCLUDES += ['/media/libav']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += [
         '-Wno-parentheses',
         '-Wno-pointer-sign',
         '-Wno-sign-compare',
         '-Wno-switch',
         '-Wno-type-limits',
     ]
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += [
         '-Wno-incompatible-pointer-types-discards-qualifiers',
         '-Wno-logical-op-parentheses',
     ]
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     CFLAGS += [
         '-wd4090', # 'return' : different 'const' qualifiers
         '-wd4018', # '>' : signed/unsigned mismatch
         '-wd4305', # 'initializing' : truncation from '__int64' to 'double'
     ]
 
 FINAL_LIBRARY = 'lgpllibs'
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -93,17 +93,17 @@ if CONFIG['CPU_ARCH'] in ('x86', 'x86_64
     DEFINES['OPUS_X86_MAY_HAVE_SSE4_1'] = True
     DEFINES['OPUS_X86_MAY_HAVE_AVX'] = True
     SOURCES += celt_sources_sse
     SOURCES += celt_sources_sse2
     SOURCES += celt_sources_sse4_1
     SOURCES += silk_sources_sse4_1
     if not CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
         SOURCES += silk_sources_fixed_sse4_1
-    if CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl') or CONFIG['CC_TYPE'] == 'clang-cl':
+    if CONFIG['CC_TYPE'] != 'msvc':
         for f in SOURCES:
             if f in celt_sources_sse:
                 SOURCES[f].flags += CONFIG['SSE_FLAGS']
             if f in celt_sources_sse2:
                 SOURCES[f].flags += CONFIG['SSE2_FLAGS']
             if f in celt_sources_sse4_1 or \
                f in silk_sources_sse4_1 or \
                f in silk_sources_fixed_sse4_1:
--- a/media/libspeex_resampler/src/moz.build
+++ b/media/libspeex_resampler/src/moz.build
@@ -45,13 +45,13 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
         'resample_neon.c'
     ]
     SOURCES['resample_neon.c'].flags += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-Wno-sign-compare']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     CFLAGS += [
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4101', # unreferenced local variable
     ]
--- a/media/libtheora/moz.build
+++ b/media/libtheora/moz.build
@@ -17,19 +17,19 @@ EXPORTS.theora += [
 AllowCompilerWarnings()
 
 FINAL_LIBRARY = 'gkmedias'
 
 # The encoder is currently not included.
 DEFINES['THEORA_DISABLE_ENCODE'] = True
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += ['-Wno-type-limits']
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += ['-Wno-tautological-compare']
 if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-pointer-sign',
         '-Wno-shift-op-parentheses',
     ]
 
 UNIFIED_SOURCES += [
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -89,45 +89,45 @@ if CONFIG['OS_TARGET'] == 'Android':
     # Older versions of the Android NDK don't pre-define anything to indicate
     # the OS they're on, so do it for them.
     DEFINES['__linux__'] = True
 
     SOURCES += [
         '%%%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
     ]
 
-if CONFIG['CC_TYPE'] == 'clang-cl' or CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] != 'msvc':
     for f in SOURCES:
         if f.endswith('.c'):
             if 'sse2.c' in f:
                 SOURCES[f].flags += CONFIG['SSE2_FLAGS']
             if 'ssse3.c' in f:
                 SOURCES[f].flags += ['-mssse3']
             if 'sse4.c' in f:
                 SOURCES[f].flags += ['-msse4.1']
             if 'avx.c' in f:
                 SOURCES[f].flags += ['-mavx']
             if 'avx2.c' in f:
                 SOURCES[f].flags += ['-mavx2']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
+if CONFIG['CC_TYPE'] == 'msvc':
     for f in SOURCES:
         if f.endswith('.c'):
             if 'avx.c' in f:
                 SOURCES[f].flags += ['-arch:AVX']
             if 'avx2.c' in f:
                 SOURCES[f].flags += ['-arch:AVX2']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-unused-function', # so many of these warnings; just ignore them
     ]
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
     ]
 
 ASFLAGS += CONFIG['VPX_ASFLAGS']
 ASFLAGS += [
     '-I.',
--- a/parser/html/moz.build
+++ b/parser/html/moz.build
@@ -93,11 +93,11 @@ UNIFIED_SOURCES += [
 FINAL_LIBRARY = 'xul'
 
 # DEFINES['ENABLE_VOID_MENUITEM'] = True
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang':
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow',
                  '-Wno-implicit-fallthrough']
--- a/security/moz.build
+++ b/security/moz.build
@@ -86,17 +86,17 @@ else:
     gyp_vars['use_system_sqlite'] = 1
     gyp_vars['sqlite_libs'] = 'sqlite'
     gyp_vars['nspr_include_dir'] = CONFIG['NSPR_INCLUDE_DIR']
     gyp_vars['nspr_lib_dir'] = CONFIG['NSPR_LIB_DIR']
     # The Python scripts that detect clang need it to be set as CC
     # in the environment, which isn't true here. I don't know that
     # setting that would be harmful, but we already have this information
     # anyway.
-    if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+    if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
         gyp_vars['cc_is_clang'] = 1
     if CONFIG['GCC_USE_GNU_LD']:
         gyp_vars['cc_use_gnu_ld'] = 1
 
     GYP_DIRS += ['nss']
     GYP_DIRS['nss'].input = 'nss/nss.gyp'
     GYP_DIRS['nss'].variables = gyp_vars
 
--- a/security/pkix/test/gtest/moz.build
+++ b/security/pkix/test/gtest/moz.build
@@ -34,17 +34,17 @@ LOCAL_INCLUDES += [
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
 include('../../warnings.mozbuild')
 
 # GTest uses a variadic macro in a questionable way and it doesn't seem to be
 # possible to selectively disable just that error when -pedantic-errors is set.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['CC_TYPE'] != 'clang':
+if CONFIG['CC_TYPE'] == 'gcc':
   CXXFLAGS.remove('-pedantic-errors')
 
 # These warnings are disabled in order to minimize the amount of boilerplate
 # required to implement tests, and/or because they originate in the GTest
 # framework in a way we cannot otherwise work around.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [
     '-Wno-error=shadow',
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -78,17 +78,17 @@ if CONFIG['MOZ_GMP_SANDBOX']:
         'SandboxOpenedFiles.cpp',
     ]
 
 # This copy of SafeSPrintf doesn't need to avoid the Chromium logging
 # dependency like the one in libxul does, but this way the behavior is
 # consistent.  See also the comment in SandboxLogging.h.
 SOURCES['../chromium/base/strings/safe_sprintf.cc'].flags += ['-DNDEBUG']
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Keep clang from warning about intentional 'switch' fallthrough in icu_utf.cc:
     SOURCES['../chromium/base/third_party/icu/icu_utf.cc'].flags += ['-Wno-implicit-fallthrough']
     SOURCES['../chromium/sandbox/linux/seccomp-bpf/trap.cc'].flags += ['-Wno-unreachable-code-return']
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
     SOURCES['../chromium/sandbox/linux/services/syscall_wrappers.cc'].flags += [
         '-Wno-empty-body',
--- a/toolkit/components/ctypes/tests/moz.build
+++ b/toolkit/components/ctypes/tests/moz.build
@@ -26,10 +26,10 @@ DisableStlWrapping()
 
 NO_PGO = True
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     shared_library = '!%sjsctypes-test%s' % (CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'])
     TEST_HARNESS_FILES.xpcshell.toolkit.components.ctypes.tests.unit += [shared_library]
     TEST_HARNESS_FILES.testing.mochitest.chrome.toolkit.components.ctypes.tests.chrome += [shared_library]
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += ['-Wno-varargs']
--- a/toolkit/components/jsoncpp/src/lib_json/moz.build
+++ b/toolkit/components/jsoncpp/src/lib_json/moz.build
@@ -37,17 +37,17 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-
         '-wd4005', # macro redefinition
     ]
 elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-unused-local-typedefs',
         '-Wno-shadow',
     ]
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-c++11-narrowing',
     ]
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
     ]
--- a/toolkit/crashreporter/crashreporter.mozbuild
+++ b/toolkit/crashreporter/crashreporter.mozbuild
@@ -24,17 +24,17 @@ elif CONFIG['CC_TYPE'] in ('clang', 'gcc
     CXXFLAGS += [
         '-Wno-unused-local-typedefs',
         '-Wno-shadow',
         '-Wno-deprecated-declarations',
         '-Wno-bool-compare',
         '-Wno-unused-but-set-variable',
     ]
 
-if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
      CXXFLAGS += [
          '-Wno-c++11-narrowing',
      ]
 
 if CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
      CXXFLAGS += [
          '-Wno-implicit-fallthrough',
      ]