Bug 1424281 - Use Visual Studio 2017 15.6.0 for Windows builds. r=froydnj
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 12 Mar 2018 19:24:44 -0400
changeset 766798 87b446c458d34e890ca43f6c181e3681eec0a4ab
parent 766797 1187ae9020bef4e101696883feb3b41ffb8724db
child 766799 a7ab282e1d4a1aa1726017a05e04102c7adc9e33
push id102399
push userbmo:mratcliffe@mozilla.com
push dateTue, 13 Mar 2018 10:12:19 +0000
reviewersfroydnj
bugs1424281
milestone61.0a1
Bug 1424281 - Use Visual Studio 2017 15.6.0 for Windows builds. r=froydnj
browser/config/tooltool-manifests/win32/releng.manifest
browser/config/tooltool-manifests/win64/releng.manifest
build/build-clang/build-clang.py
build/docs/toolchains.rst
build/moz.configure/toolchain.configure
build/win32/mozconfig.vs2017
build/win64/mozconfig.vs2017
build/windows_toolchain.py
js/src/devtools/automation/winbuildenv.sh
python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
--- a/browser/config/tooltool-manifests/win32/releng.manifest
+++ b/browser/config/tooltool-manifests/win32/releng.manifest
@@ -1,21 +1,21 @@
 [
   {
     "size": 266240,
     "digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
     "algorithm": "sha512",
     "filename": "mozmake.exe"
   },
   {
-    "version": "Visual Studio 2017 15.4.2 / SDK 10.0.15063.0",
-    "digest": "18700889e6b5e81613b9cf57ce4e0d46a6ee45bb4c5c33bae2604a5275326128775b8a032a1eb178c5db973746d565340c4e36d98375789e1d5bd836ab16ba58",
-    "size": 303146863,
+    "version": "Visual Studio 2017 15.6.0 / SDK 10.0.15063.0",
+    "digest": "f99285fa6328da3c21839adabe6fc4dd1a792bcb6048a491ba7617a8ce3d0e21f8d18e9de03b65c90ce5bf37073637ba7c1497fb21ce920b6794d2c9819b4f9e",
+    "size": 309779153,
     "algorithm": "sha512",
-    "filename": "vs2017_15.4.2.zip",
+    "filename": "vs2017_15.6.0.zip",
     "unpack": true
   },
   {
     "version": "makecab rev d2bc6797648b7a834782714a55d339d2fd4e58c8",
     "algorithm": "sha512",
     "visibility": "public",
     "filename": "makecab.tar.bz2",
     "unpack": true,
--- a/browser/config/tooltool-manifests/win64/releng.manifest
+++ b/browser/config/tooltool-manifests/win64/releng.manifest
@@ -1,21 +1,21 @@
 [
   {
     "size": 266240,
     "digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
     "algorithm": "sha512",
     "filename": "mozmake.exe"
   },
   {
-    "version": "Visual Studio 2017 15.4.2 / SDK 10.0.15063.0",
-    "digest": "18700889e6b5e81613b9cf57ce4e0d46a6ee45bb4c5c33bae2604a5275326128775b8a032a1eb178c5db973746d565340c4e36d98375789e1d5bd836ab16ba58",
-    "size": 303146863,
+    "version": "Visual Studio 2017 15.6.0 / SDK 10.0.15063.0",
+    "digest": "f99285fa6328da3c21839adabe6fc4dd1a792bcb6048a491ba7617a8ce3d0e21f8d18e9de03b65c90ce5bf37073637ba7c1497fb21ce920b6794d2c9819b4f9e",
+    "size": 309779153,
     "algorithm": "sha512",
-    "filename": "vs2017_15.4.2.zip",
+    "filename": "vs2017_15.6.0.zip",
     "unpack": true
   },
   {
     "version": "makecab rev d2bc6797648b7a834782714a55d339d2fd4e58c8",
     "algorithm": "sha512",
     "visibility": "public",
     "filename": "makecab.tar.bz2",
     "unpack": true,
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -523,17 +523,17 @@ if __name__ == "__main__":
             os.environ['LD_LIBRARY_PATH'] = '%s/lib64/' % gcc_dir
     elif is_windows():
         extra_cflags = []
         extra_cxxflags = []
         # clang-cl would like to figure out what it's supposed to be emulating
         # by looking at an MSVC install, but we don't really have that here.
         # Force things on.
         extra_cflags2 = []
-        extra_cxxflags2 = ['-fms-compatibility-version=19.11.25547', '-Xclang', '-std=c++14']
+        extra_cxxflags2 = ['-fms-compatibility-version=19.13.26128', '-Xclang', '-std=c++14']
         extra_asmflags = []
         extra_ldflags = []
 
     if osx_cross_compile:
         # undo the damage done in the is_linux() block above, and also simulate
         # the is_darwin() block above.
         extra_cflags = []
         extra_cxxflags = ["-stdlib=libc++"]
--- a/build/docs/toolchains.rst
+++ b/build/docs/toolchains.rst
@@ -31,32 +31,32 @@ publicly. However, the same tool can be 
 Configuring Your System
 -----------------------
 
 It is **highly** recommended to perform this process on a fresh installation
 of Windows 7 or 10 (such as in a VM). Installing all updates through
 Windows Update is not only acceptable - it is encouraged. Although it
 shouldn't matter.
 
-Next, install Visual Studio 2015 Community. The download link can be
-found at https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx.
+Next, install Visual Studio 2017 Community. The download link can be found
+at https://www.visualstudio.com/vs/community/.
 Be sure to follow these install instructions:
 
 1. Choose a ``Custom`` installation and click ``Next``
 2. Select ``Programming Languages`` -> ``Visual C++`` (make sure all sub items are
    selected)
 3. Under ``Windows and Web Development`` uncheck everything except
    ``Universal Windows App Development Tools`` and the items under it
    (should be ``Tools (1.3.1)...`` and the ``Windows 10 SDK``).
 
-Once Visual Studio 2015 Community has been installed, from a checkout
+Once Visual Studio 2017 Community has been installed, from a checkout
 of mozilla-central, run something like the following to produce a ZIP
 archive::
 
-   $ ./mach python build/windows_toolchain.py create-zip vs2017_15.4.2
+   $ ./mach python build/windows_toolchain.py create-zip vs2017_15.6.0
 
 The produced archive will be the argument to ``create-zip`` + ``.zip``.
 
 Firefox for Android with Gradle
 ===============================
 
 To build Firefox for Android with Gradle in automation, archives
 containing both the Gradle executable and a Maven repository
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -502,21 +502,22 @@ def check_compiler(compiler, language, t
             append_flag('-std=c++14')
         # GCC 4.9 indicates that it implements draft C++14 features
         # instead of the full language.
         elif info.type == 'gcc' and \
                 info.language_version not in (draft_cxx14_version,
                                               cxx14_version):
             append_flag('-std=gnu++14')
 
-    # We force clang-cl to emulate Visual C++ 2017 version 15.4
-    if info.type == 'clang-cl' and info.version != '19.11.25547':
+    # We force clang-cl to emulate Visual C++ 2017 version 15.6.0
+    msvc_version = '19.13.26128'
+    if info.type == 'clang-cl' and info.version != msvc_version:
         # This flag is a direct clang-cl flag that doesn't need -Xclang,
         # add it directly.
-        flags.append('-fms-compatibility-version=19.11.25547')
+        flags.append('-fms-compatibility-version=%s' % msvc_version)
 
     # Check compiler target
     # --------------------------------------------------------------------
     if not info.cpu or info.cpu != target.cpu:
         if info.type == 'clang':
             append_flag('--target=%s' % target.toolchain)
         elif info.type == 'clang-cl':
             # Ideally this would share the 'clang' branch above, but on Windows
--- a/build/win32/mozconfig.vs2017
+++ b/build/win32/mozconfig.vs2017
@@ -1,11 +1,11 @@
 if [ -z "${VSPATH}" ]; then
     TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
-    VSPATH="$(cd ${TOOLTOOL_DIR} && pwd)/vs2017_15.4.2"
+    VSPATH="$(cd ${TOOLTOOL_DIR} && pwd)/vs2017_15.6.0"
 fi
 
 if [ -d "${VSPATH}" ]; then
     VSWINPATH="$(cd ${VSPATH} && pwd -W)"
 
     export WINDOWSSDKDIR="${VSWINPATH}/SDK"
     export WIN32_REDIST_DIR="${VSPATH}/VC/redist/x86/Microsoft.VC141.CRT"
     export WIN_UCRT_REDIST_DIR="${VSPATH}/SDK/Redist/ucrt/DLLs/x86"
--- a/build/win64/mozconfig.vs2017
+++ b/build/win64/mozconfig.vs2017
@@ -1,11 +1,11 @@
 if [ -z "${VSPATH}" ]; then
     TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
-    VSPATH="$(cd ${TOOLTOOL_DIR} && pwd)/vs2017_15.4.2"
+    VSPATH="$(cd ${TOOLTOOL_DIR} && pwd)/vs2017_15.6.0"
 fi
 
 if [ -d "${VSPATH}" ]; then
     VSWINPATH="$(cd ${VSPATH} && pwd -W)"
 
     export WINDOWSSDKDIR="${VSWINPATH}/SDK"
     export WIN32_REDIST_DIR=${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT
     export WIN_UCRT_REDIST_DIR="${VSPATH}/SDK/Redist/ucrt/DLLs/x64"
--- a/build/windows_toolchain.py
+++ b/build/windows_toolchain.py
@@ -47,17 +47,17 @@ PATTERNS = [
                 'pattern': 'lib/**',
                 'ignore': (
                     'lib/arm/**',
                 ),
             },
         ],
     },
     {
-        'srcdir': '%(vs_path)s/VC/Tools/MSVC/14.11.25503',
+        'srcdir': '%(vs_path)s/VC/Tools/MSVC/14.13.26128',
         'dstdir': 'VC',
         'files': [
             # ATL is needed by Breakpad.
             {
                 'pattern': 'atlmfc/include/**',
             },
             {
                 'pattern': 'atlmfc/lib/x86/atls.*',
@@ -81,17 +81,17 @@ PATTERNS = [
                     'lib/onecore/**',
                     'lib/x64/store/**',
                     'lib/x86/store/**',
                 ),
             },
         ],
     },
     {
-        'srcdir': '%(vs_path)s/VC/Redist/MSVC/14.11.25325',
+        'srcdir': '%(vs_path)s/VC/Redist/MSVC/14.13.26020',
         'dstdir': 'VC/redist',
         'files': [
             {
                 'pattern': 'x64/Microsoft.VC141.CRT/**',
             },
             {
                 'pattern': 'x86/Microsoft.VC141.CRT/**',
             },
--- a/js/src/devtools/automation/winbuildenv.sh
+++ b/js/src/devtools/automation/winbuildenv.sh
@@ -5,17 +5,17 @@ mk_add_options() {
   echo "$@"
 }
 
 topsrcdir="$SOURCE"
 
 # Tooltool installs in parent of topsrcdir for spidermonkey builds.
 # Resolve that path since the mozconfigs assume tooltool installs in
 # topsrcdir.
-export VSPATH="$(cd ${topsrcdir}/.. && pwd)/vs2017_15.4.2"
+export VSPATH="$(cd ${topsrcdir}/.. && pwd)/vs2017_15.6.0"
 
 # When running on a developer machine, several variables will already
 # have the right settings and we will need to keep them since the
 # Windows mozconfigs overwrite them.
 echo "export ORIGINAL_INCLUDE=$INCLUDE"
 echo "export ORIGINAL_LIB=$LIB"
 echo "export ORIGINAL_LIBPATH=$LIBPATH"
 
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -251,17 +251,17 @@ VS_PLATFORM_X86_64 = {
 # Note: In reality, the -std=gnu* options are only supported when preceded by
 # -Xclang.
 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',
     },
-    '-fms-compatibility-version=19.11.25547': VS('19.11.25547')[None],
+    '-fms-compatibility-version=19.13.26128': VS('19.13.26128')[None],
 }
 
 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])
 
 LIBRARY_NAME_INFOS = {
     'linux-gnu': {
         'DLL_PREFIX': 'lib',
@@ -894,26 +894,26 @@ class WindowsToolchainTest(BaseToolchain
         flags=[],
         version='19.00.24213',
         type='msvc',
         compiler='/usr/bin/cl',
         language='C++',
     )
     CLANG_CL_3_9_RESULT = CompilerResult(
         flags=['-Xclang', '-std=gnu99',
-               '-fms-compatibility-version=19.11.25547'],
-        version='19.11.25547',
+               '-fms-compatibility-version=19.13.26128'],
+        version='19.13.26128',
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C',
     )
     CLANGXX_CL_3_9_RESULT = CompilerResult(
         flags=['-Xclang', '-std=c++14',
-               '-fms-compatibility-version=19.11.25547'],
-        version='19.11.25547',
+               '-fms-compatibility-version=19.13.26128'],
+        version='19.13.26128',
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C++',
     )
     CLANG_3_3_RESULT = LinuxToolchainTest.CLANG_3_3_RESULT
     CLANGXX_3_3_RESULT = LinuxToolchainTest.CLANGXX_3_3_RESULT
     CLANG_3_6_RESULT = LinuxToolchainTest.CLANG_3_6_RESULT
     CLANGXX_3_6_RESULT = LinuxToolchainTest.CLANGXX_3_6_RESULT