Bug 1512504 - Remove support for MSVC. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 13 Feb 2019 10:11:13 +0900
changeset 1838742 3fd93aa1f936787292e6d632048791ac59df4404
parent 1838741 f4050e6ff96168ff75ebb9aa118bb9a54fdd543e
child 1838743 f043c8a008e69b0ec96223b8141980bff790f31b
push id334123
push usermh@glandium.org
push dateWed, 13 Feb 2019 01:20:04 +0000
treeherdertry@cad1f4d9583e [default view] [failures only]
reviewersbuild
bugs1512504
milestone67.0a1
Bug 1512504 - Remove support for MSVC. r?build Consequently, this removes: - MOZ_LIBPRIO, which is now always enabled. - non_msvc_compiler, which is now always true. - The cl.py wrapper, since it's not used anymore. - CL_INCLUDES_PREFIX, which was only used for the cl.py wrapper. - NONASCII, which was only there to ensure CL_INCLUDES_PREFIX still worked in non-ASCII cases.
Makefile.in
browser/app/moz.build
browser/app/profile/firefox.js
browser/moz.build
build/autoconf/expandlibs.m4
build/moz.configure/bindgen.configure
build/moz.configure/headers.configure
build/moz.configure/rust.configure
build/moz.configure/toolchain.configure
build/moz.configure/windows.configure
build/templates.mozbuild
config/config.mk
config/external/icu/defs.mozbuild
config/external/moz.build
config/external/msgpack/moz.build
config/moz.build
config/rules.mk
dom/bindings/moz.build
dom/chrome-webidl/moz.build
dom/media/mp4/moz.build
dom/media/platforms/agnostic/bytestreams/moz.build
dom/media/platforms/ffmpeg/ffvpx/moz.build
dom/media/platforms/omx/moz.build
dom/media/systemservices/moz.build
dom/media/webrtc/moz.build
dom/moz.build
dom/plugins/ipc/moz.build
dom/plugins/test/testplugin/testplugin.mozbuild
gfx/cairo/cairo/src/moz.build
gfx/cairo/libpixman/src/moz.build
gfx/qcms/moz.build
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
gfx/vr/service/moz.build
gfx/ycbcr/moz.build
ipc/app/moz.build
ipc/chromium/chromium-config.mozbuild
ipc/glue/moz.build
ipc/ipdl/test/cxx/app/moz.build
js/src/js-cxxflags.mozbuild
js/src/moz.build
js/src/shell/moz.build
js/xpconnect/shell/moz.build
js/xpconnect/wrappers/moz.build
layout/base/moz.build
layout/painting/moz.build
layout/style/moz.build
media/ffvpx/ffvpxcommon.mozbuild
media/gmp-clearkey/0.1/moz.build
media/libaom/moz.build
media/libcubeb/src/moz.build
media/libdav1d/moz.build
media/libopus/moz.build
media/libspeex_resampler/src/moz.build
media/libtheora/moz.build
media/libvpx/moz.build
media/libwebp/src/dsp/moz.build
media/webrtc/moz.build
media/webrtc/signaling/gtest/moz.build
media/webrtc/trunk/gtest/moz.build
media/webrtc/webrtc.mozbuild
memory/build/moz.build
memory/mozalloc/moz.build
mfbt/tests/moz.build
modules/brotli/moz.build
modules/fdlibm/src/moz.build
modules/libpref/init/all.js
moz.configure
mozglue/build/moz.build
python/mozbuild/mozbuild/action/check_binary.py
python/mozbuild/mozbuild/action/cl.py
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/frontend/gyp_reader.py
python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
security/certverifier/moz.build
security/ct/moz.build
security/sandbox/moz.build
toolkit/components/jsoncpp/src/lib_json/moz.build
toolkit/components/maintenanceservice/moz.build
toolkit/components/protobuf/moz.build
toolkit/crashreporter/crashreporter.mozbuild
toolkit/crashreporter/google-breakpad/src/tools/windows/dump_syms/moz.build
toolkit/crashreporter/test/moz.build
toolkit/library/moz.build
toolkit/moz.configure
toolkit/mozapps/update/updater/updater-common.build
widget/windows/moz.build
xpcom/ds/moz.build
xpcom/glue/standalone/moz.build
xpcom/io/moz.build
--- a/Makefile.in
+++ b/Makefile.in
@@ -267,32 +267,25 @@ endif
 .PHONY: update-packaging
 update-packaging:
 	$(MAKE) -C tools/update-packaging
 
 .PHONY: package-generated-sources
 package-generated-sources:
 	$(call py_action,package_generated_sources,'$(DIST)/$(PKG_PATH)$(GENERATED_SOURCE_FILE_PACKAGE)')
 
-#XXX: this is a hack, since we don't want to clobber for MSVC
 # PGO support, but we can't do this test in client.mk
 # No point in clobbering if PGO has been explicitly disabled.
 ifdef NO_PROFILE_GUIDED_OPTIMIZE
 maybe_clobber_profiledbuild:
 else
-ifneq ($(CC_TYPE),msvc)
 maybe_clobber_profiledbuild: clean
 ifneq (,$(findstring clang,$(CC_TYPE)))
 	$(LLVM_PROFDATA) merge -o $(DEPTH)/merged.profdata $(DEPTH)/*.profraw
 endif
-else
-maybe_clobber_profiledbuild:
-	$(RM) $(DIST)/bin/*.pgc
-	find $(DIST)/$(MOZ_APP_NAME) -name '*.pgc' -exec mv {} $(DIST)/bin \;
-endif # msvc
 endif # NO_PROFILE_GUIDED_OPTIMIZE
 
 .PHONY: maybe_clobber_profiledbuild
 
 ifdef JS_STANDALONE
 # Delegate js-specific rules to js
 check-%:
 	$(MAKE) -C js/src $@
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -57,17 +57,17 @@ if CONFIG['LIBFUZZER']:
     USE_LIBS += [ 'fuzzer' ]
     LOCAL_INCLUDES += [
         '/tools/fuzzing/libfuzzer',
     ]
 
 if CONFIG['ENABLE_GECKODRIVER']:
     DEFINES['MOZ_GECKODRIVER'] = True
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     RCINCLUDE = 'splash.rc'
     DEFINES['MOZ_PHOENIX'] = True
     DIRS += [
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1785,26 +1785,24 @@ pref("intl.multilingual.downloadEnabled"
 // - Don't propagate events from subframes to JS child actors
 pref("browser.fission.simulate", false);
 
 // Prio preferences
 // Only enable by default on Nightly.
 // On platforms that do not build libprio, do not set these prefs at all, which gives us a way to detect support.
 
 // Curve25519 public keys for Prio servers
-#ifdef MOZ_LIBPRIO
 pref("prio.publicKeyA", "35AC1C7576C7C6EDD7FED6BCFC337B34D48CB4EE45C86BEEFB40BD8875707733");
 pref("prio.publicKeyB", "26E6674E65425B823F1F1D5F96E3BB3EF9E406EC7FBA7DEF8B08A35DD135AF50");
-#endif
 
 // Coverage ping is disabled by default.
 pref("toolkit.coverage.enabled", false);
 pref("toolkit.coverage.endpoint.base", "https://coverage.mozilla.org");
 // Whether or not Prio-encoded Telemetry will be sent along with the main ping.
-#if defined(NIGHTLY_BUILD) && defined(MOZ_LIBPRIO)
+#if defined(NIGHTLY_BUILD)
 pref("prio.enabled", true);
 #endif
 
 // Discovery prefs
 pref("browser.discovery.enabled", true);
 pref("browser.discovery.containers.enabled", true);
 pref("browser.discovery.sites", "addons.mozilla.org");
 
--- a/browser/moz.build
+++ b/browser/moz.build
@@ -40,19 +40,16 @@ export('DIST_SUBDIR')
 DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 
 for cdm in CONFIG['MOZ_EME_MODULES']:
     DEFINES['MOZ_%s_EME' % cdm.upper()] = True
 
 if CONFIG['MOZ_GPSD']:
     DEFINES['MOZ_GPSD'] = True
 
-if CONFIG['MOZ_LIBPRIO']:
-    DEFINES['MOZ_LIBPRIO'] = True
-
 # These files are specified in this moz.build to pick up DIST_SUBDIR as set in
 # this directory, which is un-set in browser/app.
 JS_PREFERENCE_PP_FILES += [
     'app/profile/firefox.js',
 ]
 FINAL_TARGET_FILES += ['app/blocklist.xml']
 FINAL_TARGET_FILES.defaults += ['app/permissions']
 
--- a/build/autoconf/expandlibs.m4
+++ b/build/autoconf/expandlibs.m4
@@ -15,17 +15,17 @@ AC_CACHE_CHECK(what kind of list files a
     EXPAND_LIBS_LIST_STYLE,
     [echo "int main() {return 0;}" > conftest.${ac_ext}
      dnl Because BFD ld doesn't work with LTO + linker scripts, we
      dnl must pass the LTO CFLAGS to the compile command, and the LTO
      dnl LDFLAGS to all subsequent link commands.
      dnl https://sourceware.org/bugzilla/show_bug.cgi?id=23600
      if AC_TRY_COMMAND(${CC-cc} -o conftest.${OBJ_SUFFIX} -c $MOZ_LTO_CFLAGS $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5) && test -s conftest.${OBJ_SUFFIX}; then
          echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list
-         if test "$CC_TYPE" = "msvc" -o "$CC_TYPE" = "clang-cl"; then
+         if test "$CC_TYPE" = "clang-cl"; then
              link="$LINKER -OUT:conftest${ac_exeext}"
          else
              link="${CC-cc} -o conftest${ac_exeext}"
          fi
          if AC_TRY_COMMAND($link $MOZ_LTO_LDFLAGS $LDFLAGS conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
              EXPAND_LIBS_LIST_STYLE=linkerscript
          else
              echo "conftest.${OBJ_SUFFIX}" > conftest.list
--- a/build/moz.configure/bindgen.configure
+++ b/build/moz.configure/bindgen.configure
@@ -268,17 +268,17 @@ def basic_bindgen_cflags(target, is_unix
         'OSX': ['-DOS_MACOSX=1', '-stdlib=libc++'],
         'SunOS': ['-DOS_SOLARIS=1'],
         'WINNT': [
             '-DOS_WIN=1',
             '-DWIN32=1',
         ],
     }.get(target.os, [])
 
-    if compiler_info.type in ('msvc', 'clang-cl'):
+    if compiler_info.type == 'clang-cl':
         args += [
             # To enable the builtin __builtin_offsetof so that CRT wouldn't
             # use reinterpret_cast in offsetof() which is not allowed inside
             # static_assert().
             '-D_CRT_USE_BUILTIN_OFFSETOF',
             # Enable hidden attribute (which is not supported by MSVC and
             # thus not enabled by default with a MSVC-compatibile build)
             # to exclude hidden symbols from the generated file.
--- a/build/moz.configure/headers.configure
+++ b/build/moz.configure/headers.configure
@@ -22,56 +22,51 @@ check_header('alloca.h')
 add_old_configure_assignment('HAVE_MALLOC_H', have_malloc)
 
 check_headers(
     'sys/byteorder.h',
     'getopt.h',
     'unistd.h',
     'nl_types.h',
     'cpuid.h',
-    when=non_msvc_compiler,
 )
 
 # These are all the places some variant of statfs can be hiding.
 check_headers(
     'sys/statvfs.h',
     'sys/statfs.h',
     'sys/vfs.h',
     'sys/mount.h',
-    when=non_msvc_compiler,
 )
 
 # Quota support
 # Check for both the header and quotactl() because Android headers can have the
 # header but not quotactl().
 set_define('HAVE_SYS_QUOTA_H',
            try_compile(includes=['sys/quota.h'],
                        body='quotactl(0, nullptr, 0, (caddr_t)nullptr);',
-                       when=non_msvc_compiler,
                        check_msg='for sys/quota.h'))
 check_header('linux/quota.h',
              includes=['sys/socket.h'],
              when=building_linux)
 
 # SCTP support - needs various network include headers
 check_headers(
     'linux/if_addr.h',
     'linux/rtnetlink.h',
     includes=['sys/socket.h'],
     when=building_linux,
 )
 
-check_header('sys/queue.h',
-             when=non_msvc_compiler)
+check_header('sys/queue.h')
 
 check_headers(
     'sys/types.h',
     'netinet/in.h',
     'byteswap.h',
-    when=non_msvc_compiler,
 )
 
 # TODO: Move these checks to file specific to --enable-project=js.
 have_perf_event_h = check_header('linux/perf_event.h',
                                  when=building_linux)
 
 js_option('--with-linux-headers',
           help='location where the Linux kernel headers can be found',
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -316,17 +316,17 @@ def win64_cargo_linker_config(linker, en
 
 
 set_config('WIN64_CARGO_LINKER_CONFIG', win64_cargo_linker_config)
 
 
 @depends(target, c_compiler, rustc)
 @imports('os')
 def rustc_natvis_ldflags(target, compiler_info, rustc):
-    if target.kernel == 'WINNT' and compiler_info.type in ('msvc', 'clang-cl'):
+    if target.kernel == 'WINNT' and compiler_info.type == 'clang-cl':
         sysroot = check_cmd_output(rustc, '--print', 'sysroot').strip()
         etc = os.path.join(sysroot, 'lib/rustlib/etc')
         ldflags = []
         for f in os.listdir(etc):
             if f.endswith('.natvis'):
                 ldflags.append('-NATVIS:' + normsep(os.path.join(etc, f)))
         return ldflags
 
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -443,57 +443,49 @@ def try_preprocess(compiler, language, s
          _import='OS_preprocessor_checks')
 @imports(_from='textwrap', _import='dedent')
 @imports(_from='__builtin__', _import='Exception')
 def get_compiler_info(compiler, language):
     '''Returns information about the given `compiler` (command line in the
     form of a list or tuple), in the given `language`.
 
     The returned information includes:
-    - the compiler type (msvc, clang-cl, clang or gcc)
+    - the compiler type (clang-cl, clang or gcc)
     - the compiler version
     - the compiler supported language
     - the compiler supported language version
     '''
-    # Note: MSVC doesn't expose __STDC_VERSION__. It does expose __STDC__,
-    # but only when given the -Za option, which disables compiler
-    # extensions.
     # Note: We'd normally do a version check for clang, but versions of clang
     # in Xcode have a completely different versioning scheme despite exposing
     # the version with the same defines.
     # So instead, we make things such that the version is missing when the
     # clang used is below the minimum supported version (currently clang 3.9).
     # We then only include the version information when the C++ compiler
     # matches the feature check, so that an unsupported version of clang would
     # have no version number.
     check = dedent('''\
         #if defined(_MSC_VER)
         #if defined(__clang__)
         %COMPILER "clang-cl"
         %VERSION __clang_major__.__clang_minor__.__clang_patchlevel__
-        #else
-        %COMPILER "msvc"
-        %VERSION _MSC_FULL_VER
         #endif
         #elif defined(__clang__)
         %COMPILER "clang"
         #  if !__cplusplus || __has_builtin(__builtin_bitreverse8)
         %VERSION __clang_major__.__clang_minor__.__clang_patchlevel__
         #  endif
         #elif defined(__GNUC__)
         %COMPILER "gcc"
         %VERSION __GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__
         #endif
 
         #if __cplusplus
         %cplusplus __cplusplus
         #elif __STDC_VERSION__
         %STDC_VERSION __STDC_VERSION__
-        #elif __STDC__
-        %STDC_VERSION 198900L
         #endif
     ''')
 
     # While we're doing some preprocessing, we might as well do some more
     # preprocessor-based tests at the same time, to check the toolchain
     # matches what we want.
     for name, preprocessor_checks in (
         ('CPU', CPU_preprocessor_checks),
@@ -509,19 +501,19 @@ def get_compiler_info(compiler, language
                 'condition': condition,
                 'name': name,
                 'value': value,
             })
         check += '#endif\n'
 
     # Also check for endianness. The advantage of living in modern times is
     # that all the modern compilers we support now have __BYTE_ORDER__ defined
-    # by the preprocessor, except MSVC, which only supports little endian.
+    # by the preprocessor.
     check += dedent('''\
-        #if _MSC_VER || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+        #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
         %ENDIANNESS "little"
         #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
         %ENDIANNESS "big"
         #endif
     ''')
 
     result = try_preprocess(compiler, language, check)
 
@@ -544,24 +536,16 @@ def get_compiler_info(compiler, language
     except Exception:
         raise FatalCheckError(
             'Unknown compiler or compiler not supported.')
 
     cplusplus = int(data.get('cplusplus', '0L').rstrip('L'))
     stdc_version = int(data.get('STDC_VERSION', '0L').rstrip('L'))
 
     version = data.get('VERSION')
-    if version and type == 'msvc':
-        msc_ver = version
-        version = msc_ver[0:2]
-        if len(msc_ver) > 2:
-            version += '.' + msc_ver[2:4]
-        if len(msc_ver) > 4:
-            version += '.' + msc_ver[4:]
-
     if version:
         version = Version(version)
 
     return namespace(
         type=type,
         version=version,
         cpu=data.get('CPU'),
         kernel=data.get('KERNEL'),
@@ -599,17 +583,16 @@ def check_compiler(compiler, language, t
     # C99 compiles as e.g. C11 (as of writing, this is true of libnestegg, for
     # example)
     if info.language == 'C' and info.language_version != 199901:
         if info.type in ('clang-cl', 'clang', 'gcc'):
             if info.type == 'clang-cl':
                 flags.append('-Xclang')
             flags.append('-std=gnu99')
 
-    # Note: MSVC, while supporting C++14, still reports 199711L for __cplusplus.
     # Note: this is a strict version check because we used to always add
     # -std=gnu++14.
     cxx14_version = 201402
     if info.language == 'C++':
         if info.type == 'clang' and info.language_version != cxx14_version:
             flags.append('-std=gnu++14')
         # MSVC headers include C++14 features, but don't guard them
         # with appropriate checks.
@@ -629,17 +612,17 @@ def check_compiler(compiler, language, t
         # Add target flag when there is an OS mismatch (e.g. building for Android on
         # Linux). However, only do this if the target OS is in our whitelist, to
         # keep things the same on other platforms.
         elif target.os in OS_preprocessor_checks and (
                 not info.os or info.os != target.os):
             flags.append('--target=%s' % target.toolchain)
             has_target = True
 
-    if not has_target and (not info.cpu or info.cpu != target.cpu and info.type != 'msvc'):
+    if not has_target and (not info.cpu or info.cpu != target.cpu):
         same_arch = same_arch_different_bits()
         if (target.cpu, info.cpu) in same_arch:
             flags.append('-m32')
         elif (info.cpu, target.cpu) in same_arch:
             flags.append('-m64')
         elif info.type == 'clang-cl' and target.cpu == 'aarch64':
             # clang-cl uses a different name for this target
             flags.append('--target=aarch64-windows-msvc')
@@ -848,17 +831,17 @@ def default_c_compilers(host_or_target, 
 
     other_c_compiler = () if other_c_compiler is None else (other_c_compiler,)
 
     @depends(host_or_target, target, toolchain_prefix, android_clang_compiler,
              *other_c_compiler)
     def default_c_compilers(host_or_target, target, toolchain_prefix,
                             android_clang_compiler, *other_c_compiler):
         if host_or_target.kernel == 'WINNT':
-            supported = types = ('clang-cl', 'msvc', 'gcc', 'clang')
+            supported = types = ('clang-cl', 'gcc', 'clang')
         elif host_or_target.kernel == 'Darwin':
             types = ('clang',)
             supported = ('clang', 'gcc')
         else:
             supported = types = ('clang', 'gcc')
 
         info = other_c_compiler[0] if other_c_compiler else None
         if info and info.type in supported:
@@ -873,38 +856,32 @@ def default_c_compilers(host_or_target, 
                     # If the target C compiler is GCC, and it can't be used with
                     # -m32/-m64 for the host, it's probably toolchain-prefixed,
                     # so we prioritize a raw 'gcc' instead.
                     prioritized = info.type
             elif info.type == 'clang' and android_clang_compiler:
                 # Android NDK clangs do not function as host compiler, so
                 # prioritize a raw 'clang' instead.
                 prioritized = info.type
-            elif info.type == 'msvc' and target.cpu != host_or_target.cpu:
-                # MSVC compilers only support one architecture, so we'll
-                # want a cl in another (detected) path.
-                prioritized = 'cl'
 
             types = [prioritized] + [t for t in types if t != info.type]
 
         gcc = ('gcc',)
         if toolchain_prefix and host_or_target is target:
             gcc = tuple('%sgcc' % p for p in toolchain_prefix) + gcc
 
         result = []
         for type in types:
             # Android sets toolchain_prefix and android_clang_compiler, but
             # we want the latter to take precedence, because the latter can
             # point at clang, which is what we want to use.
             if type == 'clang' and android_clang_compiler and host_or_target is target:
                 result.append(android_clang_compiler)
             elif type == 'gcc':
                 result.extend(gcc)
-            elif type == 'msvc':
-                result.append('cl')
             else:
                 result.append(type)
 
         return tuple(result)
 
     return default_c_compilers
 
 
@@ -1114,26 +1091,16 @@ def compiler(language, host_or_target, c
                     % info.version)
 
         # If you want to bump the version check here search for
         # builtin_bitreverse8 above, and see the associated comment.
         if info.type == 'clang' and not info.version:
             raise FatalCheckError(
                 'Only clang/llvm 3.9 or newer is supported.')
 
-        if info.type == 'msvc':
-            if info.version < '19.15.26726':
-                raise FatalCheckError(
-                    'This version (%s) of the MSVC compiler is not '
-                    'supported.\n'
-                    'You must install Visual C++ 2017 Update 8 or '
-                    'later in order to build.\n'
-                    'See https://developer.mozilla.org/en/'
-                    'Windows_Build_Prerequisites' % info.version)
-
         if info.flags:
             raise FatalCheckError(
                 'Unknown compiler or compiler not supported.')
 
         return namespace(
             wrapper=wrapper,
             compiler=compiler,
             flags=flags,
@@ -1229,49 +1196,41 @@ def compiler(language, host_or_target, c
             host: 'HOST_LD',
         }[host_or_target]
 
         @deprecated_option(env=linker_var, nargs=1)
         def linker(value):
             if value:
                 return value[0]
 
-        @depends(valid_compiler, linker)
-        def unused_linker(compiler, linker):
-            if linker and compiler.type != 'msvc':
+        @depends(linker)
+        def unused_linker(linker):
+            if linker:
                 log.warning('The value of %s is not used by this build system.'
                             % linker_var)
 
-        if host_or_target is target:
-            @depends(valid_compiler)
-            def is_msvc(compiler):
-                return compiler.type == 'msvc'
-
-            imply_option('LINKER', linker, reason='LD', when=is_msvc)
-
     return valid_compiler
 
 
 c_compiler = compiler('C', target)
 cxx_compiler = compiler('C++', target, c_compiler=c_compiler)
 host_c_compiler = compiler('C', host, other_compiler=c_compiler)
 host_cxx_compiler = compiler('C++', host, c_compiler=host_c_compiler,
                              other_compiler=cxx_compiler,
                              other_c_compiler=c_compiler)
 
 # Generic compiler-based conditions.
-non_msvc_compiler = depends(c_compiler)(lambda info: info.type != 'msvc')
 building_with_gcc = depends(c_compiler)(lambda info: info.type == 'gcc')
 
 
 @depends(c_compiler)
 def msvs_version(info):
     # clang-cl emulates the same version scheme as cl. And MSVS_VERSION needs to
     # be set for GYP on Windows.
-    if info.type in ('clang-cl', 'msvc'):
+    if info.type == 'clang-cl':
         return '2017'
 
     return ''
 
 
 set_config('MSVS_VERSION', msvs_version)
 
 include('compile-checks.configure')
@@ -1284,17 +1243,17 @@ def check_have_64_bit(have_64_bit, compi
     if have_64_bit != compiler_have_64_bit:
         configure_error('The target compiler does not agree with configure '
                         'about the target bitness.')
 
 
 @depends(c_compiler, target)
 def default_debug_flags(compiler_info, target):
     # Debug info is ON by default.
-    if compiler_info.type in ('msvc', 'clang-cl'):
+    if compiler_info.type == 'clang-cl':
         return '-Z7'
     elif target.kernel == 'WINNT' and compiler_info.type == 'clang':
         return '-g -gcodeview'
     return '-g'
 
 
 option(env='MOZ_DEBUG_FLAGS',
        nargs=1,
@@ -1422,37 +1381,33 @@ def wrap_system_includes(target, visibil
 set_define('HAVE_VISIBILITY_HIDDEN_ATTRIBUTE',
            depends(visibility_flags)(lambda v: bool(v) or None))
 set_define('HAVE_VISIBILITY_ATTRIBUTE',
            depends(visibility_flags)(lambda v: bool(v) or None))
 set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes)
 set_config('VISIBILITY_FLAGS', visibility_flags)
 
 
-@depends(c_compiler, using_sccache)
-def depend_cflags(info, using_sccache):
-    if info.type not in ('clang-cl', 'msvc'):
+@depends(c_compiler)
+def depend_cflags(info):
+    if info.type != 'clang-cl':
         return ['-MD', '-MP', '-MF $(MDDEPDIR)/$(@F).pp']
-    elif info.type == 'clang-cl':
+    else:
         # clang-cl doesn't accept the normal -MD -MP -MF options that clang
         # does, but the underlying cc1 binary understands how to generate
         # dependency files.  These options are based on analyzing what the
         # normal clang driver sends to cc1 when given the "correct"
         # dependency options.
         return [
             '-Xclang', '-MP',
             '-Xclang', '-dependency-file',
             '-Xclang', '$(MDDEPDIR)/$(@F).pp',
             '-Xclang', '-MT',
             '-Xclang', '$@'
         ]
-    elif using_sccache:
-        # sccache supports a special flag to create depfiles
-        # by parsing MSVC's -showIncludes output.
-        return ['-deps$(MDDEPDIR)/$(@F).pp']
 
 
 set_config('_DEPEND_CFLAGS', depend_cflags)
 
 
 @depends(c_compiler, check_build_environment, target)
 @imports('multiprocessing')
 @imports(_from='__builtin__', _import='min')
@@ -1487,39 +1442,16 @@ def pgo_flags(compiler, build_env, targe
                 gen_cflags=['-fprofile-instr-generate'],
                 gen_ldflags=gen_ldflags,
                 use_cflags=['-fprofile-instr-use=%s' % profdata,
                             '-Wno-error=profile-instr-out-of-date',
                             '-Wno-error=profile-instr-unprofiled'],
                 use_ldflags=[],
             )
 
-    if compiler.type == 'msvc':
-        num_cores = min(8, multiprocessing.cpu_count())
-        cgthreads = '-CGTHREADS:%s' % num_cores
-
-        return namespace(
-            gen_cflags=['-GL'],
-            gen_ldflags=['-LTCG:PGINSTRUMENT', '-PogoSafeMode', cgthreads],
-            # XXX: PGO builds can fail with warnings treated as errors,
-            # specifically "no profile data available" appears to be
-            # treated as an error sometimes. This might be a consequence
-            # of using WARNINGS_AS_ERRORS in some modules, combined
-            # with the linker doing most of the work in the whole-program
-            # optimization/PGO case. I think it's probably a compiler bug,
-            # but we work around it here.
-            use_cflags=['-GL', '-wd4624', '-wd4952'],
-            # XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
-            # Probably also a compiler bug, but what can you do?
-            # /d2:-cgsummary prints a summary of what is happening during
-            # code generation. How long individual functions are optimized,
-            # which functions are optimized, etc.
-            use_ldflags=['-LTCG:PGUPDATE', cgthreads, '-d2:-cgsummary'],
-        )
-
 
 set_config('PROFILE_GEN_CFLAGS', pgo_flags.gen_cflags)
 set_config('PROFILE_GEN_LDFLAGS', pgo_flags.gen_ldflags)
 set_config('PROFILE_USE_CFLAGS', pgo_flags.use_cflags)
 set_config('PROFILE_USE_LDFLAGS', pgo_flags.use_ldflags)
 
 
 @depends(c_compiler)
@@ -2064,27 +1996,27 @@ add_old_configure_assignment('GCC_USE_GN
 
 # Assembler detection
 # ==============================================================
 
 js_option(env='AS', nargs=1, help='Path to the assembler')
 
 @depends(target, c_compiler)
 def as_info(target, c_compiler):
-    if c_compiler.type in ('msvc', 'clang-cl'):
+    if c_compiler.type == 'clang-cl':
         ml = {
             'x86': 'ml',
             'x86_64': 'ml64',
             'aarch64': 'armasm64.exe',
         }.get(target.cpu)
         return namespace(
             type='masm',
             names=(ml, )
         )
-    # When building with anything but MSVC, we just use the C compiler as the assembler.
+    # When building with anything but clang-cl, we just use the C compiler as the assembler.
     return namespace(
         type='gcc',
         names=(c_compiler.compiler, )
     )
 
 # One would expect the assembler to be specified merely as a program.  But in
 # cases where the assembler is passed down into js/, it can be specified in
 # the same way as CC: a program + a list of argument flags.  We might as well
--- a/build/moz.configure/windows.configure
+++ b/build/moz.configure/windows.configure
@@ -246,26 +246,23 @@ def valid_ucrt_sdk_dir(windows_sdk_dir, 
         lib=sdk.lib,
         version=version,
     )
 
 
 @depends(c_compiler, toolchain_search_path)
 @imports('os')
 def vc_path(c_compiler, toolchain_search_path):
-    if c_compiler.type not in ('msvc', 'clang-cl'):
+    if c_compiler.type != 'clang-cl':
         return
 
-    vc_program = c_compiler.compiler
-
-    # In clang-cl builds, we use the headers and libraries from an MSVC installation.
-    if c_compiler.type == 'clang-cl':
-        vc_program = find_program('cl.exe', paths=toolchain_search_path)
-        if not vc_program:
-            die('Cannot find a Visual C++ install for e.g. ATL headers.')
+    # In clang-cl builds, we need the headers and libraries from an MSVC installation.
+    vc_program = find_program('cl.exe', paths=toolchain_search_path)
+    if not vc_program:
+        die('Cannot find a Visual C++ install for e.g. ATL headers.')
 
     result = os.path.dirname(vc_program)
     while True:
         next, p = os.path.split(result)
         if next == result:
             die('Cannot determine the Visual C++ directory the compiler (%s) '
                 'is in' % vc_program)
         result = next
@@ -492,18 +489,16 @@ set_config('MSMANIFEST_TOOL', depends(va
 def linker_progs_for(host_or_target):
     compiler = {
         host: host_c_compiler,
         target: c_compiler,
     }[host_or_target]
 
     @depends(compiler)
     def linker_progs(compiler):
-        if compiler.type == 'msvc':
-            return ('link', 'lld-link')
         if compiler.type == 'clang-cl':
             return ('lld-link', 'link')
     return linker_progs
 
 
 js_option(env='LINKER', nargs=1, help='Path to the linker')
 
 link = check_prog('LINKER', linker_progs_for(target), input='LINKER',
@@ -514,38 +509,8 @@ js_option(env='HOST_LINKER', nargs=1, he
 host_link = check_prog('HOST_LINKER', linker_progs_for(host),
                        input='HOST_LINKER',
                        paths=host_toolchain_search_path)
 
 add_old_configure_assignment('LINKER', link)
 
 
 check_prog('MAKECAB', ('makecab.exe',))
-
-
-@depends(c_compiler, using_sccache)
-def need_showincludes_prefix(info, using_sccache):
-    # sccache does its own -showIncludes prefix checking.
-    # clang-cl uses a gcc-style dependency scheme, see toolchain.configure.
-    if info.type == 'msvc' and not using_sccache:
-        return True
-
-
-@depends(c_compiler, when=need_showincludes_prefix)
-@imports(_from='re', _import='compile', _as='re_compile')
-def msvc_showincludes_prefix(c_compiler):
-    pattern = re_compile(br'^([^:]*:.*[ :] )(.*\\stdio.h)$')
-    output = try_invoke_compiler([c_compiler.compiler], 'C', '#include <stdio.h>\n',
-                                 ['-nologo', '-c', '-Fonul', '-showIncludes'])
-    for line in output.splitlines():
-        if line.endswith(b'\\stdio.h'):
-            m = pattern.match(line)
-            if m:
-                return m.group(1)
-    # We should have found the prefix and returned earlier
-    die('Cannot find cl -showIncludes prefix.')
-
-
-set_config('CL_INCLUDES_PREFIX', msvc_showincludes_prefix)
-
-# Make sure that the build system can handle non-ASCII characters in
-# environment variables to prevent silent breakage on non-English systems.
-set_config('NONASCII', b'\241\241')
--- a/build/templates.mozbuild
+++ b/build/templates.mozbuild
@@ -154,17 +154,17 @@ def DisableStlWrapping():
 
 @template
 def NoVisibilityFlags():
     COMPILE_FLAGS['VISIBILITY'] = []
 
 @template
 def ForceInclude(*headers):
     """Force includes a set of header files in C++ compilations"""
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         include_flag = '-FI'
     else:
         include_flag = '-include'
     for header in headers:
         CXXFLAGS += [include_flag, header]
 
 include('gecko_templates.mozbuild')
 include('test_templates.mozbuild')
--- a/config/config.mk
+++ b/config/config.mk
@@ -101,24 +101,16 @@ ACDEFINES += -DXPI_NAME=$(XPI_NAME)
 endif
 
 # The VERSION_NUMBER is suffixed onto the end of the DLLs we ship.
 VERSION_NUMBER		= 50
 
 CONFIG_TOOLS	= $(MOZ_BUILD_ROOT)/config
 AUTOCONF_TOOLS	= $(MOZILLA_DIR)/build/autoconf
 
-ifeq (msvc,$(CC_TYPE))
-# clang-cl is smart enough to generate dependencies directly.
-ifeq (,$(MOZ_USING_SCCACHE))
-CC_WRAPPER ?= $(call py_action,cl)
-CXX_WRAPPER ?= $(call py_action,cl)
-endif # MOZ_USING_SCCACHE
-endif # CC_TYPE
-
 CC := $(CC_WRAPPER) $(CC)
 CXX := $(CXX_WRAPPER) $(CXX)
 MKDIR ?= mkdir
 SLEEP ?= sleep
 TOUCH ?= touch
 
 PYTHON_PATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py
 
@@ -436,14 +428,8 @@ ifneq (,$(GNU_CC)$(CLANG_CL))
 OBJS_VAR_SUFFIX := PGO_OBJS
 ifndef NO_PROFILE_GUIDED_OPTIMIZE
 OBJ_SUFFIX := i_o
 endif
 endif
 endif
 
 PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply
-
-export CL_INCLUDES_PREFIX
-# Make sure that the build system can handle non-ASCII characters
-# in environment variables to prevent it from breking silently on
-# non-English systems.
-export NONASCII
--- a/config/external/icu/defs.mozbuild
+++ b/config/external/icu/defs.mozbuild
@@ -44,19 +44,8 @@ if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-macro-redefined',
         '-Wno-microsoft-include',
     ]
     CXXFLAGS += [
         '-Wno-macro-redefined',
         '-Wno-microsoft-include',
     ]
-
-if CONFIG['CC_TYPE'] == 'msvc':
-    CFLAGS += [
-        '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
-        '-wd4996', # The compiler encountered a deprecated declaration.
-    ]
-    CXXFLAGS += [
-        '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
-        '-wd4333', # '>>' : right shift by too large amount, data loss
-        '-wd4996', # The compiler encountered a deprecated declaration.
-    ]
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -8,20 +8,19 @@ external_dirs = []
 
 DIRS += [
     'lgpllibs',
     'sqlite',
 ]
 if not CONFIG['MOZ_SYSTEM_JPEG']:
     external_dirs += ['media/libjpeg']
 
-if CONFIG['MOZ_LIBPRIO']:
-    DIRS += [
-        'prio',
-    ]
+DIRS += [
+    'prio',
+]
 
 # There's no "native" brotli or woff2 yet, but probably in the future...
 external_dirs += ['modules/brotli']
 external_dirs += ['modules/woff2']
 
 external_dirs += ['modules/xz-embedded']
 
 if CONFIG['MOZ_VORBIS']:
--- a/config/external/msgpack/moz.build
+++ b/config/external/msgpack/moz.build
@@ -1,9 +1,7 @@
 # -*- 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['MOZ_LIBPRIO']:
-    DIRS += ['/third_party/msgpack']
-
+DIRS += ['/third_party/msgpack']
--- a/config/moz.build
+++ b/config/moz.build
@@ -38,17 +38,17 @@ HOST_DEFINES = {
     '_UNICODE': True,
 }
 
 include('stl-headers.mozbuild')
 if CONFIG['WRAP_STL_INCLUDES']:
     stl_compiler = None
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         stl_compiler = 'gcc'
-    elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    elif CONFIG['CC_TYPE'] == 'clang-cl':
         stl_compiler = 'msvc'
 
     if stl_compiler:
         # Note that the 'stl_wrappers' folder is known to the build system as
         # containing generated files; if this is changed here then the code in
         # GeneratedFile.__init__ in python/mozbuild/mozbuild/frontend/data.py
         # might need to be updated accordingly as well.
         template_file = SRCDIR + '/%s-stl-wrapper.template.h' % stl_compiler
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -354,17 +354,17 @@ OUTOPTION = -o # eol
 endif # WINNT && !GNU_CC
 
 ifeq (,$(CROSS_COMPILE))
 HOST_OUTOPTION = $(OUTOPTION)
 else
 # Windows-to-Windows cross compiles should always use MSVC-style options for
 # host compiles.
 ifeq (WINNT_WINNT,$(HOST_OS_ARCH)_$(OS_ARCH))
-ifneq (,$(filter-out msvc clang-cl,$(HOST_CC_TYPE)))
+ifneq (,$(filter-out clang-cl,$(HOST_CC_TYPE)))
 $(error MSVC-style compilers should be used for host compilations!)
 endif
 HOST_OUTOPTION = -Fo# eol
 else
 HOST_OUTOPTION = -o # eol
 endif
 endif
 ################################################################################
@@ -512,32 +512,25 @@ distclean::
 alltags:
 	$(RM) TAGS
 	find $(topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $(TAG_PROGRAM)
 
 define EXPAND_CC_OR_CXX
 $(if $(PROG_IS_C_ONLY_$(1)),$(CC),$(CCC))
 endef
 
-# Workaround a bug of MSVC 2017 Update 8 (see bug 1485224)
-ifeq ($(CC_TYPE)_$(HOST_OS_ARCH)_$(MOZ_PROFILE_GENERATE),msvc_WINNT_1)
-LINKER_OUT=$(subst /,\,$1)
-else
-LINKER_OUT=$1
-endif
-
 #
 # PROGRAM = Foo
 # creates OBJS, links with LIBS to create Foo
 #
 $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(RUST_STATIC_LIB) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
 	$(REPORT_BUILD)
 	@$(RM) $@.manifest
 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
-	$(LINKER) -NOLOGO -OUT:$(call LINKER_OUT,$@) -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(STATIC_LIBS) $(RUST_STATIC_LIB) $(SHARED_LIBS) $(OS_LIBS)
+	$(LINKER) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_$(OBJS_VAR_SUFFIX)) $(RESFILE) $(STATIC_LIBS) $(RUST_STATIC_LIB) $(SHARED_LIBS) $(OS_LIBS)
 ifdef MSMANIFEST_TOOL
 	@if test -f $@.manifest; then \
 		if test -f '$(srcdir)/$(notdir $@).manifest'; then \
 			echo 'Embedding manifest from $(srcdir_rel)/$(notdir $@).manifest and $@.manifest'; \
 			$(MT) -NOLOGO -MANIFEST '$(srcdir_rel)/$(notdir $@).manifest' $@.manifest -OUTPUTRESOURCE:$@\;1; \
 		else \
 			echo 'Embedding manifest from $@.manifest'; \
 			$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
@@ -654,17 +647,17 @@ ifeq ($(OS_ARCH),WINNT)
 # have run before considering other targets that depend on the import library.
 # See bug 795204.
 $(IMPORT_LIBRARY): $(SHARED_LIBRARY) ;
 endif
 
 $(HOST_SHARED_LIBRARY): Makefile
 	$(REPORT_BUILD)
 	$(RM) $@
-ifneq (,$(filter msvc clang-cl,$(HOST_CC_TYPE)))
+ifneq (,$(filter clang-cl,$(HOST_CC_TYPE)))
 	$(HOST_LINKER) -NOLOGO -DLL -OUT:$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 else
 	$(HOST_CXX) $(HOST_OUTOPTION)$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 endif
 
 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
 # so instead of deleting .o files after repacking them into a dylib, we make
 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -2,19 +2,16 @@
 # 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/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM")
 
-if CONFIG['CC_TYPE'] == 'msvc':
-    CXXFLAGS += ['-bigobj']
-
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'nsIScriptError.idl'
 ]
 
 XPIDL_MODULE = 'dom_bindings'
 
@@ -93,18 +90,17 @@ LOCAL_INCLUDES += [
     '/layout/xul/tree',
     '/media/mtransport',
     '/media/webrtc/',
     '/media/webrtc/signaling/src/common/time_profiling',
     '/media/webrtc/signaling/src/peerconnection',
     '/media/webrtc/trunk/',
 ]
 
-if CONFIG['MOZ_LIBPRIO']:
-    LOCAL_INCLUDES += ['/third_party/msgpack/include']
+LOCAL_INCLUDES += ['/third_party/msgpack/include']
 
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
 
 UNIFIED_SOURCES += [
     'BindingUtils.cpp',
     'CallbackInterface.cpp',
     'CallbackObject.cpp',
--- a/dom/chrome-webidl/moz.build
+++ b/dom/chrome-webidl/moz.build
@@ -64,13 +64,12 @@ WEBIDL_FILES = [
 ]
 
 if CONFIG['MOZ_PLACES']:
     WEBIDL_FILES += [
         'PlacesEvent.webidl',
         'PlacesObservers.webidl',
     ]
 
-if CONFIG['MOZ_LIBPRIO']:
-    WEBIDL_FILES += [
-        'PrioEncoder.webidl',
-    ]
+WEBIDL_FILES += [
+    'PrioEncoder.webidl',
+]
 
--- a/dom/media/mp4/moz.build
+++ b/dom/media/mp4/moz.build
@@ -36,17 +36,17 @@ UNIFIED_SOURCES += [
 
 SOURCES += [
     'MP4Demuxer.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 # Supress warnnings for now.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-wd4013', # 'function' undefined; assuming extern returning int
         '-wd4101', # unreferenced local variable
     ]
     CXXFLAGS += [
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4275', # non dll-interface class used as base for dll-interface class
         '-wd4305', # '=' : truncation from 'double' to 'float'
--- a/dom/media/platforms/agnostic/bytestreams/moz.build
+++ b/dom/media/platforms/agnostic/bytestreams/moz.build
@@ -21,17 +21,17 @@ UNIFIED_SOURCES += [
 
 LOCAL_INCLUDES += [
     '../../../mp4/',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-wd4013', # 'function' undefined; assuming extern returning int
         '-wd4101', # unreferenced local variable
     ]
     CXXFLAGS += [
         '-wd4018', # '<' : signed/unsigned mismatch
         '-wd4275', # non dll-interface class used as base for dll-interface class
         '-wd4305', # '=' : truncation from 'double' to 'float'
--- a/dom/media/platforms/ffmpeg/ffvpx/moz.build
+++ b/dom/media/platforms/ffmpeg/ffvpx/moz.build
@@ -29,17 +29,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
   CXXFLAGS += [ '-Wno-deprecated-declarations' ]
 if CONFIG['CC_TYPE'] == 'clang':
   CXXFLAGS += [
     '-Wno-unknown-attributes',
   ]
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
   CXXFLAGS += [
     '-wd4996', # deprecated declaration
   ]
 
 DEFINES['FFVPX_VERSION'] = 46465650
 DEFINES['USING_MOZFFVPX'] = True
 
 FINAL_LIBRARY = 'xul'
--- a/dom/media/platforms/omx/moz.build
+++ b/dom/media/platforms/omx/moz.build
@@ -26,14 +26,11 @@ if CONFIG['MOZ_OMX']:
         'PureOmxPlatformLayer.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-    # Avoid warnings from third-party code that we can not modify.
-    if CONFIG['CC_TYPE'] == 'clang-cl':
-        CXXFLAGS += ['-Wno-invalid-source-encoding']
-    else:
-        CXXFLAGS += ['-validate-charset-']
+# Avoid warnings from third-party code that we can not modify.
+if CONFIG['CC_TYPE'] == 'clang-cl':
+    CXXFLAGS += ['-Wno-invalid-source-encoding']
--- a/dom/media/systemservices/moz.build
+++ b/dom/media/systemservices/moz.build
@@ -43,17 +43,17 @@ if CONFIG['OS_TARGET'] == 'Android':
     UNIFIED_SOURCES += [
         'OpenSLESProvider.cpp',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
   UNIFIED_SOURCES += ['OSXRunLoopSingleton.cpp']
   EXPORTS += ['OSXRunLoopSingleton.h']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__'
 
     # This is intended as a temporary workaround to enable building with VS2015.
     # media\webrtc\trunk\webrtc/base/criticalsection.h(59): warning C4312:
     # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
     CXXFLAGS += ['-wd4312']
 
 EXPORTS.mozilla += ['ShmemPool.h',]
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -81,15 +81,15 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang
     CXXFLAGS += [
         '-Wno-error=attributes',
         '-Wno-error=shadow',
     ]
 
 DEFINES['TRACING'] = True
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-wd4275', # non dll-interface class used as base for dll-interface class
         '-wd4312', # This is intended as a temporary hack to support building with VS2015
                    # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
     ]
     DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__'
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -99,21 +99,19 @@ DIRS += [
     'worklet',
     'script',
     'payments',
     'websocket',
     'serviceworkers',
     'simpledb',
     'reporting',
     'localstorage',
+    'prio',
 ]
 
-if CONFIG['MOZ_LIBPRIO']:
-    DIRS += ['prio']
-
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['plugins/ipc/hangui']
 
 DIRS += ['presentation']
 
 TEST_DIRS += [
     'tests',
     'imptests',
--- a/dom/plugins/ipc/moz.build
+++ b/dom/plugins/ipc/moz.build
@@ -143,17 +143,17 @@ else:
     # Force build against gtk+2 for struct offsets and such.
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # 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
     CXXFLAGS += ['-wd4312']
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -50,17 +50,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     OS_LIBS += CONFIG['MOZ_GTK2_LIBS']
     OS_LIBS += CONFIG['XLDFLAGS']
     OS_LIBS += CONFIG['XLIBS']
     OS_LIBS += CONFIG['XEXT_LIBS']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # This is intended as a temporary hack to support building with VS2015.
     # conversion from 'X' to 'Y' requires a narrowing conversion
     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:
--- a/gfx/cairo/cairo/src/moz.build
+++ b/gfx/cairo/cairo/src/moz.build
@@ -235,36 +235,16 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang
             '-Wno-shift-negative-value',
             '-Wno-tautological-compare',
             '-Wno-tautological-constant-out-of-range-compare',
             '-Wno-unreachable-code',
         ]
     else:
         CFLAGS += ['-Wno-unused-but-set-variable']
 
-if CONFIG['CC_TYPE'] == 'msvc':
-    CFLAGS += [
-        '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
-        '-wd4018', # '>' : signed/unsigned mismatch
-        '-wd4047', # different levels of indirection
-        '-wd4101', # unreferenced local variable
-        '-wd4133', # 'function' : incompatible types
-        '-wd4146', # unary minus operator applied to unsigned type
-        '-wd4311', # 'variable' : pointer truncation from 'type' to 'type'
-        '-wd4477', # format string '%s' requires an argument of type 'type'
-        '-wd4996', # The compiler encountered a deprecated declaration.
-    ]
-    CXXFLAGS += [
-        '-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['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']
 
--- a/gfx/cairo/libpixman/src/moz.build
+++ b/gfx/cairo/libpixman/src/moz.build
@@ -80,17 +80,17 @@ DEFINES['_USE_MATH_DEFINES'] = True
 use_mmx = False
 use_sse2 = False
 use_vmx = False
 use_arm_simd_gcc = False
 use_arm_neon_gcc = False
 if CONFIG['INTEL_ARCHITECTURE']:
     use_sse2 = True
     if CONFIG['CPU_ARCH'] == 'x86':
-        if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+        if CONFIG['CC_TYPE'] == 'clang-cl':
             use_mmx = True
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         use_mmx = True
 elif CONFIG['CPU_ARCH'] in ('ppc', 'ppc64'):
     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.
@@ -163,20 +163,12 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang
         '-Wno-incompatible-pointer-types',
         '-Wno-tautological-compare',
         '-Wno-tautological-constant-out-of-range-compare',
     ]
 if CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-Wno-unused-variable',
     ]
-if CONFIG['CC_TYPE'] == 'msvc':
-    CFLAGS += [
-        '-wd4047', # different levels of indirection
-        '-wd4101', # unreferenced local variable
-        '-wd4133', # 'function' : incompatible types
-        '-wd4146', # unary minus operator applied to unsigned type
-        '-wd4311', # 'variable' : pointer truncation from 'type' to 'type'
-    ]
 
 # See bug 386897.
 if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']:
     CFLAGS += ['-O2']
--- a/gfx/qcms/moz.build
+++ b/gfx/qcms/moz.build
@@ -22,17 +22,17 @@ FINAL_LIBRARY = 'xul'
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-Wno-missing-field-initializers']
 
 use_sse1 = False
 use_sse2 = False
 use_altivec = False
 if CONFIG['INTEL_ARCHITECTURE']:
     use_sse2 = True
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['CPU_ARCH'] != 'x86_64':
             use_sse1 = True
     else:
         use_sse1 = True
 elif CONFIG['HAVE_ALTIVEC']:
     use_altivec = True
 
 if use_sse1:
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -19,17 +19,17 @@ header = """
 # debugging generate_mozbuild.py.
 #
 # DO NOT MODIFY THIS FILE IT IS AUTOGENERATED.
 #
 
 skia_opt_flags = []
 
 if CONFIG['MOZ_OPTIMIZE']:
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         skia_opt_flags += ['-O2']
     elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         skia_opt_flags += ['-O3']
 
 """
 
 footer = """
 
@@ -83,17 +83,17 @@ if CONFIG['INTEL_ARCHITECTURE'] and (CON
     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', '-mf16c', '-mfma']
-elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['INTEL_ARCHITECTURE']:
+elif CONFIG['CC_TYPE'] == 'clang-cl' and CONFIG['INTEL_ARCHITECTURE']:
     # MSVC doesn't need special compiler flags, but Skia needs to be told that these files should
     # be built with the required SSE level or it will simply compile in stubs and cause runtime crashes
     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']
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -12,17 +12,17 @@
 # debugging generate_mozbuild.py.
 #
 # DO NOT MODIFY THIS FILE IT IS AUTOGENERATED.
 #
 
 skia_opt_flags = []
 
 if CONFIG['MOZ_OPTIMIZE']:
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         skia_opt_flags += ['-O2']
     elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         skia_opt_flags += ['-O3']
 
 UNIFIED_SOURCES += [
     'skia/src/codec/SkMasks.cpp',
     'skia/src/core/SkAAClip.cpp',
     'skia/src/core/SkAlphaRuns.cpp',
@@ -763,17 +763,17 @@ if CONFIG['INTEL_ARCHITECTURE'] and (CON
     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', '-mf16c', '-mfma']
-elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['INTEL_ARCHITECTURE']:
+elif CONFIG['CC_TYPE'] == 'clang-cl' and CONFIG['INTEL_ARCHITECTURE']:
     # MSVC doesn't need special compiler flags, but Skia needs to be told that these files should
     # be built with the required SSE level or it will simply compile in stubs and cause runtime crashes
     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']
--- a/gfx/vr/service/moz.build
+++ b/gfx/vr/service/moz.build
@@ -35,12 +35,12 @@ if CONFIG['OS_TARGET'] in ('WINNT', 'Lin
     # often conflict with our own types.
     SOURCES += [
         'OpenVRSession.cpp'
     ]
 
 FINAL_LIBRARY = 'xul'
 
 # This is intended as a temporary hack to enable VS2015 builds.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # ovr_capi_dynamic.h '<unnamed-tag>': Alignment specifier is less than
     # actual alignment (8), and will be ignored
     CXXFLAGS += ['-wd4359']
--- a/gfx/ycbcr/moz.build
+++ b/gfx/ycbcr/moz.build
@@ -19,26 +19,26 @@ UNIFIED_SOURCES += [
 
 if CONFIG['INTEL_ARCHITECTURE']:
     # These files use MMX and SSE2 intrinsics, so they need special compile flags
     # on some compilers.
     SOURCES += ['yuv_convert_sse2.cpp']
     SOURCES['yuv_convert_sse2.cpp'].flags += CONFIG['SSE2_FLAGS']
 
     # MSVC doesn't support MMX when targeting AMD64.
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         if CONFIG['CPU_ARCH'] == 'x86':
             SOURCES += [
                 'yuv_convert_mmx.cpp',
             ]
     else:
         SOURCES += ['yuv_convert_mmx.cpp']
         SOURCES['yuv_convert_mmx.cpp'].flags += CONFIG['MMX_FLAGS']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     if CONFIG['CPU_ARCH'] == 'x86_64' or \
        (CONFIG['CPU_ARCH'] == 'x86' and CONFIG['CC_TYPE'] == 'clang-cl'):
         SOURCES += [
             'yuv_row_win64.cpp',
         ]
     else:
         SOURCES += [
             'yuv_row_win.cpp',
--- a/ipc/app/moz.build
+++ b/ipc/app/moz.build
@@ -54,17 +54,17 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_
     LOCAL_INCLUDES += [
         '/security/sandbox/chromium',
         '/security/sandbox/chromium-shim',
     ]
     USE_LIBS += [
         'mozsandbox',
     ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 # 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.
 #
--- a/ipc/chromium/chromium-config.mozbuild
+++ b/ipc/chromium/chromium-config.mozbuild
@@ -26,17 +26,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'U_STATIC_IMPLEMENTATION': True,
         'OS_WIN': 1,
         'WIN32': True,
         '_WIN32': True,
         '_WINDOWS': True,
         'WIN32_LEAN_AND_MEAN': True,
     })
 
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         DEFINES['COMPILER_MSVC'] = True
 
 else:
     DEFINES['OS_POSIX'] = 1
 
     if CONFIG['OS_ARCH'] == 'Darwin':
         DEFINES['OS_MACOSX'] = 1
 
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -184,17 +184,17 @@ if CONFIG['OS_ARCH'] == 'Darwin':
     SOURCES += [
         'GeckoChildProcessHost.cpp',
     ]
 else:
     UNIFIED_SOURCES += [
         'GeckoChildProcessHost.cpp',
     ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # This is intended as a temporary hack to support building with VS2015.
     # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
     SOURCES['BackgroundChildImpl.cpp'].flags += ['-wd4312']
     SOURCES['BackgroundParentImpl.cpp'].flags += ['-wd4312']
 
 LOCAL_INCLUDES += [
     '/caps',
     '/dom/broadcastchannel',
--- a/ipc/ipdl/test/cxx/app/moz.build
+++ b/ipc/ipdl/test/cxx/app/moz.build
@@ -11,10 +11,10 @@ SOURCES += [
 ]
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/toolkit/xre',
     '/xpcom/base',
 ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
--- a/js/src/js-cxxflags.mozbuild
+++ b/js/src/js-cxxflags.mozbuild
@@ -2,17 +2,17 @@
 # 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/.
 
 # ICU pkg-config flags
 CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # C4805 warns mixing bool with other integral types in computation.
     # But given the conversion from bool is specified, and this is a
     # pattern widely used in code in js/src, suppress this warning here.
     CXXFLAGS += ['-wd4805']
     # C4661 ("no suitable definition provided for explicit template
     # instantiation request") is emitted for all Parser methods that
     # have a Parser<FullParseHandler> definition but no
     # Parser<SyntaxParseHandler> definition, see bug 1167030.
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -388,18 +388,17 @@ if CONFIG['JS_HAS_CTYPES']:
         ]
 
 if CONFIG['MOZ_VTUNE']:
     SOURCES += [
         'vtune/ittnotify_static.c',
         'vtune/jitprofiling.c',
         'vtune/VTuneWrapper.cpp',
     ]
-    if CONFIG['CC_TYPE'] != 'msvc':
-        SOURCES['vtune/ittnotify_static.c'].flags += ['-Wno-varargs', '-Wno-unknown-pragmas']
+    SOURCES['vtune/ittnotify_static.c'].flags += ['-Wno-varargs', '-Wno-unknown-pragmas']
 
 if CONFIG['HAVE_LINUX_PERF_EVENT_H']:
     SOURCES += [
         'perf/pm_linux.cpp'
     ]
     if CONFIG['LINUX_HEADERS_INCLUDES']:
         SOURCES['perf/pm_linux.cpp'].flags += [CONFIG['LINUX_HEADERS_INCLUDES']]
 else:
--- a/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -21,22 +21,16 @@ UNIFIED_SOURCES += [
     'js.cpp',
     'jsoptparse.cpp',
     'jsshell.cpp',
     'OSObject.cpp'
 ]
 
 DEFINES['EXPORT_JS_API'] = True
 
-if CONFIG['CC_TYPE'] == 'msvc':
-    # PGO is unnecessary for the js shell, but clang/gcc cannot turn off PGO
-    # because we need to resolve symbols from PGO runtime library when our
-    # object files have been compiled for PGO.
-    NO_PGO = True
-
 LOCAL_INCLUDES += [
     '!..',
     '..',
 ]
 
 OS_LIBS += CONFIG['EDITLINE_LIBS']
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
--- a/js/xpconnect/shell/moz.build
+++ b/js/xpconnect/shell/moz.build
@@ -16,17 +16,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/toolkit/xre',
 ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 # DELAYLOAD_DLLS in this block ensure that the DLL blocklist initializes
 if CONFIG['OS_ARCH'] == 'WINNT':
     RCINCLUDE = 'xpcshell.rc'
 
--- a/js/xpconnect/wrappers/moz.build
+++ b/js/xpconnect/wrappers/moz.build
@@ -17,17 +17,17 @@ UNIFIED_SOURCES += [
 ]
 
 # XrayWrapper needs to be built separately becaue of template instantiations.
 SOURCES += [
     'XrayWrapper.cpp',
 ]
 
 # warning C4661 for FilteringWrapper
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-wd4661', # no suitable definition provided for explicit template instantiation request
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
--- a/layout/base/moz.build
+++ b/layout/base/moz.build
@@ -160,15 +160,15 @@ IPDL_SOURCES += [
 
 FINAL_LIBRARY = 'xul'
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 MARIONETTE_LAYOUT_MANIFESTS += ['tests/marionette/manifest.ini']
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # 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['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/painting/moz.build
+++ b/layout/painting/moz.build
@@ -63,15 +63,15 @@ LOCAL_INCLUDES += [
     '/layout/tables',
     '/layout/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # 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['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -222,21 +222,16 @@ UNIFIED_SOURCES += [
 
 SOURCES += [
     'nsCSSAnonBoxes.cpp',
     'nsCSSPseudoElements.cpp',
     # nsLayoutStylesheetCache.cpp uses nsExceptionHandler.h, which includes
     # windows.h.
     'nsLayoutStylesheetCache.cpp',
 ]
-if CONFIG['CC_TYPE'] == 'msvc':
-    # Needed for gCSSAnonBoxAtoms.
-    SOURCES['nsCSSAnonBoxes.cpp'].flags += ['-Zc:externConstexpr']
-    # Needed for gCSSPseudoElementAtoms.
-    SOURCES['nsCSSPseudoElements.cpp'].flags += ['-Zc:externConstexpr']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../base',
     '../generic',
--- a/media/ffvpx/ffvpxcommon.mozbuild
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -60,45 +60,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang
     else:
         CFLAGS += [
             '-Wno-discarded-qualifiers',
             '-Wno-maybe-uninitialized',
         ]
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         # Force visibility of cpu and av_log symbols.
         CFLAGS += ['-include', 'libavutil_visibility.h']
-elif CONFIG['CC_TYPE'] == 'msvc':
-    CFLAGS += [
-        '-wd4090', # 'return' : different 'const' qualifiers
-        '-wd4018', # '>' : signed/unsigned mismatch
-        '-wd4305', # 'initializing' : truncation from '__int64' to 'double'
-        '-wd4554', # '>>' : check operator precedence for possible error
-        '-wd4307', # '+' : integral constant overflow'
-        '-wd4028', # formal parameter 1 different from declaration
-        '-wd4056', # overflow in floating-point constant arithmetic
-        '-wd4756', # overflow in constant arithmetic
-        '-wd4005', #'WIN32_LEAN_AND_MEAN' : macro redefinition
-        '-wd4054', # 'type cast' : from function pointer 'FARPROC' to data pointer 'void *'
-        '-wd4189', # local variable is initialized but not referenced
-        '-wd4133', # 'function' : incompatible types - from 'AVSampleFormat *' to 'int *'
-        '-wd4221', # nonstandard extension used
-        '-wd4206', # nonstandard extension used
-        '-wd4702', # unreachable code
-        '-wd4101', # unreferenced local variable
-        '-wd4245', # conversion from 'int' to 'uint32_t', signed/unsigned mismatch
-        '-wd4703', # potentially uninitialized local pointer
-        '-wd4293', # '<<' : shift count negative or too big, undefined behavior
-        '-wd4334', # '<<' : result of 32-bit shift implicitly converted to 64 bits
-        '-wd4996', # The compiler encountered a deprecated declaration.
-        # from FFmpeg configure
-        '-wd4244', '-wd4127', '-wd4018', '-wd4389', '-wd4146', '-wd4701',
-        '-wd4057', '-wd4204', '-wd4706', '-wd4305', '-wd4152', '-wd4324',
-        '-we4013', '-wd4100', '-wd4214', '-wd4307', '-wd4273', '-wd4554',
-    ]
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     LOCAL_INCLUDES += ['/media/ffvpx/compat/atomics/win32']
 DEFINES['HAVE_AV_CONFIG_H'] = True
 
 if CONFIG['MOZ_DEBUG']:
     # Enable all assertions in debug builds.
     DEFINES['ASSERT_LEVEL'] = 2
 elif not CONFIG['RELEASE_OR_BETA']:
     # Enable fast assertions in opt builds of Nightly and Aurora.
--- a/media/gmp-clearkey/0.1/moz.build
+++ b/media/gmp-clearkey/0.1/moz.build
@@ -59,25 +59,21 @@ USE_LIBS += ['psshparser']
 
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
     CFLAGS += [
         '-Wno-missing-braces',
         '-Wno-pointer-to-int-cast',
         '-Wno-sign-compare',
     ]
-elif CONFIG['CC_TYPE'] == 'msvc':
-    CFLAGS += [
-        '-wd4090',                  # '=' : different 'const' qualifiers
-    ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += [
         '-include', 'stdio.h',      # for sprintf() prototype
         '-include', 'unistd.h',     # for getpid() prototype
     ]
-elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+elif CONFIG['CC_TYPE'] == 'clang-cl':
     CFLAGS += [
         '-FI', 'stdio.h',           # for sprintf() prototype
     ]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497
--- a/media/libaom/moz.build
+++ b/media/libaom/moz.build
@@ -94,44 +94,35 @@ if CONFIG['OS_TARGET'] == 'Android':
     # the OS they're on, so do it for them.
     DEFINES['__linux__'] = True
 
     if not CONFIG['MOZ_WEBRTC']:
         SOURCES += [
             '%%%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
         ]
 
-if CONFIG['CC_TYPE'] != 'msvc':
-    for f in SOURCES:
-        if f.endswith('sse2.c'):
-            SOURCES[f].flags += CONFIG['SSE2_FLAGS']
-        elif f.endswith('ssse3.c'):
-            SOURCES[f].flags += ['-mssse3']
-        elif f.endswith('sse4.c'):
-            SOURCES[f].flags += ['-msse4.1']
-        elif f.endswith('sse42.c'):
-            SOURCES[f].flags += ['-msse4.2']
-        elif f.endswith('avx.c'):
-            SOURCES[f].flags += ['-mavx']
-        elif f.endswith('avx2.c'):
-            SOURCES[f].flags += ['-mavx2']
-
-if CONFIG['CC_TYPE'] == 'msvc' and CONFIG['INTEL_ARCHITECTURE']:
-    for f in SOURCES:
-        if f.endswith('avx.c'):
-            SOURCES[f].flags += ['-arch:AVX']
-        if f.endswith('avx2.c'):
-            SOURCES[f].flags += ['-arch:AVX2']
+for f in SOURCES:
+    if f.endswith('sse2.c'):
+        SOURCES[f].flags += CONFIG['SSE2_FLAGS']
+    elif f.endswith('ssse3.c'):
+        SOURCES[f].flags += ['-mssse3']
+    elif f.endswith('sse4.c'):
+        SOURCES[f].flags += ['-msse4.1']
+    elif f.endswith('sse42.c'):
+        SOURCES[f].flags += ['-msse4.2']
+    elif f.endswith('avx.c'):
+        SOURCES[f].flags += ['-mavx']
+    elif f.endswith('avx2.c'):
+        SOURCES[f].flags += ['-mavx2']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CFLAGS += [
-        '-Wno-sign-compare',
-        '-Wno-unused-function', # so many of these warnings; just ignore them
-    ]
+CFLAGS += [
+    '-Wno-sign-compare',
+    '-Wno-unused-function', # so many of these warnings; just ignore them
+]
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
     ]
 
 ASFLAGS += CONFIG['VPX_ASFLAGS']
 ASFLAGS += [
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -67,17 +67,17 @@ if CONFIG['OS_TARGET'] == 'WINNT':
         'cubeb_wasapi.cpp',
         'cubeb_winmm.c',
     ]
     DEFINES['USE_WINMM'] = True
     DEFINES['USE_WASAPI'] = True
     OS_LIBS += [
       "avrt",
     ]
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         CXXFLAGS += ['-wd4005'] # C4005: '_USE_MATH_DEFINES' : macro redefinition
 
 if CONFIG['OS_TARGET'] == 'Android':
     SOURCES += ['cubeb_opensl.c']
     SOURCES += ['cubeb_resampler.cpp']
     SOURCES += ['cubeb-jni.cpp']
     DEFINES['USE_OPENSL'] = True
     SOURCES += [
--- a/media/libdav1d/moz.build
+++ b/media/libdav1d/moz.build
@@ -154,21 +154,16 @@ EXPORTS.dav1d += [
 ]
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     RCFILE = 'dav1d.rc'
     SOURCES += [
         '../../third_party/dav1d/src/win32/thread.c'
     ]
 
-if CONFIG['CC_TYPE'] == 'msvc':
-    LOCAL_INCLUDES += ['../../third_party/dav1d/include/compat/msvc/']
-    EXPORTS.dav1d += ['../../third_party/dav1d/include/compat/msvc/stdatomic.h']
-    CFLAGS += ['-wd4028']
-
 if CONFIG['CC_TYPE'] == 'gcc':
     LOCAL_INCLUDES += ['../../third_party/dav1d/include/compat/gcc/']
     EXPORTS.dav1d += ['../../third_party/dav1d/include/compat/gcc/stdatomic.h']
 
 FINAL_LIBRARY = 'gkmedias'
 
 # We allow warnings for third-party code that can be updated from upstream.
 AllowCompilerWarnings()
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -94,26 +94,25 @@ if CONFIG['CPU_ARCH'] in ('x86', 'x86_64
     DEFINES['OPUS_X86_MAY_HAVE_SSE4_1'] = True
     DEFINES['OPUS_X86_MAY_HAVE_AVX'] = True
     SOURCES += celt_sources_sse
     SOURCES += celt_sources_sse2
     SOURCES += celt_sources_sse4_1
     SOURCES += silk_sources_sse4_1
     if not CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
         SOURCES += silk_sources_fixed_sse4_1
-    if CONFIG['CC_TYPE'] != 'msvc':
-        for f in SOURCES:
-            if f in celt_sources_sse:
-                SOURCES[f].flags += CONFIG['SSE_FLAGS']
-            if f in celt_sources_sse2:
-                SOURCES[f].flags += CONFIG['SSE2_FLAGS']
-            if f in celt_sources_sse4_1 or \
-               f in silk_sources_sse4_1 or \
-               f in silk_sources_fixed_sse4_1:
-                SOURCES[f].flags += ['-msse4.1']
+    for f in SOURCES:
+        if f in celt_sources_sse:
+            SOURCES[f].flags += CONFIG['SSE_FLAGS']
+        if f in celt_sources_sse2:
+            SOURCES[f].flags += CONFIG['SSE2_FLAGS']
+        if f in celt_sources_sse4_1 or \
+           f in silk_sources_sse4_1 or \
+           f in silk_sources_fixed_sse4_1:
+            SOURCES[f].flags += ['-msse4.1']
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
     SOURCES += celt_sources_arm
     SOURCES += [
         '!celt_pitch_xcorr_arm-gnu.s'
     ]
     # -Os is significantly slower, enable -O3 unless optimization is disabled
     if CONFIG['MOZ_OPTIMIZE']:
--- a/media/libspeex_resampler/src/moz.build
+++ b/media/libspeex_resampler/src/moz.build
@@ -44,14 +44,8 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
     SOURCES += [
         'resample_neon.c'
     ]
     SOURCES['resample_neon.c'].flags += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CFLAGS += ['-Wno-sign-compare']
-
-if CONFIG['CC_TYPE'] == 'msvc':
-    CFLAGS += [
-        '-wd4018', # '<' : signed/unsigned mismatch
-        '-wd4101', # unreferenced local variable
-    ]
--- a/media/libtheora/moz.build
+++ b/media/libtheora/moz.build
@@ -53,28 +53,25 @@ if CONFIG['INTEL_ARCHITECTURE']:
     if CONFIG['OS_ARCH'] != 'SunOS':
         if CONFIG['CC_TYPE'] == 'clang-cl':
             # clang-cl can't handle libtheora's inline asm.
             pass
         elif CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['CPU_ARCH'] != 'x86_64':
             DEFINES['OC_X86_ASM'] = True
             if CONFIG['CPU_ARCH'] == 'x86_64':
                 DEFINES['OC_X86_64_ASM'] = True
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-        if CONFIG['CC_TYPE'] == 'clang-cl':
-            # clang-cl can't handle libtheora's inline asm.
-            pass
-        elif CONFIG['CPU_ARCH'] == 'x86':
-            SOURCES += [
-                'lib/x86_vc/mmxfrag.c',
-                'lib/x86_vc/mmxidct.c',
-                'lib/x86_vc/mmxstate.c',
-                'lib/x86_vc/x86cpu.c',
-                'lib/x86_vc/x86state.c',
-            ]
+    if CONFIG['CC_TYPE'] == 'clang-cl':
+        # clang-cl can't handle libtheora's inline asm.
+        #SOURCES += [
+        #    'lib/x86_vc/mmxfrag.c',
+        #    'lib/x86_vc/mmxidct.c',
+        #    'lib/x86_vc/mmxstate.c',
+        #    'lib/x86_vc/x86cpu.c',
+        #    'lib/x86_vc/x86state.c',
+        #]
     else:
         SOURCES += [
             'lib/x86/mmxfrag.c',
             'lib/x86/mmxidct.c',
             'lib/x86/mmxstate.c',
             'lib/x86/sse2idct.c',
             'lib/x86/x86cpu.c',
             'lib/x86/x86state.c',
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -104,44 +104,34 @@ if CONFIG['OS_TARGET'] == 'Android':
     # Older versions of the Android NDK don't pre-define anything to indicate
     # the OS they're on, so do it for them.
     DEFINES['__linux__'] = True
 
     SOURCES += [
         '%%%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
     ]
 
-if CONFIG['CC_TYPE'] != 'msvc':
-    for f in SOURCES:
-        if f.endswith('.c'):
-            if 'sse2.c' in f:
-                SOURCES[f].flags += CONFIG['SSE2_FLAGS']
-            if 'ssse3.c' in f:
-                SOURCES[f].flags += ['-mssse3']
-            if 'sse4.c' in f:
-                SOURCES[f].flags += ['-msse4.1']
-            if 'avx.c' in f:
-                SOURCES[f].flags += ['-mavx']
-            if 'avx2.c' in f:
-                SOURCES[f].flags += ['-mavx2']
-
-if CONFIG['CC_TYPE'] == 'msvc' and CONFIG['INTEL_ARCHITECTURE']:
-    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']
+for f in SOURCES:
+    if f.endswith('.c'):
+        if 'sse2.c' in f:
+            SOURCES[f].flags += CONFIG['SSE2_FLAGS']
+        if 'ssse3.c' in f:
+            SOURCES[f].flags += ['-mssse3']
+        if 'sse4.c' in f:
+            SOURCES[f].flags += ['-msse4.1']
+        if 'avx.c' in f:
+            SOURCES[f].flags += ['-mavx']
+        if 'avx2.c' in f:
+            SOURCES[f].flags += ['-mavx2']
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CFLAGS += [
-        '-Wno-sign-compare',
-        '-Wno-unused-function', # so many of these warnings; just ignore them
-    ]
+CFLAGS += [
+    '-Wno-sign-compare',
+    '-Wno-unused-function', # so many of these warnings; just ignore them
+]
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CFLAGS += [
         '-Wno-unreachable-code',
         '-Wno-unneeded-internal-declaration',
     ]
 
 ASFLAGS += CONFIG['VPX_ASFLAGS']
 ASFLAGS += [
--- a/media/libwebp/src/dsp/moz.build
+++ b/media/libwebp/src/dsp/moz.build
@@ -31,17 +31,17 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
         'rescaler_neon.c',
         'upsampling_neon.c',
         'yuv_neon.c',
     ]
     DEFINES['WEBP_HAVE_NEON'] = 1;
     for f in SOURCES:
       if f.endswith('neon.c'):
         SOURCES[f].flags += CONFIG['NEON_FLAGS']
-elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] != 'msvc':
+elif CONFIG['CPU_ARCH'] == 'aarch64':
     SOURCES += [
         'alpha_processing_neon.c',
         'dec_neon.c',
         'filters_neon.c',
         'lossless_neon.c',
         'rescaler_neon.c',
         'upsampling_neon.c',
         'yuv_neon.c',
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -96,25 +96,19 @@ if CONFIG['MOZ_WEBRTC_SIGNALING']:
         'signaling/src/peerconnection',
         'signaling/src/sdp'
     ]
     GYP_DIRS += ['trunk/third_party/gflags']
     GYP_DIRS['trunk/third_party/gflags'].input = 'trunk/third_party/gflags/gflags.gyp'
     GYP_DIRS['trunk/third_party/gflags'].variables = gyp_vars_copy
     GYP_DIRS['trunk/third_party/gflags'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}
 
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-        # Avoid warnings from third-party code that we can not modify.
-        if CONFIG['CC_TYPE'] == 'clang-cl':
-            CXXFLAGS += ['-Wno-invalid-source-encoding']
-        else:
-            CXXFLAGS += [
-                '-validate-charset-',
-                '-wd5038', # C5038 initializer list order warnings
-            ]
+    # Avoid warnings from third-party code that we can not modify.
+    if CONFIG['CC_TYPE'] == 'clang-cl':
+        CXXFLAGS += ['-Wno-invalid-source-encoding']
 
     if CONFIG['ENABLE_TESTS']:
         TEST_DIRS += [
             'signaling/gtest',
             'trunk/gtest',
         ]
 
     # Add libFuzzer configuration directives
--- a/media/webrtc/signaling/gtest/moz.build
+++ b/media/webrtc/signaling/gtest/moz.build
@@ -37,16 +37,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uiki
     # See Bug 1372950, mediapipeline tests seem to cause crashes on Windows
     if CONFIG['OS_TARGET'] != 'WINNT':
         SOURCES += [
             'mediapipeline_unittest.cpp',
         ]
 
     FINAL_LIBRARY = 'xul-gtest'
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # This is intended as a temporary workaround to enable warning free building
     # with VS2015.
     # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
     CXXFLAGS += ['-wd4312']
 
     # Disable warning for decorated name length exceeded, name was truncated
     CXXFLAGS += ['-wd4503']
--- a/media/webrtc/trunk/gtest/moz.build
+++ b/media/webrtc/trunk/gtest/moz.build
@@ -476,15 +476,15 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += [
             '-Wno-inconsistent-missing-override',
             '-Wno-overloaded-virtual',
         ]
         if CONFIG['CC_TYPE'] == 'clang':
             CXXFLAGS += ['-Wno-comma']
 
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         # This is intended as a temporary workaround to enable warning free building
         # with VS2015.
         # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
         CXXFLAGS += ['-wd4312']
 
     GeckoProgram('webrtc-gtest', linkage=None)
--- a/media/webrtc/webrtc.mozbuild
+++ b/media/webrtc/webrtc.mozbuild
@@ -17,13 +17,13 @@ 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['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__'
 
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         CXXFLAGS += ['-Wno-error=shadow']
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -41,17 +41,17 @@ Library('memory')
 if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += [
         '-Wno-tautological-pointer-compare',
     ]
 
 if CONFIG['MOZ_BUILD_APP'] != 'memory':
     FINAL_LIBRARY = 'mozglue'
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)
 
 if CONFIG['MOZ_REPLACE_MALLOC_STATIC']:
     DEFINES['MOZ_REPLACE_MALLOC_STATIC'] = True
 
 DisableStlWrapping()
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -9,17 +9,17 @@ EXPORTS.mozilla += [
     'mozalloc.h',
     'mozalloc_abort.h',
     'mozalloc_oom.h',
 ]
 
 if CONFIG['WRAP_STL_INCLUDES']:
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         EXPORTS.mozilla += ['throw_gcc.h']
-    elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    elif CONFIG['CC_TYPE'] == 'clang-cl':
         DEFINES['_HAS_EXCEPTIONS'] = 0
         SOURCES += [
             'msvc_raise_wrappers.cpp',
         ]
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     # Keep this file separate to avoid #include'ing windows.h everywhere.
     SOURCES += [
--- a/mfbt/tests/moz.build
+++ b/mfbt/tests/moz.build
@@ -76,17 +76,17 @@ if not CONFIG['MOZ_ASAN']:
         'TestPoisonArea',
     ])
 
 # Since we link directly with MFBT object files, define IMPL_MFBT
 DEFINES['IMPL_MFBT'] = True
 
 DisableStlWrapping()
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
   CXXFLAGS += [
     '-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',
 ]
--- a/modules/brotli/moz.build
+++ b/modules/brotli/moz.build
@@ -51,12 +51,12 @@ HOST_SOURCES += [
     'enc/literal_cost.c',
     'enc/memory.c',
     'enc/metablock.c',
     'enc/static_dict.c',
     'enc/utf8_util.c',
     'tools/brotli.c',
 ]
 
-if CONFIG['HOST_CC_TYPE'] not in ('msvc', 'clang-cl'):
+if CONFIG['HOST_CC_TYPE'] != 'clang-cl':
     HOST_OS_LIBS += [
         'm' # for log2() function used by Brotli encoder
     ]
--- a/modules/fdlibm/src/moz.build
+++ b/modules/fdlibm/src/moz.build
@@ -16,17 +16,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
         '-Wno-sign-compare',
     ]
 
 if CONFIG['CC_TYPE'] == 'clang':
     CXXFLAGS += [
         '-Wno-dangling-else',
     ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-wd4018', # signed/unsigned mismatch
         '-wd4146', # unary minus operator applied to unsigned type
         '-wd4305', # truncation from 'double' to 'const float'
         '-wd4723', # potential divide by 0
         '-wd4756', # overflow in constant arithmetic
     ]
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5989,19 +5989,17 @@ pref("dom.events.testing.asyncClipboard"
 #ifdef NIGHTLY_BUILD
 // Disable moz* APIs in DataTransfer
 pref("dom.datatransfer.mozAtAPIs", false);
 #else
 pref("dom.datatransfer.mozAtAPIs", true);
 #endif
 
 // Whether or not Prio is supported on this platform.
-#ifdef MOZ_LIBPRIO
 pref("prio.enabled", false);
-#endif
 
 // External.AddSearchProvider is deprecated and it will be removed in the next
 // cycles.
 pref("dom.sidebar.enabled", true);
 
 #if defined(MOZ_WIDGET_GTK)
 pref("widget.default-hidden-titlebar", true);
 #endif
--- a/moz.configure
+++ b/moz.configure
@@ -175,17 +175,17 @@ def library_name_info_template(host_or_t
         target: c_compiler,
     }[host_or_target]
 
     @depends(host_or_target, compiler, so_version)
     def library_name_info_impl(host_or_target, compiler, so_version):
         if host_or_target.kernel == 'WINNT':
             # There aren't artifacts for mingw builds, so it's OK that the
             # results are inaccurate in that case.
-            if compiler and compiler.type not in ('msvc', 'clang-cl'):
+            if compiler and compiler.type != 'clang-cl':
                 return namespace(
                     dll=namespace(prefix='', suffix='.dll'),
                     lib=namespace(prefix='lib', suffix='a'),
                     import_lib=namespace(prefix='lib', suffix='a'),
                     rust_lib=namespace(prefix='', suffix='lib'),
                     obj=namespace(prefix='', suffix='o'),
                 )
 
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -53,18 +53,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT']:
             'dummy.cpp',
         ]
 
     if CONFIG['OS_TARGET'] == 'WINNT':
         LOCAL_INCLUDES += [
             '/memory/build',
         ]
 
-        if CONFIG['CC_TYPE'] == "msvc":
-            SOURCES += ['WindowsCFGStatus.cpp']
         SOURCES += [
             'Authenticode.cpp',
             'UntrustedDllsHandler.cpp',
             'WindowsDllBlocklist.cpp',
         ]
 
         DisableStlWrapping()
         OS_LIBS += [
--- a/python/mozbuild/mozbuild/action/check_binary.py
+++ b/python/mozbuild/mozbuild/action/check_binary.py
@@ -242,17 +242,17 @@ def check_nsmodules(target, binary):
         for addr, size, sym in symbols:
             print('%x %d %s' % (addr, size, sym))
 
     symbols = sorted(symbols)
     next_addr = None
     # MSVC linker, when doing incremental linking, adds padding when
     # merging sections. Allow there to be more space between the NSModule
     # symbols, as long as they are in the right order.
-    test_msvc = (buildconfig.substs.get('CC_TYPE') in ('msvc', 'clang-cl') and \
+    test_msvc = (buildconfig.substs.get('CC_TYPE') == 'clang-cl' and \
         buildconfig.substs.get('DEVELOPER_OPTIONS'))
     test_clang = (buildconfig.substs.get('CC_TYPE') == 'clang' and \
         buildconfig.substs.get('OS_ARCH') == 'WINNT')
     if test_msvc or test_clang:
         sym_cmp = lambda guessed, actual: guessed <= actual
     else:
         sym_cmp = lambda guessed, actual: guessed == actual
 
deleted file mode 100644
--- a/python/mozbuild/mozbuild/action/cl.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# 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/.
-
-from __future__ import absolute_import
-
-import ctypes
-import os
-import sys
-
-from mozprocess.processhandler import ProcessHandlerMixin
-from mozbuild.makeutil import Makefile
-
-CL_INCLUDES_PREFIX = os.environ.get("CL_INCLUDES_PREFIX", "Note: including file:")
-
-GetShortPathName = ctypes.windll.kernel32.GetShortPathNameW
-GetLongPathName = ctypes.windll.kernel32.GetLongPathNameW
-
-
-# cl.exe likes to print inconsistent paths in the showIncludes output
-# (some lowercased, some not, with different directions of slashes),
-# and we need the original file case for make/pymake to be happy.
-# As this is slow and needs to be called a lot of times, use a cache
-# to speed things up.
-_normcase_cache = {}
-
-def normcase(path):
-    # Get*PathName want paths with backslashes
-    path = path.replace('/', os.sep)
-    dir = os.path.dirname(path)
-    # name is fortunately always going to have the right case,
-    # so we can use a cache for the directory part only.
-    name = os.path.basename(path)
-    if dir in _normcase_cache:
-        result = _normcase_cache[dir]
-    else:
-        path = ctypes.create_unicode_buffer(dir)
-        length = GetShortPathName(path, None, 0)
-        shortpath = ctypes.create_unicode_buffer(length)
-        GetShortPathName(path, shortpath, length)
-        length = GetLongPathName(shortpath, None, 0)
-        if length > len(path):
-            path = ctypes.create_unicode_buffer(length)
-        GetLongPathName(shortpath, path, length)
-        result = _normcase_cache[dir] = path.value
-    return os.path.join(result, name)
-
-
-def InvokeClWithDependencyGeneration(cmdline):
-    target = ""
-    # Figure out what the target is
-    for arg in cmdline:
-        if arg.startswith("-Fo"):
-            target = arg[3:]
-            break
-
-    if target is None:
-        print >>sys.stderr, "No target set"
-        return 1
-
-    # Assume the source file is the last argument
-    source = cmdline[-1]
-    assert not source.startswith('-')
-
-    # The deps target lives here
-    depstarget = os.path.basename(target) + ".pp"
-
-    showincludes = '-showIncludes' in cmdline
-    cmdline += ['-showIncludes']
-
-    mk = Makefile()
-    rule = mk.create_rule([target])
-    rule.add_dependencies([normcase(source)])
-
-    def on_line(line):
-        # cl -showIncludes prefixes every header with "Note: including file:"
-        # and an indentation corresponding to the depth (which we don't need)
-        if line.startswith(CL_INCLUDES_PREFIX):
-            dep = line[len(CL_INCLUDES_PREFIX):].strip()
-            # We can't handle pathes with spaces properly in mddepend.pl, but
-            # we can assume that anything in a path with spaces is a system
-            # header and throw it away.
-            dep = normcase(dep)
-            if ' ' not in dep:
-                rule.add_dependencies([dep])
-            # Hide the line by returning early
-            if not showincludes:
-                return
-        # Make sure we preserve the relevant output from cl. mozprocess
-        # swallows the newline delimiter, so we need to re-add it.
-        sys.stdout.write(line)
-        sys.stdout.write('\n')
-
-    # We need to ignore children because MSVC can fire up a background process
-    # during compilation. This process is cleaned up on its own. If we kill it,
-    # we can run into weird compilation issues.
-    p = ProcessHandlerMixin(cmdline, processOutputLine=[on_line],
-        ignore_children=True)
-    p.run()
-    p.processOutput()
-    ret = p.wait()
-
-    if ret != 0 or target == "":
-        # p.wait() returns a long. Somehow sys.exit(long(0)) is like
-        # sys.exit(1). Don't ask why.
-        return int(ret)
-
-    depsdir = os.path.normpath(os.path.join(os.curdir, ".deps"))
-    depstarget = os.path.join(depsdir, depstarget)
-    if not os.path.isdir(depsdir):
-        try:
-            os.makedirs(depsdir)
-        except OSError:
-            pass # This suppresses the error we get when the dir exists, at the
-                 # cost of masking failure to create the directory.  We'll just
-                 # die on the next line though, so it's not that much of a loss.
-
-    with open(depstarget, "w") as f:
-        mk.dump(f)
-
-    return 0
-
-def main(args):
-    return InvokeClWithDependencyGeneration(args)
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv[1:]))
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -479,22 +479,16 @@ class CompileFlags(BaseCompileFlags):
     def _debug_flags(self):
         if (self._context.config.substs.get('MOZ_DEBUG') or
             self._context.config.substs.get('MOZ_DEBUG_SYMBOLS')):
             return self._context.config.substs.get('MOZ_DEBUG_FLAGS', '').split()
         return []
 
     def _warnings_as_errors(self):
         warnings_as_errors = self._context.config.substs.get('WARNINGS_AS_ERRORS')
-        if self._context.config.substs.get('MOZ_PGO'):
-            # Don't use warnings-as-errors in MSVC PGO builds because it is suspected of
-            # causing problems in that situation. (See bug 437002.)
-            if self._context.config.substs.get('CC_TYPE') == 'msvc':
-                warnings_as_errors = None
-
         if warnings_as_errors:
             return [warnings_as_errors]
 
     def _optimize_flags(self):
         if not self._context.config.substs.get('MOZ_OPTIMIZE'):
             return []
         optimize_flags = None
         if self._context.config.substs.get('MOZ_PGO'):
--- a/python/mozbuild/mozbuild/frontend/gyp_reader.py
+++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py
@@ -238,17 +238,17 @@ def process_gyp_result(gyp_result, gyp_d
                 if ext == '.s':
                     use_defines_in_asflags = True
 
             # The context expects alphabetical order when adding sources
             context['SOURCES'] = alphabetical_sorted(sources)
             context['UNIFIED_SOURCES'] = alphabetical_sorted(unified_sources)
 
             defines = target_conf.get('defines', [])
-            if config.substs['CC_TYPE'] in ('msvc', 'clang-cl') and no_chromium:
+            if config.substs['CC_TYPE'] == 'clang-cl' and no_chromium:
                 msvs_settings = gyp.msvs_emulation.MsvsSettings(spec, {})
                 defines.extend(msvs_settings.GetComputedDefines(c))
             for define in defines:
                 if '=' in define:
                     name, value = define.split('=', 1)
                     # The NSS gyp file doesn't expose a way to override this
                     # currently, so we do so here.
                     if name == 'NSS_ALLOW_SSLKEYLOGFILE' and config.substs.get('RELEASE_OR_BETA', False):
@@ -375,17 +375,17 @@ class GypProcessor(object):
         self._gyp_dir_attrs = gyp_dir_attrs
         self._action_overrides = action_overrides
         self.execution_time = 0.0
         self._results = []
 
         # gyp expects plain str instead of unicode. The frontend code gives us
         # unicode strings, so convert them.
         path = encode(path)
-        if config.substs['CC_TYPE'] in ('msvc', 'clang-cl'):
+        if config.substs['CC_TYPE'] == 'clang-cl':
             # This isn't actually used anywhere in this generator, but it's needed
             # to override the registry detection of VC++ in gyp.
             os.environ['GYP_MSVS_OVERRIDE_PATH'] = 'fake_path'
 
             os.environ['GYP_MSVS_VERSION'] = config.substs['MSVS_VERSION']
 
         params = {
             b'parallel': False,
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -65,18 +65,16 @@ SUPPORTS_CXX14 = {
 @memoize
 def GCC_BASE(version):
     version = Version(version)
     return FakeCompiler({
         '__GNUC__': version.major,
         '__GNUC_MINOR__': version.minor,
         '__GNUC_PATCHLEVEL__': version.patch,
         '__STDC__': 1,
-        '__ORDER_LITTLE_ENDIAN__': 1234,
-        '__ORDER_BIG_ENDIAN__': 4321,
     })
 
 
 @memoize
 def GCC(version):
     return GCC_BASE(version) + SUPPORTS_GNU99
 
 
@@ -97,20 +95,24 @@ GCC_6 = GCC('6.4.0') + DEFAULT_C11
 GXX_6 = GXX('6.4.0') + DEFAULT_CXX_14
 GCC_7 = GCC('7.3.0') + DEFAULT_C11
 GXX_7 = GXX('7.3.0') + DEFAULT_CXX_14
 
 DEFAULT_GCC = GCC_6
 DEFAULT_GXX = GXX_6
 
 GCC_PLATFORM_LITTLE_ENDIAN = {
+    '__ORDER_LITTLE_ENDIAN__': 1234,
+    '__ORDER_BIG_ENDIAN__': 4321,
     '__BYTE_ORDER__': 1234,
 }
 
 GCC_PLATFORM_BIG_ENDIAN = {
+    '__ORDER_LITTLE_ENDIAN__': 1234,
+    '__ORDER_BIG_ENDIAN__': 4321,
     '__BYTE_ORDER__': 4321,
 }
 
 GCC_PLATFORM_X86 = FakeCompiler(GCC_PLATFORM_LITTLE_ENDIAN) + {
     None: {
         '__i386__': 1,
     },
     '-m64': {
@@ -229,24 +231,16 @@ def VS(version):
             '_MSC_VER': '%02d%02d' % (version.major, version.minor),
             '_MSC_FULL_VER': '%02d%02d%05d' % (version.major, version.minor,
                                                version.patch),
         },
         '*.cpp': DEFAULT_CXX_97,
     })
 
 
-VS_2013u2 = VS('18.00.30501')
-VS_2013u3 = VS('18.00.30723')
-VS_2015 = VS('19.00.23026')
-VS_2015u1 = VS('19.00.23506')
-VS_2015u2 = VS('19.00.23918')
-VS_2015u3 = VS('19.00.24213')
-VS_2017u4 = VS('19.11.25547')
-VS_2017u6 = VS('19.13.26128')
 VS_2017u8 = VS('19.15.26726')
 
 VS_PLATFORM_X86 = {
     '_M_IX86': 600,
     '_WIN32': 1,
 }
 
 VS_PLATFORM_X86_64 = {
@@ -260,18 +254,20 @@ VS_PLATFORM_X86_64 = {
 CLANG_CL_3_9 = (CLANG_BASE('3.9.0') + VS('18.00.00000') + DEFAULT_C11 +
                 SUPPORTS_GNU99 + SUPPORTS_GNUXX11 + SUPPORTS_CXX14) + {
     '*.cpp': {
         '__STDC_VERSION__': False,
         '__cplusplus': '201103L',
     },
 }
 
-CLANG_CL_PLATFORM_X86 = FakeCompiler(VS_PLATFORM_X86, GCC_PLATFORM_X86[None])
-CLANG_CL_PLATFORM_X86_64 = FakeCompiler(VS_PLATFORM_X86_64, GCC_PLATFORM_X86_64[None])
+CLANG_CL_PLATFORM_X86 = FakeCompiler(
+    VS_PLATFORM_X86, GCC_PLATFORM_X86[None], GCC_PLATFORM_LITTLE_ENDIAN)
+CLANG_CL_PLATFORM_X86_64 = FakeCompiler(
+    VS_PLATFORM_X86_64, GCC_PLATFORM_X86_64[None], GCC_PLATFORM_LITTLE_ENDIAN)
 
 LIBRARY_NAME_INFOS = {
     'linux-gnu': {
         'DLL_PREFIX': 'lib',
         'DLL_SUFFIX': '.so',
         'LIB_PREFIX': 'lib',
         'LIB_SUFFIX': 'a',
         'IMPORT_LIB_SUFFIX': '',
@@ -380,17 +376,17 @@ class BaseToolchainTest(BaseConfigureTes
                                   (var, self.out.getvalue().strip()))
                 return
 
         # Normalize the target os to match what we have as keys in
         # LIBRARY_NAME_INFOS.
         target_os = getattr(self, 'TARGET', self.HOST).split('-', 2)[2]
         if target_os == 'mingw32':
             compiler_type = sandbox._value_for(sandbox['c_compiler']).type
-            if compiler_type in ('msvc', 'clang-cl'):
+            if compiler_type == 'clang-cl':
                 target_os = 'msvc'
         elif target_os == 'linux-gnuabi64':
             target_os = 'linux-gnu'
 
         self.do_library_name_info_test(target_os, sandbox)
 
         # Try again on artifact builds. In that case, we always get library
         # name info for msvc on Windows
@@ -869,24 +865,16 @@ class OSXToolchainTest(BaseToolchainTest
 
 
 class WindowsToolchainTest(BaseToolchainTest):
     HOST = 'i686-pc-mingw32'
 
     # For the purpose of this test, it doesn't matter that the paths are not
     # real Windows paths.
     PATHS = {
-        '/opt/VS_2013u2/bin/cl': VS_2013u2 + VS_PLATFORM_X86,
-        '/opt/VS_2013u3/bin/cl': VS_2013u3 + VS_PLATFORM_X86,
-        '/opt/VS_2015/bin/cl': VS_2015 + VS_PLATFORM_X86,
-        '/opt/VS_2015u1/bin/cl': VS_2015u1 + VS_PLATFORM_X86,
-        '/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86,
-        '/opt/VS_2015u3/bin/cl': VS_2015u3 + VS_PLATFORM_X86,
-        '/opt/VS_2017u4/bin/cl': VS_2017u4 + VS_PLATFORM_X86,
-        '/opt/VS_2017u6/bin/cl': VS_2017u6 + VS_PLATFORM_X86,
         '/usr/bin/cl': VS_2017u8 + VS_PLATFORM_X86,
         '/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86,
         '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_WIN,
         '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_WIN,
         '/usr/bin/gcc-4.9': GCC_4_9 + GCC_PLATFORM_X86_WIN,
         '/usr/bin/g++-4.9': GXX_4_9 + GCC_PLATFORM_X86_WIN,
         '/usr/bin/gcc-5': GCC_5 + GCC_PLATFORM_X86_WIN,
         '/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_WIN,
@@ -895,42 +883,16 @@ class WindowsToolchainTest(BaseToolchain
         '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang-3.6': CLANG_3_6 + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang++-3.6': CLANGXX_3_6 + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang-3.3': CLANG_3_3 + CLANG_PLATFORM_X86_WIN,
         '/usr/bin/clang++-3.3': CLANGXX_3_3 + CLANG_PLATFORM_X86_WIN,
     }
 
-    VS_FAILURE_MESSAGE = (
-        'This version (%s) of the MSVC compiler is not supported.\nYou must'
-        ' install Visual C++ 2017 Update 8 or later in order to build.\n'
-        'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
-    VS_2013u2_RESULT = VS_FAILURE_MESSAGE % '18.00.30501'
-    VS_2013u3_RESULT = VS_FAILURE_MESSAGE % '18.00.30723'
-    VS_2015_RESULT = VS_FAILURE_MESSAGE % '19.00.23026'
-    VS_2015u1_RESULT = VS_FAILURE_MESSAGE % '19.00.23506'
-    VS_2015u2_RESULT = VS_FAILURE_MESSAGE % '19.00.23918'
-    VS_2015u3_RESULT = VS_FAILURE_MESSAGE % '19.00.24213'
-    VS_2017u4_RESULT = VS_FAILURE_MESSAGE % '19.11.25547'
-    VS_2017u6_RESULT = VS_FAILURE_MESSAGE % '19.13.26128'
-    VS_2017u8_RESULT = CompilerResult(
-        flags=[],
-        version='19.15.26726',
-        type='msvc',
-        compiler='/usr/bin/cl',
-        language='C',
-    )
-    VSXX_2017u8_RESULT = CompilerResult(
-        flags=[],
-        version='19.15.26726',
-        type='msvc',
-        compiler='/usr/bin/cl',
-        language='C++',
-    )
     CLANG_CL_3_9_RESULT = CompilerResult(
         version='3.9.0',
         flags=['-Xclang', '-std=gnu99'],
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C',
     )
     CLANGXX_CL_3_9_RESULT = CompilerResult(
@@ -948,75 +910,21 @@ class WindowsToolchainTest(BaseToolchain
     GXX_4_9_RESULT = LinuxToolchainTest.GXX_4_9_RESULT
     GCC_5_RESULT = LinuxToolchainTest.GCC_5_RESULT
     GXX_5_RESULT = LinuxToolchainTest.GXX_5_RESULT
     GCC_6_RESULT = LinuxToolchainTest.GCC_6_RESULT
     GXX_6_RESULT = LinuxToolchainTest.GXX_6_RESULT
     DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
     DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
 
-    # VS2017u6 or greater is required.
-    def test_msvc(self):
-        # We'll pick msvc if clang-cl can't be found.
-        paths = {
-            k: v for k, v in self.PATHS.iteritems()
-            if os.path.basename(k) != 'clang-cl'
-        }
-        self.do_toolchain_test(paths, {
-            'c_compiler': self.VS_2017u8_RESULT,
-            'cxx_compiler': self.VSXX_2017u8_RESULT,
-        })
-
     def test_unsupported_msvc(self):
         self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2017u6_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2017u6/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2017u4_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2017u4/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2015u3_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2015u3/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2015u2_RESULT,
+            'c_compiler': 'Unknown compiler or compiler not supported.'
         }, environ={
-            'CC': '/opt/VS_2015u2/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2015u1_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2015u1/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2015_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2015/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2013u3_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2013u3/bin/cl',
-        })
-
-        self.do_toolchain_test(self.PATHS, {
-            'c_compiler': self.VS_2013u2_RESULT,
-        }, environ={
-            'CC': '/opt/VS_2013u2/bin/cl',
+            'CC': '/usr/bin/cl',
         })
 
     def test_clang_cl(self):
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': self.CLANG_CL_3_9_RESULT,
             'cxx_compiler': self.CLANGXX_CL_3_9_RESULT,
         })
 
@@ -1055,40 +963,23 @@ class WindowsToolchainTest(BaseToolchain
         self.do_toolchain_test(self.PATHS, {
             'c_compiler': self.CLANG_3_3_RESULT,
             'cxx_compiler': self.CLANGXX_3_3_RESULT,
         }, environ={
             'CC': 'clang-3.3',
             'CXX': 'clang++-3.3',
         })
 
-    def test_cannot_cross(self):
-        paths = {
-            '/usr/bin/cl': VS_2017u8 + VS_PLATFORM_X86_64,
-        }
-        self.do_toolchain_test(paths, {
-            'c_compiler': ('Target C compiler target CPU (x86_64) '
-                           'does not match --target CPU (i686)'),
-        })
-
 
 class Windows64ToolchainTest(WindowsToolchainTest):
     HOST = 'x86_64-pc-mingw32'
 
     # For the purpose of this test, it doesn't matter that the paths are not
     # real Windows paths.
     PATHS = {
-        '/opt/VS_2013u2/bin/cl': VS_2013u2 + VS_PLATFORM_X86_64,
-        '/opt/VS_2013u3/bin/cl': VS_2013u3 + VS_PLATFORM_X86_64,
-        '/opt/VS_2015/bin/cl': VS_2015 + VS_PLATFORM_X86_64,
-        '/opt/VS_2015u1/bin/cl': VS_2015u1 + VS_PLATFORM_X86_64,
-        '/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86_64,
-        '/opt/VS_2015u3/bin/cl': VS_2015u3 + VS_PLATFORM_X86_64,
-        '/opt/VS_2017u4/bin/cl': VS_2017u4 + VS_PLATFORM_X86_64,
-        '/opt/VS_2017u6/bin/cl': VS_2017u6 + VS_PLATFORM_X86_64,
         '/usr/bin/cl': VS_2017u8 + VS_PLATFORM_X86_64,
         '/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86_64,
         '/usr/bin/gcc': DEFAULT_GCC + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/g++': DEFAULT_GXX + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/gcc-4.9': GCC_4_9 + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/g++-4.9': GXX_4_9 + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/gcc-5': GCC_5 + GCC_PLATFORM_X86_64_WIN,
         '/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_64_WIN,
@@ -1099,25 +990,16 @@ class Windows64ToolchainTest(WindowsTool
         '/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang-3.6': CLANG_3_6 + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang++-3.6': CLANGXX_3_6 + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang-3.3': CLANG_3_3 + CLANG_PLATFORM_X86_64_WIN,
         '/usr/bin/clang++-3.3': CLANGXX_3_3 + CLANG_PLATFORM_X86_64_WIN,
     }
 
-    def test_cannot_cross(self):
-        paths = {
-            '/usr/bin/cl': VS_2017u8 + VS_PLATFORM_X86,
-        }
-        self.do_toolchain_test(paths, {
-            'c_compiler': ('Target C compiler target CPU (x86) '
-                           'does not match --target CPU (x86_64)'),
-        })
-
 
 class LinuxCrossCompileToolchainTest(BaseToolchainTest):
     TARGET = 'arm-unknown-linux-gnu'
     PATHS = {
         '/usr/bin/arm-linux-gnu-gcc-4.9': GCC_4_9 + GCC_PLATFORM_ARM_LINUX,
         '/usr/bin/arm-linux-gnu-g++-4.9': GXX_4_9 + GCC_PLATFORM_ARM_LINUX,
         '/usr/bin/arm-linux-gnu-gcc-5': GCC_5 + GCC_PLATFORM_ARM_LINUX,
         '/usr/bin/arm-linux-gnu-g++-5': GXX_5 + GCC_PLATFORM_ARM_LINUX,
@@ -1449,28 +1331,16 @@ class OSXCrossToolchainTest(BaseToolchai
         })
 
 
 class WindowsCrossToolchainTest(BaseToolchainTest):
     TARGET = 'x86_64-pc-mingw32'
     DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
     DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT
 
-    def test_wsl_cross(self):
-        paths = {
-            '/usr/bin/cl': VS_2017u8 + VS_PLATFORM_X86_64,
-        }
-        paths.update(LinuxToolchainTest.PATHS)
-        self.do_toolchain_test(paths, {
-            'c_compiler': WindowsToolchainTest.VS_2017u8_RESULT,
-            'cxx_compiler': WindowsToolchainTest.VSXX_2017u8_RESULT,
-            'host_c_compiler': self.DEFAULT_CLANG_RESULT,
-            'host_cxx_compiler': self.DEFAULT_CLANGXX_RESULT,
-        })
-
     def test_clang_cl_cross(self):
         paths = {
             '/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86_64,
         }
         paths.update(LinuxToolchainTest.PATHS)
         self.do_toolchain_test(paths, {
             'c_compiler': WindowsToolchainTest.CLANG_CL_3_9_RESULT,
             'cxx_compiler': WindowsToolchainTest.CLANGXX_CL_3_9_RESULT,
--- a/security/certverifier/moz.build
+++ b/security/certverifier/moz.build
@@ -40,95 +40,22 @@ TEST_DIRS += [
 ]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     # -Wall on clang-cl maps to -Weverything, which turns on way too
     # much, so we're passing through -Wall using -Xclang.
     CXXFLAGS += ['-Xclang']
 CXXFLAGS += ['-Wall']
 
-if CONFIG['CC_TYPE'] == 'msvc':
-    # -Wall with Visual C++ enables too many problematic warnings
-    CXXFLAGS += [
-        '-wd4324', # structure was padded due to __declspec(align())
-        '-wd4355', # 'this' used in base member initializer list
-        '-wd4464', # relative include path contains '..'
-        '-wd4480', # nonstandard extension used: specifying underlying type for
-                   # enum 'enum'
-        '-wd4481', # nonstandard extension used: override specifier 'keyword'
-        '-wd4510', # default constructor could not be generated
-        '-wd4512', # assignment operator could not be generated
-        '-wd4514', # 'function': unreferenced inline function has been removed
-        '-wd4610', # struct 'symbol' can never be instantiated - user defined
-                   # constructor required
-        '-wd4619', # pragma warning: there is no warning 'warning'
-        '-wd4623', # default constructor could not be generated because a base
-                   # class default constructor is inaccessible or deleted
-        '-wd4625', # copy constructor could not be generated because a base
-                   # class copy constructor is inaccessible or deleted
-        '-wd4626', # assignment operator could not be generated because a base
-                   # class assignment operator is inaccessible or deleted
-        '-wd4628', # digraphs not supported with -Ze (nsThreadUtils.h includes
-                   # what would be the digraph "<:" in the expression
-                   # "mozilla::EnableIf<::detail::...". Since we don't want it
-                   # interpreted as a digraph anyway, we can disable the
-                   # warning.)
-        '-wd4640', # construction of local static object is not thread-safe
-        '-wd4710', # 'function': function not inlined
-        '-wd4711', # function 'function' selected for inline expansion
-        '-wd4820', # 'bytes' bytes padding added after construct 'member_name'
-    ]
-
-    # Disable Spectre diagnostics only if optimization is disabled.
-    # AArch64 MSVC apparently warns about Spectre even if optimization is
-    # enabled, so disable the diagnostic there too.
-    if not CONFIG['MOZ_OPTIMIZE'] or CONFIG['CPU_ARCH'] == 'aarch64':
-        CXXFLAGS += [
-            '-wd5045', # Compiler will insert Spectre mitigation for memory
-                       # load if /Qspectre switch specified
-        ]
+CXXFLAGS += [
+    '-Wextra',
+    '-Wunreachable-code',
+]
 
-    # MSVC 2010's headers trigger these
-    CXXFLAGS += [
-        '-wd4548', # expression before comma has no effect; ...
-        '-wd4668', # 'symbol' is not defined as a preprocessor macro...
-        '-wd4987', # nonstandard extension used
-    ]
-
-    # MSVC 2015 triggers these
-    CXXFLAGS += [
-        '-wd4456', # declaration of 'rv' hides previous local declaration
-        '-wd4458', # declaration of 'input' hides class member
-    ]
-
-    # The following warnings are disabled because MSVC 2017 headers aren't
-    # warning free at the -Wall level.
-    CXXFLAGS += [
-        '-wd4061', # enumerator 'identifier' in switch of enum 'enumeration' is
-                   # not explicitly handled by a case label
-        '-wd4365', # 'action' : conversion from 'type_1' to 'type_2',
-                   # signed/unsigned mismatch
-        '-wd4774', # '<function>' : format string expected in argument
-                   # <position> is not a string literal
-    ]
-
-    # 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['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CXXFLAGS += [
-        '-Wextra',
-        '-Wunreachable-code',
-    ]
-
-    # Gecko headers aren't warning-free enough for us to enable these warnings.
-    CXXFLAGS += [
-        '-Wno-unused-parameter',
-    ]
+# Gecko headers aren't warning-free enough for us to enable these warnings.
+CXXFLAGS += [
+    '-Wno-unused-parameter',
+]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497
--- a/security/ct/moz.build
+++ b/security/ct/moz.build
@@ -38,88 +38,22 @@ if not CONFIG['MOZ_DEBUG']:
     DEFINES['NDEBUG'] = True
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     # -Wall on clang-cl maps to -Weverything, which turns on way too
     # much, so we're passing through -Wall using -Xclang.
     CXXFLAGS += ['-Xclang']
 CXXFLAGS += ['-Wall']
 
-if CONFIG['CC_TYPE'] == 'msvc':
-    # -Wall with Visual C++ enables too many problematic warnings
-    CXXFLAGS += [
-        '-wd4324', # structure was padded due to __declspec(align())
-        '-wd4355', # 'this' used in base member initializer list
-        '-wd4464', # relative include path contains '..'
-        '-wd4480', # nonstandard extension used: specifying underlying type for
-                   # enum 'enum'
-        '-wd4481', # nonstandard extension used: override specifier 'keyword'
-        '-wd4510', # default constructor could not be generated
-        '-wd4512', # assignment operator could not be generated
-        '-wd4514', # 'function': unreferenced inline function has been removed
-        '-wd4610', # struct 'symbol' can never be instantiated - user defined
-                   # constructor required
-        '-wd4619', # pragma warning: there is no warning 'warning'
-        '-wd4623', # default constructor could not be generated because a base
-                   # class default constructor is inaccessible or deleted
-        '-wd4625', # copy constructor could not be generated because a base
-                   # class copy constructor is inaccessible or deleted
-        '-wd4626', # assignment operator could not be generated because a base
-                   # class assignment operator is inaccessible or deleted
-        '-wd4640', # construction of local static object is not thread-safe
-        '-wd4710', # 'function': function not inlined
-        '-wd4711', # function 'function' selected for inline expansion
-        '-wd4820', # 'bytes' bytes padding added after construct 'member_name'
-    ]
-
-    # Disable Spectre diagnostics only if optimization is disabled.
-    if not CONFIG['MOZ_OPTIMIZE']:
-        CXXFLAGS += [
-            '-wd5045', # Compiler will insert Spectre mitigation for memory
-                       # load if /Qspectre switch specified
-        ]
+CXXFLAGS += [
+    '-Wextra',
+    '-Wunreachable-code',
+]
 
-    # MSVC 2010's headers trigger these
-    CXXFLAGS += [
-        '-wd4548', # expression before comma has no effect; ...
-        '-wd4668', # 'symbol' is not defined as a preprocessor macro...
-        '-wd4987', # nonstandard extension used
-    ]
-
-    # MSVC 2015 triggers these
-    CXXFLAGS += [
-        '-wd4456', # declaration of 'rv' hides previous local declaration
-        '-wd4458', # declaration of 'input' hides class member
-    ]
-
-    # The following warnings are disabled because MSVC 2017 headers aren't
-    # warning free at the -Wall level.
-    CXXFLAGS += [
-        '-wd4061', # enumerator 'identifier' in switch of enum 'enumeration' is
-                   # not explicitly handled by a case label
-        '-wd4365', # 'action' : conversion from 'type_1' to 'type_2',
-                   # signed/unsigned mismatch
-        '-wd4774', # '<function>' : format string expected in argument
-                   # <position> is not a string literal
-    ]
-
-    # 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['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CXXFLAGS += [
-        '-Wextra',
-        '-Wunreachable-code',
-    ]
-
-    # Gecko headers aren't warning-free enough for us to enable these warnings.
-    CXXFLAGS += [
-        '-Wno-unused-parameter',
-    ]
+# Gecko headers aren't warning-free enough for us to enable these warnings.
+CXXFLAGS += [
+    '-Wno-unused-parameter',
+]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -164,17 +164,17 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
 
     LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
     LOCAL_INCLUDES += ['/security/sandbox/chromium']
     LOCAL_INCLUDES += ['/nsprpub']
 
     DisableStlWrapping()
 
     # Suppress warnings in third-party code.
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         CXXFLAGS += [
             '-wd4275', # non dll-interface class exception used as base for dll-interface class
             '-wd4717', # recursive on all control paths, function will cause runtime stack overflow
             '-wd4996', # 'GetVersionExW': was declared deprecated
             '-wd4302', # 'reinterpret_cast': truncation from 'LPCSTR' to 'WORD'
             '-wd4311', # 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'
             '-wd4312', # 'reinterpret_cast': conversion from 'DWORD' to 'LPOVERLAPPED' of greater size
         ]
--- a/toolkit/components/jsoncpp/src/lib_json/moz.build
+++ b/toolkit/components/jsoncpp/src/lib_json/moz.build
@@ -16,41 +16,40 @@ LOCAL_INCLUDES += [
 
 # This code is only used in the stand-alone minidump analyzer executable so
 # enabling exceptions should be fine.
 if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-Xclang',
         '-fcxx-exceptions',
     ]
-elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+elif CONFIG['CC_TYPE'] != 'clang-cl':
     CXXFLAGS += [
         '-fexceptions',
     ]
 
 # Required to build with exceptions enabled
 DisableStlWrapping()
 
 Library('jsoncpp')
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-wd4005', # macro redefinition
     ]
 elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += [
         '-Wno-unused-local-typedefs',
         '-Wno-shadow',
     ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
     CXXFLAGS += [
         '-Wno-c++11-narrowing',
     ]
 
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CXXFLAGS += [
-        '-Wno-implicit-fallthrough',
-    ]
+CXXFLAGS += [
+    '-Wno-implicit-fallthrough',
+]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497
--- a/toolkit/components/maintenanceservice/moz.build
+++ b/toolkit/components/maintenanceservice/moz.build
@@ -29,17 +29,17 @@ DEFINES['NS_NO_XPCOM'] = True
 LOCAL_INCLUDES += [
     '/mfbt',
     '/toolkit/mozapps/update/common',
     '/toolkit/xre',
 ]
 
 USE_STATIC_LIBS = True
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 RCINCLUDE = 'maintenanceservice.rc'
 
 DisableStlWrapping()
 
 OS_LIBS += [
     'comctl32',
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -131,17 +131,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
         '-Wno-unused-function',
     ]
     if CONFIG['CC_TYPE'] == 'clang':
         CXXFLAGS += [
             '-Wno-comma',
             '-Wno-null-conversion',
             '-Wno-unused-local-typedef',
         ]
-elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+elif CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-wd4005',  # 'WIN32_LEAN_AND_MEAN' : macro redefinition
         '-wd4018',  # '<' : signed/unsigned mismatch
         '-wd4065',  # switch statement contains 'default' but no 'case' labels
         '-wd4099',  # mismatched class/struct tags
         '-wd4305',  # double to float truncation
         '-wd4506',  # no definition for inline function (protobuf issue #240)
     ]
--- a/toolkit/crashreporter/crashreporter.mozbuild
+++ b/toolkit/crashreporter/crashreporter.mozbuild
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/breakpad-client',
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
 # Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += [
         '-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
@@ -29,14 +29,14 @@ elif CONFIG['CC_TYPE'] in ('clang', 'gcc
         '-Wno-unused-but-set-variable',
     ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
      CXXFLAGS += [
          '-Wno-c++11-narrowing',
      ]
 
-if CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] != 'clang-cl':
      CXXFLAGS += [
          '-Wno-implicit-fallthrough',
      ]
 
 DEFINES['NO_STABS_SUPPORT'] = True
--- a/toolkit/crashreporter/google-breakpad/src/tools/windows/dump_syms/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/tools/windows/dump_syms/moz.build
@@ -14,17 +14,17 @@ HOST_SOURCES += [
     '../../../common/windows/string_utils.cc',
     'dump_syms.cc',
 ]
 
 HOST_CXXFLAGS += [
     '-O2',
 ]
 
-if CONFIG['HOST_CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['HOST_CC_TYPE'] == 'clang-cl':
     HOST_CXXFLAGS += [
         '-EHsc',
         '-MD'
     ]
 
 HOST_OS_LIBS += [
     'dbghelp',
     'diaguids',
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -31,17 +31,17 @@ if CONFIG['OS_TARGET'] == 'WINNT' and CO
             'win64UnwindInfoTests.asm',
         ]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     SOURCES['ExceptionThrower.cpp'].flags += [
         '-Xclang',
         '-fcxx-exceptions',
     ]
-elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
+else:
     SOURCES['ExceptionThrower.cpp'].flags += [
         '-fexceptions',
     ]
 
 GeckoSharedLibrary('testcrasher')
 
 DEFINES['SHARED_LIBRARY'] = '%s%s%s' % (
     CONFIG['DLL_PREFIX'],
@@ -52,10 +52,10 @@ DEFINES['SHARED_LIBRARY'] = '%s%s%s' % (
 TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit += ['CrashTestUtils.jsm']
 TEST_HARNESS_FILES.xpcshell.toolkit.crashreporter.test.unit_ipc += ['CrashTestUtils.jsm']
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')
 
 NO_PGO = True
 
 # Temporary workaround for an issue in upstream breakpad
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     CXXFLAGS += ['-wd4334']
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -80,17 +80,17 @@ def Libxul(name, output_category=None):
     # We're also linking against libresolv to solve bug 1367932.
     if CONFIG['OS_ARCH'] == 'Darwin':
         LDFLAGS += ['-Wl,-U,_OBJC_CLASS_$_NSTouchBar']
         LDFLAGS += ['-Wl,-U,_OBJC_CLASS_$_NSSharingServicePickerTouchBarItem']
         LDFLAGS += ['-Wl,-U,_OBJC_METACLASS_$_NSTouchBar']
         LDFLAGS += ['-Wl,-U,_OBJC_CLASS_$_NSCustomTouchBarItem']
         LDFLAGS += ['-lresolv']
 
-    if CONFIG['MOZ_DEBUG_SYMBOLS'] and CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['MOZ_DEBUG_SYMBOLS'] and CONFIG['CC_TYPE'] == 'clang-cl':
         LDFLAGS += ['-NATVIS:%s/toolkit/library/gecko.natvis' % TOPSRCDIR]
     if CONFIG['RUSTC_NATVIS_LDFLAGS']:
         LDFLAGS += CONFIG['RUSTC_NATVIS_LDFLAGS']
 
 Libxul('xul')
 
 FORCE_STATIC_LIB = True
 
@@ -318,17 +318,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'wintrust',
         'wtsapi32',
         'locationapi',
         'sapi',
         'dxguid',
         'dhcpcsvc',
     ]
 
-    if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+    if CONFIG['CC_TYPE'] == 'clang-cl':
         OS_LIBS += [
             'runtimeobject',
         ]
 
     if CONFIG['ACCESSIBILITY']:
         OS_LIBS += [
             'oleacc',
         ]
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -420,26 +420,19 @@ set_config('MOZ_FFMPEG', ffmpeg)
 set_define('MOZ_FFMPEG', ffmpeg)
 imply_option('--enable-fmp4', ffmpeg, '--enable-ffmpeg')
 
 # AV1 Video Codec Support
 # ==============================================================
 option('--disable-av1',
         help='Disable av1 video support')
 
-@depends('--enable-av1', target, c_compiler)
-def av1(value, target, c_compiler):
-    enabled = bool(value)
-    if value.origin == 'default':
-        if target.os == 'WINNT' and target.cpu == 'x86' and \
-                c_compiler and c_compiler.type == 'msvc':
-            enabled = False
-        else:
-            enabled = True
-    if enabled:
+@depends('--enable-av1')
+def av1(value):
+    if value:
         return True
 
 @depends(target, nasm_version, when=av1 & compile_environment)
 def dav1d_asm(target, nasm_version):
     if target.os == 'GNU' and target.kernel == 'Linux' and target.cpu in ('x86', 'x86_64'):
         if nasm_version < '2.13':
             die('nasm 2.13 or greater is required for AV1 support. '
                 'Either install nasm or add --disable-av1 to your configure options.')
@@ -1136,33 +1129,30 @@ def check_for_midl(target, compile_envir
 midl = check_prog('MIDL', midl_names, when=check_for_midl, allow_missing=True,
                   paths=sdk_bin_path)
 
 
 @depends(c_compiler, target, toolchain_search_path,
          when=depends(midl, target)(lambda m, t: m and t.kernel == 'WINNT'))
 @imports(_from='mozbuild.shellutil', _import='quote')
 def midl_flags(c_compiler, target, toolchain_search_path):
-    if c_compiler and c_compiler.type in ('msvc', 'clang-cl'):
+    if c_compiler and c_compiler.type == 'clang-cl':
         env = {
             'x86': 'win32',
             'x86_64': 'x64',
             'aarch64': 'arm64',
         }[target.cpu]
         flags = ['-env', env]
-        if c_compiler.type == 'msvc':
-            flags += ['-cpp_cmd', c_compiler.compiler]
-        else:
-            # Ideally, we'd use the same flags setup as for msvc, but clang-cl
-            # currently doesn't work as a preprocessor for midl, so we need to
-            # find cl. https://bugs.llvm.org/show_bug.cgi?id=40140
-            cl = find_program('cl', paths=toolchain_search_path)
-            if not cl:
-                die('Could not find Microsoft Visual C/C++ compiler for MIDL')
-            flags += ['-cpp_cmd', cl]
+        # Ideally, we'd use ['-cpp_cmd', c_compiler.compiler], but clang-cl
+        # currently doesn't work as a preprocessor for midl, so we need to
+        # find cl. https://bugs.llvm.org/show_bug.cgi?id=40140
+        cl = find_program('cl', paths=toolchain_search_path)
+        if not cl:
+            die('Could not find Microsoft Visual C/C++ compiler for MIDL')
+        flags += ['-cpp_cmd', cl]
         return flags
 
     # mingw
     return {
         'x86': ['--win32', '-m32'],
         'x86_64': ['--win64', '-m64'],
     }[target.cpu]
 
@@ -1238,28 +1228,16 @@ def launcher(value, target):
     if enabled and target.os != 'WINNT':
         die('Cannot enable launcher process on %s', target.os)
     if enabled:
         return True
 
 set_config('MOZ_LAUNCHER_PROCESS', launcher)
 set_define('MOZ_LAUNCHER_PROCESS', launcher)
 
-# Prio
-# ==============================================================
-@depends(c_compiler)
-def libprio(info):
-    if info:
-      # MSVC is not supported by libprio.
-      if info.type in ('msvc',):
-        return None
-    return True
-
-set_config('MOZ_LIBPRIO', libprio)
-
 # Maintenance service (Windows only)
 # ==============================================================
 
 option('--enable-maintenance-service',
        when=target_is_windows, default=target_is_windows,
        help='{Enable|Disable} building of maintenance service')
 
 set_define('MOZ_MAINTENANCE_SERVICE',
--- a/toolkit/mozapps/update/updater/updater-common.build
+++ b/toolkit/mozapps/update/updater/updater-common.build
@@ -96,17 +96,17 @@ LOCAL_INCLUDES += [
 
 DELAYLOAD_DLLS += [
     'crypt32.dll',
     'comctl32.dll',
     'userenv.dll',
     'wsock32.dll',
 ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 elif CONFIG['OS_ARCH'] == 'WINNT':
     WIN32_EXE_LDFLAGS += ['-municode']
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
     OS_LIBS += CONFIG['TK_LIBS']
 
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -146,17 +146,17 @@ for var in ('MOZ_ENABLE_D3D10_LAYER'):
 RESFILE = 'widget.res'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 OS_LIBS += [
     'rpcrt4',
 ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     SOURCES += [
         'ToastNotification.cpp',
         'ToastNotificationHandler.cpp',
     ]
     # C5038: Suppress initializer list order warnings from wrl.h
     SOURCES['ToastNotification.cpp'].flags += ['-wd5038']
     SOURCES['ToastNotificationHandler.cpp'].flags += ['-wd5038']
     SOURCES['WindowsUIUtils.cpp'].flags += ['-wd5038']
--- a/xpcom/ds/moz.build
+++ b/xpcom/ds/moz.build
@@ -128,22 +128,16 @@ UNIFIED_SOURCES += [
     'nsVariant.cpp',
     'PLDHashTable.cpp',
     'Tokenizer.cpp',
 ]
 
 SOURCES += [
     'nsGkAtoms.cpp',
 ]
-if CONFIG['CC_TYPE'] == 'msvc':
-    # Needed for gGkAtoms.
-    SOURCES['nsGkAtoms.cpp'].flags += [
-        '-constexpr:steps300000',
-        '-Zc:externConstexpr',
-    ]
 
 LOCAL_INCLUDES += [
     '../io',
 ]
 
 GENERATED_FILES += ['nsGkAtomList.h']
 GENERATED_FILES['nsGkAtomList.h'].script = 'StaticAtoms.py:generate_nsgkatomlist_h'
 GENERATED_FILES['nsGkAtomList.h'].inputs = ['Atom.py', 'HTMLAtoms.py']
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -8,17 +8,17 @@ SOURCES += [
     '../FileUtils.cpp',
     'nsXPCOMGlue.cpp',
 ]
 
 Library('xpcomglue')
 
 FORCE_STATIC_LIB = True
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     DEFINES['_USE_ANSI_CPP'] = True
     # Don't include directives about which CRT to use
     CFLAGS += ['-Zl']
     CXXFLAGS += ['-Zl']
 
 DEFINES['XPCOM_GLUE'] = True
 
 LOCAL_INCLUDES += [
--- a/xpcom/io/moz.build
+++ b/xpcom/io/moz.build
@@ -130,19 +130,16 @@ UNIFIED_SOURCES += [
     'SnappyFrameUtils.cpp',
     'SnappyUncompressInputStream.cpp',
     'SpecialSystemDirectory.cpp',
 ]
 
 SOURCES += [
     'nsDirectoryService.cpp',
 ]
-if CONFIG['CC_TYPE'] == 'msvc':
-    # Needed for gDirectoryAtoms.
-    SOURCES['nsDirectoryService.cpp'].flags += ['-Zc:externConstexpr']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += [
         'CocoaFileUtils.mm',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
@@ -151,16 +148,16 @@ FINAL_LIBRARY = 'xul'
 if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
     DEFINES['HAVE_USR_LIB64_DIR'] = True
 
 LOCAL_INCLUDES += [
     '!..',
     '../build',
 ]
 
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
+if CONFIG['CC_TYPE'] == 'clang-cl':
     # This is intended as a temporary hack to support building with VS2015.
     # '_snwprintf' : format string '%s' requires an argument of type 'wchar_t *',
     # but variadic argument 3 has type 'char16ptr_t'
     CXXFLAGS += ['-wd4477']
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     AllowCompilerWarnings()  # workaround for bug 1090497