Bug 1394734 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 07 Dec 2017 22:09:38 +0100
changeset 395729 e9a659f1e7a19dee5607baef6c07b386451d7bb1
parent 395728 2d15016c5ede81ee2b7a7643469c381f4d787219
child 395730 8ee8daca740b3f9bc5e3164e461b0a9149ff9b35
push id33054
push userrgurzau@mozilla.com
push dateFri, 08 Dec 2017 21:57:23 +0000
treeherdermozilla-central@6e2181b6137c [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 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium MozReview-Commit-ID: HbF5oT5HW6f
accessible/atk/moz.build
accessible/interfaces/gecko/moz.build
accessible/interfaces/ia2/moz.build
accessible/interfaces/msaa/moz.build
accessible/windows/ia2/moz.build
accessible/windows/msaa/moz.build
build/gyp.mozbuild
build/moz.build
config/external/ffi/moz.build
config/external/icu/defs.mozbuild
devtools/shared/heapsnapshot/tests/gtest/moz.build
dom/canvas/moz.build
dom/media/gmp/widevine-adapter/moz.build
dom/media/moz.build
dom/media/mp4/moz.build
dom/media/platforms/agnostic/bytestreams/moz.build
dom/media/platforms/ffmpeg/ffmpeg57/moz.build
dom/media/platforms/ffmpeg/ffvpx/moz.build
dom/media/platforms/ffmpeg/libav53/moz.build
dom/media/platforms/ffmpeg/libav54/moz.build
dom/media/platforms/ffmpeg/libav55/moz.build
dom/media/platforms/omx/moz.build
dom/media/webrtc/moz.build
extensions/spellcheck/hunspell/src/moz.build
gfx/2d/moz.build
gfx/angle/moz.build
gfx/angle/src/libANGLE/moz.build
gfx/angle/src/libEGL/moz.build
gfx/angle/src/libGLESv2/moz.build
gfx/cairo/cairo/src/moz.build
gfx/cairo/libpixman/src/moz.build
gfx/gl/moz.build
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
gfx/thebes/moz.build
gfx/vr/openvr/moz.build
js/src/moz.build
layout/base/gtest/moz.build
media/ffvpx/ffvpxcommon.mozbuild
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
media/openmax_dl/dl/moz.build
media/webrtc/moz.build
media/webrtc/trunk/gtest/moz.build
mfbt/moz.build
modules/fdlibm/src/moz.build
modules/libpref/test/gtest/moz.build
netwerk/system/mac/moz.build
parser/html/moz.build
security/moz.build
security/pkix/test/gtest/moz.build
security/pkix/warnings.mozbuild
security/sandbox/linux/moz.build
toolkit/components/ctypes/tests/moz.build
toolkit/components/jsoncpp/src/lib_json/moz.build
toolkit/components/protobuf/moz.build
toolkit/crashreporter/breakpad-client/mac/crash_generation/moz.build
toolkit/crashreporter/crashreporter.mozbuild
toolkit/crashreporter/test/moz.build
tools/fuzzing/libfuzzer/moz.build
xpcom/tests/gtest/moz.build
--- 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['CLANG_CXX'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] == 'clang' or 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/accessible/interfaces/gecko/moz.build
+++ b/accessible/interfaces/gecko/moz.build
@@ -20,10 +20,10 @@ GENERATED_FILES += [
 
 FINAL_LIBRARY = 'xul'
 
 # The Windows MIDL code generator creates things like:
 #
 #   #endif !_MIDL_USE_GUIDDEF_
 #
 # which clang-cl complains about.  MSVC doesn't, so turn this warning off.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += ['-Wno-extra-tokens']
--- a/accessible/interfaces/ia2/moz.build
+++ b/accessible/interfaces/ia2/moz.build
@@ -86,10 +86,10 @@ GENERATED_FILES += [
 
 RCINCLUDE = 'IA2Marshal.rc'
 
 # The Windows MIDL code generator creates things like:
 #
 #   #endif !_MIDL_USE_GUIDDEF_
 #
 # which clang-cl complains about.  MSVC doesn't, so turn this warning off.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += ['-Wno-extra-tokens']
--- a/accessible/interfaces/msaa/moz.build
+++ b/accessible/interfaces/msaa/moz.build
@@ -36,10 +36,10 @@ GENERATED_FILES += [
 
 RCINCLUDE = 'AccessibleMarshal.rc'
 
 # The Windows MIDL code generator creates things like:
 #
 #   #endif !_MIDL_USE_GUIDDEF_
 #
 # which clang-cl complains about.  MSVC doesn't, so turn this warning off.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += ['-Wno-extra-tokens']
--- a/accessible/windows/ia2/moz.build
+++ b/accessible/windows/ia2/moz.build
@@ -47,12 +47,12 @@ LOCAL_INCLUDES += [
 
 FINAL_LIBRARY = 'xul'
 
 # The Windows MIDL code generator creates things like:
 #
 #   #endif !_MIDL_USE_GUIDDEF_
 #
 # which clang-cl complains about.  MSVC doesn't, so turn this warning off.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += ['-Wno-extra-tokens']
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/accessible/windows/msaa/moz.build
+++ b/accessible/windows/msaa/moz.build
@@ -69,14 +69,14 @@ LOCAL_INCLUDES += [
     '/layout/style',
 ]
 
 # The Windows MIDL code generator creates things like:
 #
 #   #endif !_MIDL_USE_GUIDDEF_
 #
 # which clang-cl complains about.  MSVC doesn't, so turn this warning off.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += ['-Wno-extra-tokens']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
--- a/build/gyp.mozbuild
+++ b/build/gyp.mozbuild
@@ -19,17 +19,17 @@ gyp_vars.update({
     'mac_deployment_target': '10.7',
     'use_official_google_api_keys': 0,
     'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
     'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
     'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
     'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
     # basic stuff for everything
     'include_internal_video_render': 0,
-    'clang': 1 if CONFIG['CLANG_CXX'] else 0,
+    'clang': 1 if CONFIG['CC_TYPE'] == 'clang' else 0,
     'clang_use_chrome_plugins': 0,
     'enable_protobuf': 0,
     'include_tests': 0,
     'enable_android_opensl': 1,
     'enable_android_opensl_output': 0,
     # use_system_lib* still seems to be in use in trunk/build
     'use_system_libjpeg': 0,
     'use_system_libvpx': 0,
--- a/build/moz.build
+++ b/build/moz.build
@@ -41,17 +41,17 @@ if CONFIG['MOZ_DMD']:
 
 # Put a useful .gdbinit in the bin directory, to be picked up automatically
 # by GDB when we debug executables there.
 FINAL_TARGET_FILES += ['/.gdbinit']
 FINAL_TARGET_PP_FILES += ['.gdbinit_python.in']
 OBJDIR_FILES += ['!/dist/bin/.gdbinit_python']
 
 # Install the clang-cl runtime library for ASAN next to the binaries we produce.
-if CONFIG['MOZ_ASAN'] and CONFIG['CLANG_CL']:
+if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
     FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
 
 if CONFIG['LLVM_SYMBOLIZER']:
     FINAL_TARGET_FILES += ['/' + CONFIG['LLVM_SYMBOLIZER']]
 
 if CONFIG['MOZ_APP_BASENAME']:
     appini_defines = {
         'TOPOBJDIR': TOPOBJDIR,
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -55,33 +55,33 @@ else:
     # Don't bother setting EH_FRAME_FLAGS on Windows.
     # Quoted defines confuse msvcc.sh, and the value isn't used there.
     if CONFIG['OS_TARGET'] != 'WINNT':
         if CONFIG['FFI_TARGET'] == 'ARM':
             DEFINES['EH_FRAME_FLAGS'] = '"aw"'
         else:
             DEFINES['EH_FRAME_FLAGS'] = '"a"'
 
-    if CONFIG['CLANG_CL']:
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         ASFLAGS += ['-clang-cl']
 
     # Common source files.
     SOURCES += [
         '/js/src/ctypes/libffi/src/closures.c',
         '/js/src/ctypes/libffi/src/java_raw_api.c',
         '/js/src/ctypes/libffi/src/prep_cif.c',
         '/js/src/ctypes/libffi/src/raw_api.c',
         '/js/src/ctypes/libffi/src/types.c',
     ]
 
     # Per-platform sources and flags.
     ffi_srcs = ()
     if CONFIG['FFI_TARGET'] == 'ARM':
         ffi_srcs = ('sysv.S', 'ffi.c')
-        if CONFIG['CLANG_CXX']:
+        if CONFIG['CC_TYPE'] == 'clang':
             ASFLAGS += ['-no-integrated-as']
     elif CONFIG['FFI_TARGET'] == 'AARCH64':
         ffi_srcs = ('sysv.S', 'ffi.c')
     elif CONFIG['FFI_TARGET'] == 'X86':
         ffi_srcs = ('ffi.c', 'sysv.S', 'win32.S')
     elif CONFIG['FFI_TARGET'] == 'X86_64':
         ffi_srcs = ('ffi64.c', 'unix64.S', 'ffi.c', 'sysv.S')
     elif CONFIG['FFI_TARGET'] == 'X86_WIN32':
--- a/config/external/icu/defs.mozbuild
+++ b/config/external/icu/defs.mozbuild
@@ -32,27 +32,27 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
 elif CONFIG['OS_TARGET'] == 'WINNT':
     CXXFLAGS += ['-GR']
 
 DisableStlWrapping()
 AllowCompilerWarnings()
 
 # We allow compiler warnings, but we can at least cut down on spammy
 # warnings that get triggered for every file.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-macro-redefined',
         '-Wno-microsoft-include',
     ]
     CXXFLAGS += [
         '-Wno-macro-redefined',
         '-Wno-microsoft-include',
     ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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/devtools/shared/heapsnapshot/tests/gtest/moz.build
+++ b/devtools/shared/heapsnapshot/tests/gtest/moz.build
@@ -23,14 +23,14 @@ UNIFIED_SOURCES = [
     'SerializesTypeNames.cpp',
 ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 # THE MOCK_METHOD2 macro from gtest triggers this clang warning and it's hard
 # to work around, so we just ignore it.
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += ['-Wno-inconsistent-missing-override']
   # Workaround bug 1142396. Suppress the warning from gmock library for clang.
   CXXFLAGS += ['-Wno-null-dereference']
 
 FINAL_LIBRARY = 'xul-gtest'
--- 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['CLANG_CXX'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] == 'clang' or 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/gmp/widevine-adapter/moz.build
+++ b/dom/media/gmp/widevine-adapter/moz.build
@@ -17,12 +17,12 @@ EXPORTS += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/media/gmp',
 ]
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += ['-Wno-error=shadow']
 
 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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
   SOURCES['DecoderTraits.cpp'].flags += ['-Wno-error=multichar']
 
 EXTRA_COMPONENTS += [
     'PeerConnection.js',
     'PeerConnection.manifest',
 ]
 
 EXTRA_JS_MODULES.media += [
--- a/dom/media/mp4/moz.build
+++ b/dom/media/mp4/moz.build
@@ -62,15 +62,15 @@ elif CONFIG['CC_TYPE'] in ('clang', 'gcc
         '-Wno-unused-function',
     ]
     CXXFLAGS += [
         '-Werror=format',
         '-Wno-multichar',
         '-Wno-sign-compare',
         '-Wno-unused',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-mismatched-tags',
             '-Wno-tautological-constant-out-of-range-compare',
             '-Wno-unreachable-code-return',
             '-Wno-implicit-fallthrough',
         ]
--- a/dom/media/platforms/agnostic/bytestreams/moz.build
+++ b/dom/media/platforms/agnostic/bytestreams/moz.build
@@ -47,15 +47,15 @@ elif CONFIG['CC_TYPE'] in ('clang', 'gcc
         '-Wno-unused-function',
     ]
     CXXFLAGS += [
         '-Werror=format',
         '-Wno-multichar',
         '-Wno-sign-compare',
         '-Wno-unused',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-mismatched-tags',
             '-Wno-tautological-constant-out-of-range-compare',
             '-Wno-unreachable-code-return',
             '-Wno-implicit-fallthrough',
         ]
--- a/dom/media/platforms/ffmpeg/ffmpeg57/moz.build
+++ b/dom/media/platforms/ffmpeg/ffmpeg57/moz.build
@@ -12,14 +12,14 @@ UNIFIED_SOURCES += [
 ]
 LOCAL_INCLUDES += [
     '..',
     'include',
 ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
 
 FINAL_LIBRARY = 'xul'
--- a/dom/media/platforms/ffmpeg/ffvpx/moz.build
+++ b/dom/media/platforms/ffmpeg/ffvpx/moz.build
@@ -25,17 +25,17 @@ LOCAL_INCLUDES += [
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += [
         '../ffmpeg57/include',
     ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
   CXXFLAGS += [
     '-wd4996', # deprecated declaration
   ]
 
--- a/dom/media/platforms/ffmpeg/libav53/moz.build
+++ b/dom/media/platforms/ffmpeg/libav53/moz.build
@@ -12,12 +12,12 @@ UNIFIED_SOURCES += [
 ]
 LOCAL_INCLUDES += [
     '..',
     'include',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
--- a/dom/media/platforms/ffmpeg/libav54/moz.build
+++ b/dom/media/platforms/ffmpeg/libav54/moz.build
@@ -12,12 +12,12 @@ UNIFIED_SOURCES += [
 ]
 LOCAL_INCLUDES += [
     '..',
     'include',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
--- a/dom/media/platforms/ffmpeg/libav55/moz.build
+++ b/dom/media/platforms/ffmpeg/libav55/moz.build
@@ -12,14 +12,14 @@ UNIFIED_SOURCES += [
 ]
 LOCAL_INCLUDES += [
     '..',
     'include',
 ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
 
 FINAL_LIBRARY = 'xul'
--- a/dom/media/platforms/omx/moz.build
+++ b/dom/media/platforms/omx/moz.build
@@ -23,12 +23,12 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
     # Avoid warnings from third-party code that we can not modify.
-    if CONFIG['CLANG_CL']:
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         CXXFLAGS += ['-Wno-invalid-source-encoding']
     else:
         CXXFLAGS += ['-validate-charset-']
--- 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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     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['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
     ]
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -115,17 +115,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk
 
 if CONFIG['MOZ_ENABLE_SKIA']:
     SOURCES += [
         'ConvolutionFilter.cpp',
         'DrawTargetSkia.cpp',
         'PathSkia.cpp',
         'SourceSurfaceSkia.cpp',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         # Suppress warnings from Skia header files.
         SOURCES['DrawTargetSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
         SOURCES['PathSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
         SOURCES['SourceSurfaceSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
     EXPORTS.mozilla.gfx += [
         'ConvolutionFilter.h',
         'HelpersSkia.h',
     ]
@@ -191,17 +191,17 @@ UNIFIED_SOURCES += [
     'Swizzle.cpp',
 ]
 
 SOURCES += [
     'Factory.cpp', # Need to suppress warnings in Skia header files.
     'InlineTranslator.cpp',
 ]
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXPORTS.mozilla.gfx += [
         'QuartzSupport.h',
--- a/gfx/angle/moz.build
+++ b/gfx/angle/moz.build
@@ -143,17 +143,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-attributes',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unknown-pragmas',
         '-Wno-unreachable-code',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-implicit-fallthrough',
             '-Wno-inconsistent-missing-override',
             '-Wno-unused-private-field',
         ]
     else:
         CXXFLAGS += [
             '-Wno-shadow-compatible-local',
--- a/gfx/angle/src/libANGLE/moz.build
+++ b/gfx/angle/src/libANGLE/moz.build
@@ -343,28 +343,28 @@ CXXFLAGS += CONFIG['SSE2_FLAGS']
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-attributes',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unknown-pragmas',
         '-Wno-unreachable-code',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-unused-private-field',
         ]
     else:
         CXXFLAGS += [
             '-Wno-shadow-compatible-local',
             '-Wno-shadow-local',
         ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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/angle/src/libEGL/moz.build
+++ b/gfx/angle/src/libEGL/moz.build
@@ -16,17 +16,17 @@ UNIFIED_SOURCES += [
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-attributes',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unknown-pragmas',
         '-Wno-unreachable-code',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-unused-private-field',
         ]
     else:
         CXXFLAGS += [
             '-Wno-shadow-compatible-local',
             '-Wno-shadow-local',
--- a/gfx/angle/src/libGLESv2/moz.build
+++ b/gfx/angle/src/libGLESv2/moz.build
@@ -23,17 +23,17 @@ UNIFIED_SOURCES += [
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-attributes',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unknown-pragmas',
         '-Wno-unreachable-code',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-unused-private-field',
         ]
     else:
         CXXFLAGS += [
             '-Wno-shadow-compatible-local',
             '-Wno-shadow-local',
--- 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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     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['CLANG_CXX'] or CONFIG['CLANG_CL']:
+    if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == '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 not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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
@@ -19,17 +19,17 @@ if CONFIG['OS_ARCH'] != 'Darwin' and CON
             'pixman-arm-neon-asm-bilinear.S',
             'pixman-arm-neon-asm.S',
         ]
     if CONFIG['HAVE_ARM_SIMD']:
         SOURCES += [
             'pixman-arm-simd-asm-scaled.S',
             'pixman-arm-simd-asm.S',
         ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         ASFLAGS += [
             '-no-integrated-as',
         ]
 
 SOURCES += [
     'pixman-access-accessors.c',
     'pixman-access.c',
     'pixman-arm.c',
@@ -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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-address',
         '-Wno-missing-field-initializers',
         '-Wno-sign-compare',
         '-Wno-incompatible-pointer-types',
         '-Wno-unused',                      # too many unused warnings; ignore
     ]
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-incompatible-pointer-types',
         '-Wno-tautological-compare',
         '-Wno-tautological-constant-out-of-range-compare',
     ]
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-unused-variable',
     ]
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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/gl/moz.build
+++ b/gfx/gl/moz.build
@@ -74,17 +74,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
         'SharedSurfaceANGLE.cpp',
         'SharedSurfaceD3D11Interop.cpp',
     ]
 if CONFIG['MOZ_ENABLE_SKIA_GPU']:
     EXPORTS += ['SkiaGLGlue.h']
     SOURCES += [
         'SkiaGLGlue.cpp',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         # Suppress warnings from Skia header files.
         SOURCES['SkiaGLGlue.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 if gl_provider == 'CGL':
     # These files include Mac headers that are unfriendly to unified builds
     SOURCES += [
         "GLContextProviderCGL.mm",
     ]
--- 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['CLANG_CL']):
+if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl'):
     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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     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 not CONFIG['CLANG_CXX'] and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['CC_TYPE'] != 'clang' and CONFIG['CC_TYPE'] != 'clang-cl':
     CXXFLAGS += [
         '-Wno-logical-op',
         '-Wno-maybe-uninitialized',
     ]
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == '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['CLANG_CL']):
+if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl'):
     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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     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 not CONFIG['CLANG_CXX'] and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['CC_TYPE'] != 'clang' and CONFIG['CC_TYPE'] != 'clang-cl':
     CXXFLAGS += [
         '-Wno-logical-op',
         '-Wno-maybe-uninitialized',
     ]
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == '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/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -263,11 +263,11 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('and
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 DEFINES['GRAPHITE2_STATIC'] = True
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     # Suppress warnings from Skia header files.
     SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
--- 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['CLANG_CXX'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] == 'clang' or 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['CLANG_CXX'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] == 'clang' or 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/layout/base/gtest/moz.build
+++ b/layout/base/gtest/moz.build
@@ -6,24 +6,24 @@
 
 UNIFIED_SOURCES += [
     'TestAccessibleCaretEventHub.cpp',
     'TestAccessibleCaretManager.cpp',
 ]
 
 # THE MOCK_METHOD2 macro from gtest triggers this clang warning and it's hard
 # to work around, so we just ignore it.
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += ['-Wno-inconsistent-missing-override']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/layout/base',
     '/layout/style',
 ]
 
 # Workaround bug 1142396. Suppress the warning from gmock library for clang.
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += ['-Wno-null-dereference']
 
 FINAL_LIBRARY = 'xul-gtest'
--- a/media/ffvpx/ffvpxcommon.mozbuild
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -56,17 +56,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
         '-Wno-pointer-sign',
         '-Wno-sign-compare',
         '-Wno-switch',
         '-Wno-type-limits',
         '-Wno-unused-function',
         # XXX This does not seem to have any effect on some versions of GCC.
         '-Wno-deprecated-declarations',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CFLAGS += [
             '-Wno-incompatible-pointer-types-discards-qualifiers',
             '-Wno-string-conversion',
             '-Wno-visibility',
             # Workaround for https://bugs.llvm.org/show_bug.cgi?id=26828#c4 :
             '-ffreestanding',
         ]
     else:
@@ -115,16 +115,16 @@ elif not CONFIG['RELEASE_OR_BETA']:
     DEFINES['ASSERT_LEVEL'] = 1
 
 # clang-cl's <intrin.h> doesn't work the same as MSVC's.  For details, see:
 #
 # http://lists.llvm.org/pipermail/cfe-dev/2016-September/050943.html
 #
 # As a temporary workaround while upstream decides how to address this,
 # we enable modules to make <intrin.h> more MSVC-compatible.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Xclang',
         '-fmodules',
         '-Xclang',
         '-fmodules-cache-path=' + TOPOBJDIR + '/media/ffpvx',
         '-fbuiltin-module-map',
     ]
--- a/media/libaom/moz.build
+++ b/media/libaom/moz.build
@@ -65,17 +65,17 @@ elif CONFIG['CPU_ARCH'] == 'arm':
         if f.endswith('neon.c'):
             SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
 
     if CONFIG['OS_TARGET'] == 'Android':
         # For cpu-features.h
         LOCAL_INCLUDES += [
             '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'],
         ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         ASFLAGS += [
             '-no-integrated-as',
         ]
 else:
     # Generic C-only configuration
     EXPORTS.aom += files['GENERIC_EXPORTS']
     SOURCES += files['GENERIC_SOURCES']
     ASFLAGS += [ '-I%s/media/libaom/config/generic/' % TOPSRCDIR ]
@@ -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['CLANG_CL'] or CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl' or CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
     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 not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-unused-function', # so many of these warnings; just ignore them
     ]
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == '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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-parentheses',
         '-Wno-pointer-sign',
         '-Wno-sign-compare',
         '-Wno-switch',
         '-Wno-type-limits',
     ]
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-incompatible-pointer-types-discards-qualifiers',
         '-Wno-logical-op-parentheses',
     ]
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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['CLANG_CL']:
+    if CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl') or CONFIG['CC_TYPE'] == 'clang-cl':
         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:
@@ -126,10 +126,10 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
     # opcodes; actual arch detection is done at runtime.
     ASFLAGS += [
         '-march=armv7-a',
     ]
     ASFLAGS += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CFLAGS += ['-Wno-#pragma-messages']
--- 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 not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     CFLAGS += [
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4101', # unreferenced local variable
     ]
--- a/media/libtheora/moz.build
+++ b/media/libtheora/moz.build
@@ -17,21 +17,21 @@ 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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += ['-Wno-type-limits']
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += ['-Wno-tautological-compare']
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-pointer-sign',
         '-Wno-shift-op-parentheses',
     ]
 
 UNIFIED_SOURCES += [
     'lib/apiwrapper.c',
     'lib/bitpack.c',
@@ -47,25 +47,25 @@ UNIFIED_SOURCES += [
     'lib/quant.c',
     'lib/state.c',
 ]
 
 LOCAL_INCLUDES += ['include']
 
 if '86' in CONFIG['OS_TEST']:
     if CONFIG['OS_ARCH'] != 'SunOS':
-        if CONFIG['CLANG_CL']:
+        if CONFIG['CC_TYPE'] == 'clang-cl':
             # clang-cl can't handle libtheora's inline asm.
             pass
         elif CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64':
             DEFINES['OC_X86_ASM'] = True
             if '64' in CONFIG['OS_TEST']:
                 DEFINES['OC_X86_64_ASM'] = True
     if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-        if CONFIG['CLANG_CL']:
+        if CONFIG['CC_TYPE'] == 'clang-cl':
             # clang-cl can't handle libtheora's inline asm.
             pass
         elif '64' not in CONFIG['OS_TEST']:
             SOURCES += [
                 'lib/x86_vc/mmxfrag.c',
                 'lib/x86_vc/mmxidct.c',
                 'lib/x86_vc/mmxstate.c',
                 'lib/x86_vc/x86cpu.c',
@@ -106,12 +106,12 @@ if CONFIG['GNU_AS']:
 
         # These flags are a lie; they're just used to enable the requisite
         # opcodes; actual arch detection is done at runtime.
         ASFLAGS += [
             '-march=armv7-a',
         ]
         ASFLAGS += CONFIG['NEON_FLAGS']
 
-        if CONFIG['CLANG_CXX']:
+        if CONFIG['CC_TYPE'] == 'clang':
             ASFLAGS += [
                 '-no-integrated-as',
             ]
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -62,17 +62,17 @@ elif CONFIG['CPU_ARCH'] == 'arm':
         if f.endswith('.c') and 'neon' in f:
             SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
 
     if CONFIG['OS_TARGET'] == 'Android':
         # For cpu-features.h
         LOCAL_INCLUDES += [
             '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'],
         ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         ASFLAGS += [
             '-no-integrated-as',
         ]
 else:
     # Generic C-only configuration
     EXPORTS.vpx += files['GENERIC_EXPORTS']
     SOURCES += files['GENERIC_SOURCES']
     ASFLAGS += [ '-I%s/media/libvpx/config/generic/' % TOPSRCDIR ]
@@ -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['CLANG_CL'] or CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl' or CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
     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 not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['CC_TYPE'] != 'clang-cl':
     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['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-unused-function', # so many of these warnings; just ignore them
     ]
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
     ]
 
 ASFLAGS += CONFIG['VPX_ASFLAGS']
 ASFLAGS += [
     '-I.',
--- a/media/openmax_dl/dl/moz.build
+++ b/media/openmax_dl/dl/moz.build
@@ -80,13 +80,13 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
         '..',
         'api'
     ]
 
     DEFINES['BIG_FFT_TABLE'] = True
 
     FINAL_LIBRARY = 'xul'
 
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         ASFLAGS += [
             '-no-integrated-as',
         ]
     
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -86,17 +86,17 @@ if CONFIG['MOZ_WEBRTC_SIGNALING']:
     ]
     GYP_DIRS += ['trunk/third_party/gflags']
     GYP_DIRS['trunk/third_party/gflags'].input = 'trunk/third_party/gflags/gflags.gyp'
     GYP_DIRS['trunk/third_party/gflags'].variables = gyp_vars_copy
     GYP_DIRS['trunk/third_party/gflags'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}
 
     if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
         # Avoid warnings from third-party code that we can not modify.
-        if CONFIG['CLANG_CL']:
+        if CONFIG['CC_TYPE'] == 'clang-cl':
             CXXFLAGS += ['-Wno-invalid-source-encoding']
         else:
             CXXFLAGS += [
                 '-validate-charset-',
                 '-wd5038', # C5038 initializer list order warnings
             ]
 
     if CONFIG['ENABLE_TESTS']:
--- a/media/webrtc/trunk/gtest/moz.build
+++ b/media/webrtc/trunk/gtest/moz.build
@@ -556,17 +556,17 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
         '../webrtc/voice_engine/voice_engine_fixture.cc',
     ]
 
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-overloaded-virtual',
         ]
-        if CONFIG['CLANG_CXX']:
+        if CONFIG['CC_TYPE'] == 'clang':
             CXXFLAGS += ['-Wno-comma']
 
     if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
         # This is intended as a temporary workaround to enable warning free building
         # with VS2015.
         # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
         CXXFLAGS += ['-wd4312']
 
--- a/mfbt/moz.build
+++ b/mfbt/moz.build
@@ -147,16 +147,16 @@ DEFINES['IMPL_MFBT'] = True
 SOURCES += [
     'Compression.cpp',
     'decimal/Decimal.cpp',
     'lz4.c',
 ]
 
 DisableStlWrapping()
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     # Suppress warnings from third-party V8 Decimal code.
     SOURCES['decimal/Decimal.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 if CONFIG['MOZ_NEEDS_LIBATOMIC']:
     OS_LIBS += ['atomic']
 
 DEFINES['LZ4LIB_VISIBILITY'] = ''
--- a/modules/fdlibm/src/moz.build
+++ b/modules/fdlibm/src/moz.build
@@ -11,17 +11,17 @@ EXPORTS += [
 FINAL_LIBRARY = 'js'
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-parentheses',
         '-Wno-sign-compare',
     ]
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += [
         '-Wno-dangling-else',
     ]
 
 if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
     CXXFLAGS += [
         '-wd4018', # signed/unsigned mismatch
         '-wd4146', # unary minus operator applied to unsigned type
--- a/modules/libpref/test/gtest/moz.build
+++ b/modules/libpref/test/gtest/moz.build
@@ -14,14 +14,14 @@ UNIFIED_SOURCES = [
     'CallbackAndVarCacheOrder.cpp',
 ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 # THE MOCK_METHOD2 macro from gtest triggers this clang warning and it's hard
 # to work around, so we just ignore it.
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += ['-Wno-inconsistent-missing-override']
   # Workaround bug 1142396. Suppress the warning from gmock library for clang.
   CXXFLAGS += ['-Wno-null-dereference']
 
 FINAL_LIBRARY = 'xul-gtest'
--- a/netwerk/system/mac/moz.build
+++ b/netwerk/system/mac/moz.build
@@ -5,10 +5,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsNetworkLinkService.mm',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += ['-Wno-error=shadow']
--- 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['CLANG_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CC_TYPE'] == 'clang':
     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['CLANG_CXX'] or CONFIG['CLANG_CL']:
+    if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == '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,28 +34,28 @@ 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 not CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['CC_TYPE'] != 'clang':
   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',
     '-Wno-old-style-cast',
   ]
-  if CONFIG['CLANG_CXX']:
+  if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += [
       '-Wno-exit-time-destructors',
       '-Wno-global-constructors',
       '-Wno-thread-safety',
       '-Wno-used-but-marked-unused',
       '-Wno-zero-as-null-pointer-constant',
     ]
 elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
--- a/security/pkix/warnings.mozbuild
+++ b/security/pkix/warnings.mozbuild
@@ -1,9 +1,9 @@
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Weverything',
 
     '-Wno-c++98-compat',
     '-Wno-c++98-compat-pedantic',
     '-Wno-missing-prototypes',
     '-Wno-missing-variable-declarations',
     '-Wno-padded',
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -78,31 +78,31 @@ 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['CLANG_CXX'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] == 'clang' or 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',
     ]
 
 # gcc lto likes to put the top level asm in syscall.cc in a different partition
 # from the function using it which breaks the build.  Work around that by
 # forcing there to be only one partition.
-if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']:
+if '-flto' in CONFIG['OS_CXXFLAGS'] and CONFIG['CC_TYPE'] != 'clang':
     LDFLAGS += ['--param lto-partitions=1']
 
 DEFINES['NS_NO_XPCOM'] = True
 DisableStlWrapping()
 
 LOCAL_INCLUDES += ['/security/sandbox/linux']
 LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
 LOCAL_INCLUDES += ['/security/sandbox/chromium']
--- 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['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += ['-Wno-varargs']
--- a/toolkit/components/jsoncpp/src/lib_json/moz.build
+++ b/toolkit/components/jsoncpp/src/lib_json/moz.build
@@ -11,17 +11,17 @@ UNIFIED_SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '/toolkit/components/jsoncpp/include',
 ]
 
 # This code is only used in the stand-alone minidump analyzer executable so
 # enabling exceptions should be fine.
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-Xclang',
         '-fcxx-exceptions',
     ]
 elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
     CXXFLAGS += [
         '-fexceptions',
     ]
@@ -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['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-Wno-c++11-narrowing',
     ]
 
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl' or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
     ]
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -125,17 +125,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
     CXXFLAGS += [
         '-Wno-ignored-qualifiers',
         '-Wno-maybe-uninitialized',
         '-Wno-return-type',
         '-Wno-sign-compare',
         '-Wno-subobject-linkage',
         '-Wno-unused-function',
     ]
-    if CONFIG['CLANG_CXX']:
+    if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-comma',
             '-Wno-null-conversion',
             '-Wno-unused-local-typedef',
         ]
 elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
     CXXFLAGS += [
         '-wd4005',  # 'WIN32_LEAN_AND_MEAN' : macro redefinition
--- a/toolkit/crashreporter/breakpad-client/mac/crash_generation/moz.build
+++ b/toolkit/crashreporter/breakpad-client/mac/crash_generation/moz.build
@@ -11,10 +11,10 @@ UNIFIED_SOURCES += [
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/breakpad-client',
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += ['-Wno-shadow']
--- 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['CLANG_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang' or CONFIG['CC_TYPE'] == 'clang-cl':
      CXXFLAGS += [
          '-Wno-c++11-narrowing',
      ]
 
 if CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
      CXXFLAGS += [
          '-Wno-implicit-fallthrough',
      ]
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -24,17 +24,17 @@ SOURCES += [
   'ExceptionThrower.cpp',
 ]
 
 if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'x86_64':
     SOURCES += [
         'win64UnwindInfoTests.asm',
     ]
 
-if CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] == 'clang-cl':
     SOURCES['ExceptionThrower.cpp'].flags += [
         '-Xclang',
         '-fcxx-exceptions',
     ]
 elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
     SOURCES['ExceptionThrower.cpp'].flags += [
         '-fexceptions',
     ]
--- a/tools/fuzzing/libfuzzer/moz.build
+++ b/tools/fuzzing/libfuzzer/moz.build
@@ -31,17 +31,17 @@ SOURCES += [
     'FuzzerTraceState.cpp',
     'FuzzerUtil.cpp',
     'FuzzerUtilDarwin.cpp',
     'FuzzerUtilLinux.cpp',
     'FuzzerUtilPosix.cpp',
     'FuzzerUtilWindows.cpp'
 ]
 
-if CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += ['-Wno-unreachable-code-return']
 
 # According to the LLVM docs, LibFuzzer isn't supposed to be built with any
 # sanitizer flags and in fact, building it with ASan coverage currently causes
 # Clang 3.9+ to crash, so we filter out all sanitizer-related flags here.
 for flags_var in ('OS_CFLAGS', 'OS_CXXFLAGS'):
     COMPILE_FLAGS[flags_var] = [
         f for f in COMPILE_FLAGS.get(flags_var, [])
--- a/xpcom/tests/gtest/moz.build
+++ b/xpcom/tests/gtest/moz.build
@@ -63,17 +63,17 @@ UNIFIED_SOURCES += [
 if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT') and CONFIG['OS_TARGET'] != 'Android':
     # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
     # Bug 1054249: Doesn't work on Android
     UNIFIED_SOURCES += [
         'TestDeadlockDetector.cpp',
         'TestDeadlockDetectorScalability.cpp',
     ]
 
-if CONFIG['WRAP_STL_INCLUDES'] and not CONFIG['CLANG_CL']:
+if CONFIG['WRAP_STL_INCLUDES'] and CONFIG['CC_TYPE'] != 'clang-cl':
     UNIFIED_SOURCES += [
         'TestSTLWrappers.cpp',
     ]
 
 # Compile TestAllocReplacement separately so Windows headers don't pollute
 # the global namespace for other files.
 SOURCES += [
     'TestAllocReplacement.cpp',