Bug 1483835: Default to clang-cl and lld-link in local Windows builds. r=glandium
☠☠ backed out by 3486c61e2109 ☠ ☠
authorDavid Major <dmajor@mozilla.com>
Tue, 21 Aug 2018 09:34:33 -0400
changeset 480912 1b533762e9cb4faf2b1c2d9fa58418c71dd9729d
parent 480911 ebcdf2f8e40caa2dc71786df08c9316b4578bb32
child 480913 3486c61e21091dfdb5f58b92711b16e4f610af27
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersglandium
bugs1483835
milestone63.0a1
Bug 1483835: Default to clang-cl and lld-link in local Windows builds. r=glandium
build/moz.configure/toolchain.configure
build/moz.configure/windows.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -684,17 +684,17 @@ def default_c_compilers(host_or_target):
             gcc = tuple('%sgcc' % p for p in toolchain_prefix) + gcc
         # Android sets toolchain_prefix and android_clang_compiler, but
         # we want the latter to take precedence, because the latter can
         # point at clang, which is what we want to use.
         if android_clang_compiler and host_or_target is 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:
             return ('clang',) + gcc
         return gcc + ('clang',)
 
     return default_c_compilers
 
--- a/build/moz.configure/windows.configure
+++ b/build/moz.configure/windows.configure
@@ -454,17 +454,18 @@ def valid_mt(path):
     except subprocess.CalledProcessError:
         pass
     raise FatalCheckError('%s is not Microsoft Manifest Tool')
 
 
 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)
 
 
 # Normally, we'd just have CC, etc. set to absolute paths, but the build system
 # doesn't currently handle properly the case where the paths contain spaces.
 # Additionally, there's the issue described in toolchain.configure, in
 # valid_compiler().