forked from mirrors/gecko-dev
Backed out changeset 78c755371e44 (bug 1776255) for causing artifact build bustages related to Necko WiFi scanning. CLOSED TREE
This commit is contained in:
parent
f414b9f966
commit
b341993f71
9 changed files with 43 additions and 150 deletions
|
|
@ -19,19 +19,10 @@ def enable_nspr_build(enable):
|
|||
return enable
|
||||
|
||||
|
||||
system_lib_option(
|
||||
"--with-system-nspr",
|
||||
help="Use system NSPR",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
system_lib_option("--with-system-nspr", help="Use system NSPR")
|
||||
|
||||
|
||||
@depends("--with-system-nspr", when=use_pkg_config)
|
||||
def with_system_nspr_option(with_system_nspr):
|
||||
return with_system_nspr
|
||||
|
||||
|
||||
@depends(enable_nspr_build, with_system_nspr_option, js_standalone)
|
||||
@depends(enable_nspr_build, "--with-system-nspr", js_standalone)
|
||||
def build_nspr(nspr_build, system_nspr, js_standalone):
|
||||
if nspr_build is not None and nspr_build.origin != "default":
|
||||
if nspr_build and system_nspr:
|
||||
|
|
@ -45,7 +36,7 @@ set_config("MOZ_BUILD_NSPR", True, when=build_nspr)
|
|||
set_config("MOZ_SYSTEM_NSPR", True, when="--with-system-nspr")
|
||||
|
||||
|
||||
@depends(build_nspr, with_system_nspr_option, js_standalone)
|
||||
@depends(build_nspr, "--with-system-nspr", js_standalone)
|
||||
def js_without_nspr(build_nspr, system_nspr, js_standalone):
|
||||
if js_standalone:
|
||||
return not build_nspr and not system_nspr
|
||||
|
|
@ -83,7 +74,7 @@ def nspr_pkg(nspr_pkg):
|
|||
)
|
||||
|
||||
|
||||
@depends(with_system_nspr_option, nspr_minver)
|
||||
@depends("--with-system-nspr", nspr_minver)
|
||||
def pkgconf_requires_private(system_nspr, nspr_minver):
|
||||
if not system_nspr:
|
||||
return ""
|
||||
|
|
|
|||
|
|
@ -4,11 +4,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
system_lib_option(
|
||||
"--with-system-nss",
|
||||
help="Use system NSS",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
system_lib_option("--with-system-nss", help="Use system NSS")
|
||||
|
||||
imply_option("--with-system-nspr", True, when="--with-system-nss")
|
||||
|
||||
|
|
|
|||
|
|
@ -10,17 +10,13 @@ def pkg_config(prefixes):
|
|||
return tuple("{}pkg-config".format(p) for p in (prefixes or ()) + ("",))
|
||||
|
||||
|
||||
@depends(compile_environment, target)
|
||||
def use_pkg_config(compile_environment, target):
|
||||
return compile_environment and target.os not in ("WINNT", "OSX", "Android")
|
||||
|
||||
|
||||
pkg_config = check_prog(
|
||||
"PKG_CONFIG",
|
||||
pkg_config,
|
||||
bootstrap=depends(when=target_sysroot.bootstrapped)(lambda: "pkgconf"),
|
||||
allow_missing=True,
|
||||
when=use_pkg_config,
|
||||
when=compile_environment
|
||||
& depends(target.os)(lambda os: os not in ("WINNT", "OSX", "iOS", "Android")),
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -107,12 +103,7 @@ set_config("PKG_CONFIG_LIBDIR", pkg_config_vars.PKG_CONFIG_LIBDIR)
|
|||
# Returns `True` when the package description is fulfilled.
|
||||
@template
|
||||
def pkg_check_modules(
|
||||
var,
|
||||
package_desc,
|
||||
when=always,
|
||||
allow_missing=False,
|
||||
config=True,
|
||||
cflags_only=False,
|
||||
var, package_desc, when=always, allow_missing=False, config=True, cflags_only=False
|
||||
):
|
||||
@depends(dependable(package_desc), when=when)
|
||||
def package_desc(desc):
|
||||
|
|
@ -127,11 +118,11 @@ def pkg_check_modules(
|
|||
|
||||
allow_missing = dependable(allow_missing)
|
||||
|
||||
@depends(when, when=use_pkg_config)
|
||||
def when_and_use_pkg_config(when):
|
||||
return when
|
||||
@depends(when, "--enable-compile-environment")
|
||||
def when_and_compile_environment(when, compile_environment):
|
||||
return when and compile_environment
|
||||
|
||||
@depends(pkg_config, pkg_config_version, when=when_and_use_pkg_config)
|
||||
@depends(pkg_config, pkg_config_version, when=when_and_compile_environment)
|
||||
def check_pkg_config(pkg_config, version):
|
||||
min_version = "0.9.0"
|
||||
if pkg_config is None:
|
||||
|
|
@ -151,7 +142,7 @@ def pkg_check_modules(
|
|||
pkg_config_env,
|
||||
package_desc,
|
||||
allow_missing,
|
||||
when=when_and_use_pkg_config,
|
||||
when=when_and_compile_environment,
|
||||
)
|
||||
@imports("sys")
|
||||
@imports(_from="mozbuild.configure.util", _import="LineIO")
|
||||
|
|
|
|||
|
|
@ -1208,11 +1208,7 @@ target_sysroot = sysroot(target)
|
|||
def system_lib_option(name, *args, **kwargs):
|
||||
option(name, *args, **kwargs)
|
||||
|
||||
@depends(
|
||||
name,
|
||||
target_sysroot.bootstrapped,
|
||||
when=kwargs.get("when"),
|
||||
)
|
||||
@depends(name, target_sysroot.bootstrapped)
|
||||
def no_system_lib_in_sysroot(value, bootstrapped):
|
||||
if bootstrapped and value:
|
||||
die(
|
||||
|
|
|
|||
|
|
@ -15,12 +15,10 @@ def force_system_ffi(target):
|
|||
imply_option("--with-system-ffi", force_system_ffi, "target")
|
||||
|
||||
system_lib_option(
|
||||
"--with-system-ffi",
|
||||
help="Use system libffi (located with pkgconfig)",
|
||||
when=use_pkg_config,
|
||||
"--with-system-ffi", help="Use system libffi (located with pkgconfig)"
|
||||
)
|
||||
|
||||
use_system_ffi = depends_if("--with-system-ffi", when=use_pkg_config)(lambda _: True)
|
||||
use_system_ffi = depends_if("--with-system-ffi")(lambda _: True)
|
||||
|
||||
system_ffi = pkg_check_modules("MOZ_FFI", "libffi > 3.0.9", when=use_system_ffi)
|
||||
|
||||
|
|
|
|||
|
|
@ -1281,22 +1281,12 @@ set_define(
|
|||
|
||||
# ECMAScript Internationalization API Support (uses ICU)
|
||||
# ======================================================
|
||||
system_lib_option(
|
||||
"--with-system-icu",
|
||||
help="Use system ICU",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
|
||||
|
||||
@depends("--with-system-icu", when=use_pkg_config)
|
||||
def enable_system_icu_option(enable_system_icu):
|
||||
return enable_system_icu
|
||||
|
||||
system_lib_option("--with-system-icu", help="Use system ICU")
|
||||
|
||||
system_icu = pkg_check_modules("MOZ_ICU", "icu-i18n >= 73.1", when="--with-system-icu")
|
||||
|
||||
|
||||
@depends(enable_system_icu_option)
|
||||
@depends("--with-system-icu")
|
||||
def in_tree_icu(system_icu):
|
||||
return not system_icu
|
||||
|
||||
|
|
|
|||
|
|
@ -213,8 +213,6 @@ include("build/moz.configure/bootstrap.configure")
|
|||
# check_prog to use bootstrap_search_path directly because check_prog
|
||||
# comes first, so we use a trick to allow it. Uses of check_prog
|
||||
# happening before here won't allow bootstrap.
|
||||
|
||||
|
||||
@template
|
||||
def check_prog(*args, **kwargs):
|
||||
kwargs["bootstrap_search_path"] = bootstrap_search_path
|
||||
|
|
@ -920,18 +918,12 @@ option(
|
|||
nargs="?",
|
||||
default=system_zlib_default,
|
||||
help="{Use|Do not use} system libz",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
|
||||
|
||||
@depends("--with-system-zlib", when=use_pkg_config)
|
||||
def with_system_zlib_option(with_system_zlib):
|
||||
return with_system_zlib
|
||||
|
||||
|
||||
@depends(with_system_zlib_option)
|
||||
@depends("--with-system-zlib")
|
||||
def deprecated_system_zlib_path(value):
|
||||
if value and len(value) == 1:
|
||||
if len(value) == 1:
|
||||
die(
|
||||
"--with-system-zlib=PATH is not supported anymore. Please use "
|
||||
"--with-system-zlib and set any necessary pkg-config environment variable."
|
||||
|
|
@ -943,7 +935,7 @@ pkg_check_modules("MOZ_ZLIB", "zlib >= 1.2.3", when="--with-system-zlib")
|
|||
set_config("MOZ_SYSTEM_ZLIB", True, when="--with-system-zlib")
|
||||
|
||||
|
||||
@depends(with_system_zlib_option, js_shared, moz_linker, target.os)
|
||||
@depends("--with-system-zlib", js_shared, moz_linker, target.os)
|
||||
def zlib_in_mozglue(system_zlib, js_shared, linker, os):
|
||||
if not system_zlib and (js_shared or linker or os == "Android"):
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@ class TestChecksConfigure(unittest.TestCase):
|
|||
toolchain_prefix = depends(when=True)(lambda: None)
|
||||
target_multiarch_dir = depends(when=True)(lambda: None)
|
||||
target_sysroot = depends(when=True)(lambda: %(sysroot)s)
|
||||
target = depends(when=True)(lambda: namespace(os="unknown"))
|
||||
target = depends(when=True)(lambda: None)
|
||||
include('%(topsrcdir)s/build/moz.configure/util.configure')
|
||||
include('%(topsrcdir)s/build/moz.configure/checks.configure')
|
||||
# Skip bootstrapping.
|
||||
|
|
|
|||
|
|
@ -329,30 +329,19 @@ def imply_wasapi(values, target):
|
|||
|
||||
set_config("MOZ_AAUDIO", imply_aaudio, when="--enable-audio-backends")
|
||||
|
||||
imply_option(
|
||||
"--enable-alsa", imply_alsa, reason="--enable-audio-backends", when=use_pkg_config
|
||||
)
|
||||
imply_option("--enable-alsa", imply_alsa, reason="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_AUDIOUNIT_RUST", imply_audiounit, when="--enable-audio-backends")
|
||||
|
||||
imply_option(
|
||||
"--enable-jack", imply_jack, reason="--enable-audio-backends", when=use_pkg_config
|
||||
)
|
||||
imply_option("--enable-jack", imply_jack, reason="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_OPENSL", imply_opensl, when="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_OSS", imply_oss, when="--enable-audio-backends")
|
||||
|
||||
imply_option(
|
||||
"--enable-pulseaudio",
|
||||
imply_pulseaudio,
|
||||
reason="--enable-audio-backends",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
imply_option("--enable-pulseaudio", imply_pulseaudio, reason="--enable-audio-backends")
|
||||
|
||||
imply_option(
|
||||
"--enable-sndio", imply_sndio, reason="--enable-audio-backends", when=use_pkg_config
|
||||
)
|
||||
imply_option("--enable-sndio", imply_sndio, reason="--enable-audio-backends")
|
||||
|
||||
set_config("MOZ_SUNAUDIO", imply_sunaudio, when="--enable-audio-backends")
|
||||
|
||||
|
|
@ -360,20 +349,10 @@ set_config("MOZ_WASAPI", imply_wasapi, when="--enable-audio-backends")
|
|||
|
||||
# ALSA cubeb backend
|
||||
# ==============================================================
|
||||
option(
|
||||
"--enable-alsa",
|
||||
env="MOZ_ALSA",
|
||||
help="Enable ALSA audio backend.",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
option("--enable-alsa", env="MOZ_ALSA", help="Enable ALSA audio backend.")
|
||||
|
||||
|
||||
@depends("--enable-alsa", when=use_pkg_config)
|
||||
def enable_alsa_option(enable_alsa):
|
||||
return enable_alsa
|
||||
|
||||
|
||||
@depends(enable_alsa_option, midir_linux_support)
|
||||
@depends("--enable-alsa", midir_linux_support)
|
||||
def enable_alsa_or_midir_linux_support(alsa_enabled, midir_linux_support):
|
||||
return alsa_enabled or midir_linux_support
|
||||
|
||||
|
|
@ -385,12 +364,7 @@ set_define("MOZ_ALSA", True, when="--enable-alsa")
|
|||
|
||||
# JACK cubeb backend
|
||||
# ==============================================================
|
||||
system_lib_option(
|
||||
"--enable-jack",
|
||||
env="MOZ_JACK",
|
||||
help="Enable JACK audio backend.",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
system_lib_option("--enable-jack", env="MOZ_JACK", help="Enable JACK audio backend.")
|
||||
|
||||
jack = pkg_check_modules("MOZ_JACK", "jack", when="--enable-jack")
|
||||
|
||||
|
|
@ -402,7 +376,6 @@ option(
|
|||
"--enable-pulseaudio",
|
||||
env="MOZ_PULSEAUDIO",
|
||||
help="{Enable|Disable} PulseAudio audio backend.",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
|
||||
pulseaudio = pkg_check_modules("MOZ_PULSEAUDIO", "libpulse", when="--enable-pulseaudio")
|
||||
|
|
@ -412,12 +385,7 @@ set_define("MOZ_PULSEAUDIO", depends_if(pulseaudio)(lambda _: True))
|
|||
|
||||
# sndio cubeb backend
|
||||
# ==============================================================
|
||||
system_lib_option(
|
||||
"--enable-sndio",
|
||||
env="MOZ_SNDIO",
|
||||
help="Enable sndio audio backend.",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
system_lib_option("--enable-sndio", env="MOZ_SNDIO", help="Enable sndio audio backend.")
|
||||
|
||||
sndio = pkg_check_modules("MOZ_SNDIO", "sndio", when="--enable-sndio")
|
||||
|
||||
|
|
@ -1060,15 +1028,10 @@ set_define("MOZ_TELEMETRY_ON_BY_DEFAULT", True, when=telemetry_on_by_default)
|
|||
|
||||
# gpsd support
|
||||
# ==============================================================
|
||||
system_lib_option(
|
||||
"--enable-gpsd",
|
||||
env="MOZ_GPSD",
|
||||
help="Enable gpsd support",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
system_lib_option("--enable-gpsd", env="MOZ_GPSD", help="Enable gpsd support")
|
||||
|
||||
|
||||
@depends("--enable-gpsd", when=use_pkg_config)
|
||||
@depends("--enable-gpsd")
|
||||
def gpsd(value):
|
||||
return bool(value)
|
||||
|
||||
|
|
@ -1227,9 +1190,7 @@ set_config(
|
|||
)
|
||||
|
||||
system_lib_option(
|
||||
"--with-system-webp",
|
||||
help="Use system libwebp (located with pkgconfig)",
|
||||
when=use_pkg_config,
|
||||
"--with-system-webp", help="Use system libwebp (located with pkgconfig)"
|
||||
)
|
||||
|
||||
system_webp = pkg_check_modules(
|
||||
|
|
@ -2190,15 +2151,9 @@ with only_when(compile_environment):
|
|||
|
||||
with only_when(compile_environment):
|
||||
system_lib_option(
|
||||
"--with-system-libvpx",
|
||||
help="Use system libvpx (located with pkgconfig)",
|
||||
when=use_pkg_config,
|
||||
"--with-system-libvpx", help="Use system libvpx (located with pkgconfig)"
|
||||
)
|
||||
|
||||
@depends("--with-system-libvpx", when=use_pkg_config)
|
||||
def with_system_libvpx_option(with_system_libvpx):
|
||||
return with_system_libvpx
|
||||
|
||||
with only_when("--with-system-libvpx"):
|
||||
vpx = pkg_check_modules("MOZ_LIBVPX", "vpx >= 1.10.0")
|
||||
|
||||
|
|
@ -2223,7 +2178,7 @@ with only_when(compile_environment):
|
|||
|
||||
set_config("MOZ_SYSTEM_LIBVPX", True)
|
||||
|
||||
@depends(with_system_libvpx_option, target)
|
||||
@depends("--with-system-libvpx", target)
|
||||
def in_tree_vpx(system_libvpx, target):
|
||||
if system_libvpx:
|
||||
return
|
||||
|
|
@ -2434,10 +2389,9 @@ with only_when(compile_environment):
|
|||
"--with-system-png",
|
||||
nargs="?",
|
||||
help="Use system libpng",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
|
||||
@depends("--with-system-png", when=use_pkg_config)
|
||||
@depends("--with-system-png")
|
||||
def deprecated_system_png_path(value):
|
||||
if len(value) == 1:
|
||||
die(
|
||||
|
|
@ -3135,10 +3089,9 @@ with only_when(compile_environment):
|
|||
"--with-system-libevent",
|
||||
nargs="?",
|
||||
help="Use system libevent",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
|
||||
@depends("--with-system-libevent", when=use_pkg_config)
|
||||
@depends("--with-system-libevent")
|
||||
def deprecated_system_libevent_path(value):
|
||||
if len(value) == 1:
|
||||
die(
|
||||
|
|
@ -3220,13 +3173,9 @@ with only_when(toolkit_gtk):
|
|||
# DBus
|
||||
# ==============================================================
|
||||
with only_when(toolkit_gtk):
|
||||
option("--disable-dbus", help="Disable dbus support", when=use_pkg_config)
|
||||
option("--disable-dbus", help="Disable dbus support")
|
||||
|
||||
@depends("--enable-dbus", when=use_pkg_config)
|
||||
def enable_dbus_option(enable_dbus):
|
||||
return enable_dbus
|
||||
|
||||
with only_when(enable_dbus_option):
|
||||
with only_when("--enable-dbus"):
|
||||
pkg_check_modules("MOZ_DBUS", "dbus-1 >= 0.60")
|
||||
|
||||
set_config("MOZ_ENABLE_DBUS", True)
|
||||
|
|
@ -3250,7 +3199,7 @@ set_define("NECKO_WIFI", True, when="--enable-necko-wifi")
|
|||
|
||||
@depends(
|
||||
depends("--enable-necko-wifi", when=necko_wifi_when)(lambda x: x),
|
||||
depends(enable_dbus_option, when=toolkit_gtk)(lambda x: x),
|
||||
depends("--enable-dbus", when=toolkit_gtk)(lambda x: x),
|
||||
when=depends(target)(lambda t: t.os == "GNU" and t.kernel == "Linux"),
|
||||
)
|
||||
def necko_wifi_dbus(necko_wifi, dbus):
|
||||
|
|
@ -3290,11 +3239,7 @@ set_define("MOZ_LAYERS_HAVE_LOG", True, when="--enable-dump-painting")
|
|||
# libproxy support
|
||||
# ==============================================================
|
||||
with only_when(toolkit_gtk):
|
||||
system_lib_option(
|
||||
"--enable-libproxy",
|
||||
help="Enable libproxy support",
|
||||
when=use_pkg_config,
|
||||
)
|
||||
system_lib_option("--enable-libproxy", help="Enable libproxy support")
|
||||
|
||||
with only_when("--enable-libproxy"):
|
||||
pkg_check_modules("MOZ_LIBPROXY", "libproxy-1.0")
|
||||
|
|
@ -3387,16 +3332,10 @@ set_define("ENABLE_SYSTEM_EXTENSION_DIRS", True, when="--enable-system-extension
|
|||
# ==============================================================
|
||||
with only_when(compile_environment):
|
||||
system_lib_option(
|
||||
"--enable-system-pixman",
|
||||
help="Use system pixman (located with pkgconfig)",
|
||||
when=use_pkg_config,
|
||||
"--enable-system-pixman", help="Use system pixman (located with pkgconfig)"
|
||||
)
|
||||
|
||||
@depends("--enable-system-pixman", when=use_pkg_config)
|
||||
def enable_system_pixman_option(enable_system_pixman):
|
||||
return enable_system_pixman
|
||||
|
||||
@depends(enable_system_pixman_option)
|
||||
@depends("--enable-system-pixman")
|
||||
def in_tree_pixman(pixman):
|
||||
return not pixman
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue