Bug 1439762 - Make configure fail when using clang-cl with a broken SDK. r=froydnj

--HG--
extra : rebase_source : 876e1d1c760a7c3de4f2bcaba9692df5e1bacb8d
This commit is contained in:
David Major 2018-02-21 12:34:13 -05:00
Родитель 67898ab5c2
Коммит 146476c2c3
1 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -171,12 +171,12 @@ def valid_ucrt_sdk_dir_result(value):
return '%s in %s' % (value.version, quote(value.path))
@depends(windows_sdk_dir, 'WINDOWSSDKDIR')
@depends(windows_sdk_dir, 'WINDOWSSDKDIR', c_compiler)
@checking('for Universal CRT SDK', valid_ucrt_sdk_dir_result)
@imports('os')
@imports(_from='__builtin__', _import='sorted')
@imports(_import='mozpack.path', _as='mozpath')
def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env):
def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env, c_compiler):
if windows_sdk_dir_env:
windows_sdk_dir_env = windows_sdk_dir_env[0]
sdks = {}
@ -236,6 +236,15 @@ def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env):
' Studio installer.'
% (version, minimum_ucrt_version))
broken_ucrt_version = Version('10.0.16299.0')
if c_compiler.type == 'clang-cl' and version >= broken_ucrt_version:
raise FatalCheckError('Found SDK version %s but clang-cl builds'
' currently don\'t work with SDK version %s'
' and later. You should use an older SDK,'
' either by uninstalling the broken one or'
' setting a custom WINDOWSSDKDIR.'
% (version, broken_ucrt_version))
return namespace(
path=sdk.path,
include=sdk.include,