Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 07 Dec 2017 22:09:15 +0100
changeset 395727 5ec58e0e3a347e2504d7544d5d0312a70e8735cd
parent 395726 16a96ac854b85c1f6658223faa43ebea09e6eae8
child 395728 2d15016c5ede81ee2b7a7643469c381f4d787219
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['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium MozReview-Commit-ID: 7duJk2gSd4m
accessible/atk/moz.build
accessible/base/moz.build
accessible/generic/moz.build
accessible/html/moz.build
accessible/ipc/moz.build
accessible/ipc/other/moz.build
accessible/other/moz.build
accessible/xpcom/moz.build
accessible/xul/moz.build
browser/app/moz.build
build/gecko_templates.mozbuild
config/external/icu/common/moz.build
config/external/icu/defs.mozbuild
config/moz.build
db/sqlite3/src/moz.build
devtools/shared/heapsnapshot/moz.build
devtools/shared/heapsnapshot/tests/gtest/moz.build
docshell/base/moz.build
docshell/shistory/moz.build
dom/base/moz.build
dom/bindings/moz.build
dom/bindings/test/moz.build
dom/cache/moz.build
dom/canvas/moz.build
dom/events/moz.build
dom/file/ipc/moz.build
dom/html/input/moz.build
dom/html/moz.build
dom/indexedDB/moz.build
dom/ipc/moz.build
dom/media/bridge/moz.build
dom/media/doctor/gtest/moz.build
dom/media/encoder/moz.build
dom/media/flac/moz.build
dom/media/gmp/moz.build
dom/media/gtest/moz.build
dom/media/hls/moz.build
dom/media/mediasink/moz.build
dom/media/mediasource/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/libav55/moz.build
dom/media/platforms/moz.build
dom/media/platforms/omx/moz.build
dom/media/systemservices/moz.build
dom/media/wave/moz.build
dom/media/webaudio/blink/moz.build
dom/media/webaudio/moz.build
dom/media/webm/moz.build
dom/media/webrtc/moz.build
dom/media/webspeech/recognition/moz.build
dom/media/webspeech/synth/moz.build
dom/network/moz.build
dom/notification/moz.build
dom/plugins/base/moz.build
dom/plugins/ipc/hangui/moz.build
dom/plugins/ipc/moz.build
dom/plugins/test/testplugin/testplugin.mozbuild
dom/promise/moz.build
dom/quota/moz.build
dom/svg/moz.build
dom/webbrowserpersist/moz.build
dom/workers/moz.build
dom/xbl/moz.build
dom/xslt/base/moz.build
dom/xslt/xpath/moz.build
dom/xslt/xslt/moz.build
dom/xul/moz.build
dom/xul/templates/moz.build
editor/composer/moz.build
editor/libeditor/moz.build
extensions/cookie/moz.build
extensions/spellcheck/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/graphite2/src/moz.build
gfx/layers/apz/test/gtest/moz.build
gfx/layers/moz.build
gfx/qcms/moz.build
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
gfx/tests/gtest/moz.build
gfx/vr/openvr/moz.build
image/decoders/moz.build
image/moz.build
image/test/gtest/moz.build
intl/hyphenation/glue/moz.build
intl/strres/moz.build
intl/uconv/moz.build
ipc/app/moz.build
ipc/chromium/moz.build
ipc/glue/moz.build
ipc/testshell/moz.build
js/ipc/moz.build
js/src/gdb/moz.build
js/src/jsapi-tests/moz.build
js/src/moz.build
js/src/shell/moz.build
js/xpconnect/loader/moz.build
js/xpconnect/src/moz.build
js/xpconnect/wrappers/moz.build
layout/base/moz.build
layout/build/moz.build
layout/forms/moz.build
layout/generic/moz.build
layout/mathml/moz.build
layout/painting/moz.build
layout/tables/moz.build
layout/xul/grid/moz.build
layout/xul/moz.build
layout/xul/tree/moz.build
media/ffvpx/ffvpxcommon.mozbuild
media/gmp-clearkey/0.1/moz.build
media/libaom/moz.build
media/libav/libavcommon.mozbuild
media/libcubeb/gtest/moz.build
media/libopus/moz.build
media/libpng/moz.build
media/libspeex_resampler/src/moz.build
media/libtheora/moz.build
media/libtremor/lib/moz.build
media/libvorbis/moz.build
media/libvpx/moz.build
media/mtransport/common.build
media/mtransport/test/moz.build
media/sphinxbase/moz.build
media/webrtc/trunk/gtest/moz.build
media/webrtc/webrtc.mozbuild
memory/mozalloc/moz.build
memory/replace/dmd/test/moz.build
mfbt/tests/moz.build
modules/fdlibm/src/moz.build
modules/libpref/test/gtest/moz.build
mozglue/android/moz.build
mozglue/linker/moz.build
mozglue/linker/tests/moz.build
netwerk/base/moz.build
netwerk/cache/moz.build
netwerk/cache2/moz.build
netwerk/cookie/moz.build
netwerk/dns/mdns/libmdns/moz.build
netwerk/dns/moz.build
netwerk/mime/moz.build
netwerk/protocol/about/moz.build
netwerk/protocol/file/moz.build
netwerk/protocol/ftp/moz.build
netwerk/protocol/websocket/moz.build
netwerk/sctp/datachannel/moz.build
netwerk/sctp/src/moz.build
netwerk/srtp/src/moz.build
netwerk/test/moz.build
other-licenses/snappy/moz.build
parser/html/moz.build
parser/htmlparser/moz.build
rdf/base/moz.build
security/apps/moz.build
security/certverifier/moz.build
security/manager/pki/moz.build
security/manager/ssl/moz.build
security/manager/ssl/tests/gtest/moz.build
security/pkix/moz.build
security/pkix/test/gtest/moz.build
security/pkix/test/lib/moz.build
security/sandbox/linux/glue/moz.build
security/sandbox/linux/moz.build
testing/mochitest/ssltunnel/moz.build
testing/tools/minidumpwriter/moz.build
testing/tools/screenshot/moz.build
toolkit/components/browser/moz.build
toolkit/components/jsoncpp/src/lib_json/moz.build
toolkit/components/places/moz.build
toolkit/components/protobuf/moz.build
toolkit/components/reputationservice/moz.build
toolkit/components/telemetry/moz.build
toolkit/components/url-classifier/moz.build
toolkit/components/windowwatcher/moz.build
toolkit/crashreporter/breakpad-client/moz.build
toolkit/crashreporter/crashreporter.mozbuild
toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
toolkit/crashreporter/injector/moz.build
toolkit/crashreporter/moz.build
toolkit/library/moz.build
toolkit/mozapps/update/tests/moz.build
toolkit/system/osxproxy/tests/gtest/moz.build
toolkit/system/windowsproxy/tests/gtest/moz.build
toolkit/xre/moz.build
tools/profiler/moz.build
tools/profiler/tests/gtest/moz.build
uriloader/exthandler/moz.build
uriloader/prefetch/moz.build
xpcom/reflect/xptcall/md/unix/moz.build
xpcom/reflect/xptcall/md/win32/moz.build
xpcom/reflect/xptinfo/moz.build
xpfe/components/directory/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['GNU_CXX']:
+if CONFIG['CLANG_CXX'] 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/base/moz.build
+++ b/accessible/base/moz.build
@@ -107,10 +107,10 @@ else:
     LOCAL_INCLUDES += [
         '/accessible/other',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/accessible/generic/moz.build
+++ b/accessible/generic/moz.build
@@ -61,10 +61,10 @@ else:
     LOCAL_INCLUDES += [
         '/accessible/other',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/accessible/html/moz.build
+++ b/accessible/html/moz.build
@@ -41,10 +41,10 @@ else:
     LOCAL_INCLUDES += [
         '/accessible/other',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/accessible/ipc/moz.build
+++ b/accessible/ipc/moz.build
@@ -28,17 +28,17 @@ else:
         LOCAL_INCLUDES += [
             '/accessible/other',
         ]
 
 EXPORTS.mozilla.a11y += [
     'IPCTypes.h',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['ACCESSIBILITY']:
     EXPORTS.mozilla.a11y += [
         'DocAccessibleChildBase.h',
         'DocAccessibleParent.h',
         'ProxyAccessibleBase.h',
         'ProxyAccessibleShared.h',
--- a/accessible/ipc/other/moz.build
+++ b/accessible/ipc/other/moz.build
@@ -35,13 +35,13 @@ if CONFIG['ACCESSIBILITY']:
         ]
     else:
         LOCAL_INCLUDES += [
             '/accessible/other',
         ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 FINAL_LIBRARY = 'xul'
 
--- a/accessible/other/moz.build
+++ b/accessible/other/moz.build
@@ -18,10 +18,10 @@ LOCAL_INCLUDES += [
     '/accessible/base',
     '/accessible/generic',
     '/accessible/html',
     '/accessible/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/accessible/xpcom/moz.build
+++ b/accessible/xpcom/moz.build
@@ -57,10 +57,10 @@ GENERATED_FILES += [('xpcAccEvents.h', '
 xpc_acc = GENERATED_FILES[('xpcAccEvents.h', 'xpcAccEvents.cpp')]
 xpc_acc.script = 'AccEventGen.py:gen_files'
 xpc_acc.inputs += ['AccEvents.conf', '!/xpcom/idl-parser/xpidl/xpidllex.py', '!/xpcom/idl-parser/xpidl/xpidlyacc.py']
 
 FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/accessible/xul/moz.build
+++ b/accessible/xul/moz.build
@@ -48,10 +48,10 @@ else:
     LOCAL_INCLUDES += [
         '/accessible/other',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -90,17 +90,17 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_
 # Control the default heap size.
 # This is the heap returned by GetProcessHeap().
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
 #
 # Set it to 256k.  See bug 127069.
-if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
+if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CC_TYPE'] not in ('clang', 'gcc'):
     LDFLAGS += ['/HEAP:0x40000']
 
 DisableStlWrapping()
 
 if CONFIG['MOZ_LINKER']:
     OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
--- a/build/gecko_templates.mozbuild
+++ b/build/gecko_templates.mozbuild
@@ -36,17 +36,17 @@ def GeckoBinary(linkage='dependent', moz
     elif linkage != None:
         error('`linkage` must be "dependent", "standalone" or None')
 
     if mozglue:
         LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
         if mozglue == 'program':
             USE_LIBS += ['mozglue']
             DEFINES['MOZ_HAS_MOZGLUE'] = True
-            if CONFIG['MOZ_GLUE_IN_PROGRAM'] and CONFIG['GNU_CC']:
+            if CONFIG['MOZ_GLUE_IN_PROGRAM'] and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
                 LDFLAGS += ['-rdynamic']
         elif mozglue == 'library':
             LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
             if not CONFIG['MOZ_GLUE_IN_PROGRAM']:
                 USE_LIBS += ['mozglue']
         else:
             error('`mozglue` must be "program" or "library"')
 
--- a/config/external/icu/common/moz.build
+++ b/config/external/icu/common/moz.build
@@ -6,17 +6,17 @@
 
 Library('icuuc')
 FINAL_LIBRARY = 'icu'
 
 DEFINES['U_COMMON_IMPLEMENTATION'] = True
 
 LOCAL_INCLUDES += ['/intl/icu/source/i18n']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-deprecated-declarations',
         '-Wno-type-limits',
         '-Wno-unused-but-set-variable',
         '-Wno-unused-function',
         '-Wno-sign-compare',
         '-Wno-maybe-uninitialized',
     ]
--- a/config/external/icu/defs.mozbuild
+++ b/config/external/icu/defs.mozbuild
@@ -22,17 +22,17 @@ DEFINES.update(
 
 if not CONFIG['HAVE_LANGINFO_CODESET']:
     DEFINES['U_HAVE_NL_LANGINFO_CODESET'] = 0
 
 if CONFIG['MOZ_DEBUG']:
     DEFINES['U_DEBUG'] = 1
 
 # ICU requires RTTI
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-frtti']
 elif CONFIG['OS_TARGET'] == 'WINNT':
     CXXFLAGS += ['-GR']
 
 DisableStlWrapping()
 AllowCompilerWarnings()
 
 # We allow compiler warnings, but we can at least cut down on spammy
--- a/config/moz.build
+++ b/config/moz.build
@@ -30,28 +30,28 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
 
 if CONFIG['MOZ_SYSTEM_ICU']:
     DEFINES['MOZ_SYSTEM_ICU'] = True
 
 PYTHON_UNITTEST_MANIFESTS += [
     'tests/python.ini',
 ]
 
-if CONFIG['GNU_CC'] and CONFIG['MOZ_OPTIMIZE']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['MOZ_OPTIMIZE']:
     CFLAGS += ['-O3']
 
 HOST_DEFINES = {
     'UNICODE': True,
     '_UNICODE': True,
 }
 
 include('stl-headers.mozbuild')
 if CONFIG['WRAP_STL_INCLUDES']:
     stl_compiler = None
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         stl_compiler = 'gcc'
     elif CONFIG['_MSC_VER']:
         stl_compiler = 'msvc'
 
     if stl_compiler:
         template_file = SRCDIR + '/%s-stl-wrapper.template.h' % stl_compiler
         output_dir = '../dist/stl_wrappers'
         # We have to use a sentinel file as the first file because the
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -89,13 +89,13 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
 if CONFIG['OS_TARGET'] == 'Android':
     # On Android there's no tmp partition, so always use a MEMORY temp store.
     DEFINES['SQLITE_TEMP_STORE'] = 3
 elif CONFIG['HAVE_64BIT_BUILD']:
     # On 64bit platforms default to a MEMORY temp store for performance.
     DEFINES['SQLITE_TEMP_STORE'] = 2
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-type-limits',
     ]
--- a/devtools/shared/heapsnapshot/moz.build
+++ b/devtools/shared/heapsnapshot/moz.build
@@ -53,10 +53,10 @@ DevToolsModules(
     'CensusUtils.js',
     'DominatorTreeNode.js',
     'HeapAnalysesClient.js',
     'HeapAnalysesWorker.js',
     'HeapSnapshotFileUtils.js',
     'shortest-paths.js',
 )
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/devtools/shared/heapsnapshot/tests/gtest/moz.build
+++ b/devtools/shared/heapsnapshot/tests/gtest/moz.build
@@ -18,17 +18,17 @@ UNIFIED_SOURCES = [
     'DeserializedStackFrameUbiStackFrames.cpp',
     'DoesCrossCompartmentBoundaries.cpp',
     'DoesntCrossCompartmentBoundaries.cpp',
     'SerializesEdgeNames.cpp',
     'SerializesEverythingInHeapGraphOnce.cpp',
     'SerializesTypeNames.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
+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']:
   CXXFLAGS += ['-Wno-inconsistent-missing-override']
   # Workaround bug 1142396. Suppress the warning from gmock library for clang.
   CXXFLAGS += ['-Wno-null-dereference']
--- a/docshell/base/moz.build
+++ b/docshell/base/moz.build
@@ -117,10 +117,10 @@ LOCAL_INCLUDES += [
     '/netwerk/protocol/viewsource',
     '/toolkit/components/browser',
     '/tools/profiler',
 ]
 
 if CONFIG['MOZ_TOOLKIT_SEARCH']:
     DEFINES['MOZ_TOOLKIT_SEARCH'] = True
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/docshell/shistory/moz.build
+++ b/docshell/shistory/moz.build
@@ -31,10 +31,10 @@ UNIFIED_SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '/docshell/base',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -480,10 +480,10 @@ GENERATED_FILES += [
 countermap = GENERATED_FILES['PropertyUseCounterMap.inc']
 countermap.script = 'gen-usecounters.py:property_map'
 countermap.inputs = ['UseCounters.conf']
 
 counterlist = GENERATED_FILES['UseCounterList.h']
 counterlist.script = 'gen-usecounters.py:use_counter_list'
 counterlist.inputs = ['UseCounters.conf']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -155,17 +155,17 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser'
     # This is needed for Window.webidl
     DEFINES['HAVE_SIDEBAR'] = True
 
 
 PYTHON_UNITTEST_MANIFESTS += [
     'mozwebidlcodegen/test/python.ini',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
     # Suppress warnings in third-party code.
     CXXFLAGS += [
         '-Wno-maybe-uninitialized',
     ]
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     GENERATED_FILES += ['CSS2Properties.webidl']
--- a/dom/bindings/test/moz.build
+++ b/dom/bindings/test/moz.build
@@ -49,10 +49,10 @@ LOCAL_INCLUDES += [
 
 LOCAL_INCLUDES += [
     '!..',
     '/dom/bindings',
     '/js/xpconnect/src',
     '/js/xpconnect/wrappers',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/cache/moz.build
+++ b/dom/cache/moz.build
@@ -95,10 +95,10 @@ MOCHITEST_MANIFESTS += [
 BROWSER_CHROME_MANIFESTS += [
     'test/mochitest/browser.ini',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += [
     'test/xpcshell/xpcshell.ini',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- 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['GNU_CXX']:
+if CONFIG['CLANG_CXX'] 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')
 
@@ -215,10 +215,10 @@ LOCAL_INCLUDES += [
     '/media/libyuv/libyuv/include',
 ]
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/events/moz.build
+++ b/dom/events/moz.build
@@ -152,10 +152,10 @@ LOCAL_INCLUDES += [
     '/dom/xml',
     '/dom/xul',
     '/js/xpconnect/wrappers',
     '/layout/generic',
     '/layout/xul',
     '/layout/xul/tree/',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/file/ipc/moz.build
+++ b/dom/file/ipc/moz.build
@@ -48,13 +48,13 @@ LOCAL_INCLUDES += [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
--- a/dom/html/input/moz.build
+++ b/dom/html/input/moz.build
@@ -30,11 +30,11 @@ include('/ipc/chromium/chromium-config.m
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/html',
     '/layout/forms',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
--- a/dom/html/moz.build
+++ b/dom/html/moz.build
@@ -246,10 +246,10 @@ LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_ANDROID_HLS_SUPPORT'] and CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
     DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/indexedDB/moz.build
+++ b/dom/indexedDB/moz.build
@@ -90,17 +90,17 @@ IPDL_SOURCES += [
     'PBackgroundIndexedDBUtils.ipdl',
     'PIndexedDBPermissionRequest.ipdl',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Suppress gcc warning about a comparison being always false due to the
     # range of the data type
     SOURCES['Key.cpp'].flags += ['-Wno-error=type-limits']
     CXXFLAGS += ['-Wno-error=shadow']
 
 LOCAL_INCLUDES += [
     '/db/sqlite3/src',
     '/dom/base',
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -168,10 +168,10 @@ if CONFIG['MOZ_TOOLKIT_SEARCH']:
 JAR_MANIFESTS += ['jar.mn']
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/bridge/moz.build
+++ b/dom/media/bridge/moz.build
@@ -23,10 +23,10 @@ LOCAL_INCLUDES += [
     '/media/webrtc/signaling/src/media-conduit',
     '/media/webrtc/signaling/src/mediapipeline',
     '/media/webrtc/signaling/src/peerconnection',
     '/media/webrtc/trunk/',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/doctor/gtest/moz.build
+++ b/dom/media/doctor/gtest/moz.build
@@ -12,10 +12,10 @@ UNIFIED_SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/dom/media/doctor',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/encoder/moz.build
+++ b/dom/media/encoder/moz.build
@@ -34,10 +34,10 @@ FINAL_LIBRARY = 'xul'
 # These includes are from Android JB, for use of MediaCodec.
 LOCAL_INCLUDES += ['/ipc/chromium/src']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 # Suppress some GCC warnings being treated as errors:
 #  - about attributes on forward declarations for types that are already
 #    defined, which complains about an important MOZ_EXPORT for android::AString
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += ['-Wno-error=attributes']
--- a/dom/media/flac/moz.build
+++ b/dom/media/flac/moz.build
@@ -15,10 +15,10 @@ UNIFIED_SOURCES += [
     'FlacDemuxer.cpp',
     'FlacFrameParser.cpp',
 ]
 
 CXXFLAGS += CONFIG['MOZ_LIBVPX_CFLAGS']
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/gmp/moz.build
+++ b/dom/media/gmp/moz.build
@@ -136,10 +136,10 @@ FINAL_LIBRARY = 'xul'
 # media/mtransport so we work with --disable-webrtc
 LOCAL_INCLUDES += [
     '/media/mtransport',
     '/xpcom/base',
     '/xpcom/build',
     '/xpcom/threads',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/gtest/moz.build
+++ b/dom/media/gtest/moz.build
@@ -70,10 +70,10 @@ LOCAL_INCLUDES += [
     '/dom/media/platforms',
     '/dom/media/platforms/agnostic',
     '/security/certverifier',
     '/security/pkix/include',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/hls/moz.build
+++ b/dom/media/hls/moz.build
@@ -15,10 +15,10 @@ UNIFIED_SOURCES += [
     'HLSDemuxer.cpp',
     'HLSUtils.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/mediasink/moz.build
+++ b/dom/media/mediasink/moz.build
@@ -9,10 +9,10 @@ UNIFIED_SOURCES += [
     'AudioSinkWrapper.cpp',
     'DecodedStream.cpp',
     'OutputStreamManager.cpp',
     'VideoSink.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/mediasource/moz.build
+++ b/dom/media/mediasource/moz.build
@@ -37,10 +37,10 @@ UNIFIED_SOURCES += [
 TEST_DIRS += [
     'gtest',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- 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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CL']:
   SOURCES['DecoderTraits.cpp'].flags += ['-Wno-error=multichar']
 
 EXTRA_COMPONENTS += [
     'PeerConnection.js',
     'PeerConnection.manifest',
 ]
 
 EXTRA_JS_MODULES.media += [
@@ -329,15 +329,15 @@ DEFINES['MOZILLA_INTERNAL_API'] = True
 if CONFIG['MOZ_ANDROID_HLS_SUPPORT'] and CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
     DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 # Suppress some GCC warnings being treated as errors:
 #  - about attributes on forward declarations for types that are already
 #    defined, which complains about an important MOZ_EXPORT for android::AString
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-error=attributes',
         '-Wno-error=shadow',
     ]
 
 FINAL_LIBRARY = 'xul'
--- a/dom/media/mp4/moz.build
+++ b/dom/media/mp4/moz.build
@@ -50,17 +50,17 @@ if CONFIG['_MSC_VER']:
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4275', # non dll-interface class used as base for dll-interface class
         '-wd4305', # '=' : truncation from 'double' to 'float'
         '-wd4309', # '=' : truncation of constant value
         '-wd4355', # 'this' : used in base member initializer list
         '-wd4804', # '>' : unsafe use of type 'bool' in operation
         '-wd4099', # mismatched class/struct tags
     ]
-elif CONFIG['GNU_CXX']:
+elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-comment',
         '-Wno-sign-compare',
         '-Wno-unused-function',
     ]
     CXXFLAGS += [
         '-Werror=format',
         '-Wno-multichar',
--- a/dom/media/platforms/agnostic/bytestreams/moz.build
+++ b/dom/media/platforms/agnostic/bytestreams/moz.build
@@ -35,17 +35,17 @@ if CONFIG['_MSC_VER']:
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4275', # non dll-interface class used as base for dll-interface class
         '-wd4305', # '=' : truncation from 'double' to 'float'
         '-wd4309', # '=' : truncation of constant value
         '-wd4355', # 'this' : used in base member initializer list
         '-wd4804', # '>' : unsafe use of type 'bool' in operation
         '-wd4099', # mismatched class/struct tags
     ]
-elif CONFIG['GNU_CXX']:
+elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-comment',
         '-Wno-sign-compare',
         '-Wno-unused-function',
     ]
     CXXFLAGS += [
         '-Werror=format',
         '-Wno-multichar',
--- a/dom/media/platforms/ffmpeg/ffmpeg57/moz.build
+++ b/dom/media/platforms/ffmpeg/ffmpeg57/moz.build
@@ -10,16 +10,16 @@ UNIFIED_SOURCES += [
     '../FFmpegDecoderModule.cpp',
     '../FFmpegVideoDecoder.cpp',
 ]
 LOCAL_INCLUDES += [
     '..',
     'include',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
 if CONFIG['CLANG_CXX']:
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
 
 FINAL_LIBRARY = 'xul'
--- a/dom/media/platforms/ffmpeg/ffvpx/moz.build
+++ b/dom/media/platforms/ffmpeg/ffvpx/moz.build
@@ -23,17 +23,17 @@ LOCAL_INCLUDES += [
     '../ffmpeg57/include',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += [
         '../ffmpeg57/include',
     ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
 if CONFIG['CLANG_CXX']:
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
 if CONFIG['_MSC_VER']:
   CXXFLAGS += [
     '-wd4996', # deprecated declaration
--- a/dom/media/platforms/ffmpeg/libav55/moz.build
+++ b/dom/media/platforms/ffmpeg/libav55/moz.build
@@ -10,16 +10,16 @@ UNIFIED_SOURCES += [
     '../FFmpegDecoderModule.cpp',
     '../FFmpegVideoDecoder.cpp',
 ]
 LOCAL_INCLUDES += [
     '..',
     'include',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
 if CONFIG['CLANG_CXX']:
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
 
 FINAL_LIBRARY = 'xul'
--- a/dom/media/platforms/moz.build
+++ b/dom/media/platforms/moz.build
@@ -94,10 +94,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
     ]
     UNIFIED_SOURCES += [
         'android/AndroidDecoderModule.cpp',
         'android/RemoteDataDecoder.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/platforms/omx/moz.build
+++ b/dom/media/platforms/omx/moz.build
@@ -18,17 +18,17 @@ UNIFIED_SOURCES += [
 LOCAL_INCLUDES += [
     '/media/openmax_il/il112',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['_MSC_VER']:
     # Avoid warnings from third-party code that we can not modify.
     if CONFIG['CLANG_CL']:
         CXXFLAGS += ['-Wno-invalid-source-encoding']
     else:
         CXXFLAGS += ['-validate-charset-']
--- a/dom/media/systemservices/moz.build
+++ b/dom/media/systemservices/moz.build
@@ -83,10 +83,10 @@ IPDL_SOURCES += [
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/wave/moz.build
+++ b/dom/media/wave/moz.build
@@ -11,10 +11,10 @@ EXPORTS += [
 
 UNIFIED_SOURCES += [
     'WaveDecoder.cpp',
     'WaveDemuxer.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/webaudio/blink/moz.build
+++ b/dom/media/webaudio/blink/moz.build
@@ -30,10 +30,10 @@ if CONFIG['INTEL_ARCHITECTURE']:
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/media/webaudio',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/dom/media/webaudio/moz.build
+++ b/dom/media/webaudio/moz.build
@@ -128,10 +128,10 @@ if CONFIG['INTEL_ARCHITECTURE']:
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '..'
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/webm/moz.build
+++ b/dom/media/webm/moz.build
@@ -22,10 +22,10 @@ if CONFIG['MOZ_WEBM_ENCODER']:
     UNIFIED_SOURCES += ['EbmlComposer.cpp',
                         'WebMWriter.cpp',
     ]
 
 CXXFLAGS += CONFIG['MOZ_LIBVPX_CFLAGS']
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- 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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-error=attributes',
         '-Wno-error=shadow',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['_MSC_VER']:
--- a/dom/media/webspeech/recognition/moz.build
+++ b/dom/media/webspeech/recognition/moz.build
@@ -48,10 +48,10 @@ LOCAL_INCLUDES += [
     '/dom/base',
     '/media/sphinxbase',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/media/webspeech/synth/moz.build
+++ b/dom/media/webspeech/synth/moz.build
@@ -58,10 +58,10 @@ IPDL_SOURCES += [
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     'ipc',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/network/moz.build
+++ b/dom/network/moz.build
@@ -54,10 +54,10 @@ IPDL_SOURCES += [
 LOCAL_INCLUDES += [
     '../workers',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/notification/moz.build
+++ b/dom/notification/moz.build
@@ -35,10 +35,10 @@ LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/ipc',
     '/dom/workers',
 ]
 
 BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/plugins/base/moz.build
+++ b/dom/plugins/base/moz.build
@@ -83,10 +83,10 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/plugins/ipc/hangui/moz.build
+++ b/dom/plugins/ipc/hangui/moz.build
@@ -12,16 +12,16 @@ UNIFIED_SOURCES += [
 ]
 include('/ipc/chromium/chromium-config.mozbuild')
 
 DEFINES['NS_NO_XPCOM'] = True
 DEFINES['_HAS_EXCEPTIONS'] = 0
 
 DisableStlWrapping()
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     WIN32_EXE_LDFLAGS += ['-municode']
 
 RCINCLUDE = 'HangUIDlg.rc'
 
 OS_LIBS += [
     'comctl32',
 ]
--- a/dom/plugins/ipc/moz.build
+++ b/dom/plugins/ipc/moz.build
@@ -131,17 +131,17 @@ DEFINES['FORCE_PR_LOG'] = True
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gtk3':
     CXXFLAGS += CONFIG['TK_CFLAGS']
 else:
     # Force build against gtk+2 for struct offsets and such.
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['_MSC_VER']:
     # This is intended as a temporary hack to support building with VS2015.
     # conversion from 'X' to 'Y' requires a narrowing conversion
     CXXFLAGS += ['-wd4838']
 
     # 'type cast': conversion from 'unsigned int' to 'HIMC' of greater size
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -61,10 +61,10 @@ if CONFIG['_MSC_VER']:
     CXXFLAGS += ['-wd4838']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     FINAL_TARGET = 'dist/plugins/%s.plugin/Contents/MacOS' % cocoa_name
     OBJDIR_FILES.dist.plugins['%s.plugin' % cocoa_name].Contents += ['%s/Info.plist' % relative_path]
 else:
     FINAL_TARGET = 'dist/plugins'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/promise/moz.build
+++ b/dom/promise/moz.build
@@ -30,10 +30,10 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/quota/moz.build
+++ b/dom/quota/moz.build
@@ -61,10 +61,10 @@ IPDL_SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '../workers',
     '/caps',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -267,10 +267,10 @@ LOCAL_INCLUDES += [
     '/dom/xml',
     '/layout/base',
     '/layout/generic',
     '/layout/style',
     '/layout/svg',
     '/layout/xul',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/webbrowserpersist/moz.build
+++ b/dom/webbrowserpersist/moz.build
@@ -44,10 +44,10 @@ EXPORTS.mozilla += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/html',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/workers/moz.build
+++ b/dom/workers/moz.build
@@ -135,10 +135,10 @@ BROWSER_CHROME_MANIFESTS += [
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
 TEST_DIRS += ['test/gtest']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/xbl/moz.build
+++ b/dom/xbl/moz.build
@@ -48,10 +48,10 @@ LOCAL_INCLUDES += [
     '/layout/style',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/xslt/base/moz.build
+++ b/dom/xslt/base/moz.build
@@ -17,10 +17,10 @@ LOCAL_INCLUDES += [
     '..',
     '../xml',
     '../xpath',
     '../xslt',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/xslt/xpath/moz.build
+++ b/dom/xslt/xpath/moz.build
@@ -53,10 +53,10 @@ UNIFIED_SOURCES += [
 LOCAL_INCLUDES += [
     '../base',
     '../xml',
     '../xslt',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/xslt/xslt/moz.build
+++ b/dom/xslt/xslt/moz.build
@@ -53,10 +53,10 @@ LOCAL_INCLUDES += [
     '../base',
     '../xml',
     '../xpath',
     '/dom/base',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/xul/moz.build
+++ b/dom/xul/moz.build
@@ -54,10 +54,10 @@ LOCAL_INCLUDES += [
     '/layout/base',
     '/layout/generic',
     '/layout/style',
     '/layout/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/dom/xul/templates/moz.build
+++ b/dom/xul/templates/moz.build
@@ -55,10 +55,10 @@ UNIFIED_SOURCES += [
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/xul',
     '/layout/xul/tree/',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/editor/composer/moz.build
+++ b/editor/composer/moz.build
@@ -49,10 +49,10 @@ RESOURCE_FILES += [
     'res/table-remove-column-active.gif',
     'res/table-remove-column-hover.gif',
     'res/table-remove-column.gif',
     'res/table-remove-row-active.gif',
     'res/table-remove-row-hover.gif',
     'res/table-remove-row.gif',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/editor/libeditor/moz.build
+++ b/editor/libeditor/moz.build
@@ -92,10 +92,10 @@ EXTRA_COMPONENTS += [
     'EditorUtils.js',
     'EditorUtils.manifest',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/extensions/cookie/moz.build
+++ b/extensions/cookie/moz.build
@@ -17,13 +17,13 @@ UNIFIED_SOURCES += [
 LOCAL_INCLUDES += [
     '/caps',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Networking: Cookies')
--- a/extensions/spellcheck/src/moz.build
+++ b/extensions/spellcheck/src/moz.build
@@ -25,10 +25,10 @@ else:
 LOCAL_INCLUDES += [
     '../hunspell/glue',
     '/dom/base',
 ]
 EXPORTS.mozilla += [
      'mozSpellChecker.h',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -194,17 +194,17 @@ UNIFIED_SOURCES += [
 SOURCES += [
     'Factory.cpp', # Need to suppress warnings in Skia header files.
     'InlineTranslator.cpp',
 ]
 
 if CONFIG['CLANG_CXX']:
     SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXPORTS.mozilla.gfx += [
         'QuartzSupport.h',
     ]
     SOURCES += [
         'MacIOSurface.cpp',
--- a/gfx/angle/moz.build
+++ b/gfx/angle/moz.build
@@ -135,17 +135,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
         'src/common/system_utils_mac.cpp',
     ]
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     UNIFIED_SOURCES += [
         'src/common/system_utils_win.cpp',
     ]
 
 
-if CONFIG['GNU_CXX']:
+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']:
--- a/gfx/angle/src/libANGLE/moz.build
+++ b/gfx/angle/src/libANGLE/moz.build
@@ -335,17 +335,17 @@ if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     SOURCES += [
         'renderer/d3d/d3d11/SwapChain11.cpp',
         'renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp',
     ]
 
 CXXFLAGS += CONFIG['SSE2_FLAGS']
 
-if CONFIG['GNU_CXX']:
+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']:
--- a/gfx/angle/src/libEGL/moz.build
+++ b/gfx/angle/src/libEGL/moz.build
@@ -8,17 +8,17 @@
 #
 # WARNING WARNING WARNING
 #
 UNIFIED_SOURCES += [
     'libEGL.cpp',
 ]
 
 
-if CONFIG['GNU_CXX']:
+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']:
--- a/gfx/angle/src/libGLESv2/moz.build
+++ b/gfx/angle/src/libGLESv2/moz.build
@@ -15,17 +15,17 @@ UNIFIED_SOURCES += [
     'entry_points_gles_2_0_ext.cpp',
     'entry_points_gles_3_0_autogen.cpp',
     'entry_points_gles_3_1.cpp',
     'global_state.cpp',
     'libGLESv2.cpp',
 ]
 
 
-if CONFIG['GNU_CXX']:
+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']:
--- a/gfx/cairo/cairo/src/moz.build
+++ b/gfx/cairo/cairo/src/moz.build
@@ -188,17 +188,17 @@ DEFINES['PACKAGE_BUGREPORT'] = '"http://
 
 for var in ('CAIRO_HAS_PTHREAD', '_GNU_SOURCE'):
     DEFINES[var] = True
 
 for var in ('MOZ_TREE_CAIRO', 'MOZ_TREE_PIXMAN'):
     if CONFIG[var]:
         DEFINES[var] = True
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     DEFINES['HAVE_CXX11_ATOMIC_PRIMITIVES'] = True
     # We would normally use autoconf to set these up, using AC_CHECK_SIZEOF.
     # But AC_CHECK_SIZEOF requires running programs to determine the sizes,
     # and that doesn't work so well with cross-compiling.  So instead we
     # use these magic macros, available since at least GCC 4.3, to define
     # the preprocessor macros cairo wanted from autoconf.
     DEFINES['SIZEOF_VOID_P'] = '__SIZEOF_POINTER__'
     DEFINES['SIZEOF_INT'] = '__SIZEOF_INT__'
@@ -208,17 +208,17 @@ if CONFIG['GNU_CC']:
 # 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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['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',
@@ -259,17 +259,17 @@ if CONFIG['_MSC_VER'] and not CONFIG['CL
         '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
         '-wd4018', # '>' : signed/unsigned mismatch
         '-wd4146', # unary minus operator applied to unsigned type
         '-wd4828', # illegal in the current source character set
         '-wd4838', # requires a narrowing conversion
     ]
 
 # See bug 386897.
-if CONFIG['GNU_CC'] and CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']:
     CFLAGS += ['-O2']
     CXXFLAGS += ['-O2']
 
 if CONFIG['MOZ_X11']:
     CFLAGS += CONFIG['XCFLAGS']
 
 if CONFIG['MOZ_ENABLE_CAIRO_FT']:
     CFLAGS += CONFIG['CAIRO_FT_CFLAGS']
--- a/gfx/cairo/libpixman/src/moz.build
+++ b/gfx/cairo/libpixman/src/moz.build
@@ -8,17 +8,17 @@ EXPORTS += [
     'pixman-version.h',
     'pixman.h',
 ]
 
 # Apple's arm assembler doesn't support the same syntax as
 # the standard GNU assembler, so use the C fallback paths for now.
 # This may be fixable if clang's ARM/iOS assembler improves into a
 # viable solution in the future.
-if CONFIG['OS_ARCH'] != 'Darwin' and CONFIG['GNU_CC']:
+if CONFIG['OS_ARCH'] != 'Darwin' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     if CONFIG['HAVE_ARM_NEON']:
         SOURCES += [
             'pixman-arm-neon-asm-bilinear.S',
             'pixman-arm-neon-asm.S',
         ]
     if CONFIG['HAVE_ARM_SIMD']:
         SOURCES += [
             'pixman-arm-simd-asm-scaled.S',
@@ -82,49 +82,49 @@ use_sse2 = False
 use_vmx = False
 use_arm_simd_gcc = False
 use_arm_neon_gcc = False
 if '86' in CONFIG['OS_TEST']:
     use_sse2 = True
     if '64' not in CONFIG['OS_TEST']:
         if CONFIG['_MSC_VER']:
             use_mmx = True
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         use_mmx = True
 elif 'ppc' in CONFIG['OS_TEST']:
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         use_vmx = True
 # Apple's arm assembler doesn't support the same syntax as
 # the standard GNU assembler, so use the C fallback paths for now.
 # This may be fixable if clang's ARM/iOS assembler improves into a
 # viable solution in the future.
 elif 'arm' in CONFIG['OS_TEST']:
     if CONFIG['OS_ARCH'] != 'Darwin':
         if CONFIG['HAVE_ARM_SIMD']:
             use_arm_simd_gcc = True
         if CONFIG['HAVE_ARM_NEON']:
             use_arm_neon_gcc = True
 
 if use_mmx:
     DEFINES['USE_MMX'] = True
     SOURCES += ['pixman-mmx.c']
     SOURCES['pixman-mmx.c'].flags += CONFIG['MMX_FLAGS']
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         SOURCES['pixman-mmx.c'].flags += [
             '-Winline',
             '--param', 'inline-unit-growth=10000',
             '--param', 'large-function-growth=10000',
         ]
 
 if use_sse2:
     DEFINES['USE_SSE'] = True
     DEFINES['USE_SSE2'] = True
     SOURCES += ['pixman-sse2.c']
     SOURCES['pixman-sse2.c'].flags += CONFIG['SSE_FLAGS'] + CONFIG['SSE2_FLAGS']
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         SOURCES['pixman-sse2.c'].flags += ['-Winline']
 
 if use_vmx:
     DEFINES['USE_VMX'] = True
     SOURCES += ['pixman-vmx.c']
     SOURCES['pixman-vmx.c'].flags += ['-maltivec']
 
 if use_arm_simd_gcc:
@@ -132,17 +132,17 @@ 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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['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']:
--- a/gfx/gl/moz.build
+++ b/gfx/gl/moz.build
@@ -153,10 +153,10 @@ if CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']:
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CFLAGS += CONFIG['TK_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/gfx/graphite2/src/moz.build
+++ b/gfx/graphite2/src/moz.build
@@ -7,17 +7,17 @@
 # This should contain all of the _PUBLIC_HEADERS from files.mk
 EXPORTS.graphite2 += [
     '../include/graphite2/Font.h',
     '../include/graphite2/Log.h',
     '../include/graphite2/Segment.h',
     '../include/graphite2/Types.h',
 ]
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     UNIFIED_SOURCES += [
         'direct_machine.cpp'
     ]
 else:
     UNIFIED_SOURCES += [
         'call_machine.cpp'
     ]
 
--- a/gfx/layers/apz/test/gtest/moz.build
+++ b/gfx/layers/apz/test/gtest/moz.build
@@ -24,10 +24,10 @@ LOCAL_INCLUDES += [
     '/gfx/layers',
     '/gfx/tests/gtest'  # for TestLayers.h, which is shared with the gfx gtests
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -559,17 +559,17 @@ if CONFIG['ENABLE_TESTS']:
 MOCHITEST_MANIFESTS += ['apz/test/mochitest/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['apz/test/mochitest/chrome.ini']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
     # Suppress warnings in third-party code.
     CXXFLAGS += [
         '-Wno-maybe-uninitialized'
     ]
 
 if CONFIG['MOZ_ENABLE_SKIA']:
   UNIFIED_SOURCES += [
--- a/gfx/qcms/moz.build
+++ b/gfx/qcms/moz.build
@@ -14,17 +14,17 @@ SOURCES += [
     'iccread.c',
     'matrix.c',
     'transform.c',
     'transform_util.c',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-Wno-missing-field-initializers']
 
 use_sse1 = False
 use_sse2 = False
 use_altivec = False
 if '86' in CONFIG['OS_TEST']:
     use_sse2 = True
     if CONFIG['_MSC_VER']:
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -21,17 +21,17 @@ header = """
 # DO NOT MODIFY THIS FILE IT IS AUTOGENERATED.
 #
 
 skia_opt_flags = []
 
 if CONFIG['MOZ_OPTIMIZE']:
     if CONFIG['_MSC_VER']:
         skia_opt_flags += ['-O2']
-    elif CONFIG['GNU_CC']:
+    elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         skia_opt_flags += ['-O3']
 
 """
 
 footer = """
 
 # We allow warnings for third-party code that can be updated from upstream.
 ALLOW_COMPILER_WARNINGS = True
@@ -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['GNU_CC'] or CONFIG['CLANG_CL']):
+if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['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']
@@ -91,43 +91,43 @@ elif CONFIG['_MSC_VER']:
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=20']
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=31']
     SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=20']
     SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=31']
     SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=41']
     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=42']
     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=51']
     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=52']
-elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += CONFIG['NEON_FLAGS']
-elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc']
 
 DEFINES['SKIA_IMPLEMENTATION'] = 1
 
 if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
     DEFINES['SK_PDF_USE_SFNTLY'] = 1
 
 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['GNU_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-deprecated-declarations',
         '-Wno-overloaded-virtual',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unreachable-code',
         '-Wno-unused-function',
     ]
-if CONFIG['GNU_CXX'] and not CONFIG['CLANG_CXX'] and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and not CONFIG['CLANG_CXX'] and not CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-logical-op',
         '-Wno-maybe-uninitialized',
     ]
 if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
         '-Wno-inconsistent-missing-override',
@@ -444,21 +444,21 @@ def write_mozbuild(sources):
   # Windows-specific files don't get unification because of nasty headers.
   # Luckily there are not many files in this.
   write_list(f, "SOURCES", sources['win'], 4)
 
   f.write("if CONFIG['INTEL_ARCHITECTURE']:\n")
   write_sources(f, sources['intel'], 4)
   write_cflags(f, sources['intel'], opt_whitelist, 'skia_opt_flags', 4)
 
-  f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:\n")
+  f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):\n")
   write_sources(f, sources['arm'], 4)
   write_cflags(f, sources['arm'], opt_whitelist, 'skia_opt_flags', 4)
 
-  f.write("elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['GNU_CC']:\n")
+  f.write("elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):\n")
   write_sources(f, sources['arm64'], 4)
   write_cflags(f, sources['arm64'], opt_whitelist, 'skia_opt_flags', 4)
 
   f.write("else:\n")
   write_sources(f, sources['none'], 4)
 
   f.write(footer)
 
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -14,17 +14,17 @@
 # DO NOT MODIFY THIS FILE IT IS AUTOGENERATED.
 #
 
 skia_opt_flags = []
 
 if CONFIG['MOZ_OPTIMIZE']:
     if CONFIG['_MSC_VER']:
         skia_opt_flags += ['-O2']
-    elif CONFIG['GNU_CC']:
+    elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         skia_opt_flags += ['-O3']
 
 UNIFIED_SOURCES += [
     'skia/src/core/SkAAClip.cpp',
     'skia/src/core/SkAlphaRuns.cpp',
     'skia/src/core/SkAnalyticEdge.cpp',
     'skia/src/core/SkAnnotation.cpp',
     'skia/src/core/SkArenaAlloc.cpp',
@@ -629,34 +629,34 @@ if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += skia_opt_flags
-elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES += [
         'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
         'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
         'skia/src/opts/SkBitmapProcState_opts_none.cpp',
         'skia/src/opts/SkBlitMask_opts_arm.cpp',
         'skia/src/opts/SkBlitMask_opts_arm_neon.cpp',
         'skia/src/opts/SkBlitRow_opts_arm.cpp',
         'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
     ]
     SOURCES['skia/src/opts/SkBitmapProcState_arm_neon.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBitmapProcState_opts_none.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBlitMask_opts_arm.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBlitMask_opts_arm_neon.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBlitRow_opts_arm.cpp'].flags += skia_opt_flags
     SOURCES['skia/src/opts/SkBlitRow_opts_arm_neon.cpp'].flags += skia_opt_flags
-elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES += [
         'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
         'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
         'skia/src/opts/SkBitmapProcState_opts_none.cpp',
         'skia/src/opts/SkBlitMask_opts_arm.cpp',
         'skia/src/opts/SkBlitMask_opts_arm_neon.cpp',
         'skia/src/opts/SkBlitRow_opts_arm.cpp',
         'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
@@ -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['GNU_CC'] or CONFIG['CLANG_CL']):
+if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['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']
@@ -736,43 +736,43 @@ elif CONFIG['_MSC_VER']:
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=20']
     SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=31']
     SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=20']
     SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=31']
     SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=41']
     SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=42']
     SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=51']
     SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=52']
-elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += CONFIG['NEON_FLAGS']
-elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc']
 
 DEFINES['SKIA_IMPLEMENTATION'] = 1
 
 if CONFIG['MOZ_ENABLE_SKIA_PDF_SFNTLY']:
     DEFINES['SK_PDF_USE_SFNTLY'] = 1
 
 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['GNU_CXX'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-deprecated-declarations',
         '-Wno-overloaded-virtual',
         '-Wno-shadow',
         '-Wno-sign-compare',
         '-Wno-unreachable-code',
         '-Wno-unused-function',
     ]
-if CONFIG['GNU_CXX'] and not CONFIG['CLANG_CXX'] and not CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and not CONFIG['CLANG_CXX'] and not CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-logical-op',
         '-Wno-maybe-uninitialized',
     ]
 if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
         '-Wno-inconsistent-missing-override',
--- a/gfx/tests/gtest/moz.build
+++ b/gfx/tests/gtest/moz.build
@@ -59,10 +59,10 @@ LOCAL_INCLUDES += [
     '/gfx/ots/src',
     '/gfx/qcms',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/gfx/vr/openvr/moz.build
+++ b/gfx/vr/openvr/moz.build
@@ -12,17 +12,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     if CONFIG['HAVE_64BIT_BUILD']:
         DEFINES['WIN64'] = True
     else:
         DEFINES['WIN32'] = True
 
 if CONFIG['OS_ARCH'] == 'Darwin':
     DEFINES['POSIX'] = True
     DEFINES['OSX'] = True
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += ['-xobjective-c++']
 
 if CONFIG['OS_ARCH'] == 'Linux':
     DEFINES['POSIX'] = True
     DEFINES['LINUX'] = True
     if CONFIG['HAVE_64BIT_BUILD']:
         DEFINES['LINUX64'] = True
     else:
@@ -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['GNU_CXX']:
+if CONFIG['CLANG_CXX'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     # Harmless warnings in 3rd party code
     CXXFLAGS += [
         '-Wno-error=parentheses',
         '-Wno-error=unused-variable',
     ]
--- a/image/decoders/moz.build
+++ b/image/decoders/moz.build
@@ -38,10 +38,10 @@ LOCAL_INCLUDES += [
     # Decoders need ImageLib headers.
     '/image',
 ]
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/image/moz.build
+++ b/image/moz.build
@@ -108,16 +108,16 @@ LOCAL_INCLUDES += [
     '/xpcom/threads',
 ]
 
 # Because imgFrame.cpp includes "cairo.h"
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['FUZZING']:
     if CONFIG['LIBFUZZER']:
         # Add trace-pc coverage for libfuzzer
         CFLAGS += ['-fsanitize-coverage=trace-pc-guard']
         CXXFLAGS += ['-fsanitize-coverage=trace-pc-guard']
--- a/image/test/gtest/moz.build
+++ b/image/test/gtest/moz.build
@@ -74,10 +74,10 @@ LOCAL_INCLUDES += [
     '/gfx/2d',
     '/image',
 ]
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/intl/hyphenation/glue/moz.build
+++ b/intl/hyphenation/glue/moz.build
@@ -20,10 +20,10 @@ SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '../hyphen',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/intl/strres/moz.build
+++ b/intl/strres/moz.build
@@ -15,10 +15,10 @@ XPIDL_MODULE = 'intl'
 
 UNIFIED_SOURCES += [
     'nsStringBundle.cpp',
     'nsStringBundleTextOverride.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/intl/uconv/moz.build
+++ b/intl/uconv/moz.build
@@ -24,10 +24,10 @@ UNIFIED_SOURCES += [
     'nsScriptableUConv.cpp',
     'nsTextToSubURI.cpp',
     'nsUConvModule.cpp',
     'nsUTF8ConverterService.cpp'
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/ipc/app/moz.build
+++ b/ipc/app/moz.build
@@ -71,18 +71,18 @@ if CONFIG['_MSC_VER']:
 # Control the default heap size.
 # This is the heap returned by GetProcessHeap().
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
 #
 # Set it to 256k.  See bug 127069.
-if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
+if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CC_TYPE'] not in ('clang', 'gcc'):
     LDFLAGS += ['/HEAP:0x40000']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wshadow']
 
 DEFINES['MOZ_PLUGIN_CONTAINER'] = 1;
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: Content Processes")
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
@@ -150,10 +150,10 @@ CXXFLAGS += CONFIG['TK_CFLAGS']
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 DIRS += [
     'atomics',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -224,10 +224,10 @@ for var in ('MOZ_CHILD_PROCESS_NAME', 'M
 
 if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += [
         '/security/sandbox/chromium',
         '/security/sandbox/chromium-shim',
         '/security/sandbox/win/src/sandboxbroker',
     ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/ipc/testshell/moz.build
+++ b/ipc/testshell/moz.build
@@ -28,13 +28,13 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 # For xpcshell error messages and nsAutoJSString
 LOCAL_INCLUDES += [
     '/dom/base',
     '/js/xpconnect/src',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "XPConnect")
--- a/js/ipc/moz.build
+++ b/js/ipc/moz.build
@@ -32,10 +32,10 @@ EXPORTS.mozilla.jsipc = [
 LOCAL_INCLUDES += [
     '/dom/base',
     '/js/ipc',
     '/js/src',
     '/js/xpconnect/src',
     '/js/xpconnect/wrappers',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/js/src/gdb/moz.build
+++ b/js/src/gdb/moz.build
@@ -36,17 +36,17 @@ USE_LIBS += [
 
 if CONFIG['ENABLE_INTL_API'] and CONFIG['MOZ_ICU_DATA_ARCHIVE']:
     # The ICU libraries linked into libmozjs will not include the ICU data,
     # so link it directly.
     USE_LIBS += ['icudata']
 
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow', '-fno-strict-aliasing']
 
 # This is intended as a temporary workaround to enable VS2015.
 if CONFIG['_MSC_VER']:
     CXXFLAGS += ['-wd4312']
 
 DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
 FINAL_TARGET_PP_FILES += ['gdb-tests-gdb.py.in']
--- a/js/src/jsapi-tests/moz.build
+++ b/js/src/jsapi-tests/moz.build
@@ -153,17 +153,17 @@ USE_LIBS += [
     'static:js',
 ]
 
 if CONFIG['MOZ_NEEDS_LIBATOMIC']:
     OS_LIBS += ['atomic']
 
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing']
 
 # This is intended as a temporary workaround to enable VS2015.
 if CONFIG['_MSC_VER']:
     CXXFLAGS += ['-wd4312']
 
 DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
 OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in']
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -734,23 +734,23 @@ selfhosted.inputs = [
 
 if CONFIG['JS_HAS_CTYPES']:
     if CONFIG['MOZ_SYSTEM_FFI']:
         CXXFLAGS += CONFIG['MOZ_FFI_CFLAGS']
     else:
         # Windows needs this to be linked with a static library.
         DEFINES['FFI_BUILDING'] = True
 
-if CONFIG['GNU_CXX']:
+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['GNU_CXX']:
+if CONFIG['CLANG_CXX'] 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/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -45,17 +45,17 @@ if CONFIG['ENABLE_INTL_API'] and CONFIG[
 GENERATED_FILES += ['shellmoduleloader.out.h']
 shellmoduleloader = GENERATED_FILES['shellmoduleloader.out.h']
 shellmoduleloader.script = '../builtin/embedjs.py:generate_shellmoduleloader'
 shellmoduleloader.inputs = [
     '../js.msg',
     'ModuleLoader.js',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow', '-Werror=format']
 
 # This is intended as a temporary workaround to enable VS2015.
 if CONFIG['_MSC_VER']:
     CXXFLAGS += ['-wd4312']
 
 # Place a GDB Python auto-load file next to the shell executable, both in
 # the build directory and in the dist/bin directory.
--- a/js/xpconnect/loader/moz.build
+++ b/js/xpconnect/loader/moz.build
@@ -47,10 +47,10 @@ FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '../src',
     '../wrappers',
     '/dom/base',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/js/xpconnect/src/moz.build
+++ b/js/xpconnect/src/moz.build
@@ -57,10 +57,10 @@ LOCAL_INCLUDES += [
     '/dom/html',
     '/dom/svg',
     '/dom/workers',
     '/layout/base',
     '/layout/style',
     '/xpcom/reflect/xptinfo',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow', '-Werror=format']
--- a/js/xpconnect/wrappers/moz.build
+++ b/js/xpconnect/wrappers/moz.build
@@ -33,10 +33,10 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../../../dom/base',
     '../src',
     '/caps',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/layout/base/moz.build
+++ b/layout/base/moz.build
@@ -167,10 +167,10 @@ MARIONETTE_LAYOUT_MANIFESTS += ['tests/m
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
 
 if CONFIG['_MSC_VER']:
     # This is intended as a temporary hack to support building with VS2015.
     # 'type cast': conversion from 'unsigned int' to 'void *' of greater size
     CXXFLAGS += ['-wd4312']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/build/moz.build
+++ b/layout/build/moz.build
@@ -82,10 +82,10 @@ if CONFIG['MOZ_WEBSPEECH']:
 
 if CONFIG['MOZ_SECUREELEMENT']:
     LOCAL_INCLUDES += [
         '/dom/secureelement',
     ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/forms/moz.build
+++ b/layout/forms/moz.build
@@ -49,10 +49,10 @@ LOCAL_INCLUDES += [
     '../generic',
     '../painting',
     '../style',
     '../xul',
     '/dom/base',
     '/dom/html',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/generic/moz.build
+++ b/layout/generic/moz.build
@@ -219,10 +219,10 @@ RESOURCE_FILES.html = [
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/mathml/moz.build
+++ b/layout/mathml/moz.build
@@ -59,10 +59,10 @@ LOCAL_INCLUDES += [
 JAR_MANIFESTS += ['jar.mn']
 
 RESOURCE_FILES.fonts += [
     'mathfont.properties',
     'mathfontSTIXGeneral.properties',
     'mathfontUnicode.properties',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/painting/moz.build
+++ b/layout/painting/moz.build
@@ -67,10 +67,10 @@ FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 if CONFIG['_MSC_VER']:
     # This is intended as a temporary hack to support building with VS2015.
     # 'type cast': conversion from 'unsigned int' to 'void *' of greater size
     CXXFLAGS += ['-wd4312']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/tables/moz.build
+++ b/layout/tables/moz.build
@@ -47,10 +47,10 @@ LOCAL_INCLUDES += [
     '../style',
     '../xul',
     '/dom/base',
     '/dom/html',
 ]
 
 DEFINES['DEBUG_TABLE_STRATEGY_off'] = True
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/xul/grid/moz.build
+++ b/layout/xul/grid/moz.build
@@ -34,10 +34,10 @@ UNIFIED_SOURCES += [
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '..',
     '../../forms',
     '../../generic',
     '../../style',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/xul/moz.build
+++ b/layout/xul/moz.build
@@ -101,10 +101,10 @@ LOCAL_INCLUDES += [
     '../base',
     '../generic',
     '../painting',
     '../style',
     '/dom/base',
     '/dom/xul',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/xul/tree/moz.build
+++ b/layout/xul/tree/moz.build
@@ -46,10 +46,10 @@ LOCAL_INCLUDES += [
     '../../forms',
     '../../generic',
     '../../painting',
     '../../style',
     '/dom/base',
     '/dom/xul',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/media/ffvpx/ffvpxcommon.mozbuild
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -45,17 +45,17 @@ if CONFIG['FFVPX_ASFLAGS']:
 
 
 LOCAL_INCLUDES += ['/media/ffvpx']
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-parentheses',
         '-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.
--- a/media/gmp-clearkey/0.1/moz.build
+++ b/media/gmp-clearkey/0.1/moz.build
@@ -53,17 +53,17 @@ TEST_DIRS += [
 ]
 
 DisableStlWrapping()
 DEFINES['MOZ_NO_MOZALLOC'] = True
 
 USE_LIBS += ['psshparser']
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-missing-braces',
         '-Wno-pointer-to-int-cast',
         '-Wno-sign-compare',
         '-include', 'stdio.h',      # for sprintf() prototype
         '-include', 'unistd.h',     # for getpid() prototype
     ]
 elif CONFIG['_MSC_VER']:
--- a/media/libaom/moz.build
+++ b/media/libaom/moz.build
@@ -113,17 +113,17 @@ if CONFIG['CLANG_CL'] or not CONFIG['_MS
 if CONFIG['_MSC_VER'] and not CONFIG['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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['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']:
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
--- a/media/libav/libavcommon.mozbuild
+++ b/media/libav/libavcommon.mozbuild
@@ -23,17 +23,17 @@ 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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CL']:
     CFLAGS += [
         '-Wno-parentheses',
         '-Wno-pointer-sign',
         '-Wno-sign-compare',
         '-Wno-switch',
         '-Wno-type-limits',
     ]
 if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
--- a/media/libcubeb/gtest/moz.build
+++ b/media/libcubeb/gtest/moz.build
@@ -70,12 +70,12 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'ui
 elif CONFIG['OS_TARGET'] == 'OpenBSD':
     OS_LIBS += [
         'sndio',
     ]
 else:
     OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
     OS_LIBS += CONFIG['MOZ_PULSEAUDIO_LIBS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 FINAL_LIBRARY = 'xul-gtest'
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -40,17 +40,17 @@ if CONFIG['MOZ_DEBUG']:
     DEFINES['ENABLE_ASSERTIONS'] = True
 
 if CONFIG['OS_ARCH'] in ('Linux', 'Darwin', 'DragonFly', 'FreeBSD',
                          'NetBSD', 'OpenBSD'):
     DEFINES['HAVE_LRINTF'] = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DEFINES['inline'] = '__inline'
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         DEFINES['HAVE_LRINTF'] = True
 
 if CONFIG['OS_ARCH'] == 'AIX':
     DEFINES['alloca'] = '__alloca'
 
 if CONFIG['OS_ARCH'] == 'SunOS':
     DEFINES['HAVE_ALLOCA_H'] = True
 
@@ -125,11 +125,11 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
     # 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']
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     if CONFIG['CLANG_CXX']:
         CFLAGS += ['-Wno-#pragma-messages']
--- a/media/libpng/moz.build
+++ b/media/libpng/moz.build
@@ -60,10 +60,10 @@ if CONFIG['MOZ_TREE_FREETYPE']:
 
 Library('mozpng')
 
 FINAL_LIBRARY = 'gkmedias'
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-std=c89']
--- a/media/libspeex_resampler/src/moz.build
+++ b/media/libspeex_resampler/src/moz.build
@@ -42,16 +42,16 @@ if CONFIG['INTEL_ARCHITECTURE'] and not 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     DEFINES['_USE_NEON'] = True
     SOURCES += [
         'resample_neon.c'
     ]
     SOURCES['resample_neon.c'].flags += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-Wno-sign-compare']
 
 if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
     CFLAGS += [
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4101', # unreferenced local variable
     ]
--- a/media/libtheora/moz.build
+++ b/media/libtheora/moz.build
@@ -17,17 +17,17 @@ 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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CL']:
     CFLAGS += ['-Wno-type-limits']
 if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
     CFLAGS += ['-Wno-tautological-compare']
 if CONFIG['CLANG_CL']:
     CFLAGS += [
         '-Wno-pointer-sign',
         '-Wno-shift-op-parentheses',
     ]
--- a/media/libtremor/lib/moz.build
+++ b/media/libtremor/lib/moz.build
@@ -19,17 +19,17 @@ SOURCES += [
     'tremor_window.c',
 ]
 
 FINAL_LIBRARY = 'gkmedias'
 
 if CONFIG['OS_ARCH'] == 'AIX':
     DEFINES['alloca'] = '__alloca'
 
-if CONFIG['TARGET_CPU'] == 'arm' and CONFIG['GNU_CC'] and not CONFIG['MOZ_THUMB2']:
+if CONFIG['TARGET_CPU'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc') and not CONFIG['MOZ_THUMB2']:
     DEFINES['_ARM_ASSEM_'] = True
 
 LOCAL_INCLUDES += [
     '/media/libtremor/include/tremor',
 ]
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
--- a/media/libvorbis/moz.build
+++ b/media/libvorbis/moz.build
@@ -49,10 +49,10 @@ if CONFIG['OS_ARCH'] == 'SunOS':
     DEFINES['HAVE_ALLOCA_H'] = True
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
 FINAL_LIBRARY = 'gkmedias'
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-Wno-uninitialized']
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -112,17 +112,17 @@ if CONFIG['_MSC_VER'] and not CONFIG['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['GNU_CC'] or CONFIG['CLANG_CL']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['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']:
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
--- a/media/mtransport/common.build
+++ b/media/mtransport/common.build
@@ -82,10 +82,10 @@ for var in ('HAVE_STRDUP', 'NR_SOCKET_IS
 
 DEFINES['R_DEFINED_INT2'] = 'int16_t'
 DEFINES['R_DEFINED_UINT2'] = 'uint16_t'
 DEFINES['R_DEFINED_INT4'] = 'int32_t'
 DEFINES['R_DEFINED_UINT4'] = 'uint32_t'
 DEFINES['R_DEFINED_INT8'] = 'int64_t'
 DEFINES['R_DEFINED_UINT8'] = 'uint64_t'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/media/mtransport/test/moz.build
+++ b/media/mtransport/test/moz.build
@@ -90,10 +90,10 @@ LOCAL_INCLUDES += [
     '/media/mtransport/third_party/nrappkit/src/util/',
     '/media/mtransport/third_party/nrappkit/src/util/libekr',
     '/netwerk/sctp/src/',
     '/xpcom/tests/'
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/media/sphinxbase/moz.build
+++ b/media/sphinxbase/moz.build
@@ -64,22 +64,22 @@ SOURCES += [
     'src/libsphinxbase/util/sbthread.c',
     'src/libsphinxbase/util/slamch.c',
     'src/libsphinxbase/util/slapack_lite.c',
     'src/libsphinxbase/util/strfuncs.c',
     'src/libsphinxbase/util/utf8.c',
 ]
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-Wno-parentheses',
         '-Wno-sign-compare',
     ]
 
 # Add define required of third party code.
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     DEFINES['HAVE_CONFIG_H'] = True
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
 FINAL_LIBRARY = 'gkmedias'
--- a/media/webrtc/trunk/gtest/moz.build
+++ b/media/webrtc/trunk/gtest/moz.build
@@ -551,17 +551,17 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
         '../webrtc/modules/video_coding/video_codec_initializer_unittest.cc',
         '../webrtc/test/rtp_file_writer.cc',
         '../webrtc/test/testsupport/frame_writer_unittest.cc',
         '../webrtc/video/overuse_frame_detector_unittest.cc',
         '../webrtc/voice_engine/voe_codec_unittest.cc',
         '../webrtc/voice_engine/voice_engine_fixture.cc',
     ]
 
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-overloaded-virtual',
         ]
         if CONFIG['CLANG_CXX']:
             CXXFLAGS += ['-Wno-comma']
 
     if CONFIG['_MSC_VER']:
--- a/media/webrtc/webrtc.mozbuild
+++ b/media/webrtc/webrtc.mozbuild
@@ -16,10 +16,10 @@ if CONFIG['MOZ_WEBRTC']:
     elif CONFIG['OS_TARGET'] == 'WINNT':
         DEFINES['WEBRTC_WIN'] = True
         DEFINES['HAVE_WINSOCK2_H'] = True
     elif CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
         DEFINES['WEBRTC_BSD'] = True
     elif CONFIG['OS_TARGET'] == 'Android':
         DEFINES['WEBRTC_ANDROID'] = True
 
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += ['-Wno-error=shadow']
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -7,17 +7,17 @@ NoVisibilityFlags()
 
 EXPORTS.mozilla += [
     'mozalloc.h',
     'mozalloc_abort.h',
     'mozalloc_oom.h',
 ]
 
 if CONFIG['WRAP_STL_INCLUDES']:
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         EXPORTS.mozilla += ['throw_gcc.h']
     elif CONFIG['_MSC_VER']:
         DEFINES['_HAS_EXCEPTIONS'] = 0
         if CONFIG['MOZ_MSVC_STL_WRAP_RAISE']:
             SOURCES += [
                 'msvc_raise_wrappers.cpp',
             ]
 
--- a/memory/replace/dmd/test/moz.build
+++ b/memory/replace/dmd/test/moz.build
@@ -17,10 +17,10 @@ else:
 DEFINES['MOZ_NO_MOZALLOC'] = True
 
 DisableStlWrapping()
 
 XPCSHELL_TESTS_MANIFESTS += [
     'xpcshell.ini',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/mfbt/tests/moz.build
+++ b/mfbt/tests/moz.build
@@ -76,10 +76,10 @@ if CONFIG['_MSC_VER']:
     '-wd4275', # non dll-interface class used as base for dll-interface class
     '-wd4530', # C++ exception handler used, but unwind semantics are not enabled
   ]
 
 USE_LIBS += [
     'mfbt',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/modules/fdlibm/src/moz.build
+++ b/modules/fdlibm/src/moz.build
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXPORTS += [
     'fdlibm.h',
 ]
 
 FINAL_LIBRARY = 'js'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-parentheses',
         '-Wno-sign-compare',
     ]
 
 if CONFIG['CLANG_CXX']:
     CXXFLAGS += [
         '-Wno-dangling-else',
--- a/modules/libpref/test/gtest/moz.build
+++ b/modules/libpref/test/gtest/moz.build
@@ -9,17 +9,17 @@ Library('libpreftests')
 LOCAL_INCLUDES += [
     '../..',
 ]
 
 UNIFIED_SOURCES = [
     'CallbackAndVarCacheOrder.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
+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']:
   CXXFLAGS += ['-Wno-inconsistent-missing-override']
   # Workaround bug 1142396. Suppress the warning from gmock library for clang.
   CXXFLAGS += ['-Wno-null-dereference']
--- a/mozglue/android/moz.build
+++ b/mozglue/android/moz.build
@@ -49,16 +49,16 @@ LOCAL_INCLUDES += [
     '/security/nss/lib/ssl',
     '/security/nss/lib/util',
     '/toolkit/components/startup',
     '/xpcom/build',
 ]
 
 DisableStlWrapping()
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 DEFINES['XPCOM_GLUE'] = True
 
 USE_LIBS += [
     'xpcomglue',
 ]
--- a/mozglue/linker/moz.build
+++ b/mozglue/linker/moz.build
@@ -18,16 +18,16 @@ Library('linker')
 FINAL_LIBRARY = 'mozglue'
 
 DEFINES['IMPL_MFBT'] = True
 
 DisableStlWrapping()
 
 TEST_DIRS += ['tests']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 DEFINES['XZ_USE_CRC64'] = 1
 
 USE_LIBS += [
     'xz-embedded',
 ]
--- a/mozglue/linker/tests/moz.build
+++ b/mozglue/linker/tests/moz.build
@@ -17,10 +17,10 @@ USE_LIBS += [
 if CONFIG['ZLIB_IN_MOZGLUE']:
     USE_LIBS += [ 'modules_zlib_src' ]
 else:
     OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 DisableStlWrapping()
 
 PYTHON_UNITTEST_MANIFESTS += ['python.ini']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/base/moz.build
+++ b/netwerk/base/moz.build
@@ -301,10 +301,10 @@ FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/dom/base',
     '/netwerk/protocol/http',
     '/netwerk/socket',
     '/security/pkix/include'
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/cache/moz.build
+++ b/netwerk/cache/moz.build
@@ -45,10 +45,10 @@ UNIFIED_SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/cache2/moz.build
+++ b/netwerk/cache2/moz.build
@@ -53,10 +53,10 @@ UNIFIED_SOURCES += [
 
 LOCAL_INCLUDES += [
     '/netwerk/base',
     '/netwerk/cache',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/cookie/moz.build
+++ b/netwerk/cookie/moz.build
@@ -48,10 +48,10 @@ if CONFIG['NECKO_COOKIES']:
 IPDL_SOURCES = [
     'PCookieService.ipdl',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/dns/mdns/libmdns/moz.build
+++ b/netwerk/dns/mdns/libmdns/moz.build
@@ -39,10 +39,10 @@ else:
 UNIFIED_SOURCES += [
     'nsDNSServiceInfo.cpp',
     'nsMulticastDNSModule.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -66,10 +66,10 @@ etld_data.inputs = ['effective_tld_names
 
 # need to include etld_data.inc
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
 USE_LIBS += ['icu']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/mime/moz.build
+++ b/netwerk/mime/moz.build
@@ -17,10 +17,10 @@ EXPORTS += [
 ]
 
 SOURCES += [
     'nsMIMEHeaderParamImpl.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/protocol/about/moz.build
+++ b/netwerk/protocol/about/moz.build
@@ -25,10 +25,10 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/netwerk/base',
     '/netwerk/cache2',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/protocol/file/moz.build
+++ b/netwerk/protocol/file/moz.build
@@ -29,10 +29,10 @@ UNIFIED_SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/protocol/ftp/moz.build
+++ b/netwerk/protocol/ftp/moz.build
@@ -39,10 +39,10 @@ IPDL_SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/protocol/websocket/moz.build
+++ b/netwerk/protocol/websocket/moz.build
@@ -50,10 +50,10 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/base',
     '/netwerk/base',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/sctp/datachannel/moz.build
+++ b/netwerk/sctp/datachannel/moz.build
@@ -27,10 +27,10 @@ DEFINES['SCTP_DEBUG'] = 1
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['__Userspace_os_Windows'] = 1
 else:
     DEFINES['__Userspace_os_%s' % CONFIG['OS_TARGET']] = 1
 
 NO_PGO = True # Don't PGO
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/netwerk/sctp/src/moz.build
+++ b/netwerk/sctp/src/moz.build
@@ -83,10 +83,10 @@ if CONFIG['OS_TARGET'] == 'NetBSD':
 if CONFIG['OS_TARGET'] == 'OpenBSD':
     DEFINES['__OpenBSD__'] = False
 
 if CONFIG['OS_TARGET'] == 'DragonFly':
     DEFINES['__DragonFly__'] = False
 
 NO_PGO = True # Don't PGO
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-std=gnu99']
--- a/netwerk/srtp/src/moz.build
+++ b/netwerk/srtp/src/moz.build
@@ -65,10 +65,10 @@ if  CONFIG['CPU_ARCH'] in ('x86', 'x86_6
     DEFINES['HAVE_X86'] = True
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['HAVE_WINSOCK2_H'] = True
     DEFINES['inline'] = '__inline'
 else:
     DEFINES['HAVE_NETINET_IN_H'] = 1
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-std=gnu99']
--- a/netwerk/test/moz.build
+++ b/netwerk/test/moz.build
@@ -23,10 +23,10 @@ UNIFIED_SOURCES += [
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     UNIFIED_SOURCES += [
         'TestNamedPipeService.cpp',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/other-licenses/snappy/moz.build
+++ b/other-licenses/snappy/moz.build
@@ -18,13 +18,13 @@ UNIFIED_SOURCES += [
 ]
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
 
 FINAL_LIBRARY = 'xul'
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-sign-compare',
         '-Wno-unused-function'
     ]
--- 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['GNU_CXX'] or CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') or CONFIG['CLANG_CXX']:
     CXXFLAGS += ['-Wno-error=shadow',
                  '-Wno-implicit-fallthrough']
--- a/parser/htmlparser/moz.build
+++ b/parser/htmlparser/moz.build
@@ -43,10 +43,10 @@ UNIFIED_SOURCES += [
     'nsParserModule.cpp',
     'nsParserMsgUtils.cpp',
     'nsScanner.cpp',
     'nsScannerString.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/rdf/base/moz.build
+++ b/rdf/base/moz.build
@@ -50,10 +50,10 @@ UNIFIED_SOURCES += [
     'nsRDFXMLDataSource.cpp',
     'nsRDFXMLParser.cpp',
     'nsRDFXMLSerializer.cpp',
     'rdfutil.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/security/apps/moz.build
+++ b/security/apps/moz.build
@@ -19,17 +19,17 @@ LOCAL_INCLUDES += [
     '/security/manager/ssl',
     '/security/pkix/include',
 ]
 
 DEFINES['NSS_ENABLE_ECC'] = 'True'
 for var in ('DLL_PREFIX', 'DLL_SUFFIX'):
     DEFINES[var] = '"%s"' % CONFIG[var]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wextra',
     ]
 
     # Gecko headers aren't warning-free enough for us to enable these warnings.
     CXXFLAGS += [
         '-Wno-unused-parameter',
     ]
--- a/security/certverifier/moz.build
+++ b/security/certverifier/moz.build
@@ -120,17 +120,17 @@ if CONFIG['_MSC_VER']:
 
     # Gecko headers aren't warning-free enough for us to enable these warnings
     CXXFLAGS += [
         '-wd4100', # 'symbol' : unreferenced formal parameter
         '-wd4127', # conditional expression is constant
         '-wd4946', # reinterpret_cast used between related types
     ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wextra',
         '-Wunreachable-code',
     ]
 
     # Gecko headers aren't warning-free enough for us to enable these warnings.
     CXXFLAGS += [
         '-Wno-unused-parameter',
--- a/security/manager/pki/moz.build
+++ b/security/manager/pki/moz.build
@@ -20,17 +20,17 @@ UNIFIED_SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '!/dist/public/nss',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wextra',
         # -Wextra enables this warning, but it's too noisy to be useful.
         '-Wno-missing-field-initializers',
     ]
 
     # Gecko headers aren't warning-free enough for us to enable these warnings.
     CXXFLAGS += [
--- a/security/manager/ssl/moz.build
+++ b/security/manager/ssl/moz.build
@@ -183,17 +183,17 @@ for var in ('DLL_PREFIX', 'DLL_SUFFIX'):
 
 if not CONFIG['MOZ_SYSTEM_NSS']:
     USE_LIBS += [
         'crmf',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wextra',
         # -Wextra enables this warning, but it's too noisy to be useful.
         '-Wno-missing-field-initializers',
     ]
 
     # Gecko headers aren't warning-free enough for us to enable these warnings.
     CXXFLAGS += [
--- a/security/manager/ssl/tests/gtest/moz.build
+++ b/security/manager/ssl/tests/gtest/moz.build
@@ -22,10 +22,10 @@ LOCAL_INCLUDES += [
     '/security/pkix/test/lib',
     '/third_party/rust/cose-c/include',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/security/pkix/moz.build
+++ b/security/pkix/moz.build
@@ -30,15 +30,15 @@ TEST_DIRS += [
 ]
 
 include('warnings.mozbuild')
 
 Library('mozillapkix')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['_MSC_VER']:
     # This is intended as a temporary hack to support building with VS2015.
     # declaration of '*' hides class member
     CXXFLAGS += ['-wd4458']
--- a/security/pkix/test/gtest/moz.build
+++ b/security/pkix/test/gtest/moz.build
@@ -34,23 +34,23 @@ 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['GNU_CXX'] and not CONFIG['CLANG_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc') and not CONFIG['CLANG_CXX']:
   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['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [
     '-Wno-error=shadow',
     '-Wno-old-style-cast',
   ]
   if CONFIG['CLANG_CXX']:
     CXXFLAGS += [
       '-Wno-exit-time-destructors',
       '-Wno-global-constructors',
--- a/security/pkix/test/lib/moz.build
+++ b/security/pkix/test/lib/moz.build
@@ -30,10 +30,10 @@ Library('pkixtestutil')
 
 LOCAL_INCLUDES += [
     '../../include',
     '../../lib',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/security/sandbox/linux/glue/moz.build
+++ b/security/sandbox/linux/glue/moz.build
@@ -20,10 +20,10 @@ LOCAL_INCLUDES += [
 ]
 
 USE_LIBS += [
     'mozsandbox',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -78,22 +78,22 @@ 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['GNU_CXX']:
+if CONFIG['CLANG_CXX'] 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['GNU_CXX']:
+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.
--- a/testing/mochitest/ssltunnel/moz.build
+++ b/testing/mochitest/ssltunnel/moz.build
@@ -14,10 +14,10 @@ USE_LIBS += [
     'nspr',
     'nss',
 ]
 
 # This isn't XPCOM code, but it wants to use STL, so disable the STL
 # wrappers
 DisableStlWrapping()
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/testing/tools/minidumpwriter/moz.build
+++ b/testing/tools/minidumpwriter/moz.build
@@ -8,12 +8,12 @@ if CONFIG['ENABLE_TESTS'] and CONFIG['CP
     Program('minidumpwriter')
     OS_LIBS += [
         'dbghelp',
     ]
     SOURCES += [
         'minidumpwriter.cpp',
     ]
     USE_STATIC_LIBS = True
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         WIN32_EXE_LDFLAGS += ['-municode']
 
 NO_PGO = True
--- a/testing/tools/screenshot/moz.build
+++ b/testing/tools/screenshot/moz.build
@@ -14,15 +14,15 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']
     OS_LIBS += CONFIG['TK_LIBS']
     OS_LIBS += CONFIG['XSS_LIBS']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     Program('screenshot')
     SOURCES += [
         'win32-screenshot.cpp',
     ]
     USE_STATIC_LIBS = True
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         WIN32_EXE_LDFLAGS += ['-municode']
     OS_LIBS += [
         'gdiplus',
     ]
 
 NO_PGO = True
--- a/toolkit/components/browser/moz.build
+++ b/toolkit/components/browser/moz.build
@@ -37,14 +37,14 @@ UNIFIED_SOURCES += [
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/dom/base',
     '/dom/svg',
     '/layout/style',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 EXPORTS += [
     'nsEmbedCID.h',
 ]
--- a/toolkit/components/jsoncpp/src/lib_json/moz.build
+++ b/toolkit/components/jsoncpp/src/lib_json/moz.build
@@ -31,23 +31,23 @@ DisableStlWrapping()
 
 Library('jsoncpp')
 
 # Suppress warnings in third-party code.
 if CONFIG['_MSC_VER']:
     CXXFLAGS += [
         '-wd4005', # macro redefinition
     ]
-elif CONFIG['GNU_CXX']:
+elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-unused-local-typedefs',
         '-Wno-shadow',
     ]
 
 if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
     CXXFLAGS += [
         '-Wno-c++11-narrowing',
     ]
 
-if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL'] or CONFIG['GNU_CXX']:
+if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL'] or CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-implicit-fallthrough',
     ]
--- a/toolkit/components/places/moz.build
+++ b/toolkit/components/places/moz.build
@@ -89,12 +89,12 @@ if CONFIG['MOZ_PLACES']:
 
     FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Places')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 JAR_MANIFESTS += ['jar.mn']
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -116,17 +116,17 @@ SOURCES += [
 AllowCompilerWarnings()
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
 
 # Suppress warnings in third-party code.
-if CONFIG['GNU_CXX']:
+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',
     ]
--- a/toolkit/components/reputationservice/moz.build
+++ b/toolkit/components/reputationservice/moz.build
@@ -28,10 +28,10 @@ LOCAL_INCLUDES += [
     '../protobuf',
     '/ipc/chromium/src',
     'chromium',
 ]
 
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/toolkit/components/telemetry/moz.build
+++ b/toolkit/components/telemetry/moz.build
@@ -18,17 +18,17 @@ DEFINES['MOZ_APP_VERSION'] = '"%s"' % CO
 
 LOCAL_INCLUDES += [
     '/xpcom/build',
     '/xpcom/threads',
 ]
 
 SPHINX_TREES['telemetry'] = 'docs'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
 
 TEST_DIRS += ['tests']
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
--- a/toolkit/components/url-classifier/moz.build
+++ b/toolkit/components/url-classifier/moz.build
@@ -76,17 +76,17 @@ EXPORTS += [
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../build',
 ]
 
 CXXFLAGS += CONFIG['SQLITE_CFLAGS']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
     # Suppress warnings in third-party code.
     CXXFLAGS += [
         '-Wno-maybe-uninitialized',
     ]
 
 if CONFIG['NIGHTLY_BUILD'] or CONFIG['MOZ_DEBUG']:
     DEFINES['MOZ_SAFEBROWSING_DUMP_FAILED_UPDATES'] = True
--- a/toolkit/components/windowwatcher/moz.build
+++ b/toolkit/components/windowwatcher/moz.build
@@ -40,12 +40,12 @@ if CONFIG['MOZ_XUL']:
 
 FINAL_LIBRARY = 'xul'
 # For nsJSUtils
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/dom/base',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/toolkit/crashreporter/breakpad-client/moz.build
+++ b/toolkit/crashreporter/breakpad-client/moz.build
@@ -9,10 +9,10 @@ SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/toolkit/crashreporter/crashreporter.mozbuild
+++ b/toolkit/crashreporter/crashreporter.mozbuild
@@ -15,17 +15,17 @@ if CONFIG['_MSC_VER']:
         '-wd4005', # macro redefinition
         '-wd4146', # negative unsigned
         '-wd4334', # 32-bit shift to 64 bits
         '-wd4804', # unsafe use of type 'bool'
     ]
     CFLAGS += [
         '-wd4312', # conversion to greater size
     ]
-elif CONFIG['GNU_CXX']:
+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',
     ]
 
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
@@ -47,10 +47,10 @@ if CONFIG['OS_TARGET'] == 'Android':
 Library('breakpad_linux_common_s')
 
 FINAL_LIBRARY = 'xul'
 
 HOST_DEFINES['NO_STABS_SUPPORT'] = True
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-shadow']
--- a/toolkit/crashreporter/injector/moz.build
+++ b/toolkit/crashreporter/injector/moz.build
@@ -14,14 +14,14 @@ include('/ipc/chromium/chromium-config.m
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/breakpad-client',
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
 USE_STATIC_LIBS = True
 
-if CONFIG['GNU_CC']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     LDFLAGS += ['-Wl,-e,_DummyEntryPoint@12']
 else:
     LDFLAGS += ['-ENTRY:DummyEntryPoint']
 
 DisableStlWrapping()
--- a/toolkit/crashreporter/moz.build
+++ b/toolkit/crashreporter/moz.build
@@ -108,17 +108,17 @@ if CONFIG['MOZ_CRASHREPORTER']:
     ]
 
     PYTHON_UNITTEST_MANIFESTS += [
         'tools/python.ini',
     ]
 
     include('/toolkit/crashreporter/crashreporter.mozbuild')
 
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += ['-Wno-shadow']
 else:
     UNIFIED_SOURCES += [
         'nsDummyExceptionHandler.cpp',
     ]
 
 
 with Files('**'):
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -40,17 +40,17 @@ def Libxul(name):
         DELAYLOAD_DLLS += [
             'api-ms-win-core-winrt-l1-1-0.dll',
             'api-ms-win-core-winrt-string-l1-1-0.dll',
         ]
 
     if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['ACCESSIBILITY']:
         LOCAL_INCLUDES += ['!/accessible/interfaces/gecko/']
 
-    if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
+    if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CC_TYPE'] not in ('clang', 'gcc'):
         LOCAL_INCLUDES += [
             '/widget/windows',
             '/xpcom/base',
         ]
         # config/version.mk says $(srcdir)/$(RCINCLUDE), and this needs to
         # be valid in both toolkit/library and toolkit/library/gtest.
         # Eventually, the make backend would do its own path canonicalization
         # and config/version.mk would lift the $(srcdir)
@@ -104,17 +104,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     ]
 
 LOCAL_INCLUDES += [
     '/config',
     # need widget/windows for resource.h (included from widget.rc)
     '/widget/windows',
 ]
 
-if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
+if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CC_TYPE'] not in ('clang', 'gcc'):
     LOCAL_INCLUDES += [
         '/xpcom/base',
     ]
 
 DIRS += ['gtest']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
   DIRS += ['dummydll']
@@ -282,17 +282,17 @@ if CONFIG['MOZ_ENABLE_STARTUP_NOTIFICATI
 
 if CONFIG['MOZ_ENABLE_LIBPROXY']:
     OS_LIBS += CONFIG['MOZ_LIBPROXY_LIBS']
 
 if CONFIG['OS_ARCH'] == 'SunOS':
     OS_LIBS += [
         'elf',
     ]
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         OS_LIBS += [
             'demangle',
         ]
 
 if CONFIG['OS_ARCH'] == 'FreeBSD':
     OS_LIBS += [
         'util',
     ]
--- a/toolkit/mozapps/update/tests/moz.build
+++ b/toolkit/mozapps/update/tests/moz.build
@@ -51,17 +51,17 @@ if CONFIG['MOZ_MAINTENANCE_SERVICE']:
 
 # For debugging purposes only
 #DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
     USE_STATIC_LIBS = True
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         WIN32_EXE_LDFLAGS += ['-municode']
 
 TEST_HARNESS_FILES.testing.mochitest.browser.toolkit.mozapps.update.tests.browser += [
     'chrome/update.sjs',
     'data/shared.js',
     'data/sharedUpdateXML.js',
     'data/simple.mar',
 ]
--- a/toolkit/system/osxproxy/tests/gtest/moz.build
+++ b/toolkit/system/osxproxy/tests/gtest/moz.build
@@ -9,10 +9,10 @@ UNIFIED_SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '/toolkit/system/osxproxy',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wshadow']
--- a/toolkit/system/windowsproxy/tests/gtest/moz.build
+++ b/toolkit/system/windowsproxy/tests/gtest/moz.build
@@ -9,10 +9,10 @@ UNIFIED_SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '/toolkit/system/windowsproxy',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wshadow']
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -214,13 +214,13 @@ CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
 FINAL_TARGET_PP_FILES += [
     'platform.ini'
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
 if CONFIG['MOZ_IPDL_TESTS']:
     DEFINES['MOZ_IPDL_TESTS'] = True
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -133,16 +133,16 @@ if CONFIG['MOZ_TASK_TRACER']:
     ]
     UNIFIED_SOURCES += [
         'tasktracer/GeckoTaskTracer.cpp',
         'tasktracer/TracedTaskCommon.cpp',
     ]
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-error=shadow',
         '-Wno-ignored-qualifiers', # due to use of breakpad headers
     ]
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Gecko Profiler')
--- a/tools/profiler/tests/gtest/moz.build
+++ b/tools/profiler/tests/gtest/moz.build
@@ -20,10 +20,10 @@ LOCAL_INCLUDES += [
 
 UNIFIED_SOURCES += [
     'GeckoProfiler.cpp',
     'ThreadProfileTest.cpp',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -72,17 +72,17 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'ui
         'uikit/nsMIMEInfoUIKit.mm',
         'uikit/nsOSHelperAppService.mm',
     ]
 else:
     # These files can't be built in unified mode because they redefine LOG.
     SOURCES += [
         osdir + '/nsOSHelperAppService.cpp',
     ]
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += ['-Wno-error=shadow']
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     UNIFIED_SOURCES += [
         'unix/nsGNOMERegistry.cpp',
         'unix/nsMIMEInfoUnix.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
--- a/uriloader/prefetch/moz.build
+++ b/uriloader/prefetch/moz.build
@@ -39,10 +39,10 @@ IPDL_SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -48,34 +48,34 @@ if CONFIG['OS_ARCH'] in ('Linux', 'FreeB
             'xptcinvoke_asm_ipf64.s',
             'xptcinvoke_ipf64.cpp',
             'xptcstubs_asm_ipf64.s',
             'xptcstubs_ipf64.cpp'
         ]
 
 if CONFIG['OS_ARCH'] == 'SunOS' and '86' in CONFIG['OS_TEST']:
     if CONFIG['OS_TEST'] == 'x86_64':
-        if CONFIG['GNU_CC']:
+        if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
             SOURCES += [
                 'xptcinvoke_asm_x86_64_unix.S',
                 'xptcinvoke_x86_64_unix.cpp',
                 'xptcstubs_x86_64_linux.cpp'
             ]
         else:
             GENERATED_FILES = [
                 'xptcstubsdef_asm.solx86',
             ]
             ASFLAGS += ['-xarch=amd64']
             SOURCES += [
                 'xptcinvoke_x86_64_solaris.cpp',
                 'xptcstubs_asm_x86_64_solaris_SUNW.s',
                 'xptcstubs_x86_64_solaris.cpp',
             ]
     else:
-        if CONFIG['GNU_CC']:
+        if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
             SOURCES += [
                 'xptcinvoke_gcc_x86_unix.cpp',
                 'xptcstubs_gcc_x86_unix.cpp'
             ]
         else:
             GENERATED_FILES = [
                 'xptcstubsdef_asm.solx86',
             ]
@@ -131,17 +131,17 @@ if CONFIG['OS_ARCH'] == 'HP-UX':
                 'xptcinvoke_asm_pa32.s',
                 'xptcinvoke_pa32.cpp',
                 'xptcstubs_asm_pa32.s',
                 'xptcstubs_pa32.cpp'
             ]
 
 if CONFIG['OS_ARCH'] == 'Linux':
     if CONFIG['OS_TEST'] in ('hppa', 'hppa2.0', 'hppa1.1'):
-        if CONFIG['GNU_CXX']:
+        if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
             SOURCES += [
                 'xptcinvoke_asm_parisc_linux.s',
                 'xptcinvoke_pa32.cpp',
                 'xptcstubs_asm_parisc_linux.s',
                 'xptcstubs_pa32.cpp',
             ]
         elif CONFIG['COMPILE_ENVIRONMENT']:
             error('Unknown C++ compiler, xptcall assembly will probably be incorrect.')
@@ -280,17 +280,17 @@ if CONFIG['OS_ARCH'] == 'SunOS' and '86'
             'xptcinvoke_sparcv9_solaris.cpp',
             'xptcstubs_sparcv9_solaris.cpp',
         ]
     else:
         SOURCES += [
             'xptcinvoke_sparc_solaris.cpp',
             'xptcstubs_sparc_solaris.cpp',
         ]
-    if CONFIG['GNU_CC']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         SOURCES += [
             'xptcinvoke_asm_sparc_solaris_GCC3.s',
             'xptcstubs_asm_sparc_solaris.s',
         ]
     else:
         if CONFIG['HAVE_64BIT_BUILD']:
             SOURCES += [
                 'xptcinvoke_asm_sparcv9_solaris_SUNW.s',
--- a/xpcom/reflect/xptcall/md/win32/moz.build
+++ b/xpcom/reflect/xptcall/md/win32/moz.build
@@ -1,16 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['TARGET_CPU'] == 'x86_64':
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         SOURCES += [
             'xptcinvoke_x86_64.cpp',
             'xptcstubs_x86_64_gnu.cpp',
         ]
         SOURCES += [
             'xptcinvoke_asm_x86_64_gnu.s'
         ]
     else:
@@ -18,17 +18,17 @@ if CONFIG['TARGET_CPU'] == 'x86_64':
             'xptcinvoke_x86_64.cpp',
             'xptcstubs_x86_64.cpp'
         ]
         SOURCES += [
             'xptcinvoke_asm_x86_64.asm',
             'xptcstubs_asm_x86_64.asm'
         ]
 else:
-    if CONFIG['GNU_CXX']:
+    if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         SOURCES += [
             'xptcinvoke_x86_gnu.cpp',
             'xptcstubs.cpp',
         ]
     else:
         SOURCES += [
             'xptcinvoke.cpp',
             'xptcinvoke_asm_x86_msvc.asm',
--- a/xpcom/reflect/xptinfo/moz.build
+++ b/xpcom/reflect/xptinfo/moz.build
@@ -28,10 +28,10 @@ EXPORTS.mozilla += [
 ]
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/xpfe/components/directory/moz.build
+++ b/xpfe/components/directory/moz.build
@@ -14,10 +14,10 @@ XPIDL_SOURCES += [
 XPIDL_MODULE = 'directory'
 
 SOURCES += [
     'nsDirectoryViewer.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']