Bug 1483835: Default to clang-cl and lld-link in local Windows builds. r=glandium

This commit is contained in:
David Major 2018-08-21 11:30:16 -04:00
parent 612c73ef66
commit e57877cd63
3 changed files with 10 additions and 9 deletions

View File

@ -689,7 +689,7 @@ def default_c_compilers(host_or_target):
return (android_clang_compiler,) + gcc
if host_or_target.kernel == 'WINNT':
return ('cl', 'clang-cl') + gcc + ('clang',)
return ('clang-cl', 'cl') + gcc + ('clang',)
if host_or_target.kernel == 'Darwin':
return ('clang',)
if developer_options:

View File

@ -459,7 +459,8 @@ def valid_mt(path):
set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
link = check_prog('LINKER', ('link.exe',), paths=toolchain_search_path)
link = check_prog('LINKER', ('lld-link.exe', 'link.exe'),
paths=toolchain_search_path)
add_old_configure_assignment('LINKER', link)

View File

@ -967,7 +967,12 @@ class WindowsToolchainTest(BaseToolchainTest):
# VS2017u6 or greater is required.
def test_msvc(self):
self.do_toolchain_test(self.PATHS, {
# 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_2017u6_RESULT,
'cxx_compiler': self.VSXX_2017u6_RESULT,
})
@ -1016,12 +1021,7 @@ class WindowsToolchainTest(BaseToolchainTest):
})
def test_clang_cl(self):
# We'll pick clang-cl if msvc can't be found.
paths = {
k: v for k, v in self.PATHS.iteritems()
if os.path.basename(k) != 'cl'
}
self.do_toolchain_test(paths, {
self.do_toolchain_test(self.PATHS, {
'c_compiler': self.CLANG_CL_3_9_RESULT,
'cxx_compiler': self.CLANGXX_CL_3_9_RESULT,
})