зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1424281 - Require Visual Studio 2017 15.6.0 and Win SDK 10.0.15063.0 to build on Windows. r=froydnj
--HG-- extra : rebase_source : 0de2c47bb978ae92128fc00390649a327612890f
This commit is contained in:
Родитель
dde54aa578
Коммит
0bd3547b12
|
@ -920,25 +920,15 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
|
||||||
'Only clang/llvm 3.6 or newer is supported.')
|
'Only clang/llvm 3.6 or newer is supported.')
|
||||||
|
|
||||||
if info.type == 'msvc':
|
if info.type == 'msvc':
|
||||||
# 19.00 is VS2015.
|
if info.version < '19.13.26128':
|
||||||
# 19.10+ is VS2017+.
|
|
||||||
if info.version < '19.00.24213':
|
|
||||||
raise FatalCheckError(
|
raise FatalCheckError(
|
||||||
'This version (%s) of the MSVC compiler is not '
|
'This version (%s) of the MSVC compiler is not '
|
||||||
'supported.\n'
|
'supported.\n'
|
||||||
'You must install Visual C++ 2015 Update 3 or newer in '
|
'You must install Visual C++ 2017 Update 6 or newer in '
|
||||||
'order to build.\n'
|
'order to build.\n'
|
||||||
'See https://developer.mozilla.org/en/'
|
'See https://developer.mozilla.org/en/'
|
||||||
'Windows_Build_Prerequisites' % info.version)
|
'Windows_Build_Prerequisites' % info.version)
|
||||||
|
|
||||||
if info.version >= '19.10' and info.version < '19.11.25506':
|
|
||||||
raise FatalCheckError(
|
|
||||||
'This version (%s) of the MSVC compiler is not supported.\n'
|
|
||||||
'You must install Visual C++ 2017 15.3 or newer in order '
|
|
||||||
'to build.\n'
|
|
||||||
'See https://developer.mozilla.org/en/'
|
|
||||||
'Windows_Build_Prerequisites' % info.version)
|
|
||||||
|
|
||||||
if info.flags:
|
if info.flags:
|
||||||
raise FatalCheckError(
|
raise FatalCheckError(
|
||||||
'Unknown compiler or compiler not supported.')
|
'Unknown compiler or compiler not supported.')
|
||||||
|
|
|
@ -228,7 +228,7 @@ def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env, c_compiler):
|
||||||
'Please install it.')
|
'Please install it.')
|
||||||
|
|
||||||
version, sdk = sdks[valid_sdks[0]]
|
version, sdk = sdks[valid_sdks[0]]
|
||||||
minimum_ucrt_version = Version('10.0.14393.0')
|
minimum_ucrt_version = Version('10.0.15063.0')
|
||||||
if version < minimum_ucrt_version:
|
if version < minimum_ucrt_version:
|
||||||
raise FatalCheckError('Latest Universal CRT SDK version found %s'
|
raise FatalCheckError('Latest Universal CRT SDK version found %s'
|
||||||
' and minimum required is %s. This or a later'
|
' and minimum required is %s. This or a later'
|
||||||
|
@ -240,10 +240,10 @@ def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env, c_compiler):
|
||||||
if c_compiler.type == 'clang-cl' and version >= broken_ucrt_version:
|
if c_compiler.type == 'clang-cl' and version >= broken_ucrt_version:
|
||||||
raise FatalCheckError('Found SDK version %s but clang-cl builds'
|
raise FatalCheckError('Found SDK version %s but clang-cl builds'
|
||||||
' currently don\'t work with SDK version %s'
|
' currently don\'t work with SDK version %s'
|
||||||
' and later. You should use an older SDK,'
|
' and later. You should use version %s,'
|
||||||
' either by uninstalling the broken one or'
|
' either by uninstalling the newer one or'
|
||||||
' setting a custom WINDOWSSDKDIR.'
|
' setting a custom WINDOWSSDKDIR.'
|
||||||
% (version, broken_ucrt_version))
|
% (version, broken_ucrt_version, minimum_ucrt_version))
|
||||||
|
|
||||||
return namespace(
|
return namespace(
|
||||||
path=sdk.path,
|
path=sdk.path,
|
||||||
|
|
|
@ -236,6 +236,8 @@ VS_2015 = VS('19.00.23026')
|
||||||
VS_2015u1 = VS('19.00.23506')
|
VS_2015u1 = VS('19.00.23506')
|
||||||
VS_2015u2 = VS('19.00.23918')
|
VS_2015u2 = VS('19.00.23918')
|
||||||
VS_2015u3 = VS('19.00.24213')
|
VS_2015u3 = VS('19.00.24213')
|
||||||
|
VS_2017u4 = VS('19.11.25547')
|
||||||
|
VS_2017u6 = VS('19.13.26128')
|
||||||
|
|
||||||
VS_PLATFORM_X86 = {
|
VS_PLATFORM_X86 = {
|
||||||
'_M_IX86': 600,
|
'_M_IX86': 600,
|
||||||
|
@ -847,7 +849,9 @@ class WindowsToolchainTest(BaseToolchainTest):
|
||||||
'/opt/VS_2015/bin/cl': VS_2015 + 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_2015u1/bin/cl': VS_2015u1 + VS_PLATFORM_X86,
|
||||||
'/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86,
|
'/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86,
|
||||||
'/usr/bin/cl': VS_2015u3 + VS_PLATFORM_X86,
|
'/opt/VS_2015u3/bin/cl': VS_2015u3 + VS_PLATFORM_X86,
|
||||||
|
'/opt/VS_2017u4/bin/cl': VS_2017u4 + VS_PLATFORM_X86,
|
||||||
|
'/usr/bin/cl': VS_2017u6 + VS_PLATFORM_X86,
|
||||||
'/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86,
|
'/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86,
|
||||||
'/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_WIN,
|
'/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_WIN,
|
||||||
'/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_WIN,
|
'/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_WIN,
|
||||||
|
@ -865,34 +869,42 @@ class WindowsToolchainTest(BaseToolchainTest):
|
||||||
|
|
||||||
VS_2013u2_RESULT = (
|
VS_2013u2_RESULT = (
|
||||||
'This version (18.00.30501) of the MSVC compiler is not supported.\n'
|
'This version (18.00.30501) of the MSVC compiler is not supported.\n'
|
||||||
'You must install Visual C++ 2015 Update 3 or newer in order to build.\n'
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
VS_2013u3_RESULT = (
|
VS_2013u3_RESULT = (
|
||||||
'This version (18.00.30723) of the MSVC compiler is not supported.\n'
|
'This version (18.00.30723) of the MSVC compiler is not supported.\n'
|
||||||
'You must install Visual C++ 2015 Update 3 or newer in order to build.\n'
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
VS_2015_RESULT = (
|
VS_2015_RESULT = (
|
||||||
'This version (19.00.23026) of the MSVC compiler is not supported.\n'
|
'This version (19.00.23026) of the MSVC compiler is not supported.\n'
|
||||||
'You must install Visual C++ 2015 Update 3 or newer in order to build.\n'
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
VS_2015u1_RESULT = (
|
VS_2015u1_RESULT = (
|
||||||
'This version (19.00.23506) of the MSVC compiler is not supported.\n'
|
'This version (19.00.23506) of the MSVC compiler is not supported.\n'
|
||||||
'You must install Visual C++ 2015 Update 3 or newer in order to build.\n'
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
VS_2015u2_RESULT = (
|
VS_2015u2_RESULT = (
|
||||||
'This version (19.00.23918) of the MSVC compiler is not supported.\n'
|
'This version (19.00.23918) of the MSVC compiler is not supported.\n'
|
||||||
'You must install Visual C++ 2015 Update 3 or newer in order to build.\n'
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
VS_2015u3_RESULT = CompilerResult(
|
VS_2015u3_RESULT = (
|
||||||
|
'This version (19.00.24213) of the MSVC compiler is not supported.\n'
|
||||||
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
|
VS_2017u4_RESULT = (
|
||||||
|
'This version (19.11.25547) of the MSVC compiler is not supported.\n'
|
||||||
|
'You must install Visual C++ 2017 Update 6 or newer in order to build.\n'
|
||||||
|
'See https://developer.mozilla.org/en/Windows_Build_Prerequisites')
|
||||||
|
VS_2017u6_RESULT = CompilerResult(
|
||||||
flags=[],
|
flags=[],
|
||||||
version='19.00.24213',
|
version='19.13.26128',
|
||||||
type='msvc',
|
type='msvc',
|
||||||
compiler='/usr/bin/cl',
|
compiler='/usr/bin/cl',
|
||||||
language='C',
|
language='C',
|
||||||
)
|
)
|
||||||
VSXX_2015u3_RESULT = CompilerResult(
|
VSXX_2017u6_RESULT = CompilerResult(
|
||||||
flags=[],
|
flags=[],
|
||||||
version='19.00.24213',
|
version='19.13.26128',
|
||||||
type='msvc',
|
type='msvc',
|
||||||
compiler='/usr/bin/cl',
|
compiler='/usr/bin/cl',
|
||||||
language='C++',
|
language='C++',
|
||||||
|
@ -935,14 +947,26 @@ class WindowsToolchainTest(BaseToolchainTest):
|
||||||
language='C++',
|
language='C++',
|
||||||
)
|
)
|
||||||
|
|
||||||
# VS2015u3 or greater is required.
|
# VS2017u6 or greater is required.
|
||||||
def test_msvc(self):
|
def test_msvc(self):
|
||||||
self.do_toolchain_test(self.PATHS, {
|
self.do_toolchain_test(self.PATHS, {
|
||||||
'c_compiler': self.VS_2015u3_RESULT,
|
'c_compiler': self.VS_2017u6_RESULT,
|
||||||
'cxx_compiler': self.VSXX_2015u3_RESULT,
|
'cxx_compiler': self.VSXX_2017u6_RESULT,
|
||||||
})
|
})
|
||||||
|
|
||||||
def test_unsupported_msvc(self):
|
def test_unsupported_msvc(self):
|
||||||
|
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, {
|
self.do_toolchain_test(self.PATHS, {
|
||||||
'c_compiler': self.VS_2015u2_RESULT,
|
'c_compiler': self.VS_2015u2_RESULT,
|
||||||
}, environ={
|
}, environ={
|
||||||
|
@ -1026,7 +1050,7 @@ class WindowsToolchainTest(BaseToolchainTest):
|
||||||
|
|
||||||
def test_cannot_cross(self):
|
def test_cannot_cross(self):
|
||||||
paths = {
|
paths = {
|
||||||
'/usr/bin/cl': VS_2015u3 + VS_PLATFORM_X86_64,
|
'/usr/bin/cl': VS_2017u6 + VS_PLATFORM_X86_64,
|
||||||
}
|
}
|
||||||
self.do_toolchain_test(paths, {
|
self.do_toolchain_test(paths, {
|
||||||
'c_compiler': ('Target C compiler target CPU (x86_64) '
|
'c_compiler': ('Target C compiler target CPU (x86_64) '
|
||||||
|
@ -1045,7 +1069,9 @@ class Windows64ToolchainTest(WindowsToolchainTest):
|
||||||
'/opt/VS_2015/bin/cl': VS_2015 + 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_2015u1/bin/cl': VS_2015u1 + VS_PLATFORM_X86_64,
|
||||||
'/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86_64,
|
'/opt/VS_2015u2/bin/cl': VS_2015u2 + VS_PLATFORM_X86_64,
|
||||||
'/usr/bin/cl': VS_2015u3 + 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,
|
||||||
|
'/usr/bin/cl': VS_2017u6 + VS_PLATFORM_X86_64,
|
||||||
'/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86_64,
|
'/usr/bin/clang-cl': CLANG_CL_3_9 + CLANG_CL_PLATFORM_X86_64,
|
||||||
'/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_64_WIN,
|
'/usr/bin/gcc': GCC_4_9 + GCC_PLATFORM_X86_64_WIN,
|
||||||
'/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_64_WIN,
|
'/usr/bin/g++': GXX_4_9 + GCC_PLATFORM_X86_64_WIN,
|
||||||
|
@ -1063,7 +1089,7 @@ class Windows64ToolchainTest(WindowsToolchainTest):
|
||||||
|
|
||||||
def test_cannot_cross(self):
|
def test_cannot_cross(self):
|
||||||
paths = {
|
paths = {
|
||||||
'/usr/bin/cl': VS_2015u3 + VS_PLATFORM_X86,
|
'/usr/bin/cl': VS_2017u6 + VS_PLATFORM_X86,
|
||||||
}
|
}
|
||||||
self.do_toolchain_test(paths, {
|
self.do_toolchain_test(paths, {
|
||||||
'c_compiler': ('Target C compiler target CPU (x86) '
|
'c_compiler': ('Target C compiler target CPU (x86) '
|
||||||
|
|
Загрузка…
Ссылка в новой задаче