Bug 1459993 - remove MSVC 2015 bits from toolchain.configure; r=ted.mielczarek
authorNathan Froyd <froydnj@mozilla.com>
Wed, 09 May 2018 17:26:31 -0400
changeset 417677 ed0bdeaa6fd4284bf48d9b055148ec0fe308cfcc
parent 417676 bb8e6bef734f562d70737964dd93f417f19e8c1c
child 417678 758cb28b70144afa10405624044bec305f101dc2
push id33977
push userncsoregi@mozilla.com
push dateThu, 10 May 2018 16:43:24 +0000
treeherdermozilla-central@17db33b6a124 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1459993
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1459993 - remove MSVC 2015 bits from toolchain.configure; r=ted.mielczarek It's unsupported, so we might as well get rid of the bits for it.
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -490,17 +490,17 @@ def check_compiler(compiler, language, t
 
     # 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:
             append_flag('-std=gnu++14')
-        # MSVC 2015 headers include C++14 features, but don't guard them
+        # MSVC headers include C++14 features, but don't guard them
         # with appropriate checks.
         elif info.type == 'clang-cl' and info.language_version != cxx14_version:
             append_flag('-std=c++14')
 
     # 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,
@@ -556,54 +556,38 @@ def get_vc_paths(topsrcdir):
         encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
         return json.loads(
             subprocess.check_output([
                 os.path.join(topsrcdir, 'build/win32/vswhere.exe'),
                 '-format',
                 'json'
             ] + args).decode(encoding, 'replace'))
 
-    # Can't pass -requires with -legacy, so query each separately.
-    # Legacy versions first (VS2015)
-    for install in vswhere(['-legacy', '-version', '[14.0,15.0)']):
-        version = Version(install['installationVersion'])
-        # Skip anything older than VS2015.
-        if version < '14':
-            continue
-        path = install['installationPath']
-
-        yield (Version(install['installationVersion']), {
-            'x64': [os.path.join(path, r'VC\bin\amd64')],
-            # The x64->x86 cross toolchain requires DLLs from the native x64 toolchain.
-            'x86': [os.path.join(path, r'VC\bin\amd64_x86'), os.path.join(path, r'VC\bin\amd64')],
-        })
-    # Then VS2017 and newer.
     for install in vswhere(['-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64']):
         path = install['installationPath']
         tools_version = open(os.path.join(
             path, r'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'), 'rb').read().strip()
         tools_path = os.path.join(
             path, r'VC\Tools\MSVC', tools_version, r'bin\HostX64')
         yield (Version(install['installationVersion']), {
             'x64': [os.path.join(tools_path, 'x64')],
             # The x64->x86 cross toolchain requires DLLs from the native x64 toolchain.
             'x86': [os.path.join(tools_path, 'x86'), os.path.join(tools_path, 'x64')],
         })
 
 
 js_option('--with-visual-studio-version', nargs=1,
-          choices=('2015', '2017'),
+          choices=('2017',),
           help='Select a specific Visual Studio version to use')
 
 
 @depends('--with-visual-studio-version')
 def vs_major_version(value):
     if value:
-        return {'2015': 14,
-                '2017': 15}[value[0]]
+        return {'2017': 15}[value[0]]
 
 
 @depends(host, target, vs_major_version, check_build_environment, '--with-visual-studio-version')
 @imports(_from='__builtin__', _import='sorted')
 @imports(_from='operator', _import='itemgetter')
 @imports('platform')
 def vc_compiler_path(host, target, vs_major_version, env, vs_release_name):
     if host.kernel != 'WINNT':
@@ -1050,18 +1034,16 @@ building_with_gcc = depends(c_compiler)(
 
 @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.version >= '19.10':
             return '2017'
-        elif info.version >= '19.00':
-            return '2015'
 
     return ''
 
 
 set_config('MSVS_VERSION', msvs_version)
 
 include('compile-checks.configure')