Bug 1641291 - Part 1: Allow cross-compiling from host macOS -> Windows target. r=froydnj
☠☠ backed out by 689892f08566 ☠ ☠
authorNick Alexander <nalexander@mozilla.com>
Wed, 03 Jun 2020 18:18:15 +0000
changeset 597837 d830bee40b5c102454c34ec40c626da5011b6873
parent 597836 fe38c82c2dad31f06ed5350fdda4829ce3f4707c
child 597838 0dcf604b880e0c4dcb1c8f2c738e315c0b7c2c73
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1641291
milestone79.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 1641291 - Part 1: Allow cross-compiling from host macOS -> Windows target. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D77117
build/moz.configure/toolchain.configure
moz.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -2122,19 +2122,19 @@ def select_linker(linker, c_compiler, de
     return result
 
 
 set_config('LINKER_KIND', select_linker.KIND)
 
 
 @depends_if(select_linker, macos_sdk)
 def linker_ldflags(linker, macos_sdk):
-    flags = list(linker.LINKER_FLAG or [])
+    flags = list((linker and linker.LINKER_FLAG) or [])
     if macos_sdk:
-        if linker.KIND == 'ld64':
+        if linker and linker.KIND == 'ld64':
             flags.append('-Wl,-syslibroot,%s' % macos_sdk)
         else:
             flags.append('-Wl,--sysroot=%s' % macos_sdk)
 
     return flags
 
 
 add_old_configure_assignment('LINKER_LDFLAGS', linker_ldflags)
--- a/moz.configure
+++ b/moz.configure
@@ -143,17 +143,17 @@ set_define('MOZ_DEBUG_RUST', debug_rust)
 js_option(env='MOZ_PGO', help='Build with profile guided optimizations')
 
 set_config('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
 
 
 wine = check_prog(
     'WINE', ['wine64', 'wine'], allow_missing=True,
     when=depends(target, host)(
-        lambda t, h: t.kernel == 'WINNT' and h.kernel == 'Linux'))
+        lambda t, h: t.kernel == 'WINNT' and h.kernel != 'WINNT'))
 
 
 include('build/moz.configure/toolchain.configure',
         when='--enable-compile-environment')
 
 include('build/moz.configure/pkg.configure')
 # Make this assignment here rather than in pkg.configure to avoid
 # requiring this file in unit tests.