Commit f2aef849 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1731223 - Move wine detection to toolkit/moz.configure. r=firefox-build-system-reviewers,andi

As of now, wine is used with:
- fxc, which is detected in toolkit/moz.configure
- midl, which is detected in toolkit/moz.configure
- ml64 or armasm64, for some assembly sources that aren't used in
  projects that don't include toolkit/moz.configure.

We can thus move it there.

As of bug 1731195, there is no remaining use of wine for artifact
builds, so we also make it limited to builds with a compile environment.

Differential Revision: https://phabricator.services.mozilla.com/D126166
parent 3af0eaaf
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -408,18 +408,6 @@ def check_prog(*args, **kwargs):
    return check_prog(*args, **kwargs)


@depends(target, host)
def want_wine(target, host):
    return target.kernel == "WINNT" and host.kernel != "WINNT"


wine = check_prog(
    "WINE",
    ["wine64", "wine"],
    allow_missing=True,
    when=want_wine,
    bootstrap="wine/bin",
)
check_prog("WGET", ("wget",), allow_missing=True)


+16 −0
Original line number Diff line number Diff line
@@ -2521,3 +2521,19 @@ def oxidized_breakpad(target):

set_config("MOZ_OXIDIZED_BREAKPAD", True, when=oxidized_breakpad)
set_define("MOZ_OXIDIZED_BREAKPAD", True, when=oxidized_breakpad)


# Wine
# ==============================================================
@depends(target, host, compile_environment)
def want_wine(target, host, compile_environment):
    return compile_environment and target.kernel == "WINNT" and host.kernel != "WINNT"


wine = check_prog(
    "WINE",
    ["wine64", "wine"],
    allow_missing=True,
    when=want_wine,
    bootstrap="wine/bin",
)