зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1661450 - 1/2 Make webrtc depend on MOZ_X11 r=ng
1. add the MOZ_X11 config flag in build/gn.mozbuild and set the gn_vars accordingly. 2. create the new gn-config/mozconfig files and delete previous ones dom/media/webrtc/third_party_build/gn-configs/**.mozconfig with --enable-default-toolkit=cairo-gtk3-wayland-only for the non X11 version. New toolkit nmae is required to force disable X11 detection as cairo-gtk3-wayland will auto-detect X11 and make generate-gn-build-files.sh fail. 3. Add the MOZ_X11 config flag in python/mozbuild/mozbuild/gn_processor.py Then run dom/media/webrtc/third_party_build/gn-configs/generate-gn-build-files.sh Differential Revision: https://phabricator.services.mozilla.com/D142904
This commit is contained in:
Родитель
df23203d4e
Коммит
e2f88e166b
|
@ -13,6 +13,12 @@ else:
|
|||
|
||||
os = CONFIG['OS_TARGET']
|
||||
|
||||
if os == "Linux":
|
||||
if CONFIG['MOZ_X11']:
|
||||
gn_vars['use_x11'] = True
|
||||
else:
|
||||
gn_vars['use_x11'] = False
|
||||
|
||||
flavors = {
|
||||
'WINNT': 'win',
|
||||
'Android': 'android',
|
||||
|
|
|
@ -83,9 +83,12 @@ else
|
|||
rustup target add aarch64-unknown-linux-gnu
|
||||
rustup target add i686-unknown-linux-gnu
|
||||
|
||||
CONFIGS="x64_False_x64_linux x64_True_x64_linux"
|
||||
CONFIGS="$CONFIGS x64_False_x86_linux x64_True_x86_linux"
|
||||
CONFIGS="$CONFIGS x64_False_arm64_linux x64_True_arm64_linux"
|
||||
CONFIGS="x64_False_x64_linux_False x64_True_x64_linux_False"
|
||||
CONFIGS="$CONFIGS x64_False_x64_linux_True x64_True_x64_linux_True"
|
||||
CONFIGS="$CONFIGS x64_False_x86_linux_False x64_True_x86_linux_False"
|
||||
CONFIGS="$CONFIGS x64_False_x86_linux_True x64_True_x86_linux_True"
|
||||
CONFIGS="$CONFIGS x64_False_arm64_linux_False x64_True_arm64_linux_False"
|
||||
CONFIGS="$CONFIGS x64_False_arm64_linux_True x64_True_arm64_linux_True"
|
||||
CONFIGS="$CONFIGS x64_False_arm_android x64_True_arm_android"
|
||||
CONFIGS="$CONFIGS x64_False_x64_android x64_True_x64_android"
|
||||
CONFIGS="$CONFIGS x64_False_x86_android x64_True_x86_android"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
ac_add_options --target=aarch64
|
||||
ac_add_options --enable-bootstrap
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_arm64_linux_False
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
ac_add_options --target=aarch64
|
||||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_arm64_linux
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_arm64_linux_True
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_x64_linux
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
ac_add_options --enable-bootstrap
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_x64_linux_False
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_x64_linux_True
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
ac_add_options --target=i686
|
||||
ac_add_options --enable-bootstrap
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_x86_linux_False
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
ac_add_options --target=i686
|
||||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_x86_linux
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_False_x86_linux_True
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
ac_add_options --enable-debug
|
||||
ac_add_options --target=aarch64
|
||||
ac_add_options --enable-bootstrap
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_arm64_linux_False
|
||||
|
|
@ -2,5 +2,5 @@ ac_add_options --enable-debug
|
|||
ac_add_options --target=aarch64
|
||||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_arm64_linux
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_arm64_linux_True
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-bootstrap
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_x64_linux_False
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_x64_linux
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_x64_linux_True
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
ac_add_options --enable-debug
|
||||
ac_add_options --target=i686
|
||||
ac_add_options --enable-bootstrap
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_x86_linux_False
|
||||
|
|
@ -2,5 +2,5 @@ ac_add_options --enable-debug
|
|||
ac_add_options --target=i686
|
||||
ac_add_options --enable-bootstrap
|
||||
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_x86_linux
|
||||
mk_add_options MOZ_OBJDIR=obj-x64_True_x86_linux_True
|
||||
|
|
@ -153,7 +153,13 @@ def filter_gn_config(gn_result, config, sandbox_vars, input_vars, gn_target):
|
|||
# mozbuild configuration.
|
||||
gn_out = {"targets": {}, "sandbox_vars": sandbox_vars, "gn_gen_args": input_vars}
|
||||
|
||||
gn_mozbuild_vars = ("MOZ_DEBUG", "OS_TARGET", "HOST_CPU_ARCH", "CPU_ARCH")
|
||||
gn_mozbuild_vars = (
|
||||
"MOZ_DEBUG",
|
||||
"OS_TARGET",
|
||||
"HOST_CPU_ARCH",
|
||||
"CPU_ARCH",
|
||||
"MOZ_X11",
|
||||
)
|
||||
|
||||
mozbuild_args = {k: config.substs.get(k) for k in gn_mozbuild_vars}
|
||||
gn_out["mozbuild_args"] = mozbuild_args
|
||||
|
@ -486,6 +492,7 @@ def write_mozbuild(
|
|||
("OS_TARGET",),
|
||||
("CPU_ARCH",),
|
||||
("MOZ_DEBUG", "OS_TARGET"),
|
||||
("OS_TARGET", "MOZ_X11"),
|
||||
("OS_TARGET", "CPU_ARCH"),
|
||||
("OS_TARGET", "CPU_ARCH", "MOZ_DEBUG"),
|
||||
("MOZ_DEBUG", "OS_TARGET", "CPU_ARCH", "HOST_CPU_ARCH"),
|
||||
|
|
|
@ -122,7 +122,7 @@ declare_args() {
|
|||
rtc_build_tools = false
|
||||
|
||||
# Set this to false to skip building code that requires X11.
|
||||
rtc_use_x11 = is_desktop_linux
|
||||
rtc_use_x11 = use_x11
|
||||
|
||||
# Set this to use PipeWire on the Wayland display server.
|
||||
# By default it's only enabled on desktop Linux (excludes ChromeOS) and
|
||||
|
|
|
@ -407,7 +407,12 @@ def toolkit_choices(target):
|
|||
elif target.os == "Android":
|
||||
return ("cairo-android",)
|
||||
else:
|
||||
return ("cairo-gtk3", "cairo-gtk3-wayland", "cairo-gtk3-x11-wayland")
|
||||
return (
|
||||
"cairo-gtk3",
|
||||
"cairo-gtk3-wayland",
|
||||
"cairo-gtk3-wayland-only",
|
||||
"cairo-gtk3-x11-wayland",
|
||||
)
|
||||
|
||||
|
||||
@depends(toolkit_choices)
|
||||
|
@ -1377,7 +1382,9 @@ x11_headers = pkg_check_modules(
|
|||
"MOZ_X11",
|
||||
x11_libs,
|
||||
allow_missing=depends(full_toolkit)(lambda t: t == "cairo-gtk3-wayland"),
|
||||
when=toolkit_gtk,
|
||||
when=depends(full_toolkit)(
|
||||
lambda t: t in ("cairo-gtk3", "cairo-gtk3-wayland", "cairo-gtk3-x11-wayland")
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@ -1389,7 +1396,9 @@ pkg_check_modules(
|
|||
["ice", "sm"],
|
||||
cflags_only=True,
|
||||
allow_missing=depends(full_toolkit)(lambda t: t == "cairo-gtk3-wayland"),
|
||||
when=toolkit_gtk,
|
||||
when=depends(full_toolkit)(
|
||||
lambda t: t in ("cairo-gtk3", "cairo-gtk3-wayland", "cairo-gtk3-x11-wayland")
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче