diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile index 52946e156a5b..2ee7d4be13e4 100644 --- a/www/librewolf/Makefile +++ b/www/librewolf/Makefile @@ -1,105 +1,104 @@ PORTNAME= librewolf -DISTVERSION= 117.0.1-1 -PORTREVISION= 7 +DISTVERSION= 123.0.1-1 CATEGORIES= www wayland MASTER_SITES= https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${DISTVERSION:R}-1/ DISTNAME= ${PORTNAME}-${DISTVERSION:R}-1.source. EXTRACT_SUFX= tar.gz -PATCH_SITES= https://gitlab.com/librewolf-community/browser/source/-/raw/5a211f7bad8dcf188a96b408cc143082df8d30a8/ -PATCHFILES= patches/unity_kde/unity-menubar.patch?inline=false:-p1 MAINTAINER= freebsd@sysctl.cz COMMENT= Custom version of Firefox, focused on privacy, security and freedom WWW= https://librewolf.net/ LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= nspr>=4.32:devel/nspr \ - nss>=3.84:security/nss \ - icu>=71.1:devel/icu \ + nss>=3.95:security/nss \ + icu>=73.1:devel/icu \ libevent>=2.1.8:devel/libevent \ - harfbuzz>=4.4.1:print/harfbuzz \ + harfbuzz>=8.3.0:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ - png>=1.6.37:graphics/png \ + png>=1.6.39:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ - libvpx>=1.12.0:multimedia/libvpx \ + libvpx>=1.14.0:multimedia/libvpx \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf2.13:devel/autoconf2.13 \ nasm:devel/nasm \ yasm:devel/yasm \ zip:archivers/zip +EXTRA_PATCHES= ${FILESDIR}/unity-menubar.patch:-p1 + .include "${.CURDIR}/../../www/firefox/Makefile.options" .include .if ${ARCH} != powerpc64 BUILD_DEPENDS+= ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \ wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION} .endif USE_GECKO= gecko USE_MOZILLA= -sqlite CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234 # work around bindgen not finding ICU, e.g. # dist/include/mozilla/intl/ICU4CGlue.h:8:10: fatal error: 'unicode/uenum.h' file not found, err: true CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" CONFIGURE_ENV+= MOZ_REQUIRE_SIGNING="" MOZ_EXPORT+= MOZ_TELEMETRY_REPORTING="" \ MOZILLA_OFFICIAL="1" \ MOZ_OFFICIAL_BRANDING="1" \ MOZ_APP_DISPLAYNAME="Librewolf" \ MOZ_APP_NAME="librewolf" MOZ_OPTIONs= --enable-application=browser \ --allow-addon-sideload \ --disable-crashreporter \ --disable-debug \ --disable-default-browser-agent \ --disable-tests \ --disable-updater \ --enable-hardening \ --enable-optimize \ --enable-release \ --enable-rust-simd \ --with-app-name=librewolf \ --with-branding=browser/branding/librewolf \ --with-unsigned-addon-scopes=app,system \ --with-l10n-base=$PWD/browser/locales/l10n \ --enable-bootstrap \ MOZ_CRASHREPORTER=0 \ MOZ_DATA_REPORTING=0 \ MOZ_SERVICES_HEALTHREPORT=0 # helpful when testing beta WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}-1 FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop .if ${ARCH} == powerpc64 CFLAGS+= -DHWY_COMPILE_ONLY_SCALAR MOZ_OPTIONS+= --without-wasm-sandboxed-libraries .else BUILD_DEPENDS+= ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \ wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION} MOZ_OPTIONS+= --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot .endif post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp @${RM} ${WRKSRC}/mozconfig post-install: ${CP} ${FIREFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop ${REINPLACE_CMD} -e 's|Firefox|Librewolf|g' ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop ${REINPLACE_CMD} -e 's|firefox|librewolf|g' ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop ${REINPLACE_CMD} -e 's|Icon=.*|Icon=${FIREFOX_ICON_SRC}|g' ${STAGEDIR}${PREFIX}/share/applications/librewolf.desktop .include diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo index ff9232ec3d47..fb7179e55c47 100644 --- a/www/librewolf/distinfo +++ b/www/librewolf/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1696616618 -SHA256 (librewolf-117.0-1.source.tar.gz) = 446e9479547dceda58cbcdc2f9f503539086ddb193c8b1206b7c736cd56e44c3 -SIZE (librewolf-117.0-1.source.tar.gz) = 903353725 -SHA256 (patches/unity_kde/unity-menubar.patch?inline=false) = ff6e224ed0eb3c9d4c3ae92acd9cd04d750e0bcc6be1fa64ccc1317abcc13711 -SIZE (patches/unity_kde/unity-menubar.patch?inline=false) = 163548 +TIMESTAMP = 1710878981 +SHA256 (librewolf-123.0-1.source.tar.gz) = e3209efbddd0c0a79bc62cb9c5cc57b816816bf32a24e8e476e07879c2791314 +SIZE (librewolf-123.0-1.source.tar.gz) = 965610712 diff --git a/www/librewolf/files/patch-bug1559213 b/www/librewolf/files/patch-bug1559213 index 516328d61aca..ae11fb38f989 100644 --- a/www/librewolf/files/patch-bug1559213 +++ b/www/librewolf/files/patch-bug1559213 @@ -1,123 +1,104 @@ commit 717bba28411c Author: Jory A. Pratt Date: Thu Jun 13 11:53:00 2019 -0700 Bug 1559213 - Allow to use system av1 libs instead of bundled. --- config/external/moz.build | 5 +++-- config/system-headers.mozbuild | 8 ++++++++ dom/media/platforms/moz.build | 5 +++++ toolkit/moz.configure | 19 ++++++++++++++++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git config/external/moz.build config/external/moz.build -index a0877c9d717e..5caa2036e0ec 100644 +index 2fc8df57992e..63d18e50a961 100644 --- config/external/moz.build +++ config/external/moz.build -@@ -45,8 +45,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: +@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: external_dirs += ["media/libvpx"] if CONFIG["MOZ_AV1"]: - external_dirs += ["media/libaom"] - external_dirs += ["media/libdav1d"] + if not CONFIG["MOZ_SYSTEM_AV1"]: + external_dirs += ["media/libaom"] + external_dirs += ["media/libdav1d"] if not CONFIG["MOZ_SYSTEM_PNG"]: external_dirs += ["media/libpng"] -diff --git config/system-headers.mozbuild config/system-headers.mozbuild -index d9489c8f15e4..4d2f15e18c1c 100644 ---- config/system-headers.mozbuild -+++ config/system-headers.mozbuild -@@ -1291,6 +1291,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: - 'proxy.h', - ] - -+if CONFIG['MOZ_SYSTEM_AV1']: -+ system_headers += [ -+ 'aom/aom_decoder.h', -+ 'aom/aomdx.h', -+ 'aom/aom_image.h', -+ 'dav1d/dav1d.h', -+ ] -+ - if CONFIG['MOZ_SYSTEM_LIBVPX']: - system_headers += [ - 'vpx_mem/vpx_mem.h', diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build -index c71f22a22eee..efbd523b1225 100644 +index 5c6e25b3980b..ce99ebfb6d3f 100644 --- dom/media/platforms/moz.build +++ dom/media/platforms/moz.build -@@ -80,6 +80,11 @@ if CONFIG["MOZ_AV1"]: +@@ -81,6 +81,11 @@ if CONFIG["MOZ_AV1"]: "agnostic/AOMDecoder.cpp", "agnostic/DAV1DDecoder.cpp", ] + if CONFIG['MOZ_SYSTEM_AV1']: + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS'] + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS'] + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] if CONFIG["MOZ_OMX"]: EXPORTS += [ diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build -index 5675c28234a1..56344e5e4c98 100644 +index 761fc8cf4cd9..793a5b8697a8 100644 --- media/ffvpx/libavcodec/moz.build +++ media/ffvpx/libavcodec/moz.build -@@ -109,10 +109,14 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']: +@@ -120,10 +120,14 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']: 'vp9recon.c', 'vpx_rac.c', ] - USE_LIBS += [ - 'dav1d', - 'media_libdav1d_asm', - ] + if CONFIG["MOZ_SYSTEM_AV1"]: + CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] + else: + USE_LIBS += [ + 'dav1d', + 'media_libdav1d_asm', + ] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": LOCAL_INCLUDES += ['/media/mozva'] SOURCES += [ diff --git toolkit/moz.configure toolkit/moz.configure -index 2e56fa46ce59..23e30935c4bc 100644 +index f93a5d64fec8..814357f4e979 100644 --- toolkit/moz.configure +++ toolkit/moz.configure -@@ -745,7 +745,23 @@ def av1(value): +@@ -744,7 +744,23 @@ def av1(value): return True -@depends(target, when=av1 & compile_environment) +option("--with-system-av1", + help="Use system av1 (located with pkgconfig)") + +system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0", + when="--with-system-av1") + +system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >= 0.1.1", + when="--with-system-av1") + +@depends(system_libaom_info, system_libdav1d_info) +def system_av1(system_libaom_info, system_libdav1d_info): + has_av1_libs = False + if system_libaom_info and system_libdav1d_info: + has_av1_libs = True + return has_av1_libs + +@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) def dav1d_asm(target): if target.cpu in ("aarch64", "x86", "x86_64"): return True -@@ -761,6 +777,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) +@@ -760,6 +776,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) set_define("MOZ_DAV1D_ASM", dav1d_asm) set_config("MOZ_AV1", av1) set_define("MOZ_AV1", av1) +set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True)) # JXL Image Codec Support # ============================================================== diff --git a/www/librewolf/files/patch-bug1680982 b/www/librewolf/files/patch-bug1680982 deleted file mode 100644 index c9fc2344bb44..000000000000 --- a/www/librewolf/files/patch-bug1680982 +++ /dev/null @@ -1,388 +0,0 @@ -commit 3204512f58a1 -Author: Greg V -Date: Sun Dec 6 22:07:00 2020 +0000 - - Bug 1680982 - Use evdev instead of the Linux legacy joystick API for gamepads - - Using evdev is a prerequisite for adding rumble (haptic feedback) and LED support. - - - BTN_GAMEPAD semantic buttons are interpreted directly, - since all kernel drivers are supposed to use them correctly: - https://www.kernel.org/doc/html/latest/input/gamepad.html - - BTN_JOYSTICK legacy style numbered buttons use the model specific remappers - - we support even strange devices that combine both styles in one device - - the Linux gamepad module is enabled on FreeBSD and DragonFly, because - these kernels provide evdev, and libudev-devd provides enough of libudev - (evdev headers are provided by the devel/evdev-proto package) - - Differential Revision: https://phabricator.services.mozilla.com/D98868 ---- - dom/gamepad/linux/LinuxGamepad.cpp | 262 ++++++++++++++++++++++++++++++++----- - dom/gamepad/moz.build | 2 +- - 2 files changed, 229 insertions(+), 35 deletions(-) - -diff --git dom/gamepad/linux/LinuxGamepad.cpp dom/gamepad/linux/LinuxGamepad.cpp -index deee47b9d267..31f0aad7ae4a 100644 ---- dom/gamepad/linux/LinuxGamepad.cpp -+++ dom/gamepad/linux/LinuxGamepad.cpp -@@ -5,15 +5,16 @@ - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - - /* -- * LinuxGamepadService: A Linux backend for the GamepadService. -- * Derived from the kernel documentation at -- * http://www.kernel.org/doc/Documentation/input/joystick-api.txt -+ * LinuxGamepadService: An evdev backend for the GamepadService. -+ * -+ * Ref: https://www.kernel.org/doc/html/latest/input/gamepad.html - */ - #include -+#include - #include - - #include --#include -+#include - #include - #include - #include -@@ -21,10 +22,14 @@ - #include "nscore.h" - #include "mozilla/dom/GamepadHandle.h" - #include "mozilla/dom/GamepadPlatformService.h" -+#include "mozilla/dom/GamepadRemapping.h" - #include "mozilla/Tainting.h" - #include "mozilla/UniquePtr.h" - #include "udev.h" - -+#define LONG_BITS (sizeof(long) * 8) -+#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS) -+ - namespace { - - using namespace mozilla::dom; -@@ -36,19 +41,29 @@ using mozilla::udev_list_entry; - using mozilla::udev_monitor; - using mozilla::UniquePtr; - --static const float kMaxAxisValue = 32767.0; --static const char kJoystickPath[] = "/dev/input/js"; -+static const char kEvdevPath[] = "/dev/input/event"; -+ -+static inline bool TestBit(const unsigned long* arr, int bit) { -+ return !!(arr[bit / LONG_BITS] & (1LL << (bit % LONG_BITS))); -+} -+ -+static inline double ScaleAxis(const input_absinfo& info, int value) { -+ return 2.0 * (value - info.minimum) / (double)(info.maximum - info.minimum) - -+ 1.0; -+} - - // TODO: should find a USB identifier for each device so we can - // provide something that persists across connect/disconnect cycles. --typedef struct { -+struct Gamepad { - GamepadHandle handle; -- guint source_id; -- int numAxes; -- int numButtons; -- char idstring[256]; -- char devpath[PATH_MAX]; --} Gamepad; -+ RefPtr remapper = nullptr; -+ guint source_id = UINT_MAX; -+ char idstring[256] = {0}; -+ char devpath[PATH_MAX] = {0}; -+ uint8_t key_map[KEY_MAX] = {0}; -+ uint8_t abs_map[ABS_MAX] = {0}; -+ std::unordered_map abs_info; -+}; - - class LinuxGamepadService { - public: -@@ -66,7 +81,7 @@ class LinuxGamepadService { - bool is_gamepad(struct udev_device* dev); - void ReadUdevChange(); - -- // handler for data from /dev/input/jsN -+ // handler for data from /dev/input/eventN - static gboolean OnGamepadData(GIOChannel* source, GIOCondition condition, - gpointer data); - -@@ -114,8 +129,14 @@ void LinuxGamepadService::AddDevice(struct udev_device* dev) { - g_io_channel_set_encoding(channel, nullptr, nullptr); - g_io_channel_set_buffered(channel, FALSE); - int fd = g_io_channel_unix_get_fd(channel); -+ -+ struct input_id id {}; -+ if (ioctl(fd, EVIOCGID, &id) == -1) { -+ return; -+ } -+ - char name[128]; -- if (ioctl(fd, JSIOCGNAME(sizeof(name)), &name) == -1) { -+ if (ioctl(fd, EVIOCGNAME(sizeof(name)), &name) == -1) { - strcpy(name, "unknown"); - } - const char* vendor_id = -@@ -131,20 +152,86 @@ void LinuxGamepadService::AddDevice(struct udev_device* dev) { - model_id = mUdev.udev_device_get_sysattr_value(parent, "id/product"); - } - } -+ if (!vendor_id && id.vendor != 0) { -+ vendor_id = (const char*)alloca(5); -+ snprintf((char*)vendor_id, 5, "%04x", id.vendor); -+ } -+ if (!model_id && id.product != 0) { -+ model_id = (const char*)alloca(5); -+ snprintf((char*)model_id, 5, "%04x", id.product); -+ } - snprintf(gamepad->idstring, sizeof(gamepad->idstring), "%s-%s-%s", - vendor_id ? vendor_id : "unknown", model_id ? model_id : "unknown", - name); - - char numAxes = 0, numButtons = 0; -- ioctl(fd, JSIOCGAXES, &numAxes); -- gamepad->numAxes = numAxes; -- ioctl(fd, JSIOCGBUTTONS, &numButtons); -- gamepad->numButtons = numButtons; -+ unsigned long key_bits[NLONGS(KEY_CNT)] = {0}; -+ unsigned long abs_bits[NLONGS(ABS_CNT)] = {0}; -+ ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), key_bits); -+ ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bits)), abs_bits); -+ -+ /* Here, we try to support even strange cases where proper semantic -+ * BTN_GAMEPAD button are combined with arbitrary extra buttons. */ -+ for (uint16_t i = BTN_JOYSTICK; i < KEY_MAX; i++) { -+ /* Do not map semantic buttons, they are handled directly */ -+ if (i == BTN_GAMEPAD) { -+ i = BTN_THUMBR + 1; -+ continue; -+ } -+ if (i == BTN_DPAD_UP) { -+ i = BTN_DPAD_RIGHT + 1; -+ continue; -+ } -+ if (TestBit(key_bits, i)) { -+ gamepad->key_map[i] = numButtons++; -+ } -+ } -+ for (uint16_t i = 0; i < BTN_JOYSTICK; i++) { -+ if (TestBit(key_bits, i)) { -+ gamepad->key_map[i] = numButtons++; -+ } -+ } -+ for (uint16_t i = BTN_GAMEPAD; i <= BTN_THUMBR; i++) { -+ /* But if any semantic event exists, count them all */ -+ if (TestBit(key_bits, i)) { -+ numButtons += BUTTON_INDEX_COUNT; -+ break; -+ } -+ } -+ for (uint16_t i = 0; i < ABS_MAX; ++i) { -+ if (TestBit(abs_bits, i)) { -+ gamepad->abs_info.emplace(i, input_absinfo{}); -+ if (ioctl(fd, EVIOCGABS(i), &gamepad->abs_info[i]) < 0) { -+ continue; -+ } -+ if (gamepad->abs_info[i].minimum == gamepad->abs_info[i].maximum) { -+ gamepad->abs_info.erase(i); -+ continue; -+ } -+ gamepad->abs_map[i] = numAxes++; -+ } -+ } -+ -+ if (numAxes == 0) { -+ NS_WARNING("Gamepad with zero axes detected?"); -+ } -+ if (numButtons == 0) { -+ NS_WARNING("Gamepad with zero buttons detected?"); -+ } -+ -+ bool defaultRemapper = false; -+ RefPtr remapper = -+ GetGamepadRemapper(id.vendor, id.product, defaultRemapper); -+ MOZ_ASSERT(remapper); -+ remapper->SetAxisCount(numAxes); -+ remapper->SetButtonCount(numButtons); - - gamepad->handle = service->AddGamepad( -- gamepad->idstring, mozilla::dom::GamepadMappingType::_empty, -- mozilla::dom::GamepadHand::_empty, gamepad->numButtons, gamepad->numAxes, -- 0, 0, 0); // TODO: Bug 680289, implement gamepad haptics for Linux. -+ gamepad->idstring, remapper->GetMappingType(), GamepadHand::_empty, -+ remapper->GetButtonCount(), remapper->GetAxisCount(), 0, -+ remapper->GetLightIndicatorCount(), remapper->GetTouchEventCount()); -+ gamepad->remapper = remapper.forget(); -+ // TODO: Bug 680289, implement gamepad haptics for Linux. - // TODO: Bug 1523355, implement gamepad lighindicator and touch for Linux. - - gamepad->source_id = -@@ -257,7 +344,7 @@ bool LinuxGamepadService::is_gamepad(struct udev_device* dev) { - if (!devpath) { - return false; - } -- if (strncmp(kJoystickPath, devpath, sizeof(kJoystickPath) - 1) != 0) { -+ if (strncmp(kEvdevPath, devpath, sizeof(kEvdevPath) - 1) != 0) { - return false; - } - -@@ -292,7 +379,7 @@ gboolean LinuxGamepadService::OnGamepadData(GIOChannel* source, - if (condition & G_IO_ERR || condition & G_IO_HUP) return FALSE; - - while (true) { -- struct js_event event; -+ struct input_event event {}; - gsize count; - GError* err = nullptr; - if (g_io_channel_read_chars(source, (gchar*)&event, sizeof(event), &count, -@@ -301,18 +388,125 @@ gboolean LinuxGamepadService::OnGamepadData(GIOChannel* source, - break; - } - -- // TODO: store device state? -- if (event.type & JS_EVENT_INIT) { -- continue; -- } -- - switch (event.type) { -- case JS_EVENT_BUTTON: -- service->NewButtonEvent(gamepad->handle, event.number, !!event.value); -+ case EV_KEY: -+ switch (event.code) { -+ /* The gamepad events are meaningful, and according to -+ * https://www.kernel.org/doc/html/latest/input/gamepad.html -+ * "No other devices, that do not look/feel like a gamepad, shall -+ * report these events" */ -+ case BTN_SOUTH: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_PRIMARY, -+ !!event.value); -+ break; -+ case BTN_EAST: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_SECONDARY, -+ !!event.value); -+ break; -+ case BTN_NORTH: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_QUATERNARY, -+ !!event.value); -+ break; -+ case BTN_WEST: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_TERTIARY, -+ !!event.value); -+ break; -+ case BTN_TL: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_LEFT_SHOULDER, -+ !!event.value); -+ break; -+ case BTN_TR: -+ service->NewButtonEvent(gamepad->handle, -+ BUTTON_INDEX_RIGHT_SHOULDER, !!event.value); -+ break; -+ case BTN_TL2: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_LEFT_TRIGGER, -+ !!event.value); -+ break; -+ case BTN_TR2: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_RIGHT_TRIGGER, -+ !!event.value); -+ break; -+ case BTN_SELECT: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_BACK_SELECT, -+ !!event.value); -+ break; -+ case BTN_START: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_START, -+ !!event.value); -+ break; -+ case BTN_MODE: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_META, -+ !!event.value); -+ break; -+ case BTN_THUMBL: -+ service->NewButtonEvent( -+ gamepad->handle, BUTTON_INDEX_LEFT_THUMBSTICK, !!event.value); -+ break; -+ case BTN_THUMBR: -+ service->NewButtonEvent( -+ gamepad->handle, BUTTON_INDEX_RIGHT_THUMBSTICK, !!event.value); -+ break; -+ case BTN_DPAD_UP: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_UP, -+ !!event.value); -+ break; -+ case BTN_DPAD_DOWN: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_DOWN, -+ !!event.value); -+ break; -+ case BTN_DPAD_LEFT: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_LEFT, -+ !!event.value); -+ break; -+ case BTN_DPAD_RIGHT: -+ service->NewButtonEvent(gamepad->handle, BUTTON_INDEX_DPAD_RIGHT, -+ !!event.value); -+ break; -+ default: -+ /* For non-gamepad events, this is the "anything goes" numbered -+ * handling that should be handled with remappers. */ -+ gamepad->remapper->RemapButtonEvent( -+ gamepad->handle, gamepad->key_map[event.code], !!event.value); -+ break; -+ } - break; -- case JS_EVENT_AXIS: -- service->NewAxisMoveEvent(gamepad->handle, event.number, -- ((float)event.value) / kMaxAxisValue); -+ case EV_ABS: -+ if (!gamepad->abs_info.count(event.code)) continue; -+ switch (event.code) { -+ case ABS_HAT0X: -+ service->NewButtonEvent( -+ gamepad->handle, BUTTON_INDEX_DPAD_LEFT, -+ AxisNegativeAsButton( -+ ScaleAxis(gamepad->abs_info[event.code], event.value))); -+ service->NewButtonEvent( -+ gamepad->handle, BUTTON_INDEX_DPAD_RIGHT, -+ AxisPositiveAsButton( -+ ScaleAxis(gamepad->abs_info[event.code], event.value))); -+ break; -+ case ABS_HAT0Y: -+ service->NewButtonEvent( -+ gamepad->handle, BUTTON_INDEX_DPAD_UP, -+ AxisNegativeAsButton( -+ ScaleAxis(gamepad->abs_info[event.code], event.value))); -+ service->NewButtonEvent( -+ gamepad->handle, BUTTON_INDEX_DPAD_DOWN, -+ AxisPositiveAsButton( -+ ScaleAxis(gamepad->abs_info[event.code], event.value))); -+ break; -+ case ABS_HAT1X: -+ case ABS_HAT1Y: -+ case ABS_HAT2X: -+ case ABS_HAT2Y: -+ case ABS_HAT3X: -+ case ABS_HAT3Y: -+ break; -+ default: -+ gamepad->remapper->RemapAxisMoveEvent( -+ gamepad->handle, gamepad->abs_map[event.code], -+ ScaleAxis(gamepad->abs_info[event.code], event.value)); -+ break; -+ } - break; - } - } -diff --git dom/gamepad/moz.build dom/gamepad/moz.build -index 5f55d5a95e96..544b7f927736 100644 ---- dom/gamepad/moz.build -+++ dom/gamepad/moz.build -@@ -59,7 +59,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": - UNIFIED_SOURCES += ["windows/WindowsGamepad.cpp"] - elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": - UNIFIED_SOURCES += ["android/AndroidGamepad.cpp"] --elif CONFIG["OS_ARCH"] == "Linux": -+elif CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "DragonFly"): - UNIFIED_SOURCES += ["linux/LinuxGamepad.cpp"] - else: - UNIFIED_SOURCES += ["fallback/FallbackGamepad.cpp"] diff --git a/www/librewolf/files/patch-bug1874059 b/www/librewolf/files/patch-bug1874059 new file mode 100644 index 000000000000..3fa954ef9def --- /dev/null +++ b/www/librewolf/files/patch-bug1874059 @@ -0,0 +1,25 @@ +commit 56c888446600991803fd92d668349101ad4bf160 +Author: Christoph Moench-Tegeder +Date: Tue Feb 6 22:51:27 2024 +0100 + + switch to -fvisibility flags + + this fixes linkage with llvm18 (which does not like the former + approach via the #pragma in gcc_hidden.h + + PR: 276746 + Submitted by: dim@ + +diff --git build/moz.configure/toolchain.configure build/moz.configure/toolchain.configure +index d08b748db250..4696f69153f6 100644 +--- build/moz.configure/toolchain.configure ++++ build/moz.configure/toolchain.configure +@@ -2186,7 +2186,7 @@ set_define("_LIBCPP_HIDE_FROM_ABI", libcxx_override_visibility.hide_from_abi) + @depends(target, build_environment) + def visibility_flags(target, env): + if target.os != "WINNT": +- if target.kernel == "Darwin": ++ if target.kernel == "Darwin" or target.kernel == "FreeBSD": + return ("-fvisibility=hidden", "-fvisibility-inlines-hidden") + return ( + "-I%s/system_wrappers" % os.path.join(env.dist), diff --git a/www/librewolf/files/patch-bug1876366 b/www/librewolf/files/patch-bug1876366 new file mode 100644 index 000000000000..a6f39ffabab8 --- /dev/null +++ b/www/librewolf/files/patch-bug1876366 @@ -0,0 +1,188 @@ +commit 54d21b7398dc1a8ff22a987c660d400347b144a9 +Author: Christoph Moench-Tegeder +Date: Sun Feb 11 19:11:15 2024 +0100 + + Bug 1876366: many X11 cursors stopped working + + revert switch to newer gdk interface, as it broke cursor shape + switching and living with the default cursor only is no fun. + + Revert "Bug 1872961 [Linux] Use pointer cursor for hyperlinks r=emilio" + + This reverts commit 0574d0cdc438e4b0ce588f1652af802a0357f255. + + Revert "Bug 1871863 - Port from GdkCursorType to gdk_cursor_new_from_name. r=rmader,stransky" + + This reverts commit 5dfa42970a9577f0ac4e0992d9ec58c691e9bef6. + +diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp +index a011dcc51fdb..28100db36d89 100644 +--- widget/gtk/nsWindow.cpp ++++ widget/gtk/nsWindow.cpp +@@ -7797,53 +7797,61 @@ static GdkCursor* get_gtk_cursor(nsCursor aCursor) { + + GdkDisplay* defaultDisplay = gdk_display_get_default(); + ++ // The strategy here is to use standard GDK cursors, and, if not available, ++ // load by standard name with gdk_cursor_new_from_name. ++ // Spec is here: http://www.freedesktop.org/wiki/Specifications/cursor-spec/ + switch (aCursor) { + case eCursor_standard: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "default"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_LEFT_PTR); + break; + case eCursor_wait: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "wait"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_WATCH); + break; + case eCursor_select: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "text"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_XTERM); + break; + case eCursor_hyperlink: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "pointer"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_HAND2); + break; + case eCursor_n_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "n-resize"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_TOP_SIDE); + break; + case eCursor_s_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "s-resize"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_BOTTOM_SIDE); + break; + case eCursor_w_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "w-resize"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_LEFT_SIDE); + break; + case eCursor_e_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "e-resize"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_RIGHT_SIDE); + break; + case eCursor_nw_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "nw-resize"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_TOP_LEFT_CORNER); + break; + case eCursor_se_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "se-resize"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_BOTTOM_RIGHT_CORNER); + break; + case eCursor_ne_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "ne-resize"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_TOP_RIGHT_CORNER); + break; + case eCursor_sw_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "sw-resize"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_BOTTOM_LEFT_CORNER); + break; + case eCursor_crosshair: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "crosshair"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_CROSSHAIR); + break; + case eCursor_move: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "move"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_FLEUR); + break; + case eCursor_help: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "help"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_QUESTION_ARROW); + break; +- case eCursor_copy: ++ case eCursor_copy: // CSS3 + gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "copy"); + if (!gdkcursor) newType = MOZ_CURSOR_COPY; + break; +@@ -7856,14 +7864,18 @@ static GdkCursor* get_gtk_cursor(nsCursor aCursor) { + if (!gdkcursor) newType = MOZ_CURSOR_CONTEXT_MENU; + break; + case eCursor_cell: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "cell"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_PLUS); + break; ++ // Those two aren’t standardized. Trying both KDE’s and GNOME’s names + case eCursor_grab: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "grab"); ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "openhand"); + if (!gdkcursor) newType = MOZ_CURSOR_HAND_GRAB; + break; + case eCursor_grabbing: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "grabbing"); ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "closedhand"); ++ if (!gdkcursor) { ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "grabbing"); ++ } + if (!gdkcursor) newType = MOZ_CURSOR_HAND_GRABBING; + break; + case eCursor_spinning: +@@ -7880,6 +7892,9 @@ static GdkCursor* get_gtk_cursor(nsCursor aCursor) { + break; + case eCursor_not_allowed: + gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "not-allowed"); ++ if (!gdkcursor) { // nonstandard, yet common ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "crossed_circle"); ++ } + if (!gdkcursor) newType = MOZ_CURSOR_NOT_ALLOWED; + break; + case eCursor_no_drop: +@@ -7900,35 +7915,46 @@ static GdkCursor* get_gtk_cursor(nsCursor aCursor) { + } + break; + case eCursor_all_scroll: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "move"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_FLEUR); + break; + case eCursor_nesw_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "nesw-resize"); ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "size_bdiag"); + if (!gdkcursor) newType = MOZ_CURSOR_NESW_RESIZE; + break; + case eCursor_nwse_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "nwse-resize"); ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "size_fdiag"); + if (!gdkcursor) newType = MOZ_CURSOR_NWSE_RESIZE; + break; + case eCursor_ns_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "ns-resize"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_SB_V_DOUBLE_ARROW); + break; + case eCursor_ew_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "ew-resize"); ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_SB_H_DOUBLE_ARROW); + break; ++ // Here, two better fitting cursors exist in some cursor themes. Try those ++ // first + case eCursor_row_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "row-resize"); ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "split_v"); ++ if (!gdkcursor) { ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_SB_V_DOUBLE_ARROW); ++ } + break; + case eCursor_col_resize: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "col-resize"); ++ gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "split_h"); ++ if (!gdkcursor) { ++ gdkcursor = ++ gdk_cursor_new_for_display(defaultDisplay, GDK_SB_H_DOUBLE_ARROW); ++ } + break; + case eCursor_none: +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "none"); +- if (!gdkcursor) newType = MOZ_CURSOR_NONE; ++ newType = MOZ_CURSOR_NONE; + break; + default: + NS_ASSERTION(aCursor, "Invalid cursor type"); +- gdkcursor = gdk_cursor_new_from_name(defaultDisplay, "default"); ++ gdkcursor = gdk_cursor_new_for_display(defaultDisplay, GDK_LEFT_PTR); + break; + } + diff --git a/www/librewolf/files/patch-bug1878010 b/www/librewolf/files/patch-bug1878010 new file mode 100644 index 000000000000..e247f2d95d7b --- /dev/null +++ b/www/librewolf/files/patch-bug1878010 @@ -0,0 +1,30 @@ +commit fa2a8be440397b623eab7a414c5685932176ef03 +Author: Andreas Pehrson +Date: Fri Feb 2 18:43:54 2024 +0000 + + Bug 1878010 - Fix webrtc::VideoCaptureFactory for BSD. r=grulja,gaston,webrtc-reviewers,mjf + + Differential Revision: https://phabricator.services.mozilla.com/D200427 + +diff --git third_party/libwebrtc/modules/video_capture/video_capture_factory.cc third_party/libwebrtc/modules/video_capture/video_capture_factory.cc +index e085ac2df8a0..2790fbbe1cba 100644 +--- third_party/libwebrtc/modules/video_capture/video_capture_factory.cc ++++ third_party/libwebrtc/modules/video_capture/video_capture_factory.cc +@@ -24,7 +24,7 @@ rtc::scoped_refptr VideoCaptureFactory::Create( + const char* deviceUniqueIdUTF8) { + // This is only implemented on pure Linux and WEBRTC_LINUX is defined for + // Android as well +-#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) ++#if (!defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)) || defined(WEBRTC_ANDROID) + return nullptr; + #else + return videocapturemodule::VideoCaptureImpl::Create(options, +@@ -40,7 +40,7 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo( + VideoCaptureOptions* options) { + // This is only implemented on pure Linux and WEBRTC_LINUX is defined for + // Android as well +-#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) ++#if (!defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)) || defined(WEBRTC_ANDROID) + return nullptr; + #else + return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo(options); diff --git a/www/librewolf/files/patch-bug847568 b/www/librewolf/files/patch-bug847568 index 2b3c5e14e99e..37619c17f883 100644 --- a/www/librewolf/files/patch-bug847568 +++ b/www/librewolf/files/patch-bug847568 @@ -1,288 +1,289 @@ # Allow building against system-wide graphite2/harfbuzz. diff --git config/system-headers.mozbuild config/system-headers.mozbuild -index a1b58eb..a0a0943 100644 +index 07d48e7f9748..a35804b443e5 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild -@@ -1289,6 +1289,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: - 'proxy.h', +@@ -1304,6 +1304,19 @@ if CONFIG["MOZ_ENABLE_LIBPROXY"]: + "proxy.h", ] +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + system_headers += [ + 'graphite2/Font.h', + 'graphite2/Segment.h', + ] + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + system_headers += [ + 'harfbuzz/hb-glib.h', + 'harfbuzz/hb-ot.h', + 'harfbuzz/hb.h', + ] + - if CONFIG['MOZ_SYSTEM_LIBVPX']: + if CONFIG["MOZ_SYSTEM_ICU"]: system_headers += [ - 'vpx_mem/vpx_mem.h', + "unicode/calendar.h", diff --git dom/base/moz.build dom/base/moz.build -index d390adf..4508f19 100644 +index 26fe7e716da8..9015fc360402 100644 --- dom/base/moz.build +++ dom/base/moz.build -@@ -576,6 +576,9 @@ FINAL_LIBRARY = "xul" +@@ -608,6 +608,9 @@ FINAL_LIBRARY = "xul" if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + GeneratedFile( "UseCounterList.h", script="gen-usecounters.py", diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build new file mode 100644 -index 0000000..24e8d7a +index 000000000000..24e8d7a03274 --- /dev/null +++ gfx/graphite2/geckoextra/moz.build @@ -0,0 +1,21 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + +EXPORTS.graphite2 += [ + 'include/GraphiteExtra.h', + 'include/GraphiteStructsForRLBox.h', +] + +UNIFIED_SOURCES += [ + '../geckoextra/src/GraphiteExtra.cpp', +] + +CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] + +# Match bundled graphite2 configuration +AllowCompilerWarnings() + +FINAL_LIBRARY = 'gkmedias' diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh -index b91d9c1..a97e6eb 100755 +index b91d9c161cc7..a97e6eb20322 100755 --- gfx/graphite2/moz-gr-update.sh +++ gfx/graphite2/moz-gr-update.sh @@ -1,6 +1,7 @@ #!/bin/bash # Script used to update the Graphite2 library in the mozilla source tree +# and bump version for --with-system-graphite2 # This script lives in gfx/graphite2, along with the library source, # but must be run from the top level of the mozilla-central tree. @@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; +# chase version for --with-system-graphite2 +perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \ + if /GR2_VERSION_REQUIRE/" old-configure.in + # summarize what's been touched echo Updated to $RELEASE. echo Here is what changed in the gfx/graphite2 directory: echo -hg stat gfx/graphite2 +hg stat old-configure.in gfx/graphite2 echo echo If gfx/graphite2/src/files.mk has changed, please make corresponding -diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla -index 3180257..4587a3b 100644 +diff --git gfx/harfbuzz/README-mozilla.fbsd gfx/harfbuzz/README-mozilla.fbsd +new file mode 100644 +index 000000000000..2a10eb1e2b42 --- /dev/null +++ gfx/harfbuzz/README-mozilla.fbsd @@ -0,0 +1,4 @@ +The in-tree copy may be omitted during build by --with-system-harfbuzz. +Make sure to keep pkg-config version check within toolkit/moz.configure in sync +with checkout version or increment latest tag by one if it's not based +on upstream release. diff --git gfx/moz.build gfx/moz.build -index 4d6d63d..cd57b0c 100644 +index 56ea317bedfc..07dd7f66f1bc 100644 --- gfx/moz.build +++ gfx/moz.build @@ -10,6 +10,14 @@ with Files("**"): with Files("wr/**"): BUG_COMPONENT = ("Core", "Graphics: WebRender") +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + DIRS += ["graphite2/geckoextra"] +else: + DIRS += ["graphite2/src" ] + +if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + DIRS += ["harfbuzz/src"] + DIRS += [ "cairo", "2d", @@ -19,8 +27,6 @@ DIRS += [ "qcms", "gl", "layers", - "graphite2/src", - "harfbuzz/src", "ots/src", "thebes", "ipc", diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py -index 5e0fd17..860b80a 100755 +index c161d24df853..8c7dd395b371 100755 --- gfx/skia/generate_mozbuild.py +++ gfx/skia/generate_mozbuild.py -@@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +@@ -91,6 +91,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git gfx/skia/moz.build gfx/skia/moz.build -index 524bd28..615c93b 100755 +index 83aa2957a938..0859316a1f09 100644 --- gfx/skia/moz.build +++ gfx/skia/moz.build -@@ -488,6 +488,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +@@ -601,6 +601,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git gfx/thebes/moz.build gfx/thebes/moz.build -index baa6f09..4f02a9e 100644 +index 97f02d59f51a..04c75cc7234d 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build -@@ -286,7 +286,13 @@ if CONFIG["MOZ_WAYLAND"]: +@@ -290,7 +290,13 @@ if CONFIG["MOZ_WAYLAND"]: LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] -DEFINES["GRAPHITE2_STATIC"] = True +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"] +else: + DEFINES["GRAPHITE2_STATIC"] = True + +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] - if CONFIG["CC_TYPE"] == "clang": - # Suppress warnings from Skia header files. + CXXFLAGS += ["-Werror=switch"] + diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build -index 301eb9a..7cece5e 100644 +index 2bbd00415cae..f66bd37695d4 100644 --- intl/unicharutil/util/moz.build +++ intl/unicharutil/util/moz.build -@@ -25,6 +25,9 @@ UNIFIED_SOURCES += [ +@@ -24,6 +24,9 @@ UNIFIED_SOURCES += [ "nsUnicodeProperties.cpp", ] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + include("/ipc/chromium/chromium-config.mozbuild") GeneratedFile( diff --git netwerk/dns/moz.build netwerk/dns/moz.build -index f769e27..315bdd4 100644 +index 784a1631fba9..574e739e22a0 100644 --- netwerk/dns/moz.build +++ netwerk/dns/moz.build @@ -102,6 +102,9 @@ GeneratedFile( "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"] ) +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + # need to include etld_data.inc LOCAL_INCLUDES += [ "/netwerk/base", diff --git old-configure.in old-configure.in -index d147957..d332b34 100644 +index 86424df3f879..09c0bd470172 100644 --- old-configure.in +++ old-configure.in -@@ -1335,6 +1335,27 @@ fi +@@ -1141,6 +1141,27 @@ fi AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID) AC_SUBST(MOZ_MACBUNDLE_ID) +dnl ======================================================== +dnl Check for graphite2 +dnl ======================================================== +if test -n "$MOZ_SYSTEM_GRAPHITE2"; then + dnl graphite2.pc has bogus version, check manually + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" + AC_TRY_COMPILE([ #include + #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ + ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ + * 100 + GR2_VERSION_BUGFIX >= \ + (major) * 10000 + (minor) * 100 + (bugfix) ) + ], [ + #if !GR2_VERSION_REQUIRE(1,3,14) + #error "Insufficient graphite2 version." + #endif + ], [], + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) + CFLAGS=$_SAVE_CFLAGS +fi + dnl ======================================================== dnl = Child Process Name for IPC dnl ======================================================== diff --git toolkit/library/moz.build toolkit/library/moz.build -index 2c3f869..e8a9d23 100644 +index da1d8c47f83e..e5fa5d5c45a1 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build -@@ -269,6 +269,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]: +@@ -295,6 +295,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]: if CONFIG["MOZ_SYSTEM_WEBP"]: OS_LIBS += CONFIG["MOZ_WEBP_LIBS"] +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"] + +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"] + if CONFIG["MOZ_SYSTEM_LIBEVENT"]: OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"] diff --git toolkit/moz.configure toolkit/moz.configure -index 0069865..9bb1864 100644 +index f93a5d64fec8..6cd072f7aaeb 100644 --- toolkit/moz.configure +++ toolkit/moz.configure -@@ -1058,6 +1058,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom +@@ -1279,6 +1279,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom return False return True +# Graphite2 +# ============================================================== +option("--with-system-graphite2", + help="Use system graphite2 (located with pkgconfig)") + +system_graphite2 = pkg_check_modules("MOZ_GRAPHITE2", "graphite2", + when="--with-system-graphite2") + +set_config("MOZ_SYSTEM_GRAPHITE2", depends_if(system_graphite2)(lambda _: True)) + +# HarfBuzz +# ============================================================== +option("--with-system-harfbuzz", + help="Use system harfbuzz (located with pkgconfig)") + +system_harfbuzz = pkg_check_modules("MOZ_HARFBUZZ", "harfbuzz >= 2.7.4", + when="--with-system-harfbuzz") + +set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True)) option( "--enable-geckodriver", diff --git a/www/librewolf/files/patch-dom_media_flac_FlacDecoder.cpp b/www/librewolf/files/patch-dom_media_flac_FlacDecoder.cpp index c96cb2b99987..6dc197d9455e 100644 --- a/www/librewolf/files/patch-dom_media_flac_FlacDecoder.cpp +++ b/www/librewolf/files/patch-dom_media_flac_FlacDecoder.cpp @@ -1,23 +1,23 @@ Enable FLAC on platforms without ffvpx like powerpc* --- dom/media/flac/FlacDecoder.cpp.orig 2021-04-15 19:44:28 UTC +++ dom/media/flac/FlacDecoder.cpp @@ -7,6 +7,7 @@ #include "FlacDecoder.h" #include "MediaContainerType.h" #include "mozilla/StaticPrefs_media.h" +#include "PDMFactory.h" namespace mozilla { @@ -14,6 +15,10 @@ namespace mozilla { bool FlacDecoder::IsEnabled() { #ifdef MOZ_FFVPX return StaticPrefs::media_flac_enabled(); +#elif defined(MOZ_FFMPEG) + RefPtr platform = new PDMFactory(); + return StaticPrefs::media_flac_enabled() && -+ (platform->SupportsMimeType("audio/flac"_ns) != media::DecodeSupport::Unsupported); ++ !platform->SupportsMimeType("audio/flac"_ns).isEmpty(); #else return false; #endif diff --git a/www/librewolf/files/patch-dom_media_webrtc_third__party__build_webrtc.mozbuild b/www/librewolf/files/patch-dom_media_webrtc_third__party__build_webrtc.mozbuild new file mode 100644 index 000000000000..3242763d64a6 --- /dev/null +++ b/www/librewolf/files/patch-dom_media_webrtc_third__party__build_webrtc.mozbuild @@ -0,0 +1,27 @@ +commit 0a4dfe06e072222335bff7724b64a1f479e56569 +Author: Christoph Moench-Tegeder + + flag WEBRTC_USE_PIPEWIRE just as on Linux + +diff --git dom/media/webrtc/third_party_build/webrtc.mozbuild dom/media/webrtc/third_party_build/webrtc.mozbuild +index 940420e3f8c4..08e07f77056f 100644 +--- dom/media/webrtc/third_party_build/webrtc.mozbuild ++++ dom/media/webrtc/third_party_build/webrtc.mozbuild +@@ -40,6 +40,17 @@ if CONFIG["MOZ_WEBRTC"]: + DEFINES["HAVE_WINSOCK2_H"] = True + elif CONFIG["OS_TARGET"] in ("DragonFly", "FreeBSD", "NetBSD", "OpenBSD"): + DEFINES["WEBRTC_BSD"] = True ++ if ( ++ CONFIG["TARGET_CPU"] == "x86" ++ or CONFIG["TARGET_CPU"] == "x86_64" ++ or CONFIG["TARGET_CPU"] == "arm" ++ or CONFIG["TARGET_CPU"] == "aarch64" ++ or ( ++ CONFIG["TARGET_ENDIANNESS"] == "little" ++ and CONFIG["TARGET_CPU"].startswith("mips") ++ ) ++ ): ++ DEFINES["WEBRTC_USE_PIPEWIRE"] = True + elif CONFIG["OS_TARGET"] == "Android": + DEFINES["WEBRTC_LINUX"] = True + DEFINES["WEBRTC_ANDROID"] = True diff --git a/www/librewolf/files/patch-libwebrtc-generated b/www/librewolf/files/patch-libwebrtc-generated index 8bb12672c84d..9e738d51a306 100644 --- a/www/librewolf/files/patch-libwebrtc-generated +++ b/www/librewolf/files/patch-libwebrtc-generated @@ -1,95985 +1,99234 @@ -commit 0aac9b2c295097dbef4d85302845196eaf9c9d60 +commit 51e6b92d3903fe970db280deb69924432107ca55 Author: Christoph Moench-Tegeder -Date: Sat Aug 19 19:46:49 2023 +0000 - regenerate FreeBSD libwebrtc patch for Firefox 117 + regenerate FreeBSD libwebrtc patch for Firefox 122 diff --git third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build -index aa958f70420c..e6a2d969a1fd 100644 +index c06f943d1b75..642f867db664 100644 --- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build +++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("resource_adaptation_api_gn") diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build -index e453cb8585d0..552c7e77985a 100644 +index e89811c36f3a..935f8560bd05 100644 --- third_party/libwebrtc/api/array_view_gn/moz.build +++ third_party/libwebrtc/api/array_view_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("array_view_gn") diff --git third_party/libwebrtc/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build -index c2d256488d9b..1b3eb3a6acb6 100644 +index 4b9691091908..d217e83eb683 100644 --- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build +++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("aec3_config_gn") diff --git third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build -index ecd28a700696..4e5509d7162d 100644 +index de044719ccf5..4e9cb792fd2e 100644 --- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build +++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("aec3_factory_gn") diff --git third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build -index 6fac266c7368..ce2f85ba66dc 100644 +index ca2c90ecfa0d..2fecbfa52bb7 100644 --- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build +++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_frame_api_gn") diff --git third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build -index 1732aa7d0c9a..a6098a248028 100644 +index 87847bb863f0..cdd13155790d 100644 --- third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build +++ third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_frame_processor_gn") diff --git third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build -index 4eac2aa4b4f4..2df8ddd20ca2 100644 +index 27baf1a79656..d4a66ce81d9b 100644 --- third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build +++ third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_mixer_api_gn") diff --git third_party/libwebrtc/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build -index 2e128f80386d..6e4054510c88 100644 +index 6a5ce44f46f9..08b8d7df91dd 100644 --- third_party/libwebrtc/api/audio/echo_control_gn/moz.build +++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("echo_control_gn") diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build -index 87335c298d63..9f1caaa8645d 100644 +index 9ab87e6a0e84..0973b9bab0b3 100644 --- third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_decoder_L16_gn") diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build -index 49e0d546f1ce..57de72563f2e 100644 +index 0efa8c28a219..8e851ee1eac0 100644 --- third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_L16_gn") diff --git third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build -index 846946073ee1..0a34d8fdda8a 100644 +index 6c8b6b3b2b89..acac009b8893 100644 --- third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_codecs_api_gn") diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build -index 366307ea13d7..7ea300e23f2a 100644 +index f64e3e334075..edfab7737136 100644 --- third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build -@@ -12,13 +12,22 @@ AllowCompilerWarnings() +@@ -12,13 +12,23 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" DEFINES["WEBRTC_USE_BUILTIN_ILBC"] = "1" DEFINES["WEBRTC_USE_BUILTIN_OPUS"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,194 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("builtin_audio_decoder_factory_gn") diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build -index db0e3fbe00d5..0818f76d7b90 100644 +index 6965c4298fe3..dd0e328737c6 100644 --- third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build -@@ -12,13 +12,22 @@ AllowCompilerWarnings() +@@ -12,13 +12,23 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" DEFINES["WEBRTC_USE_BUILTIN_ILBC"] = "1" DEFINES["WEBRTC_USE_BUILTIN_OPUS"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,194 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("builtin_audio_encoder_factory_gn") diff --git third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build -index 4782d01dd10f..588ec3b5b33b 100644 +index e0dcf8f03274..a29327a65377 100644 --- third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_decoder_g711_gn") diff --git third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build -index c972978c13ef..20d76c5496fa 100644 +index 708744cf3b72..68424c136524 100644 --- third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_g711_gn") diff --git third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build -index 77003c77a9dd..f738a9569a45 100644 +index 4b96ef206879..4577862a247d 100644 --- third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_decoder_g722_gn") diff --git third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build -index 41e1e248c525..2cc917d90aab 100644 +index bddf7d557198..cdb668cf70bc 100644 --- third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_encoder_g722_config_gn") diff --git third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build -index c3beba6cdb78..8f13941e25c3 100644 +index e35ace4e0ab9..3a983cc69d40 100644 --- third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_g722_gn") diff --git third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build -index 53e9d1a4a7ef..ada577bf55ee 100644 +index 123ba8eb1c6f..af4f54885d1e 100644 --- third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_decoder_ilbc_gn") diff --git third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build -index 75737b8f19b0..008599051c34 100644 +index 843a9aee3bc9..9e4afff2cb93 100644 --- third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_encoder_ilbc_config_gn") diff --git third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build -index bddfe4219301..5d2f4376ee92 100644 +index a01bbe78d5af..b52f29085529 100644 --- third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_ilbc_gn") diff --git third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build -index 2b2bc6d9a7b7..fce4fdca7298 100644 +index fec5701696de..19274344f17c 100644 --- third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_decoder_multiopus_gn") diff --git third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build -index e2c470d5ee58..0c7b461dd94a 100644 +index 41887d187159..e666d73db50a 100644 --- third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_decoder_opus_config_gn") diff --git third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build -index 58e6355a5568..c40633ff9ee4 100644 +index 9c9bbb415b26..2a0eaf5162ae 100644 --- third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_decoder_opus_gn") diff --git third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build -index 91afd0a4e40a..27167f6f4829 100644 +index ec36454e9f09..a1e0aebdd00b 100644 --- third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_multiopus_gn") diff --git third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build -index 06732b48f469..0ccb94d1f9fb 100644 +index 6c061ce58f6b..1814a45bd0b9 100644 --- third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_OPUS_VARIABLE_COMPLEXITY"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,175 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,179 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_opus_config_gn") diff --git third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build -index ab84d3f7559f..e4bcd225837a 100644 +index b5c0f484ad6e..3c36a8e40946 100644 --- third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build +++ third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_opus_gn") diff --git third_party/libwebrtc/api/audio_options_api_gn/moz.build third_party/libwebrtc/api/audio_options_api_gn/moz.build -index 1b19c42e986c..8d416085b79b 100644 +index f31b23065002..dee079f27798 100644 --- third_party/libwebrtc/api/audio_options_api_gn/moz.build +++ third_party/libwebrtc/api/audio_options_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_options_api_gn") diff --git third_party/libwebrtc/api/bitrate_allocation_gn/moz.build third_party/libwebrtc/api/bitrate_allocation_gn/moz.build -index a694eff03b3f..953d60cc35a0 100644 +index dcf9b27ca369..1fb50aa9e1e4 100644 --- third_party/libwebrtc/api/bitrate_allocation_gn/moz.build +++ third_party/libwebrtc/api/bitrate_allocation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("bitrate_allocation_gn") diff --git third_party/libwebrtc/api/call_api_gn/moz.build third_party/libwebrtc/api/call_api_gn/moz.build -index e446d8228025..8b21859a8adb 100644 +index 5c4a7f29a005..93c7cd55cf2e 100644 --- third_party/libwebrtc/api/call_api_gn/moz.build +++ third_party/libwebrtc/api/call_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("call_api_gn") diff --git third_party/libwebrtc/api/callfactory_api_gn/moz.build third_party/libwebrtc/api/callfactory_api_gn/moz.build -index b0f2bbbf3545..e51b0bd98f1a 100644 +index a67107994317..d9e58de1c43a 100644 --- third_party/libwebrtc/api/callfactory_api_gn/moz.build +++ third_party/libwebrtc/api/callfactory_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("callfactory_api_gn") diff --git third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build -index 1ce4cdd00a59..16ee32317d2a 100644 +index 65794fbdd2ac..1f0c3440b172 100644 --- third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build +++ third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("frame_decryptor_interface_gn") diff --git third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build -index b8385d1daacd..0ee97ec6c218 100644 +index 19352a6da41c..2f5ff0067bee 100644 --- third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build +++ third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("frame_encryptor_interface_gn") diff --git third_party/libwebrtc/api/crypto/options_gn/moz.build third_party/libwebrtc/api/crypto/options_gn/moz.build -index aee1983c3e76..c6ad466bcf88 100644 +index 3219fce47f9c..33542ced4242 100644 --- third_party/libwebrtc/api/crypto/options_gn/moz.build +++ third_party/libwebrtc/api/crypto/options_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("options_gn") diff --git third_party/libwebrtc/api/fec_controller_api_gn/moz.build third_party/libwebrtc/api/fec_controller_api_gn/moz.build -index 014e7fe571aa..0e340edaa9b8 100644 +index a0129cce5aa1..29117e092916 100644 --- third_party/libwebrtc/api/fec_controller_api_gn/moz.build +++ third_party/libwebrtc/api/fec_controller_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - +- OS_LIBS += [ +- "log" +- ] +- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("fec_controller_api_gn") diff --git third_party/libwebrtc/api/field_trials_registry_gn/moz.build third_party/libwebrtc/api/field_trials_registry_gn/moz.build -index f8884b4cd26a..bb3da46c855c 100644 +index 5133134fc268..bbfe2fc66a9b 100644 --- third_party/libwebrtc/api/field_trials_registry_gn/moz.build +++ third_party/libwebrtc/api/field_trials_registry_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("field_trials_registry_gn") diff --git third_party/libwebrtc/api/field_trials_view_gn/moz.build third_party/libwebrtc/api/field_trials_view_gn/moz.build -index 2c7f147d4afb..3078bdae753b 100644 +index 0e5ed09f70fc..41db496b2998 100644 --- third_party/libwebrtc/api/field_trials_view_gn/moz.build +++ third_party/libwebrtc/api/field_trials_view_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("field_trials_view_gn") diff --git third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build -index 885c8437ae88..43b4eeb1d4f0 100644 +index 20da3e9cdbae..42bd8a0ebee8 100644 --- third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build +++ third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -- OS_LIBS += [ -- "rt" -- ] -- -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("frame_transformer_interface_gn") diff --git third_party/libwebrtc/api/function_view_gn/moz.build third_party/libwebrtc/api/function_view_gn/moz.build -index 59ebc4ae7ad2..53144eed7f3b 100644 +index 0854c1f77115..96dce96e8ab5 100644 --- third_party/libwebrtc/api/function_view_gn/moz.build +++ third_party/libwebrtc/api/function_view_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("function_view_gn") diff --git third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build -index 5e41eca1b72c..a918a1104b37 100644 +index 3a6a8537c24d..b71b016ae856 100644 --- third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build +++ third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("jingle_logging_api_gn") diff --git third_party/libwebrtc/api/libjingle_peerconnection_api_gn/moz.build third_party/libwebrtc/api/libjingle_peerconnection_api_gn/moz.build -index 579b7f164b6a..bdbc0d078b7f 100644 +index b4ff24a0b54c..a8d741a090d2 100644 --- third_party/libwebrtc/api/libjingle_peerconnection_api_gn/moz.build +++ third_party/libwebrtc/api/libjingle_peerconnection_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("jingle_peerconnection_api_gn") diff --git third_party/libwebrtc/api/location_gn/moz.build third_party/libwebrtc/api/location_gn/moz.build -index 434406691e4c..0251460ee9f6 100644 +index 5e7de58f06b5..364fda084155 100644 --- third_party/libwebrtc/api/location_gn/moz.build +++ third_party/libwebrtc/api/location_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("location_gn") diff --git third_party/libwebrtc/api/make_ref_counted_gn/moz.build third_party/libwebrtc/api/make_ref_counted_gn/moz.build -index 8b3a500acb00..2565408ce87a 100644 +index 2eb6226bfb2d..7ecc837f314f 100644 --- third_party/libwebrtc/api/make_ref_counted_gn/moz.build +++ third_party/libwebrtc/api/make_ref_counted_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("make_ref_counted_gn") diff --git third_party/libwebrtc/api/media_stream_interface_gn/moz.build third_party/libwebrtc/api/media_stream_interface_gn/moz.build -index b80f10168f55..7aea55ea197a 100644 +index b066645cd26c..67560deca0bc 100644 --- third_party/libwebrtc/api/media_stream_interface_gn/moz.build +++ third_party/libwebrtc/api/media_stream_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("media_stream_interface_gn") diff --git third_party/libwebrtc/api/metronome/metronome_gn/moz.build third_party/libwebrtc/api/metronome/metronome_gn/moz.build -index dce0ca43192e..9559599c7097 100644 +index d89c86ef4bb1..a18489ff59f5 100644 --- third_party/libwebrtc/api/metronome/metronome_gn/moz.build +++ third_party/libwebrtc/api/metronome/metronome_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("metronome_gn") diff --git third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build -index 273be80f73aa..3def73b6e920 100644 +index 75602ac5122a..9f85d1d43198 100644 --- third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build +++ third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("default_neteq_controller_factory_gn") diff --git third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build -index f06937f581eb..909633162ae6 100644 +index 7c4e1c550a82..45a550ec1872 100644 --- third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build +++ third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("neteq_api_gn") diff --git third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build -index d09b5aed5335..b63d342a355c 100644 +index 617ffd753eb2..568e7bbc811a 100644 --- third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build +++ third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("neteq_controller_api_gn") diff --git third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build -index 012522550973..10f3a99bcbcd 100644 +index 8106b395ca55..6b28cb62c9fc 100644 --- third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build +++ third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("tick_timer_gn") diff --git third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build -index 2a95233bda53..7f30532ddb95 100644 +index 0ffd6a24063b..900b054a1cb4 100644 --- third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build +++ third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("network_state_predictor_api_gn") diff --git third_party/libwebrtc/api/priority_gn/moz.build third_party/libwebrtc/api/priority_gn/moz.build -index 08cb5bf2d567..461d52f93d0e 100644 +index 090d23dd7626..4d79158262ef 100644 --- third_party/libwebrtc/api/priority_gn/moz.build +++ third_party/libwebrtc/api/priority_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("priority_gn") diff --git third_party/libwebrtc/api/refcountedbase_gn/moz.build third_party/libwebrtc/api/refcountedbase_gn/moz.build -index f2a22be84640..b048864ad448 100644 +index c18c17de9994..e7c234797960 100644 --- third_party/libwebrtc/api/refcountedbase_gn/moz.build +++ third_party/libwebrtc/api/refcountedbase_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("refcountedbase_gn") diff --git third_party/libwebrtc/api/rtc_error_gn/moz.build third_party/libwebrtc/api/rtc_error_gn/moz.build -index 07efa1cf5563..fcf285f401fc 100644 +index 19bee500727e..b394febab922 100644 --- third_party/libwebrtc/api/rtc_error_gn/moz.build +++ third_party/libwebrtc/api/rtc_error_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_error_gn") diff --git third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build -index a96be6791fdc..68470ecf6df4 100644 +index 1965bc7a12dd..dde96c64f726 100644 --- third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build +++ third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_log_gn") diff --git third_party/libwebrtc/api/rtp_headers_gn/moz.build third_party/libwebrtc/api/rtp_headers_gn/moz.build -index d26fa6a026f9..b5647f419f7c 100644 +index 7328eb81c013..84b819ba9e90 100644 --- third_party/libwebrtc/api/rtp_headers_gn/moz.build +++ third_party/libwebrtc/api/rtp_headers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True - DEFINES["RTC_ENABLE_VP9"] = True -+DEFINES["USE_GLIB"] = "1" -+DEFINES["USE_OZONE"] = "1" -+DEFINES["WEBRTC_BSD"] = True - DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" - DEFINES["WEBRTC_LIBRARY_IMPL"] = True - DEFINES["WEBRTC_MOZILLA_BUILD"] = True - DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -+DEFINES["WEBRTC_POSIX"] = True - DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -+DEFINES["_FILE_OFFSET_BITS"] = "64" -+DEFINES["_LARGEFILE64_SOURCE"] = True -+DEFINES["_LARGEFILE_SOURCE"] = True -+DEFINES["__STDC_CONSTANT_MACROS"] = True -+DEFINES["__STDC_FORMAT_MACROS"] = True - - FINAL_LIBRARY = "webrtc" - -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: - if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" -- --if CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["ANDROID"] = True -- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" -- DEFINES["HAVE_SYS_UIO_H"] = True -- DEFINES["WEBRTC_ANDROID"] = True -- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True -- DEFINES["WEBRTC_LINUX"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_GNU_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- -- OS_LIBS += [ -- "log" -- ] -- --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_AURA"] = "1" -- DEFINES["USE_GLIB"] = "1" -- DEFINES["USE_NSS_CERTS"] = "1" -- DEFINES["USE_OZONE"] = "1" -- DEFINES["USE_UDEV"] = True -- DEFINES["WEBRTC_LINUX"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["USE_GLIB"] = "1" -- DEFINES["USE_OZONE"] = "1" -- DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_BSD"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -- DEFINES["NOMINMAX"] = True -- DEFINES["NTDDI_VERSION"] = "0x0A000000" -- DEFINES["PSAPI_VERSION"] = "2" -- DEFINES["UNICODE"] = True -- DEFINES["USE_AURA"] = "1" -- DEFINES["WEBRTC_WIN"] = True -- DEFINES["WIN32"] = True -- DEFINES["WIN32_LEAN_AND_MEAN"] = True -- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -- DEFINES["WINVER"] = "0x0A00" -- DEFINES["_ATL_NO_OPENGL"] = True -- DEFINES["_CRT_RAND_S"] = True -- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -- DEFINES["_HAS_EXCEPTIONS"] = "0" -- DEFINES["_HAS_NODISCARD"] = True -- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -- DEFINES["_SECURE_ATL"] = True -- DEFINES["_UNICODE"] = True -- DEFINES["_WIN32_WINNT"] = "0x0A00" -- DEFINES["_WINDOWS"] = True -- DEFINES["__STD_C"] = True -- -- OS_LIBS += [ -- "winmm" -- ] -+ DEFINES["_DEBUG"] = True - - if CONFIG["CPU_ARCH"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": -- -- CXXFLAGS += [ -- "-mfpu=neon" -- ] -- -- DEFINES["WEBRTC_ARCH_ARM"] = True -- DEFINES["WEBRTC_ARCH_ARM_V7"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": -- -- DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "x86": - -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" -- --if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_X11"] = "1" -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": -- -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": - -- DEFINES["_GNU_SOURCE"] = True -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - -- DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - - Library("rtp_headers_gn") -diff --git third_party/libwebrtc/api/rtp_packet_info_gn/moz.build third_party/libwebrtc/api/rtp_packet_info_gn/moz.build -index 99c25cbbaead..df1cf58c7083 100644 ---- third_party/libwebrtc/api/rtp_packet_info_gn/moz.build -+++ third_party/libwebrtc/api/rtp_packet_info_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["USE_X11"] = "1" + + Library("rtp_headers_gn") +diff --git third_party/libwebrtc/api/rtp_packet_info_gn/moz.build third_party/libwebrtc/api/rtp_packet_info_gn/moz.build +index 92eb6cb3693b..50846adb8b4e 100644 +--- third_party/libwebrtc/api/rtp_packet_info_gn/moz.build ++++ third_party/libwebrtc/api/rtp_packet_info_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "webrtc" + +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["WEBRTC_ANDROID"] = True +- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_GNU_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +- OS_LIBS += [ +- "log" +- ] +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True +- +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" +- ] ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +- OS_LIBS += [ +- "android_support" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_packet_info_gn") diff --git third_party/libwebrtc/api/rtp_parameters_gn/moz.build third_party/libwebrtc/api/rtp_parameters_gn/moz.build -index 4dc6e4a74378..ddc2e7f5536f 100644 +index 480114ad07dd..9330001cc876 100644 --- third_party/libwebrtc/api/rtp_parameters_gn/moz.build +++ third_party/libwebrtc/api/rtp_parameters_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_parameters_gn") diff --git third_party/libwebrtc/api/rtp_sender_interface_gn/moz.build third_party/libwebrtc/api/rtp_sender_interface_gn/moz.build -index 9712e13ddd16..5f6e81fb3f4e 100644 +index 9938ecca35ee..3f2c9b2e4cd7 100644 --- third_party/libwebrtc/api/rtp_sender_interface_gn/moz.build +++ third_party/libwebrtc/api/rtp_sender_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtp_sender_interface_gn") diff --git third_party/libwebrtc/api/rtp_sender_setparameters_callback_gn/moz.build third_party/libwebrtc/api/rtp_sender_setparameters_callback_gn/moz.build -index 5cc94b1d99f7..f274d0055498 100644 +index f8cd38576d8e..fc343fe57be9 100644 --- third_party/libwebrtc/api/rtp_sender_setparameters_callback_gn/moz.build +++ third_party/libwebrtc/api/rtp_sender_setparameters_callback_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_sender_setparameters_callback_gn") diff --git third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build -index 1ca9b4be66c4..a4bf4591450e 100644 +index 9f3a7424ae8a..f12c6a35f934 100644 --- third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build +++ third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtp_transceiver_direction_gn") diff --git third_party/libwebrtc/api/scoped_refptr_gn/moz.build third_party/libwebrtc/api/scoped_refptr_gn/moz.build -index d4dbda2c18f8..951e821afca9 100644 +index c2f167533dc2..e482239ee788 100644 --- third_party/libwebrtc/api/scoped_refptr_gn/moz.build +++ third_party/libwebrtc/api/scoped_refptr_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("scoped_refptr_gn") diff --git third_party/libwebrtc/api/sequence_checker_gn/moz.build third_party/libwebrtc/api/sequence_checker_gn/moz.build -index d3dd3980f86a..81e314ac9523 100644 +index a45bc8e9c1e1..591815f47c77 100644 --- third_party/libwebrtc/api/sequence_checker_gn/moz.build +++ third_party/libwebrtc/api/sequence_checker_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("sequence_checker_gn") diff --git third_party/libwebrtc/api/simulated_network_api_gn/moz.build third_party/libwebrtc/api/simulated_network_api_gn/moz.build -index 0867200479f4..04a99f0b12ea 100644 +index b46ec1656b48..26728a141487 100644 --- third_party/libwebrtc/api/simulated_network_api_gn/moz.build +++ third_party/libwebrtc/api/simulated_network_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("simulated_network_api_gn") diff --git third_party/libwebrtc/api/task_queue/pending_task_safety_flag_gn/moz.build third_party/libwebrtc/api/task_queue/pending_task_safety_flag_gn/moz.build -index d7e6a087fa00..ba1a6b109e0e 100644 +index 52a2e5003b5a..e8094ed7f16d 100644 --- third_party/libwebrtc/api/task_queue/pending_task_safety_flag_gn/moz.build +++ third_party/libwebrtc/api/task_queue/pending_task_safety_flag_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("pending_task_safety_flag_gn") diff --git third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build -index c4d9c9d67d0a..7ff2201844db 100644 +index 73630a2ad988..e9f40adf5dcc 100644 --- third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build +++ third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("task_queue_gn") diff --git third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build -index fba5b45a5df7..39a9ebc0842e 100644 +index d99d149fa37c..716e91c361d1 100644 --- third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build +++ third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("bitrate_settings_gn") diff --git third_party/libwebrtc/api/transport/datagram_transport_interface_gn/moz.build third_party/libwebrtc/api/transport/datagram_transport_interface_gn/moz.build -index ac59bcbcde75..cbeb41795c2d 100644 +index 9168cf915658..12180edceced 100644 --- third_party/libwebrtc/api/transport/datagram_transport_interface_gn/moz.build +++ third_party/libwebrtc/api/transport/datagram_transport_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("datagram_transport_interface_gn") diff --git third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build -index 1ef79b4d200b..e4486979adcc 100644 +index fd2b2dd12b03..10d7b6bb4d54 100644 --- third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build +++ third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("field_trial_based_config_gn") diff --git third_party/libwebrtc/api/transport/goog_cc_gn/moz.build third_party/libwebrtc/api/transport/goog_cc_gn/moz.build -index 69fd4ce27866..dee377f35156 100644 +index 4a7c84915c5e..929cc485f211 100644 --- third_party/libwebrtc/api/transport/goog_cc_gn/moz.build +++ third_party/libwebrtc/api/transport/goog_cc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("goog_cc_gn") diff --git third_party/libwebrtc/api/transport/network_control_gn/moz.build third_party/libwebrtc/api/transport/network_control_gn/moz.build -index 181843597f7a..f03b20773145 100644 +index 76dd117a863f..a67647ff4e6a 100644 --- third_party/libwebrtc/api/transport/network_control_gn/moz.build +++ third_party/libwebrtc/api/transport/network_control_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("network_control_gn") diff --git third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build -index 0ee9e1fa1b7e..8c55ec075d15 100644 +index a2fe75e60e9b..cf683816e0d6 100644 --- third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build +++ third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("dependency_descriptor_gn") diff --git third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build -index b43f4a77ec51..7862f9ee7c3d 100644 +index 9a7b0b69bf3b..791e45051d89 100644 --- third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build +++ third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtp_source_gn") diff --git third_party/libwebrtc/api/transport/stun_types_gn/moz.build third_party/libwebrtc/api/transport/stun_types_gn/moz.build -index dd75da361bf7..39d0ef9756e1 100644 +index 36750a2f188e..d7df0d5d7208 100644 --- third_party/libwebrtc/api/transport/stun_types_gn/moz.build +++ third_party/libwebrtc/api/transport/stun_types_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("stun_types_gn") diff --git third_party/libwebrtc/api/transport_api_gn/moz.build third_party/libwebrtc/api/transport_api_gn/moz.build -index 5335c2c5196b..98964899137c 100644 +index af080bee0bd0..f01561893920 100644 --- third_party/libwebrtc/api/transport_api_gn/moz.build +++ third_party/libwebrtc/api/transport_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - +- OS_LIBS += [ +- "log" +- ] +- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("transport_api_gn") diff --git third_party/libwebrtc/api/units/data_rate_gn/moz.build third_party/libwebrtc/api/units/data_rate_gn/moz.build -index de76b8e11c82..710093b8259e 100644 +index 4964c3e05f88..91d77bc12c86 100644 --- third_party/libwebrtc/api/units/data_rate_gn/moz.build +++ third_party/libwebrtc/api/units/data_rate_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("data_rate_gn") diff --git third_party/libwebrtc/api/units/data_size_gn/moz.build third_party/libwebrtc/api/units/data_size_gn/moz.build -index dc54ce4f156e..ef4aba55e68f 100644 +index 0fe0bc100b9e..31b25242e9a9 100644 --- third_party/libwebrtc/api/units/data_size_gn/moz.build +++ third_party/libwebrtc/api/units/data_size_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("data_size_gn") diff --git third_party/libwebrtc/api/units/frequency_gn/moz.build third_party/libwebrtc/api/units/frequency_gn/moz.build -index 3c84c283b8ec..07ce5ab7d03d 100644 +index 413a57a8f3c4..f780d340c448 100644 --- third_party/libwebrtc/api/units/frequency_gn/moz.build +++ third_party/libwebrtc/api/units/frequency_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("frequency_gn") diff --git third_party/libwebrtc/api/units/time_delta_gn/moz.build third_party/libwebrtc/api/units/time_delta_gn/moz.build -index 3fe57620d83d..99beb9e82767 100644 +index 39355ed5881c..2df892f4a708 100644 --- third_party/libwebrtc/api/units/time_delta_gn/moz.build +++ third_party/libwebrtc/api/units/time_delta_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("time_delta_gn") diff --git third_party/libwebrtc/api/units/timestamp_gn/moz.build third_party/libwebrtc/api/units/timestamp_gn/moz.build -index a869cbcd713e..41f7f84b1527 100644 +index da68eea1608b..f4f43207ca71 100644 --- third_party/libwebrtc/api/units/timestamp_gn/moz.build +++ third_party/libwebrtc/api/units/timestamp_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("timestamp_gn") diff --git third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build -index 40823f23553c..020bfc89b65a 100644 +index cb32b05fa6ce..114f6b43ad03 100644 --- third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build +++ third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("builtin_video_bitrate_allocator_factory_gn") diff --git third_party/libwebrtc/api/video/encoded_frame_gn/moz.build third_party/libwebrtc/api/video/encoded_frame_gn/moz.build -index f5aee8c8e896..d43142211cf9 100644 +index fdb34bf903a5..3aab4972d1b0 100644 --- third_party/libwebrtc/api/video/encoded_frame_gn/moz.build +++ third_party/libwebrtc/api/video/encoded_frame_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -- OS_LIBS += [ -- "rt" -- ] -- -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("encoded_frame_gn") diff --git third_party/libwebrtc/api/video/encoded_image_gn/moz.build third_party/libwebrtc/api/video/encoded_image_gn/moz.build -index aebcf21b3767..4c046aa480ac 100644 +index 3bc012ad2867..9bbfe7ab6b7c 100644 --- third_party/libwebrtc/api/video/encoded_image_gn/moz.build +++ third_party/libwebrtc/api/video/encoded_image_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("encoded_image_gn") diff --git third_party/libwebrtc/api/video/frame_buffer_gn/moz.build third_party/libwebrtc/api/video/frame_buffer_gn/moz.build -index 67d7583074d3..ea11fb826b9e 100644 +index 2614e67133bc..b0ddb83924e2 100644 --- third_party/libwebrtc/api/video/frame_buffer_gn/moz.build +++ third_party/libwebrtc/api/video/frame_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("frame_buffer_gn") diff --git third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build -index af294ef3ca63..63707a6269b2 100644 +index ace02623f71c..c5cf761665a3 100644 --- third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build +++ third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("recordable_encoded_frame_gn") diff --git third_party/libwebrtc/api/video/render_resolution_gn/moz.build third_party/libwebrtc/api/video/render_resolution_gn/moz.build -index 5f97a983f82e..abe0dea08303 100644 +index f27e4cc9441b..581ca3830235 100644 --- third_party/libwebrtc/api/video/render_resolution_gn/moz.build +++ third_party/libwebrtc/api/video/render_resolution_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("render_resolution_gn") diff --git third_party/libwebrtc/api/video/resolution_gn/moz.build third_party/libwebrtc/api/video/resolution_gn/moz.build -index deafa478ddb9..10bf77256f20 100644 +index 673bb4f1c9f3..8b1b3fe09fa1 100644 --- third_party/libwebrtc/api/video/resolution_gn/moz.build +++ third_party/libwebrtc/api/video/resolution_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("resolution_gn") diff --git third_party/libwebrtc/api/video/video_adaptation_gn/moz.build third_party/libwebrtc/api/video/video_adaptation_gn/moz.build -index 3b4495f26c0c..cd0d8268f411 100644 +index ffff5639eeef..26cb2efe4e07 100644 --- third_party/libwebrtc/api/video/video_adaptation_gn/moz.build +++ third_party/libwebrtc/api/video/video_adaptation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_adaptation_gn") diff --git third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build -index 2c7b1f39e7c2..b2366c6af2a0 100644 +index be63dc82523f..a7dbc316cfc0 100644 --- third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build +++ third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_bitrate_allocation_gn") diff --git third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build -index a6e2e2c6f5a9..8eb8884fe45b 100644 +index 222bcaf25116..df387e75d820 100644 --- third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build +++ third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_bitrate_allocator_factory_gn") diff --git third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build -index f09476aacb87..7f6b2b8a30ac 100644 +index e7f3f5a4de36..d83935fe0710 100644 --- third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build +++ third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_bitrate_allocator_gn") diff --git third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build -index 2ac72c5b5429..b7f4cc420178 100644 +index 403c521a1f56..8bfda2bd2815 100644 --- third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build +++ third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_codec_constants_gn") diff --git third_party/libwebrtc/api/video/video_frame_gn/moz.build third_party/libwebrtc/api/video/video_frame_gn/moz.build -index 7a4e9fdc2c33..c7700a5bcd92 100644 +index b0fc90582b6e..67fafe98aa0c 100644 --- third_party/libwebrtc/api/video/video_frame_gn/moz.build +++ third_party/libwebrtc/api/video/video_frame_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -54,183 +63,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,190 +64,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_frame_gn") diff --git third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build -index e56d43a29930..735fd52d03b8 100644 +index 7fe6e4df955d..7b3d8fef889c 100644 --- third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build +++ third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -50,183 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,190 +60,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_frame_i010_gn") diff --git third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build -index 2d2221dbb57d..eb03efadbe9a 100644 +index d80dda91786b..900162a802f7 100644 --- third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build +++ third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_frame_metadata_gn") diff --git third_party/libwebrtc/api/video/video_frame_type_gn/moz.build third_party/libwebrtc/api/video/video_frame_type_gn/moz.build -index bc4c46bfbdc5..7b04b10d4157 100644 +index 8fcbef76e8e6..3ebf86087e9b 100644 --- third_party/libwebrtc/api/video/video_frame_type_gn/moz.build +++ third_party/libwebrtc/api/video/video_frame_type_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - +- OS_LIBS += [ +- "log" +- ] +- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_frame_type_gn") diff --git third_party/libwebrtc/api/video/video_layers_allocation_gn/moz.build third_party/libwebrtc/api/video/video_layers_allocation_gn/moz.build -index ded4d37ab6b7..0129e1ce4ed0 100644 +index b8ba6ec54b86..13701e033163 100644 --- third_party/libwebrtc/api/video/video_layers_allocation_gn/moz.build +++ third_party/libwebrtc/api/video/video_layers_allocation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_layers_allocation_gn") diff --git third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build -index fffe252ebd5c..1bdba7c6dffa 100644 +index f65965f80bcd..039f412a6c99 100644 --- third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build +++ third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_rtp_headers_gn") diff --git third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build -index e36bc0df9828..cb189ba6fbb8 100644 +index 7b8a329463c7..fa61dad4d254 100644 --- third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build +++ third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_stream_encoder_gn") diff --git third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build -index dcf5d2273c8d..86180d10a821 100644 +index c3642c46d0fe..a20debacf2b1 100644 --- third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build +++ third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("bitstream_parser_api_gn") diff --git third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build -index 987a01bd2f1a..dfcfda00467b 100644 +index 4e928c91a430..554a2bc0b150 100644 --- third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build +++ third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,195 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_software_fallback_wrappers_gn") diff --git third_party/libwebrtc/api/video_codecs/scalability_mode_gn/moz.build third_party/libwebrtc/api/video_codecs/scalability_mode_gn/moz.build -index a308bfc58fd9..50cd221a39d7 100644 +index d63795ed948e..874d12b31e06 100644 --- third_party/libwebrtc/api/video_codecs/scalability_mode_gn/moz.build +++ third_party/libwebrtc/api/video_codecs/scalability_mode_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("scalability_mode_gn") diff --git third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build -index eccdc6cfc778..748f6fb1b597 100644 +index 89cce4215bb6..c866cb6d800f 100644 --- third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build +++ third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -53,183 +62,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -53,190 +63,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_codecs_api_gn") diff --git third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build -index 41d547569586..2b71c8370242 100644 +index e757e9ed510c..eff6026011a0 100644 --- third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build +++ third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("vp8_temporal_layers_factory_gn") diff --git third_party/libwebrtc/api/video_track_source_constraints_gn/moz.build third_party/libwebrtc/api/video_track_source_constraints_gn/moz.build -index 77f7ba4d70db..524de95cf6e8 100644 +index 8213e3088f48..b1b79e03c8ee 100644 --- third_party/libwebrtc/api/video_track_source_constraints_gn/moz.build +++ third_party/libwebrtc/api/video_track_source_constraints_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_track_source_constraints_gn") diff --git third_party/libwebrtc/audio/audio_gn/moz.build third_party/libwebrtc/audio/audio_gn/moz.build -index 8a35de2e88b4..beb8a0df1b72 100644 +index e81a4f673bac..bb58c94c5403 100644 --- third_party/libwebrtc/audio/audio_gn/moz.build +++ third_party/libwebrtc/audio/audio_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -55,191 +64,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -55,195 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_gn") diff --git third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build -index 81aea2d62785..1e0bdc5fc767 100644 +index e215792f649d..aab0bc81b0aa 100644 --- third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build +++ third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,194 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_frame_operations_gn") diff --git third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build -index b67981ba5850..5bb0f70142e3 100644 +index d8893a734152..6e627cb67c35 100644 --- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build +++ third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -52,191 +61,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -52,195 +62,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("resource_adaptation_gn") diff --git third_party/libwebrtc/call/audio_sender_interface_gn/moz.build third_party/libwebrtc/call/audio_sender_interface_gn/moz.build -index 6779dfa7cc01..75c30bf9abf4 100644 +index 2b42e8ebf96e..6f80ac1cc6e5 100644 --- third_party/libwebrtc/call/audio_sender_interface_gn/moz.build +++ third_party/libwebrtc/call/audio_sender_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_sender_interface_gn") diff --git third_party/libwebrtc/call/bitrate_allocator_gn/moz.build third_party/libwebrtc/call/bitrate_allocator_gn/moz.build -index ef48a850a44f..7e63d38a987e 100644 +index a56b55faf3bc..79b7f726fe25 100644 --- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build +++ third_party/libwebrtc/call/bitrate_allocator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("bitrate_allocator_gn") diff --git third_party/libwebrtc/call/bitrate_configurator_gn/moz.build third_party/libwebrtc/call/bitrate_configurator_gn/moz.build -index b70008b5486c..f62f036ab699 100644 +index e6f73025aa61..d5840ec1a784 100644 --- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build +++ third_party/libwebrtc/call/bitrate_configurator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("bitrate_configurator_gn") diff --git third_party/libwebrtc/call/call_gn/moz.build third_party/libwebrtc/call/call_gn/moz.build -index 1f5190649461..21474e0e8eb1 100644 +index 25c1961b89ae..172d26827022 100644 --- third_party/libwebrtc/call/call_gn/moz.build +++ third_party/libwebrtc/call/call_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,191 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,195 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("call_gn") diff --git third_party/libwebrtc/call/call_interfaces_gn/moz.build third_party/libwebrtc/call/call_interfaces_gn/moz.build -index 9782bf65f418..d02126352f57 100644 +index a5796666d84d..0c8e7e07006f 100644 --- third_party/libwebrtc/call/call_interfaces_gn/moz.build +++ third_party/libwebrtc/call/call_interfaces_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -49,190 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,195 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("call_interfaces_gn") diff --git third_party/libwebrtc/call/receive_stream_interface_gn/moz.build third_party/libwebrtc/call/receive_stream_interface_gn/moz.build -index 7be3350326f2..2d90f7bf5333 100644 +index 92973e6d7b60..99fc4b2ce9c4 100644 --- third_party/libwebrtc/call/receive_stream_interface_gn/moz.build +++ third_party/libwebrtc/call/receive_stream_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("receive_stream_interface_gn") diff --git third_party/libwebrtc/call/rtp_interfaces_gn/moz.build third_party/libwebrtc/call/rtp_interfaces_gn/moz.build -index 8e64b723410f..f0698d5291ce 100644 +index c83031d5b506..384f284c4233 100644 --- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build +++ third_party/libwebrtc/call/rtp_interfaces_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_interfaces_gn") diff --git third_party/libwebrtc/call/rtp_receiver_gn/moz.build third_party/libwebrtc/call/rtp_receiver_gn/moz.build -index c3f5b80c8581..4b5e64a7b0a9 100644 +index 8809c7664f76..a35b27249321 100644 --- third_party/libwebrtc/call/rtp_receiver_gn/moz.build +++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,191 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,195 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_receiver_gn") diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build -index 1ed4fe8bb42c..2959f53394c1 100644 +index 09560bbaab54..864bbdfd7819 100644 --- third_party/libwebrtc/call/rtp_sender_gn/moz.build +++ third_party/libwebrtc/call/rtp_sender_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,191 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,195 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_sender_gn") diff --git third_party/libwebrtc/call/version_gn/moz.build third_party/libwebrtc/call/version_gn/moz.build -index d6382035216b..b2052c8cd0fb 100644 +index e2e087a17fe3..43695342b267 100644 --- third_party/libwebrtc/call/version_gn/moz.build +++ third_party/libwebrtc/call/version_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("version_gn") diff --git third_party/libwebrtc/call/video_stream_api_gn/moz.build third_party/libwebrtc/call/video_stream_api_gn/moz.build -index c441da830946..7eea7977d9df 100644 +index f2ec65de01cc..c2ee6bd9eb51 100644 --- third_party/libwebrtc/call/video_stream_api_gn/moz.build +++ third_party/libwebrtc/call/video_stream_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_stream_api_gn") diff --git third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build -index 5526be7b8bed..30d931689b62 100644 +index 390c83ec43a4..0b18db99441c 100644 --- third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build -@@ -17,12 +17,21 @@ CXXFLAGS += [ +@@ -17,12 +17,22 @@ CXXFLAGS += [ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_ENABLE_AVX2"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -50,137 +59,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,141 +60,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - CXXFLAGS += [ - "-msse2" - ] + DEFINES["USE_X11"] = "1" Library("common_audio_avx2_gn") diff --git third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build -index 9381d65ceafe..30c5b7a739fc 100644 +index ec4329a9cc6e..4adf2cb0a3ff 100644 --- third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,112 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse_arm.S", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S" - ] - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -150,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -154,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("common_audio_c_arm_asm_gn") diff --git third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build -index c9d2d986330f..cbb28b276a83 100644 +index 2a9bfac234f1..58196389a505 100644 --- third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -80,113 +89,12 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -80,117 +90,12 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" + DEFINES["_DEBUG"] = True -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] -+if CONFIG["CPU_ARCH"] == "aarch64": ++if CONFIG["TARGET_CPU"] == "aarch64": -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", -@@ -194,26 +102,10 @@ if CONFIG["OS_TARGET"] == "WINNT": +@@ -198,26 +103,10 @@ if CONFIG["OS_TARGET"] == "WINNT": "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" ] --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True SOURCES += [ "/third_party/libwebrtc/common_audio/signal_processing/resample_by_2_mips.c" -@@ -230,8 +122,6 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -234,8 +123,6 @@ if CONFIG["TARGET_CPU"] == "mips32": - if CONFIG["CPU_ARCH"] == "mips64": + if CONFIG["TARGET_CPU"] == "mips64": - DEFINES["_GNU_SOURCE"] = True - UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c", -@@ -246,85 +136,13 @@ if CONFIG["CPU_ARCH"] == "ppc64": +@@ -250,85 +137,13 @@ if CONFIG["TARGET_CPU"] == "ppc64": "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" ] --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "riscv64": - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", -@@ -332,21 +150,9 @@ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +@@ -336,21 +151,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" ] --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", -@@ -354,14 +160,8 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -358,14 +161,8 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", - "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c", - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] + DEFINES["USE_X11"] = "1" Library("common_audio_c_gn") diff --git third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build -index 90260ba8646c..54512f5b3543 100644 +index 31757c2b89d3..ccbce8a93a86 100644 --- third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("common_audio_cc_gn") diff --git third_party/libwebrtc/common_audio/common_audio_gn/moz.build third_party/libwebrtc/common_audio/common_audio_gn/moz.build -index c7b74d2e510c..1048f961f8f0 100644 +index b6c5dc57c8fb..208fd6af96b7 100644 --- third_party/libwebrtc/common_audio/common_audio_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -56,190 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -56,194 +66,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("common_audio_gn") diff --git third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build -index d51e7f4e3541..7d3d05a3e0af 100644 +index f2ef55667bcb..665f9d57f8fa 100644 --- third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build -@@ -12,12 +12,22 @@ AllowCompilerWarnings() +@@ -12,12 +12,23 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_ARCH_ARM64"] = True +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_HAS_NEON"] = True DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,148 +56,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,152 +57,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - Library("common_audio_neon_c_gn") diff --git third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build -index 8df7017bff19..8ad021bcb676 100644 +index 2b5a1cf4ccbe..7b093b38218c 100644 --- third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build -@@ -12,12 +12,22 @@ AllowCompilerWarnings() +@@ -12,12 +12,23 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_ARCH_ARM64"] = True +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_HAS_NEON"] = True DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,148 +55,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,152 +56,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - Library("common_audio_neon_gn") diff --git third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build -index 022ff2845548..81c11ad52373 100644 +index 298c08b4189f..60b8bdd048ee 100644 --- third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build +++ third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_ENABLE_AVX2"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,159 +54,23 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,163 +55,23 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2", "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": - - CXXFLAGS += [ - "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86_64": CXXFLAGS += [ - "-msse2", "-msse2" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - CXXFLAGS += [ - "-msse2" - ] + DEFINES["USE_X11"] = "1" Library("common_audio_sse2_gn") diff --git third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build -index 52e5226e09a0..f34663641568 100644 +index 699fdd026734..8c94cafaea8c 100644 --- third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build +++ third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("fir_filter_factory_gn") diff --git third_party/libwebrtc/common_audio/fir_filter_gn/moz.build third_party/libwebrtc/common_audio/fir_filter_gn/moz.build -index f931502550d0..3ccb102e85a9 100644 +index b0236d1067a1..a2f52d00f787 100644 --- third_party/libwebrtc/common_audio/fir_filter_gn/moz.build +++ third_party/libwebrtc/common_audio/fir_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("fir_filter_gn") diff --git third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build -index 57e889cebd1b..8dc865c12715 100644 +index cda88c03f924..920ecc6786e2 100644 --- third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build +++ third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("sinc_resampler_gn") diff --git third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build -index 2f5623b61072..284df3697995 100644 +index 328c77410ca2..6516aa36e738 100644 --- third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build +++ third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,97 +52,7 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,101 +53,7 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": -@@ -144,133 +63,42 @@ if CONFIG["CPU_ARCH"] == "aarch64": +@@ -148,133 +64,42 @@ if CONFIG["TARGET_CPU"] == "aarch64": "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc" ] --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc" - ] - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc" ] --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" - ] - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" - ] - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2", "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": - - CXXFLAGS += [ - "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": +-if CONFIG["OS_TARGET"] == "Darwin" and CONFIG["TARGET_CPU"] == "x86_64": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" ] --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86_64": CXXFLAGS += [ - "-msse2", "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" ] - DEFINES["_GNU_SOURCE"] = True +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "OpenBSD": +-if CONFIG["OS_TARGET"] == "OpenBSD" and CONFIG["TARGET_CPU"] == "x86_64": - - CXXFLAGS += [ - "-msse2" - ] + DEFINES["USE_X11"] = "1" Library("fft_size_128_gn") diff --git third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build -index 8639a7ae2e0e..3105fcab9d6b 100644 +index e65c7c572fc8..e684b91a0664 100644 --- third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build +++ third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("fft_size_256_gn") diff --git third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build -index 4bae7df22774..5d194b7d816a 100644 +index 316c1991d5f2..2b74740448a4 100644 --- third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build +++ third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,115 +48,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,119 +49,21 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_arm.S" + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ] - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_mips.c" -@@ -155,8 +70,6 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -159,8 +71,6 @@ if CONFIG["TARGET_CPU"] == "mips32": - if CONFIG["CPU_ARCH"] == "mips64": + if CONFIG["TARGET_CPU"] == "mips64": - DEFINES["_GNU_SOURCE"] = True - UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ] -@@ -167,107 +80,28 @@ if CONFIG["CPU_ARCH"] == "ppc64": +@@ -171,107 +81,28 @@ if CONFIG["TARGET_CPU"] == "ppc64": "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ] --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "riscv64": - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ] --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True UNIFIED_SOURCES += [ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] + DEFINES["USE_X11"] = "1" Library("spl_sqrt_floor_gn") diff --git third_party/libwebrtc/common_video/common_video_gn/moz.build third_party/libwebrtc/common_video/common_video_gn/moz.build -index 869db500add1..9e5cdb7e6cce 100644 +index a767c9c76531..aaaed70ce9a2 100644 --- third_party/libwebrtc/common_video/common_video_gn/moz.build +++ third_party/libwebrtc/common_video/common_video_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -55,183 +64,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -55,190 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("common_video_gn") diff --git third_party/libwebrtc/common_video/frame_counts_gn/moz.build third_party/libwebrtc/common_video/frame_counts_gn/moz.build -index 6029016a0e4b..0bd2ab0ab211 100644 +index 0ccbf9ac7636..b83174b75ce7 100644 --- third_party/libwebrtc/common_video/frame_counts_gn/moz.build +++ third_party/libwebrtc/common_video/frame_counts_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("frame_counts_gn") diff --git third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build -index b09e027176e1..0ab69dd829cb 100644 +index 7aa4e9bfff47..ecc27ae7537e 100644 --- third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build +++ third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("generic_frame_descriptor_gn") diff --git third_party/libwebrtc/experiments/registered_field_trials_gn/moz.build third_party/libwebrtc/experiments/registered_field_trials_gn/moz.build -index 2ae645ea741d..82f547782ab4 100644 +index 023dd46dd1ee..c4bdc6ec5e67 100644 --- third_party/libwebrtc/experiments/registered_field_trials_gn/moz.build +++ third_party/libwebrtc/experiments/registered_field_trials_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("registered_field_trials_gn") diff --git third_party/libwebrtc/experiments/registered_field_trials_header_gn/moz.build third_party/libwebrtc/experiments/registered_field_trials_header_gn/moz.build index 2f9f14acb430..f8143d2798f0 100644 --- third_party/libwebrtc/experiments/registered_field_trials_header_gn/moz.build +++ third_party/libwebrtc/experiments/registered_field_trials_header_gn/moz.build @@ -31,9 +31,4 @@ LOCAL_INCLUDES += [ "/tools/profiler/public" ] -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["UNICODE"] = True - DEFINES["_UNICODE"] = True - Library("registered_field_trials_header_gn") diff --git third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build -index ddc4a9cc8bdb..76b97cad597b 100644 +index f4f41e48ae54..5286d0893211 100644 --- third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,183 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,190 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_audio_gn") diff --git third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build -index 270182b2be45..48e47598a034 100644 +index 72e02793f70c..c9e2dbbd60a6 100644 --- third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,183 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,190 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_bwe_gn") diff --git third_party/libwebrtc/logging/rtc_event_field_gn/moz.build third_party/libwebrtc/logging/rtc_event_field_gn/moz.build -index 7a816f43289d..9c1a7bd6de3f 100644 +index 6a37b25112a8..e03e19ffe137 100644 --- third_party/libwebrtc/logging/rtc_event_field_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_field_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_field_gn") diff --git third_party/libwebrtc/logging/rtc_event_log_parse_status_gn/moz.build third_party/libwebrtc/logging/rtc_event_log_parse_status_gn/moz.build -index d9020f9a56c3..5362e89efe76 100644 +index 5ad6834dff13..a2cfdaa1e322 100644 --- third_party/libwebrtc/logging/rtc_event_log_parse_status_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_log_parse_status_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtc_event_log_parse_status_gn") diff --git third_party/libwebrtc/logging/rtc_event_number_encodings_gn/moz.build third_party/libwebrtc/logging/rtc_event_number_encodings_gn/moz.build -index ad1c2615454e..7838b57024ae 100644 +index af4c0bf656d0..ccdfd183ece3 100644 --- third_party/libwebrtc/logging/rtc_event_number_encodings_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_number_encodings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,179 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_number_encodings_gn") diff --git third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build -index a920e8d64332..ffe265db0851 100644 +index abf04bb09f55..76f4e6aaf79d 100644 --- third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_pacing_gn") diff --git third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build -index bb826e4a720e..b290dc3e72e7 100644 +index b003d287bd3b..c36201f6936f 100644 --- third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,194 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_rtp_rtcp_gn") diff --git third_party/libwebrtc/logging/rtc_event_video_gn/moz.build third_party/libwebrtc/logging/rtc_event_video_gn/moz.build -index 423abc9ec40c..cf444b4316cd 100644 +index 264fc2cf4b44..ce50ff600882 100644 --- third_party/libwebrtc/logging/rtc_event_video_gn/moz.build +++ third_party/libwebrtc/logging/rtc_event_video_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_video_gn") diff --git third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build -index 14ba953e29d3..96ef93e69179 100644 +index eb3342a9262b..554779329f71 100644 --- third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build +++ third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_stream_config_gn") diff --git third_party/libwebrtc/media/codec_gn/moz.build third_party/libwebrtc/media/codec_gn/moz.build -index 6b56a082191f..f5bac588d11b 100644 +index a6fa3b406360..0e5621e98050 100644 --- third_party/libwebrtc/media/codec_gn/moz.build +++ third_party/libwebrtc/media/codec_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("codec_gn") -diff --git third_party/libwebrtc/media/delayable_gn/moz.build third_party/libwebrtc/media/delayable_gn/moz.build -index 12b25ac016e3..3a95f5ef1faf 100644 ---- third_party/libwebrtc/media/delayable_gn/moz.build -+++ third_party/libwebrtc/media/delayable_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True - DEFINES["RTC_ENABLE_VP9"] = True -+DEFINES["USE_GLIB"] = "1" -+DEFINES["USE_OZONE"] = "1" -+DEFINES["WEBRTC_BSD"] = True - DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" - DEFINES["WEBRTC_LIBRARY_IMPL"] = True - DEFINES["WEBRTC_MOZILLA_BUILD"] = True - DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -+DEFINES["WEBRTC_POSIX"] = True - DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -+DEFINES["_FILE_OFFSET_BITS"] = "64" -+DEFINES["_LARGEFILE64_SOURCE"] = True -+DEFINES["_LARGEFILE_SOURCE"] = True -+DEFINES["__STDC_CONSTANT_MACROS"] = True -+DEFINES["__STDC_FORMAT_MACROS"] = True - - FINAL_LIBRARY = "webrtc" - -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: - if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" -- --if CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["ANDROID"] = True -- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" -- DEFINES["HAVE_SYS_UIO_H"] = True -- DEFINES["WEBRTC_ANDROID"] = True -- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True -- DEFINES["WEBRTC_LINUX"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_GNU_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_AURA"] = "1" -- DEFINES["USE_GLIB"] = "1" -- DEFINES["USE_NSS_CERTS"] = "1" -- DEFINES["USE_OZONE"] = "1" -- DEFINES["USE_UDEV"] = True -- DEFINES["WEBRTC_LINUX"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["USE_GLIB"] = "1" -- DEFINES["USE_OZONE"] = "1" -- DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_BSD"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -- DEFINES["NOMINMAX"] = True -- DEFINES["NTDDI_VERSION"] = "0x0A000000" -- DEFINES["PSAPI_VERSION"] = "2" -- DEFINES["UNICODE"] = True -- DEFINES["USE_AURA"] = "1" -- DEFINES["WEBRTC_WIN"] = True -- DEFINES["WIN32"] = True -- DEFINES["WIN32_LEAN_AND_MEAN"] = True -- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -- DEFINES["WINVER"] = "0x0A00" -- DEFINES["_ATL_NO_OPENGL"] = True -- DEFINES["_CRT_RAND_S"] = True -- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -- DEFINES["_HAS_EXCEPTIONS"] = "0" -- DEFINES["_HAS_NODISCARD"] = True -- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -- DEFINES["_SECURE_ATL"] = True -- DEFINES["_UNICODE"] = True -- DEFINES["_WIN32_WINNT"] = "0x0A00" -- DEFINES["_WINDOWS"] = True -- DEFINES["__STD_C"] = True -+ DEFINES["_DEBUG"] = True - - if CONFIG["CPU_ARCH"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": -- -- DEFINES["WEBRTC_ARCH_ARM"] = True -- DEFINES["WEBRTC_ARCH_ARM_V7"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": -- -- DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "x86": - -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" -- --if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": -- -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- - Library("delayable_gn") diff --git third_party/libwebrtc/media/media_channel_gn/moz.build third_party/libwebrtc/media/media_channel_gn/moz.build -index d031085023fb..863e7fde7105 100644 +index 1bedb41bf2af..dc7b58e842ae 100644 --- third_party/libwebrtc/media/media_channel_gn/moz.build +++ third_party/libwebrtc/media/media_channel_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,119 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,123 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -161,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -165,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("media_channel_gn") diff --git third_party/libwebrtc/media/media_channel_impl_gn/moz.build third_party/libwebrtc/media/media_channel_impl_gn/moz.build -index 49b90be2fc51..7f0b3bc10a7f 100644 +index 7d0a4bd6506d..172ee56822ee 100644 --- third_party/libwebrtc/media/media_channel_impl_gn/moz.build +++ third_party/libwebrtc/media/media_channel_impl_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("media_channel_impl_gn") diff --git third_party/libwebrtc/media/media_constants_gn/moz.build third_party/libwebrtc/media/media_constants_gn/moz.build -index fb30505356f2..28762fdde6a3 100644 +index af4cd6b257f8..f824cfa02a97 100644 --- third_party/libwebrtc/media/media_constants_gn/moz.build +++ third_party/libwebrtc/media/media_constants_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("media_constants_gn") diff --git third_party/libwebrtc/media/rid_description_gn/moz.build third_party/libwebrtc/media/rid_description_gn/moz.build -index 73ebe8374986..c11ccc5b2902 100644 +index 61afeec94597..5002ea1e568b 100644 --- third_party/libwebrtc/media/rid_description_gn/moz.build +++ third_party/libwebrtc/media/rid_description_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rid_description_gn") diff --git third_party/libwebrtc/media/rtc_media_base_gn/moz.build third_party/libwebrtc/media/rtc_media_base_gn/moz.build -index a48b9886dd24..fcc31ea11376 100644 +index cfff6f34114e..a8cbb815b3dc 100644 --- third_party/libwebrtc/media/rtc_media_base_gn/moz.build +++ third_party/libwebrtc/media/rtc_media_base_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,191 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,195 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_media_base_gn") diff --git third_party/libwebrtc/media/rtc_media_config_gn/moz.build third_party/libwebrtc/media/rtc_media_config_gn/moz.build -index 568632c48fb8..94c43caef47b 100644 +index 17afebe8da99..5f7ef130f434 100644 --- third_party/libwebrtc/media/rtc_media_config_gn/moz.build +++ third_party/libwebrtc/media/rtc_media_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtc_media_config_gn") diff --git third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build -index 4293ba6d9066..01eda12bd559 100644 +index c09703ddd6a2..d923f1e5407f 100644 --- third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build +++ third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_simulcast_encoder_adapter_gn") diff --git third_party/libwebrtc/media/rtp_utils_gn/moz.build third_party/libwebrtc/media/rtp_utils_gn/moz.build -index d12f755865a5..a5d44da104b6 100644 +index 1aaa347151a2..3a5eee57c3c6 100644 --- third_party/libwebrtc/media/rtp_utils_gn/moz.build +++ third_party/libwebrtc/media/rtp_utils_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtp_utils_gn") diff --git third_party/libwebrtc/media/stream_params_gn/moz.build third_party/libwebrtc/media/stream_params_gn/moz.build -index 2deba906b932..65ec7aef0025 100644 +index 71875c4e0165..4c9a675fed35 100644 --- third_party/libwebrtc/media/stream_params_gn/moz.build +++ third_party/libwebrtc/media/stream_params_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("stream_params_gn") diff --git third_party/libwebrtc/modules/async_audio_processing/async_audio_processing_gn/moz.build third_party/libwebrtc/modules/async_audio_processing/async_audio_processing_gn/moz.build -index f599fadae2f0..90a52e406005 100644 +index 347559a342cb..b34d55194ffa 100644 --- third_party/libwebrtc/modules/async_audio_processing/async_audio_processing_gn/moz.build +++ third_party/libwebrtc/modules/async_audio_processing/async_audio_processing_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("async_audio_processing_gn") diff --git third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build -index 03d99c93b89a..a1a7c66b6ff0 100644 +index 4dad1217d030..1beb494d070e 100644 --- third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,194 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_coding_gn") diff --git third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build -index 2826ed8642f9..e8194cf79b99 100644 +index 704026c84512..662101a6da02 100644 --- third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_coding_module_typedefs_gn") diff --git third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build -index bf852e8442a4..de2e04dffe32 100644 +index bbb1557baa57..07e4babacbee 100644 --- third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_coding_opus_common_gn") diff --git third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build -index 56b6d50f6cb7..7ef50512ec05 100644 +index 75153f32214b..7e607a103229 100644 --- third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_encoder_cng_gn") diff --git third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build -index 37cf81ad9f54..a17cc5124685 100644 +index b9d3c55453a7..af6c05a7ac37 100644 --- third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_network_adaptor_config_gn") diff --git third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build -index 1d0905ebc109..ba348ebeecff 100644 +index 7d446965f130..2bc0c19c36ad 100644 --- third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -53,190 +62,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -53,194 +63,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_network_adaptor_gn") diff --git third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build -index 206a4ae313fd..145619c84116 100644 +index aea0a80ed4fa..f37caf681b50 100644 --- third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("default_neteq_factory_gn") diff --git third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build -index 8322910094eb..7bfe819841af 100644 +index 575478702e32..ca3e24ca4b66 100644 --- third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("g711_c_gn") diff --git third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build -index 3a21cddc41e2..80e618a7fa10 100644 +index fa25fde0bd42..5ca4c8481054 100644 --- third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("g711_gn") diff --git third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build -index dc05788b8021..add81cce3212 100644 +index 4821c2bd8267..b91e6ceef362 100644 --- third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("g722_c_gn") diff --git third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build -index 910eef267ffc..d53536655acd 100644 +index 0a56f32af0b5..1023ae364204 100644 --- third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("g722_gn") diff --git third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build -index 1ff9bdf07a4b..9871fbb1c38f 100644 +index 43d69c766282..a4630b7e5435 100644 --- third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -111,190 +120,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -111,194 +121,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("ilbc_c_gn") diff --git third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build -index 4a7279386ee5..b1811c428dda 100644 +index c4b3b4cd1309..4a8e42c833db 100644 --- third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("ilbc_gn") diff --git third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build -index bb9cdf4460c3..00d886763be2 100644 +index 4f4a5c0e7e9b..dc793c09c02f 100644 --- third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("isac_bwinfo_gn") diff --git third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build -index 86f566663ad5..dbed4ddcb476 100644 +index a5cc52279a9f..cab48c87fd99 100644 --- third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,175 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,179 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("isac_vad_gn") diff --git third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build -index b642ffbe952b..9c04c9bb3900 100644 +index 78b7338ddd81..cac379b6b793 100644 --- third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("legacy_encoded_audio_frame_gn") diff --git third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build -index 823aea6ddaa0..ecf6b3b2fde3 100644 +index 04dbb0327974..57d0a614a954 100644 --- third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -78,190 +87,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -78,194 +88,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("neteq_gn") diff --git third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build -index 54863e95aee7..936368e4205a 100644 +index 41f722069cde..929298145fe6 100644 --- third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("pcm16b_c_gn") diff --git third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build -index afee108cb3a1..436a0dda6fd4 100644 +index ed96e7c0f8b8..f2c0266976ea 100644 --- third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("pcm16b_gn") diff --git third_party/libwebrtc/modules/audio_coding/red_gn/moz.build third_party/libwebrtc/modules/audio_coding/red_gn/moz.build -index c4fa5c8bc4fe..7be902bc7b5d 100644 +index 479cf67a2a66..7f59f0ce2a61 100644 --- third_party/libwebrtc/modules/audio_coding/red_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/red_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("red_gn") diff --git third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build -index 4a9c24069e74..ea61654f618e 100644 +index a8a6c576e22b..644ed46e25af 100644 --- third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_cng_gn") diff --git third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build -index 99ea47c13acc..1edab76c795b 100644 +index 491f0cc543ac..2cdd2e8966cc 100644 --- third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build -@@ -12,6 +12,9 @@ AllowCompilerWarnings() +@@ -12,14 +12,24 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_CODEC_ILBC"] = True DEFINES["WEBRTC_CODEC_OPUS"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -@@ -19,7 +22,13 @@ DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_OPUS_SUPPORT_120MS_PTIME"] = "1" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,183 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,190 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_multiopus_gn") diff --git third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build -index 49fb552b0d38..bdf1cbbf4c27 100644 +index e2c57b99afb1..b9964a572e72 100644 --- third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build -@@ -12,6 +12,9 @@ AllowCompilerWarnings() +@@ -12,14 +12,24 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_CODEC_ILBC"] = True DEFINES["WEBRTC_CODEC_OPUS"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -@@ -19,7 +22,13 @@ DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_OPUS_SUPPORT_120MS_PTIME"] = "1" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,190 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,194 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_opus_gn") diff --git third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build -index 20e1d37306c9..604d2ff1160d 100644 +index 268854264f5b..75cf2ac66f90 100644 --- third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build +++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build -@@ -12,6 +12,9 @@ AllowCompilerWarnings() +@@ -12,14 +12,24 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_CODEC_ILBC"] = True DEFINES["WEBRTC_CODEC_OPUS"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -@@ -19,7 +22,13 @@ DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_OPUS_SUPPORT_120MS_PTIME"] = "1" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,183 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,190 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_opus_wrapper_gn") diff --git third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build -index 40ed29f25814..101e685fa20c 100644 +index df00e056c677..9c87f7c0eb47 100644 --- third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build +++ third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_device_gn") diff --git third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build -index c6a45f9a3761..f1359947dd44 100644 +index edfac56a3a52..76eea8d6f4b7 100644 --- third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build +++ third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_frame_manipulator_gn") diff --git third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build -index 32a47e6b064d..44ff455cc768 100644 +index 7108d9fbe1c4..7e31717972c2 100644 --- third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build +++ third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,194 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_mixer_impl_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build -index 60ecc93ab967..556de6ede5e6 100644 +index f21e65fb4a2b..45caaf66c9d3 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("adaptive_fir_filter_erl_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build -index fd78a435604d..aed93b9c682d 100644 +index b9c819893ff9..7f00a42dad1a 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("adaptive_fir_filter_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build -index 6f67bd6fad7f..301dd09d6644 100644 +index 097e67bbe502..8581bbea27b3 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build -@@ -17,13 +17,22 @@ CXXFLAGS += [ +@@ -17,13 +17,23 @@ CXXFLAGS += [ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_ENABLE_AVX2"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -54,137 +63,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,141 +64,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - CXXFLAGS += [ - "-msse2" - ] + DEFINES["USE_X11"] = "1" Library("aec3_avx2_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build -index b0952a7d0cd8..8a9d53a1b709 100644 +index 955fe2022fd3..644f510a92b4 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("aec3_common_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build -index 97bbc435395f..0fba9b70c95b 100644 +index 154d9f440665..b39c407de26b 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("aec3_fft_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build -index 6646d41ff3a8..b680faacb6b6 100644 +index 7ad4cffedf28..0ef6f85dcfa2 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -100,190 +109,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -100,194 +110,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("aec3_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build -index d77163999ba8..bbfd52a05ced 100644 +index 0084077435c5..a04b6dc8ae72 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("fft_data_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build -index bae4fa297266..af83e29c22cb 100644 +index be2c3bbf56ee..1fb2bf245b0b 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("matched_filter_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build -index b7a10f5d7c88..8068d5e8b48a 100644 +index 2bd3ae0c0132..080f579f017c 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("render_buffer_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build -index 89ee0b6a8172..e2c6c18ff9e0 100644 +index e40fdb1cf187..8d526768fe2b 100644 --- third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("vector_math_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build -index 201cd58360cf..28209dac0b7d 100644 +index f1280fed0dcb..4fd80b10de2e 100644 --- third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("aec_dump_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build -index 974b70b087d2..e7cd5f585b83 100644 +index 2966151ab6a6..29c503fd1b35 100644 --- third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("null_aec_dump_factory_gn") diff --git third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build -index 1c47bbd5cc1e..c51fcb7d6a97 100644 +index 02b847ed761e..336b06122354 100644 --- third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("aec_dump_interface_gn") diff --git third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build -index f0e41cd6bd08..9fec01cfbcec 100644 +index a645dceff4b0..63d92c92ad50 100644 --- third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,113 +53,7 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,117 +54,7 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": -@@ -158,20 +61,7 @@ if CONFIG["CPU_ARCH"] == "aarch64": +@@ -162,20 +62,7 @@ if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_HAS_NEON"] = True SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_neon.cc" - ] - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - SOURCES += [ + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc", "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_neon.cc" ] -@@ -179,7 +69,6 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -183,7 +70,6 @@ if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True SOURCES += [ "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_mips.cc" -@@ -187,8 +76,6 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -191,8 +77,6 @@ if CONFIG["TARGET_CPU"] == "mips32": - if CONFIG["CPU_ARCH"] == "mips64": + if CONFIG["TARGET_CPU"] == "mips64": - DEFINES["_GNU_SOURCE"] = True - SOURCES += [ "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" ] -@@ -199,95 +86,28 @@ if CONFIG["CPU_ARCH"] == "ppc64": +@@ -203,95 +87,28 @@ if CONFIG["TARGET_CPU"] == "ppc64": "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" ] --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "riscv64": - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] - - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True SOURCES += [ "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" ] --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True SOURCES += [ "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True - - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] + DEFINES["USE_X11"] = "1" Library("aecm_core_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build -index 45e6cad30638..cafd3cc50045 100644 +index f6f4442cfc84..0bf849711117 100644 --- third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("agc_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build -index c6ab9b3160de..6cc48faee4a7 100644 +index be6b4f9b27f5..81bfd7afd255 100644 --- third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("gain_control_interface_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build -index 0188a8ac107e..364ef9950f2c 100644 +index 4e6e295d34a8..7780faadc89c 100644 --- third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("legacy_agc_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build -index 9db9a639e7ae..865eee21cf92 100644 +index 64ffa7596019..6a905df4ed20 100644 --- third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,194 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("level_estimation_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gain_controller_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gain_controller_gn/moz.build -index 7d16c9a9f5c1..ab3f79521ab8 100644 +index 9473ac62f52b..2c59f64717cf 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gain_controller_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gain_controller_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("adaptive_digital_gain_controller_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build -index f396f42e5776..1d4e4aaebbe3 100644 +index c7a2f6d21536..c8a383c619f6 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("biquad_filter_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor_gn/moz.build -index 9cddd69abef4..fc59d2ead813 100644 +index e70e3f68e936..8859fbd93187 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("clipping_predictor_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build -index 274cae23a398..c4e0b45cf302 100644 +index 869061354209..bd6ed025dd1e 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("common_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/cpu_features_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/cpu_features_gn/moz.build -index a4572251ad4c..6817471d99c1 100644 +index 4b0431db1a98..638f16d62cad 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/cpu_features_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/cpu_features_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("cpu_features_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build -index 3a54fc31711b..e87103152bc9 100644 +index 1b8da82f5817..0dc44f1fda4d 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,194 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("fixed_digital_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build -index 394aa109faf3..cb41c74ad271 100644 +index bea71dcee3e5..c8dc6b50f073 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("gain_applier_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/gain_map_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/gain_map_gn/moz.build -index 5b1d68415a52..32bf484b86e7 100644 +index 03eb1fb3a1df..910e1f47a627 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/gain_map_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/gain_map_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("gain_map_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_gn/moz.build -index 582eb326f3d6..8fa3a2bba795 100644 +index f1a841d5aee9..ae8b8ea97657 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,194 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("input_volume_controller_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter_gn/moz.build -index 5a662f407985..c92be24aa407 100644 +index 40448f68a9d2..d92108c59272 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("input_volume_stats_reporter_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build -index ba000d386223..21a9e8b6511a 100644 +index 9d4629e9abeb..2057bc49645f 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("noise_level_estimator_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_auto_correlation_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_auto_correlation_gn/moz.build -index 3f00e43e7c28..87c64337304c 100644 +index 134ffac5fd31..a6688f3d2880 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_auto_correlation_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_auto_correlation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_auto_correlation_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_common_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_common_gn/moz.build -index 64d3371d81b0..bd147bc9f851 100644 +index cf3de48a578a..7a188fed0014 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_common_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_common_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rnn_vad_common_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build -index 82e5302312e5..ef8d61998fa0 100644 +index dbb926c5fcb6..06b7c1408598 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_layers_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_layers_gn/moz.build -index 7dd4619965ab..63049c23fc5e 100644 +index 92da260f905a..23a0102c4071 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_layers_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_layers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_layers_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_lp_residual_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_lp_residual_gn/moz.build -index 1fcbbbe408fa..ebc5b9a10d04 100644 +index cedb17bc22b7..58600753bf59 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_lp_residual_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_lp_residual_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_lp_residual_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_pitch_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_pitch_gn/moz.build -index 6a69de9e292e..3d0349fab510 100644 +index d45bc78ff6ae..76f782e606d1 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_pitch_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_pitch_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_pitch_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_ring_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_ring_buffer_gn/moz.build -index d2a4eb7261b6..1a81378e66f5 100644 +index 20da5f3615d1..aeba82350dcf 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_ring_buffer_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_ring_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rnn_vad_ring_buffer_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_sequence_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_sequence_buffer_gn/moz.build -index c6913470c362..916932ccba9a 100644 +index b0ba79562e46..941c1d83c87a 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_sequence_buffer_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_sequence_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rnn_vad_sequence_buffer_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_spectral_features_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_spectral_features_gn/moz.build -index 8298c7e091d7..db6f13136c47 100644 +index 2d8396fa2aa9..d120c6a00f95 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_spectral_features_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_spectral_features_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_spectral_features_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_symmetric_matrix_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_symmetric_matrix_buffer_gn/moz.build -index acb933045439..e9cb91b4da31 100644 +index 143ba6960c6f..bea61cc9a325 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_symmetric_matrix_buffer_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_symmetric_matrix_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rnn_vad_symmetric_matrix_buffer_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn/moz.build -index 275c512cf6bb..d8f9ba076c5f 100644 +index d4dd169f1523..176b86944ca2 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn/moz.build -@@ -17,12 +17,21 @@ CXXFLAGS += [ +@@ -17,12 +17,22 @@ CXXFLAGS += [ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_ENABLE_AVX2"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -49,137 +58,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,141 +59,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - CXXFLAGS += [ - "-msse2" - ] + DEFINES["USE_X11"] = "1" Library("vector_math_avx2_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_gn/moz.build -index 263ec679e37d..e2c6c18ff9e0 100644 +index 09fe0c3d2452..8d526768fe2b 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("vector_math_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/saturation_protector_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/saturation_protector_gn/moz.build -index a1e6f309bffa..934bd6d2cdd2 100644 +index 6b8def8650b5..7a45c00e5966 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/saturation_protector_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/saturation_protector_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,194 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("saturation_protector_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/speech_level_estimator_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/speech_level_estimator_gn/moz.build -index bb1dbc67b847..ad6f735a2729 100644 +index 8f2996fa264e..eee602cf0088 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/speech_level_estimator_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/speech_level_estimator_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("speech_level_estimator_gn") diff --git third_party/libwebrtc/modules/audio_processing/agc2/vad_wrapper_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/vad_wrapper_gn/moz.build -index dfa276510899..9f02e46a59fd 100644 +index 55cfbb60e71d..dbe8fdf62b34 100644 --- third_party/libwebrtc/modules/audio_processing/agc2/vad_wrapper_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/agc2/vad_wrapper_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("vad_wrapper_gn") diff --git third_party/libwebrtc/modules/audio_processing/api_gn/moz.build third_party/libwebrtc/modules/audio_processing/api_gn/moz.build -index 7f1c48ac391e..d6226679c01e 100644 +index 7a02b7e10c3f..02a5a5977fb2 100644 --- third_party/libwebrtc/modules/audio_processing/api_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("api_gn") diff --git third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build -index b6d96414b469..7a4060eadad0 100644 +index 992376cd8a35..7d069ced5f05 100644 --- third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("apm_logging_gn") diff --git third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build -index 2291d2981df8..a6e68e27491a 100644 +index 88031a747de7..07b14b4ad557 100644 --- third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,194 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_buffer_gn") diff --git third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build -index 683d86e74389..d0b535438023 100644 +index 7e73b704838d..244e4b9f1e17 100644 --- third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_frame_proxies_gn") diff --git third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build -index 9b90bca379fd..af0fce3d5e23 100644 +index 0f8175509182..e6ffd17bd131 100644 --- third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("audio_frame_view_gn") diff --git third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build -index ab0ca7113f60..f5628add5044 100644 +index 7dc22bcf2bdc..2d073c5534c0 100644 --- third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -50,190 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,194 +60,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_processing_gn") diff --git third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build -index f0af20c33521..0e0173197c5f 100644 +index 6d174505ed03..a1efc9d29d6b 100644 --- third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_processing_statistics_gn") diff --git third_party/libwebrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster_gn/moz.build third_party/libwebrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster_gn/moz.build -index 3e57c48b6fc4..3ceff91af48f 100644 +index d80a3bb1c6d2..2d0cb60d35c2 100644 --- third_party/libwebrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("capture_levels_adjuster_gn") diff --git third_party/libwebrtc/modules/audio_processing/gain_controller2_gn/moz.build third_party/libwebrtc/modules/audio_processing/gain_controller2_gn/moz.build -index fcbe873d276a..f87fc5607282 100644 +index d6d9d3658b8d..2309786d2b1c 100644 --- third_party/libwebrtc/modules/audio_processing/gain_controller2_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/gain_controller2_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("gain_controller2_gn") diff --git third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build -index 4c8aac9c3dad..28352a6c74f4 100644 +index 8769a3a31863..441defcc49c4 100644 --- third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("high_pass_filter_gn") diff --git third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build -index 12076eedcb58..467f6e1046bb 100644 +index 14595abaf908..eb8ba5a7bc73 100644 --- third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" - DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "0" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -56,190 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -56,194 +66,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("ns_gn") diff --git third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build -index 3e4fa4ca518f..3bd588630b7e 100644 +index af79a781f6de..67ab6a2a8454 100644 --- third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("optionally_built_submodule_creators_gn") diff --git third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build -index ec35734b6dfc..de1436046491 100644 +index 23f52652aebc..54810dea2903 100644 --- third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rms_level_gn") diff --git third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build -index 5988e89a6a2a..5b680cbdd1fb 100644 +index 6310b948ac1f..1ee08a185597 100644 --- third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("transient_suppressor_api_gn") diff --git third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build -index ee6b82a2f629..d7a2d68e8bf0 100644 +index 31e0736f308e..21fd63ba8c66 100644 --- third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,194 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("transient_suppressor_impl_gn") diff --git third_party/libwebrtc/modules/audio_processing/transient/voice_probability_delay_unit_gn/moz.build third_party/libwebrtc/modules/audio_processing/transient/voice_probability_delay_unit_gn/moz.build -index e2abcb849006..6deaa3bbf6a4 100644 +index 52587c089017..a816267ba48b 100644 --- third_party/libwebrtc/modules/audio_processing/transient/voice_probability_delay_unit_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/transient/voice_probability_delay_unit_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("voice_probability_delay_unit_gn") diff --git third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build -index 8cf3aaefeb48..ae86ec0ff176 100644 +index 02813d2513b3..f5811a132b51 100644 --- third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("cascaded_biquad_filter_gn") diff --git third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build -index 11294e2aefb8..0d5e4b712c18 100644 +index 67c6a218f6db..c97c6e245e5c 100644 --- third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("legacy_delay_estimator_gn") diff --git third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build -index 02898359bf06..7d5ad6e0e09e 100644 +index 321370600559..c3d938676efc 100644 --- third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("pffft_wrapper_gn") diff --git third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build -index 0e76427c6e5f..b452ab92154e 100644 +index 3739bbef8afc..951669e227b5 100644 --- third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build +++ third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -50,190 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,194 +60,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("vad_gn") diff --git third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build -index 700c1d15f44f..02587d185dd1 100644 +index b5bcafa45fbc..ca0e2eb0d4f3 100644 --- third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,191 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,195 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("congestion_controller_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build -index f6520bf35800..0b35f2f82c75 100644 +index b48fc38c398c..7b699b35ae1c 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("alr_detector_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build -index 35ba379f71c0..ff1a426bf5d3 100644 +index 31d8c420f6b6..ef4afa64817b 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,191 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,195 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("delay_based_bwe_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build -index b15062af41c8..3e8439f74637 100644 +index e233806b437f..5d3384990b73 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -49,190 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,194 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("estimators_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build -index de5ccaa0c810..49adaa09b004 100644 +index 147a08113b86..e5abebc8e438 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,195 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("goog_cc_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build -index 829ff47d87db..3f777466098c 100644 +index 0ee8a34df8b9..bf9b47761a6b 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("link_capacity_estimator_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v1_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v1_gn/moz.build -index aae4b8252060..0cad7d4a534c 100644 +index 5931292efe33..92f384be816c 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v1_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v1_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("loss_based_bwe_v1_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2_gn/moz.build -index 5728e0c4b27d..da1bee07288c 100644 +index ca9f20ab87e6..3a63a38d3def 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("loss_based_bwe_v2_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build -index 4f4f573cd902..51646a517e70 100644 +index 703c22a59092..e3ef5aa27c28 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("probe_controller_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build -index e189363d3ea8..5cf159041ae8 100644 +index 291502c95a37..d0ba53b314f1 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("pushback_controller_gn") diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/send_side_bwe_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/send_side_bwe_gn/moz.build -index c93e412e836f..0b6eb6ed39e9 100644 +index d83d51f98500..c2c328ca1180 100644 --- third_party/libwebrtc/modules/congestion_controller/goog_cc/send_side_bwe_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/goog_cc/send_side_bwe_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("send_side_bwe_gn") diff --git third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build -index 980bc79d04c3..313ac07d0c15 100644 +index 7e8cb8782020..bb0f0dcf3f16 100644 --- third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("control_handler_gn") diff --git third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build -index eb5a2a87e058..b4e083731eed 100644 +index 40ead5619cde..341ba2492f8d 100644 --- third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build +++ third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("transport_feedback_gn") diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build -index 06e178901e14..8c38587543bd 100644 +index e02d81561426..ab560df6adc1 100644 --- third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build +++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True DEFINES["WEBRTC_ENABLE_AVX2"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,110 +53,23 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,113 +54,23 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" + DEFINES["_DEBUG"] = True -if CONFIG["OS_TARGET"] == "Darwin": -+if CONFIG["CPU_ARCH"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ + "-msse2", "-msse2" ] - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": CXXFLAGS += [ "-msse2" ] - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2", - "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - CXXFLAGS += [ - "-msse2" - ] - Library("desktop_capture_differ_sse2_gn") diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build -index 63c0e0b52d57..77ef9f7209ee 100644 +index 22a76e9e761e..a9ffbe84d438 100644 --- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build +++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build -@@ -14,11 +14,20 @@ AllowCompilerWarnings() +@@ -14,11 +14,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -70,180 +79,13 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -70,188 +80,13 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_configuration_monitor.cc", +- "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/mac/full_screen_mac_application_handler.cc", - "/third_party/libwebrtc/modules/desktop_capture/mac/window_list_utils.cc" - ] - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", - "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["WEBRTC_USE_X11"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc", - "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", - "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" - ] - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "d3d11", +- "dwmapi", - "dxgi", - "iphlpapi", - "secur32", - "shcore", - "winmm" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/cropping_window_capturer_win.cc", - "/third_party/libwebrtc/modules/desktop_capture/desktop_frame_win.cc", - "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc", - "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_win.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/cursor.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/d3d_device.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/desktop.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/desktop_capture_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/display_configuration_monitor.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_context.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_frame.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_texture.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/dxgi_texture_staging.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/full_screen_win_application_handler.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/scoped_thread_desktop.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/screen_capture_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/selected_window_context.cc", +- "/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc", +- "/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_source.cc", +- "/third_party/libwebrtc/modules/desktop_capture/win/wgc_capturer_win.cc", +- "/third_party/libwebrtc/modules/desktop_capture/win/wgc_desktop_frame.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/window_capture_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/win/window_capturer_win_gdi.cc", - "/third_party/libwebrtc/modules/desktop_capture/window_capturer_win.cc", - "/third_party/libwebrtc/modules/desktop_capture/window_finder_win.cc" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -256,7 +98,8 @@ if CONFIG["CPU_ARCH"] == "arm": +@@ -264,7 +99,8 @@ if CONFIG["TARGET_CPU"] == "arm": ] SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ -@@ -266,7 +109,9 @@ if CONFIG["CPU_ARCH"] == "arm": +@@ -274,7 +110,9 @@ if CONFIG["TARGET_CPU"] == "arm": "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", + "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ] - if CONFIG["CPU_ARCH"] == "mips32": -@@ -274,7 +119,6 @@ if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": +@@ -282,7 +120,6 @@ if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -287,7 +131,8 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -295,7 +132,8 @@ if CONFIG["TARGET_CPU"] == "mips32": ] SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ -@@ -297,13 +142,14 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -305,13 +143,14 @@ if CONFIG["TARGET_CPU"] == "mips32": "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", + "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ] - if CONFIG["CPU_ARCH"] == "mips64": + if CONFIG["TARGET_CPU"] == "mips64": DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -316,7 +162,8 @@ if CONFIG["CPU_ARCH"] == "mips64": +@@ -324,7 +163,8 @@ if CONFIG["TARGET_CPU"] == "mips64": ] SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ -@@ -326,128 +173,19 @@ if CONFIG["CPU_ARCH"] == "mips64": +@@ -334,126 +174,19 @@ if CONFIG["TARGET_CPU"] == "mips64": "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" - ] - --if CONFIG["CPU_ARCH"] == "ppc64": +-if CONFIG["TARGET_CPU"] == "ppc64": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" - ] - --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "riscv64": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", + "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ] - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - - LOCAL_INCLUDES += [ - "/gfx/angle/checkout/include/", - "/third_party/drm/drm/", - "/third_party/drm/drm/include/", - "/third_party/drm/drm/include/libdrm/", - "/third_party/gbm/gbm/", - "/third_party/libepoxy/libepoxy/include/", - "/third_party/pipewire/" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/mouse_cursor_monitor_pipewire.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/restore_token_manager.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] + DEFINES["WEBRTC_ENABLE_AVX2"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -460,7 +198,8 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -466,7 +199,8 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ] SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ -@@ -470,13 +209,15 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -476,13 +210,15 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", + "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", + "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": + DEFINES["WEBRTC_ENABLE_AVX2"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -489,7 +230,8 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +@@ -495,7 +231,8 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ] SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" + "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc", + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ -@@ -499,97 +241,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +@@ -505,66 +242,12 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc", "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_stream_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" -- ] -- --if CONFIG["CPU_ARCH"] == "mips32" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": ++ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" + ] + +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_USE_X11"] = True +@@ -592,88 +275,23 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGE + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" + ] + +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] -- -- UNIFIED_SOURCES += [ ++if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "ppc64": + + UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ++ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_null.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_null.cc" ] --if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "ppc64": - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True -@@ -618,62 +275,23 @@ if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TA - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] -+if CONFIG["CPU_ARCH"] == "ppc64" and not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD": - - UNIFIED_SOURCES += [ +- +- UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" -+ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_null.cc", -+ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_null.cc" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- ] +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True -+if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +- - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" + SOURCES += [ + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" + "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", + "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ] Library("desktop_capture_gn") diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build deleted file mode 100644 -index 2706bed4a65f..000000000000 +index 3b34c0cc8b0b..000000000000 --- third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build +++ /dev/null @@ -1,77 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/sdk/objc/", - "/third_party/libwebrtc/sdk/objc/base/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_configuration.mm", - "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_cgimage.mm", - "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_iosurface.mm", - "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.mm", - "/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm", - "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm", - "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_darwin.mm", - "/third_party/libwebrtc/modules/desktop_capture/window_capturer_mac.mm", - "/third_party/libwebrtc/modules/desktop_capture/window_finder_mac.mm" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("desktop_capture_objc_gn") diff --git third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build -index 59c2ba037b83..4458ad4e5673 100644 +index de232571beb4..515a6b7fe6df 100644 --- third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build +++ third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -49,165 +58,31 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,168 +59,31 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "ppc64": +-if CONFIG["TARGET_CPU"] == "ppc64": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "riscv64": - - DEFINES["USE_X11"] = "1" - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "mips32" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" diff --git third_party/libwebrtc/modules/module_api_gn/moz.build third_party/libwebrtc/modules/module_api_gn/moz.build -index 3b999fdfdfe9..b5cd5bd51eb9 100644 +index d61cca4a488c..021306b00c2a 100644 --- third_party/libwebrtc/modules/module_api_gn/moz.build +++ third_party/libwebrtc/modules/module_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("module_api_gn") diff --git third_party/libwebrtc/modules/module_api_public_gn/moz.build third_party/libwebrtc/modules/module_api_public_gn/moz.build -index 6d3952410c70..6d2484302b75 100644 +index 45518d1a8a19..03a6663f2ee5 100644 --- third_party/libwebrtc/modules/module_api_public_gn/moz.build +++ third_party/libwebrtc/modules/module_api_public_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("module_api_public_gn") diff --git third_party/libwebrtc/modules/module_fec_api_gn/moz.build third_party/libwebrtc/modules/module_fec_api_gn/moz.build -index 3badc9ded12e..b50fec7f7d98 100644 +index 7b4274f1b8a5..8f331e2b7df5 100644 --- third_party/libwebrtc/modules/module_fec_api_gn/moz.build +++ third_party/libwebrtc/modules/module_fec_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("module_fec_api_gn") diff --git third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build -index 17d4371d72e0..f42d208ca469 100644 +index a528123ae068..e46741806ee3 100644 --- third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build +++ third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("interval_budget_gn") diff --git third_party/libwebrtc/modules/pacing/pacing_gn/moz.build third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -index 6fb893c2db14..5605df303cd7 100644 +index 6b7f69865fd1..453c5e0ead44 100644 --- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build +++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -50,191 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,195 +60,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("pacing_gn") diff --git third_party/libwebrtc/modules/portal/portal_gn/moz.build third_party/libwebrtc/modules/portal/portal_gn/moz.build -index 77603c780bdc..2ab84b3fe759 100644 +index 2760d7e5e125..309f14a69dc0 100644 --- third_party/libwebrtc/modules/portal/portal_gn/moz.build +++ third_party/libwebrtc/modules/portal/portal_gn/moz.build -@@ -14,21 +14,17 @@ AllowCompilerWarnings() +@@ -14,22 +14,18 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["USE_AURA"] = "1" DEFINES["USE_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True +DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_LINUX"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" DEFINES["WEBRTC_USE_PIPEWIRE"] = True DEFINES["_FILE_OFFSET_BITS"] = "64" -DEFINES["_GNU_SOURCE"] = True DEFINES["_LARGEFILE64_SOURCE"] = True DEFINES["_LARGEFILE_SOURCE"] = True DEFINES["__STDC_CONSTANT_MACROS"] = True -@@ -75,16 +71,6 @@ if CONFIG["CPU_ARCH"] == "aarch64": +@@ -76,16 +72,6 @@ if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True -@@ -102,7 +88,7 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -103,7 +89,7 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" diff --git third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build -index e572e90c311a..712c9fe0bacd 100644 +index 2876755e9119..54de56dcae4e 100644 --- third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build +++ third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -55,190 +64,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -55,194 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("remote_bitrate_estimator_gn") diff --git third_party/libwebrtc/modules/rtp_rtcp/leb128_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/leb128_gn/moz.build -index f03986e482da..8cfbc6b1ddb3 100644 +index 88f2cb22e03b..8a8bd3e82b3a 100644 --- third_party/libwebrtc/modules/rtp_rtcp/leb128_gn/moz.build +++ third_party/libwebrtc/modules/rtp_rtcp/leb128_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("leb128_gn") diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build -index da69b456d323..3a86740343d2 100644 +index da304ae5a4f9..6a99f50c5c90 100644 --- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build +++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -85,190 +94,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -85,194 +95,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_rtcp_format_gn") diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build -index d4d42e4dcf5c..ca2824350d12 100644 +index 382194837b7f..b9118e1215cd 100644 --- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build +++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build -@@ -13,11 +13,20 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +@@ -13,11 +13,21 @@ DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -97,191 +106,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -98,195 +108,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_rtcp_gn") diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build -index 99447dd14992..4743dce9a666 100644 +index 2c8b5e232175..172b2829c241 100644 --- third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build +++ third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtp_video_header_gn") diff --git third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build -index 40022820400d..a8dff360398f 100644 +index d2e3ea012808..393d9c9b7322 100644 --- third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build +++ third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("fft_gn") diff --git third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build -index 3b2ee5ee3d97..af84f0dd5f5a 100644 +index aa7a21a68032..76439cf53388 100644 --- third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build +++ third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("g711_3p_gn") diff --git third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build -index f40abbac1407..d320b4ef86f8 100644 +index 41a8c05baecd..169ba1ccf906 100644 --- third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build +++ third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,175 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,179 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("g722_3p_gn") diff --git third_party/libwebrtc/modules/utility/utility_gn/moz.build third_party/libwebrtc/modules/utility/utility_gn/moz.build -index b932f5da73da..49d074bc4db2 100644 +index b6921b76262e..dda03191e506 100644 --- third_party/libwebrtc/modules/utility/utility_gn/moz.build +++ third_party/libwebrtc/modules/utility/utility_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,115 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/utility/source/helpers_android.cc" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True -- -- OS_LIBS += [ -- "winmm" -- ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": -- -- CXXFLAGS += [ -- "-mfpu=neon" -- ] +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": + +@@ -157,65 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - -- DEFINES["USE_X11"] = "1" -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +- CXXFLAGS += [ +- "-mfpu=neon" +- ] - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- +- CXXFLAGS += [ +- "-msse2" +- ] - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - +- Library("utility_gn") diff --git third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build -index 4b4b418c551f..6daff73f66b4 100644 +index 24988a1ffc06..a2ba3c8ac944 100644 --- third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build +++ third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build -@@ -14,11 +14,20 @@ AllowCompilerWarnings() +@@ -14,11 +14,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -33,6 +42,10 @@ LOCAL_INCLUDES += [ +@@ -33,6 +43,10 @@ LOCAL_INCLUDES += [ ] UNIFIED_SOURCES += [ + "/third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc", + "/third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc", + "/third_party/libwebrtc/modules/video_capture/linux/video_capture_linux.cc", + "/third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc", "/third_party/libwebrtc/modules/video_capture/video_capture_options.cc" ] -@@ -45,149 +58,13 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,153 +59,13 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc", - "/third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc", - "/third_party/libwebrtc/modules/video_capture/linux/video_capture_linux.cc", - "/third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc", - "/third_party/libwebrtc/modules/video_capture/linux/device_info_v4l2.cc", - "/third_party/libwebrtc/modules/video_capture/linux/video_capture_linux.cc", - "/third_party/libwebrtc/modules/video_capture/linux/video_capture_v4l2.cc" - ] - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "ole32", - "oleaut32", - "secur32", - "strmiids", - "user32", - "winmm" - ] - - SOURCES += [ - "/third_party/libwebrtc/modules/video_capture/windows/device_info_ds.cc", - "/third_party/libwebrtc/modules/video_capture/windows/help_functions_ds.cc", - "/third_party/libwebrtc/modules/video_capture/windows/sink_filter_ds.cc" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/video_capture/windows/video_capture_ds.cc", - "/third_party/libwebrtc/modules/video_capture/windows/video_capture_factory_windows.cc" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -206,81 +83,11 @@ if CONFIG["CPU_ARCH"] == "mips32": +@@ -210,81 +84,11 @@ if CONFIG["TARGET_CPU"] == "mips32": "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" ] --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - - LOCAL_INCLUDES += [ - "/gfx/angle/checkout/include/", - "/third_party/drm/drm/", - "/third_party/drm/drm/include/", - "/third_party/drm/drm/include/libdrm/", - "/third_party/gbm/gbm/", - "/third_party/libepoxy/libepoxy/include/", - "/third_party/pipewire/" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", - "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", - "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", - "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" - ] - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["TARGET_CPU"] == "mips32": + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -299,10 +106,9 @@ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +@@ -303,10 +107,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" ] --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": ++if CONFIG["TARGET_CPU"] == "mips64": DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -321,14 +127,14 @@ if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +@@ -325,14 +128,14 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" ] --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] + DEFINES["WEBRTC_ENABLE_AVX2"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -347,10 +153,10 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -351,10 +154,10 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": + DEFINES["WEBRTC_ENABLE_AVX2"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/gfx/angle/checkout/include/", -@@ -369,4 +175,8 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +@@ -373,4 +176,8 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" ] +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + Library("video_capture_internal_impl_gn") diff --git third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build -index 8aa245b127c1..1f157fe113a0 100644 +index 49c62d5cf608..30fbc8a16f91 100644 --- third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build +++ third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,191 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,195 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_capture_module_gn") diff --git third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build -index 9020f11067fc..fcc8a73423ab 100644 +index dd8e979e41fe..3c56145fb1aa 100644 --- third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("chain_diff_calculator_gn") diff --git third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build -index 7c87e340afde..b4f0490937ff 100644 +index 73fce5bf02bb..4c79e5b318d9 100644 --- third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("codec_globals_headers_gn") diff --git third_party/libwebrtc/modules/video_coding/codecs/av1/av1_svc_config_gn/moz.build third_party/libwebrtc/modules/video_coding/codecs/av1/av1_svc_config_gn/moz.build -index cc297017e3d5..12901738a75f 100644 +index e67bb6616d49..100155a39f1f 100644 --- third_party/libwebrtc/modules/video_coding/codecs/av1/av1_svc_config_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/codecs/av1/av1_svc_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("av1_svc_config_gn") diff --git third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build -index 159b77d10cab..217d265bacee 100644 +index 9b8e33b7d542..5a661787308d 100644 --- third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("encoded_frame_gn") diff --git third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build -index c518044c948a..74af6c5dc520 100644 +index 487fc5b4d6e5..97d7596cd7ee 100644 --- third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("frame_dependencies_calculator_gn") diff --git third_party/libwebrtc/modules/video_coding/frame_helpers_gn/moz.build third_party/libwebrtc/modules/video_coding/frame_helpers_gn/moz.build -index d6342c48f713..544a97f60aad 100644 +index dd901a5371a0..99867a1c8f90 100644 --- third_party/libwebrtc/modules/video_coding/frame_helpers_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/frame_helpers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -- OS_LIBS += [ -- "rt" -- ] -- -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("frame_helpers_gn") diff --git third_party/libwebrtc/modules/video_coding/nack_requester_gn/moz.build third_party/libwebrtc/modules/video_coding/nack_requester_gn/moz.build -index 33e763a48d7e..e1db6e2439d5 100644 +index 0f6654f1ab6f..309d2686d921 100644 --- third_party/libwebrtc/modules/video_coding/nack_requester_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/nack_requester_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,194 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("nack_requester_gn") diff --git third_party/libwebrtc/modules/video_coding/packet_buffer_gn/moz.build third_party/libwebrtc/modules/video_coding/packet_buffer_gn/moz.build -index 9561cb88e8eb..65e5b4757c29 100644 +index f3f85aacaa19..c1be9596e0a5 100644 --- third_party/libwebrtc/modules/video_coding/packet_buffer_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/packet_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("packet_buffer_gn") diff --git third_party/libwebrtc/modules/video_coding/svc/scalability_mode_util_gn/moz.build third_party/libwebrtc/modules/video_coding/svc/scalability_mode_util_gn/moz.build -index f786b1161681..e6d655af95dc 100644 +index 8a1dfd6377d5..c4b6ec469538 100644 --- third_party/libwebrtc/modules/video_coding/svc/scalability_mode_util_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/svc/scalability_mode_util_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("scalability_mode_util_gn") diff --git third_party/libwebrtc/modules/video_coding/svc/scalability_structures_gn/moz.build third_party/libwebrtc/modules/video_coding/svc/scalability_structures_gn/moz.build -index a3e45b1cd7ba..12c34079a6e6 100644 +index a3ea8b349573..bb66a11cb47c 100644 --- third_party/libwebrtc/modules/video_coding/svc/scalability_structures_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/svc/scalability_structures_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -50,183 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,190 +60,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("scalability_structures_gn") diff --git third_party/libwebrtc/modules/video_coding/svc/scalable_video_controller_gn/moz.build third_party/libwebrtc/modules/video_coding/svc/scalable_video_controller_gn/moz.build -index 42b8307362fe..9348473d2af9 100644 +index a285154a79ed..9fad4e4a38d8 100644 --- third_party/libwebrtc/modules/video_coding/svc/scalable_video_controller_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/svc/scalable_video_controller_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("scalable_video_controller_gn") diff --git third_party/libwebrtc/modules/video_coding/svc/svc_rate_allocator_gn/moz.build third_party/libwebrtc/modules/video_coding/svc/svc_rate_allocator_gn/moz.build -index 5d7d952a69b9..7157f0bd74ba 100644 +index 412f719d18cd..415872506d13 100644 --- third_party/libwebrtc/modules/video_coding/svc/svc_rate_allocator_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/svc/svc_rate_allocator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("svc_rate_allocator_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build -index 86a34e861ec4..1e4f00d3f730 100644 +index 36867642c7ba..81060f6b3f2c 100644 --- third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/decode_time_percentile_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("decode_time_percentile_filter_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build -index ecdcfc93e128..47bc48987a96 100644 +index caf0efc16596..463feb1bc7a7 100644 --- third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/frame_delay_variation_kalman_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("frame_delay_variation_kalman_filter_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_variation_calculator_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_variation_calculator_gn/moz.build -index 56b01f3f41eb..a451183c0b23 100644 +index 8c6e826a4a85..284a46af8e7d 100644 --- third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_variation_calculator_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_variation_calculator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("inter_frame_delay_variation_calculator_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/jitter_estimator_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/jitter_estimator_gn/moz.build -index a0d6154d785f..b158655cdd5d 100644 +index c7ca3c7fd85f..c38cf361ccf6 100644 --- third_party/libwebrtc/modules/video_coding/timing/jitter_estimator_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/jitter_estimator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("jitter_estimator_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/rtt_filter_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/rtt_filter_gn/moz.build -index 488a49d9c26b..bc1e328ba2ec 100644 +index f3993a17b1c2..13ea6d3315e7 100644 --- third_party/libwebrtc/modules/video_coding/timing/rtt_filter_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/rtt_filter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtt_filter_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/timestamp_extrapolator_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/timestamp_extrapolator_gn/moz.build -index 4cd085dd0962..2865a2290f7d 100644 +index ad8a6874e406..59227c6d26ab 100644 --- third_party/libwebrtc/modules/video_coding/timing/timestamp_extrapolator_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/timestamp_extrapolator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("timestamp_extrapolator_gn") diff --git third_party/libwebrtc/modules/video_coding/timing/timing_module_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/timing_module_gn/moz.build -index 8ab43fb7484d..4fd77d42f049 100644 +index 60cc81a2292b..40909203b3cf 100644 --- third_party/libwebrtc/modules/video_coding/timing/timing_module_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/timing/timing_module_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("timing_module_gn") diff --git third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build -index f01783ebd1f3..89deb11da94a 100644 +index b14bef2dec4f..fae7dffcca41 100644 --- third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_codec_interface_gn") diff --git third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build -index 3c92397fe562..197ccefb29d9 100644 +index 5af51f1238a8..48e566809b99 100644 --- third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -57,191 +66,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -57,195 +67,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_coding_gn") diff --git third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build -index 3bbec9fb3074..92ff8a1d9819 100644 +index d42eb284cd9a..c914dfcbd7b5 100644 --- third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -54,191 +63,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,195 +64,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_coding_utility_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_libvpx_interface_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_libvpx_interface_gn/moz.build -index 03437c5d57de..2adbff018445 100644 +index c5dabce8b090..50581e97d555 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_libvpx_interface_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_libvpx_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_libvpx_interface_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build -index eb02eda6631d..8988f6d4b0ac 100644 +index 77a6b3870b6f..a557e98cae84 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,191 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,195 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_vp8_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp8_scalability_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp8_scalability_gn/moz.build -index 3d5642df008a..3efc79029a22 100644 +index 6799224dff30..b382aa7a36f5 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp8_scalability_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_scalability_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_vp8_scalability_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build -index 7977e03d428c..64f1526a2eb2 100644 +index 2423950ba511..9886a43a6d6c 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,191 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,195 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_vp8_temporal_layers_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build -index f470652e6d6c..03f7307e20ea 100644 +index 4bece7280761..f46399080283 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,191 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,195 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_vp9_gn") diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build -index 77a0c38f9903..0390ceb82364 100644 +index 6f1575870ead..caec155ca861 100644 --- third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build +++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("webrtc_vp9_helpers_gn") diff --git third_party/libwebrtc/moz.build third_party/libwebrtc/moz.build -index 5c9a364dd518..96c9b9570028 100644 +index 7baea55b7e4e..93e1b1cc3d48 100644 --- third_party/libwebrtc/moz.build +++ third_party/libwebrtc/moz.build -@@ -263,6 +263,8 @@ DIRS += [ +@@ -262,6 +262,8 @@ DIRS += [ "/third_party/libwebrtc/modules/congestion_controller/goog_cc/send_side_bwe_gn", "/third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn", "/third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn", + "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", + "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", "/third_party/libwebrtc/modules/module_api_gn", "/third_party/libwebrtc/modules/module_api_public_gn", "/third_party/libwebrtc/modules/module_fec_api_gn", -@@ -457,102 +459,11 @@ DIRS += [ +@@ -461,102 +463,11 @@ DIRS += [ "/third_party/libwebrtc/webrtc_gn" ] -if CONFIG["OS_TARGET"] == "Android": - - DIRS += [ - "/third_party/libwebrtc/rtc_base/ifaddrs_android_gn" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", - "/third_party/libwebrtc/rtc_base/system/cocoa_threading_gn", - "/third_party/libwebrtc/rtc_base/system/gcd_helpers_gn", - "/third_party/libwebrtc/sdk/base_objc_gn", - "/third_party/libwebrtc/sdk/helpers_objc_gn", - "/third_party/libwebrtc/sdk/videocapture_objc_gn", - "/third_party/libwebrtc/sdk/videoframebuffer_objc_gn" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" - ] - -if CONFIG["OS_TARGET"] == "WINNT": - - DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", - "/third_party/libwebrtc/rtc_base/win/create_direct3d_device_gn", - "/third_party/libwebrtc/rtc_base/win/get_activation_factory_gn", - "/third_party/libwebrtc/rtc_base/win/hstring_gn", - "/third_party/libwebrtc/rtc_base/win/windows_version_gn", - "/third_party/libwebrtc/rtc_base/win32_gn" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn", - "/third_party/libwebrtc/rtc_base/system/asm_defines_gn" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", - "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", - "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", - "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", - "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", - "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", - "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Darwin": +-if CONFIG["OS_TARGET"] == "Darwin" and CONFIG["TARGET_CPU"] == "aarch64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": +-if CONFIG["OS_TARGET"] == "Darwin" and CONFIG["TARGET_CPU"] == "x86_64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", - "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", - "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", - "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "FreeBSD": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "aarch64": DIRS += [ "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", "/third_party/libwebrtc/common_audio/common_audio_neon_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", "/third_party/libwebrtc/modules/portal/portal_gn", "/third_party/libwebrtc/third_party/drm/drm_gn", "/third_party/libwebrtc/third_party/gbm/gbm_gn", -@@ -560,26 +471,9 @@ if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +@@ -564,26 +475,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "mips32" and CONFIG["OS_TARGET"] == "FreeBSD": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": ++if CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "mips32": DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", - "/third_party/libwebrtc/modules/portal/portal_gn", - "/third_party/libwebrtc/rtc_base/system/asm_defines_gn", - "/third_party/libwebrtc/third_party/drm/drm_gn", - "/third_party/libwebrtc/third_party/gbm/gbm_gn", - "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn", - "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" - ] - --if CONFIG["CPU_ARCH"] == "mips32" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32": - - DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", "/third_party/libwebrtc/modules/portal/portal_gn", "/third_party/libwebrtc/third_party/drm/drm_gn", "/third_party/libwebrtc/third_party/gbm/gbm_gn", -@@ -587,11 +481,9 @@ if CONFIG["CPU_ARCH"] == "mips32" and CONFIG["OS_TARGET"] == "Linux": +@@ -591,11 +485,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32": "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] --if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["OS_TARGET"] == "FreeBSD": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64": ++if CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "mips64": DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", "/third_party/libwebrtc/modules/portal/portal_gn", "/third_party/libwebrtc/third_party/drm/drm_gn", "/third_party/libwebrtc/third_party/gbm/gbm_gn", -@@ -599,7 +491,7 @@ if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["OS_TARGET"] == "Linux": +@@ -603,7 +495,7 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64": "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "x86": DIRS += [ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", -@@ -607,8 +499,6 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -611,8 +503,6 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", "/third_party/libwebrtc/modules/portal/portal_gn", "/third_party/libwebrtc/third_party/drm/drm_gn", "/third_party/libwebrtc/third_party/gbm/gbm_gn", -@@ -616,7 +506,7 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +@@ -620,7 +510,7 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "x86_64": DIRS += [ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", -@@ -624,69 +514,9 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +@@ -628,69 +518,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", "/third_party/libwebrtc/modules/portal/portal_gn", "/third_party/libwebrtc/third_party/drm/drm_gn", "/third_party/libwebrtc/third_party/gbm/gbm_gn", "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn", "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "OpenBSD": +-if CONFIG["OS_TARGET"] == "OpenBSD" and CONFIG["TARGET_CPU"] == "aarch64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "OpenBSD": +-if CONFIG["OS_TARGET"] == "OpenBSD" and CONFIG["TARGET_CPU"] == "x86_64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", - "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", - "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", - "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "WINNT": +-if CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", - "/third_party/libwebrtc/common_audio/common_audio_neon_gn" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "WINNT": +-if CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", - "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", - "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", - "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT": +-if CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86_64": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", - "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", - "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", - "/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn", - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" - ] - --if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "ppc64": - - DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" - ] - --if CONFIG["CPU_ARCH"] == "riscv64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": - - DIRS += [ - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", - "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" - ] diff --git third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build -index b93fca231d69..be25257373e5 100644 +index 0038aa7ef88c..e6471de4496d 100644 --- third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build +++ third_party/libwebrtc/rtc_base/async_packet_socket_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("async_packet_socket_gn") diff --git third_party/libwebrtc/rtc_base/async_resolver_interface_gn/moz.build third_party/libwebrtc/rtc_base/async_resolver_interface_gn/moz.build -index 8e1b4e454d4d..ee64165c31d3 100644 +index 485ef7ae1c5d..141483e9b8ee 100644 --- third_party/libwebrtc/rtc_base/async_resolver_interface_gn/moz.build +++ third_party/libwebrtc/rtc_base/async_resolver_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("async_resolver_interface_gn") diff --git third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build -index d5cc0504b1d5..41df619ecefa 100644 +index 62b75c06ce21..6a1b5eae3ba5 100644 --- third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build +++ third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("audio_format_to_string_gn") diff --git third_party/libwebrtc/rtc_base/bit_buffer_gn/moz.build third_party/libwebrtc/rtc_base/bit_buffer_gn/moz.build -index 858cc304ba75..9d16e13e8efa 100644 +index a4a4e8c6e42a..94d68859a601 100644 --- third_party/libwebrtc/rtc_base/bit_buffer_gn/moz.build +++ third_party/libwebrtc/rtc_base/bit_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("bit_buffer_gn") -diff --git third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build -index 77059cd34301..c5dabe6ad79f 100644 ---- third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build -+++ third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +diff --git third_party/libwebrtc/rtc_base/bitrate_tracker_gn/moz.build third_party/libwebrtc/rtc_base/bitrate_tracker_gn/moz.build +index 8836b1e08940..0456682b1478 100644 +--- third_party/libwebrtc/rtc_base/bitrate_tracker_gn/moz.build ++++ third_party/libwebrtc/rtc_base/bitrate_tracker_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True +- +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" +- ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("bitstream_reader_gn") -diff --git third_party/libwebrtc/rtc_base/buffer_gn/moz.build third_party/libwebrtc/rtc_base/buffer_gn/moz.build -index c378c3a0b2ac..31ea8d65c7ce 100644 ---- third_party/libwebrtc/rtc_base/buffer_gn/moz.build -+++ third_party/libwebrtc/rtc_base/buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("bitrate_tracker_gn") +diff --git third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build +index b6a5de1971d5..63a6ddbeeec1 100644 +--- third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build ++++ third_party/libwebrtc/rtc_base/bitstream_reader_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": - -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True + if CONFIG["TARGET_CPU"] == "x86": +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - + CXXFLAGS += [ + "-msse2" + ] + - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + - DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -- ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + - DEFINES["_GNU_SOURCE"] = True -- - Library("buffer_gn") -diff --git third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build -index 43ed668b71ad..292e0dc836d1 100644 ---- third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build -+++ third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ DEFINES["USE_X11"] = "1" + + Library("bitstream_reader_gn") +diff --git third_party/libwebrtc/rtc_base/buffer_gn/moz.build third_party/libwebrtc/rtc_base/buffer_gn/moz.build +index cb5a45ce58bb..2a2b6adff2b4 100644 +--- third_party/libwebrtc/rtc_base/buffer_gn/moz.build ++++ third_party/libwebrtc/rtc_base/buffer_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": -- -- CXXFLAGS += [ -- "-mfpu=neon" -- ] +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": + +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_X11"] = "1" -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - - Library("byte_buffer_gn") -diff --git third_party/libwebrtc/rtc_base/byte_order_gn/moz.build third_party/libwebrtc/rtc_base/byte_order_gn/moz.build -index b49346b1540f..c8dbc51e612a 100644 ---- third_party/libwebrtc/rtc_base/byte_order_gn/moz.build -+++ third_party/libwebrtc/rtc_base/byte_order_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + Library("buffer_gn") +diff --git third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build +index b093b72f1f14..3105ccac7dc2 100644 +--- third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build ++++ third_party/libwebrtc/rtc_base/byte_buffer_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - +- OS_LIBS += [ +- "log" +- ] +- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": - -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +- OS_LIBS += [ +- "android_support" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["USE_X11"] = "1" + + Library("byte_buffer_gn") +diff --git third_party/libwebrtc/rtc_base/byte_order_gn/moz.build third_party/libwebrtc/rtc_base/byte_order_gn/moz.build +index 21ea639dd4c3..485929410a19 100644 +--- third_party/libwebrtc/rtc_base/byte_order_gn/moz.build ++++ third_party/libwebrtc/rtc_base/byte_order_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "webrtc" + +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["WEBRTC_ANDROID"] = True +- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_GNU_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("byte_order_gn") diff --git third_party/libwebrtc/rtc_base/checks_gn/moz.build third_party/libwebrtc/rtc_base/checks_gn/moz.build -index 769362b62a5a..97a3da2b775a 100644 +index f2ef2e2a78ef..7b90d3cec001 100644 --- third_party/libwebrtc/rtc_base/checks_gn/moz.build +++ third_party/libwebrtc/rtc_base/checks_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("checks_gn") diff --git third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build -index 5fd417eefd5a..b997040b164c 100644 +index 9f6999032d53..537becb3aa19 100644 --- third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build +++ third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("compile_assert_c_gn") diff --git third_party/libwebrtc/rtc_base/containers/flat_containers_internal_gn/moz.build third_party/libwebrtc/rtc_base/containers/flat_containers_internal_gn/moz.build -index 2d02d778fffe..07b174d0c11e 100644 +index 8fd59a6ce285..f8a255e5bd46 100644 --- third_party/libwebrtc/rtc_base/containers/flat_containers_internal_gn/moz.build +++ third_party/libwebrtc/rtc_base/containers/flat_containers_internal_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("flat_containers_internal_gn") diff --git third_party/libwebrtc/rtc_base/containers/flat_map_gn/moz.build third_party/libwebrtc/rtc_base/containers/flat_map_gn/moz.build -index f2d8ed054e00..df8ec55e92af 100644 +index 164aae296917..3a040d68f592 100644 --- third_party/libwebrtc/rtc_base/containers/flat_map_gn/moz.build +++ third_party/libwebrtc/rtc_base/containers/flat_map_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("flat_map_gn") diff --git third_party/libwebrtc/rtc_base/containers/flat_set_gn/moz.build third_party/libwebrtc/rtc_base/containers/flat_set_gn/moz.build -index 794ed8feb87a..6d2002a94fbc 100644 +index 5283c7e3d3be..6f4cccc313e8 100644 --- third_party/libwebrtc/rtc_base/containers/flat_set_gn/moz.build +++ third_party/libwebrtc/rtc_base/containers/flat_set_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("flat_set_gn") diff --git third_party/libwebrtc/rtc_base/copy_on_write_buffer_gn/moz.build third_party/libwebrtc/rtc_base/copy_on_write_buffer_gn/moz.build -index eecb53c907da..bcad4a983179 100644 +index f026e25abd0b..89d6eded82d3 100644 --- third_party/libwebrtc/rtc_base/copy_on_write_buffer_gn/moz.build +++ third_party/libwebrtc/rtc_base/copy_on_write_buffer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("copy_on_write_buffer_gn") diff --git third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build -index c8749bb51055..95e71cdfe9cf 100644 +index 4aa1aa43535a..339e21e75364 100644 --- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build +++ third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("criticalsection_gn") diff --git third_party/libwebrtc/rtc_base/divide_round_gn/moz.build third_party/libwebrtc/rtc_base/divide_round_gn/moz.build -index 8bc1e665d50d..729bb35b5b49 100644 +index 79146161c229..48add74427c6 100644 --- third_party/libwebrtc/rtc_base/divide_round_gn/moz.build +++ third_party/libwebrtc/rtc_base/divide_round_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("divide_round_gn") diff --git third_party/libwebrtc/rtc_base/dscp_gn/moz.build third_party/libwebrtc/rtc_base/dscp_gn/moz.build -index b8b28d8d0161..4050d593d1b1 100644 +index 7bfe2d0c75c0..fdba8802853b 100644 --- third_party/libwebrtc/rtc_base/dscp_gn/moz.build +++ third_party/libwebrtc/rtc_base/dscp_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("dscp_gn") diff --git third_party/libwebrtc/rtc_base/event_tracer_gn/moz.build third_party/libwebrtc/rtc_base/event_tracer_gn/moz.build -index 02fe978ab08d..c655f3b43877 100644 +index 06daf6b03a02..f402ae850f31 100644 --- third_party/libwebrtc/rtc_base/event_tracer_gn/moz.build +++ third_party/libwebrtc/rtc_base/event_tracer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("event_tracer_gn") diff --git third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build -index 574d7d63026a..0d1253003f3d 100644 +index 4435f010b6bd..9cc536965c58 100644 --- third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("alr_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build -index 34b388da69ec..e1cf8913860d 100644 +index cbbb32ab7072..15521be543f6 100644 --- third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("balanced_degradation_settings_gn") diff --git third_party/libwebrtc/rtc_base/experiments/bandwidth_quality_scaler_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/bandwidth_quality_scaler_settings_gn/moz.build -index ccc00e5296a1..54cef4764697 100644 +index 95a92d20e182..eedfd17761b3 100644 --- third_party/libwebrtc/rtc_base/experiments/bandwidth_quality_scaler_settings_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/bandwidth_quality_scaler_settings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("bandwidth_quality_scaler_settings_gn") diff --git third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build -index 66d21c66a349..8118147f993e 100644 +index 5151c986c4b8..17833ef180df 100644 --- third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("cpu_speed_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/encoder_info_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/encoder_info_settings_gn/moz.build -index 1cf3a5d0f41f..ed59d2508985 100644 +index b7a699fe03d0..5b8291b5a0f8 100644 --- third_party/libwebrtc/rtc_base/experiments/encoder_info_settings_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/encoder_info_settings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("encoder_info_settings_gn") diff --git third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build -index 8147b9e99a24..3cd6aec92bc8 100644 +index ea63aafc99e4..6f561f98057c 100644 --- third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -46,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("field_trial_parser_gn") diff --git third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build -index b8ece40f9b6e..cd41f4b0b645 100644 +index 3857bc9451e5..e4dbcc26dabc 100644 --- third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("keyframe_interval_settings_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build -index 0092a33c3916..0cbfa328d9ea 100644 +index 5f811a6c6da4..0354b3c70d5e 100644 --- third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("min_video_bitrate_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/normalize_simulcast_size_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/normalize_simulcast_size_experiment_gn/moz.build -index acf592c7634f..2b4feb9b7bdc 100644 +index 68ad8a0f1413..a6c29e1fb3af 100644 --- third_party/libwebrtc/rtc_base/experiments/normalize_simulcast_size_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/normalize_simulcast_size_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("normalize_simulcast_size_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build -index aa454826f68b..1e8451135790 100644 +index c4b1f5bc22c7..222b58931e96 100644 --- third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("quality_rampup_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build -index c8c2708eb734..dcc3d66af2f3 100644 +index 298ca9297c50..916a31d69ac4 100644 --- third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("quality_scaler_settings_gn") diff --git third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build -index 2a84caa1a115..f4eec0f9ca31 100644 +index d606a38148ca..f2d347a7f2ec 100644 --- third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("quality_scaling_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build -index 6cbe9e8474cf..768d19687442 100644 +index be85251358d7..23c2a12352e5 100644 --- third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rate_control_settings_gn") diff --git third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build -index aea652b1063e..faed80b04af8 100644 +index 7229d639e8a4..7fad9c144446 100644 --- third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtt_mult_experiment_gn") diff --git third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build -index c1854a7f4dfb..5ba40788ff5d 100644 +index d031f8ace4be..837697bbafe8 100644 --- third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build +++ third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("stable_target_rate_experiment_gn") -diff --git third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build -index a6650bd66393..393c4a6a5b5f 100644 ---- third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build -+++ third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +diff --git third_party/libwebrtc/rtc_base/frequency_tracker_gn/moz.build third_party/libwebrtc/rtc_base/frequency_tracker_gn/moz.build +index 30c52de72463..249d52d48465 100644 +--- third_party/libwebrtc/rtc_base/frequency_tracker_gn/moz.build ++++ third_party/libwebrtc/rtc_base/frequency_tracker_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - +- OS_LIBS += [ +- "log" +- ] +- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True +- +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" +- ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": - -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +- OS_LIBS += [ +- "android_support" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["USE_X11"] = "1" + + Library("frequency_tracker_gn") +diff --git third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build +index eb8534781009..213bbd0450d5 100644 +--- third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build ++++ third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "webrtc" + +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["WEBRTC_ANDROID"] = True +- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_GNU_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("gtest_prod_gn") diff --git third_party/libwebrtc/rtc_base/histogram_percentile_counter_gn/moz.build third_party/libwebrtc/rtc_base/histogram_percentile_counter_gn/moz.build -index 88e1ee554758..7f4ca498bb80 100644 +index ee30758d89d1..30634ecae00b 100644 --- third_party/libwebrtc/rtc_base/histogram_percentile_counter_gn/moz.build +++ third_party/libwebrtc/rtc_base/histogram_percentile_counter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("histogram_percentile_counter_gn") diff --git third_party/libwebrtc/rtc_base/ifaddrs_android_gn/moz.build third_party/libwebrtc/rtc_base/ifaddrs_android_gn/moz.build deleted file mode 100644 -index 01eeabbf70bc..000000000000 +index 7985a5f7feba..000000000000 --- third_party/libwebrtc/rtc_base/ifaddrs_android_gn/moz.build +++ /dev/null -@@ -1,99 +0,0 @@ +@@ -1,100 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["ANDROID"] = True -DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" -DEFINES["HAVE_SYS_UIO_H"] = True -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ANDROID"] = True -DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +-DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_LINUX"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_GNU_SOURCE"] = True -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -OS_LIBS += [ - "GLESv2", - "log" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/rtc_base/ifaddrs_android.cc" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("ifaddrs_android_gn") diff --git third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build -index d7b06159cea2..ede6074320d3 100644 +index 15c6052f7b32..59bbc5420da2 100644 --- third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build +++ third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("ignore_wundef_gn") diff --git third_party/libwebrtc/rtc_base/ip_address_gn/moz.build third_party/libwebrtc/rtc_base/ip_address_gn/moz.build -index a55837b63428..3310e1e14d3c 100644 +index a893dab3c2e5..7377b5d7b0fe 100644 --- third_party/libwebrtc/rtc_base/ip_address_gn/moz.build +++ third_party/libwebrtc/rtc_base/ip_address_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", -- "secur32", -- "winmm" +- "secur32" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("ip_address_gn") diff --git third_party/libwebrtc/rtc_base/logging_gn/moz.build third_party/libwebrtc/rtc_base/logging_gn/moz.build -index a1b3462893f1..7363168e0153 100644 +index 02f74cddfac6..59bf7125a288 100644 --- third_party/libwebrtc/rtc_base/logging_gn/moz.build +++ third_party/libwebrtc/rtc_base/logging_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" + DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("logging_gn") diff --git third_party/libwebrtc/rtc_base/macromagic_gn/moz.build third_party/libwebrtc/rtc_base/macromagic_gn/moz.build -index 372b4d28f8a7..3a1e46270270 100644 +index b44dfa38f59e..308e7658267e 100644 --- third_party/libwebrtc/rtc_base/macromagic_gn/moz.build +++ third_party/libwebrtc/rtc_base/macromagic_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("macromagic_gn") diff --git third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build -index 139009098bab..eb01e8eadc57 100644 +index f5720480dd0c..32bf460aab31 100644 --- third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build +++ third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("aligned_malloc_gn") diff --git third_party/libwebrtc/rtc_base/mod_ops_gn/moz.build third_party/libwebrtc/rtc_base/mod_ops_gn/moz.build -index afe42b847585..ac5348af377a 100644 +index 84e775fe7429..1a8d9fd19077 100644 --- third_party/libwebrtc/rtc_base/mod_ops_gn/moz.build +++ third_party/libwebrtc/rtc_base/mod_ops_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("mod_ops_gn") diff --git third_party/libwebrtc/rtc_base/moving_max_counter_gn/moz.build third_party/libwebrtc/rtc_base/moving_max_counter_gn/moz.build -index fdbf859c3749..d20ce225c3f9 100644 +index 5cd827786ed4..4dcd35c76a6c 100644 --- third_party/libwebrtc/rtc_base/moving_max_counter_gn/moz.build +++ third_party/libwebrtc/rtc_base/moving_max_counter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("moving_max_counter_gn") diff --git third_party/libwebrtc/rtc_base/net_helpers_gn/moz.build third_party/libwebrtc/rtc_base/net_helpers_gn/moz.build -index 4ac9a06df874..7f32da55511f 100644 +index c036110d1a92..f9f2ab464a09 100644 --- third_party/libwebrtc/rtc_base/net_helpers_gn/moz.build +++ third_party/libwebrtc/rtc_base/net_helpers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", -- "secur32", -- "winmm" +- "secur32" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("net_helpers_gn") diff --git third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build -index cdcbaee77937..ea4f2aacc117 100644 +index a1276d9a7a78..e33a367c88f7 100644 --- third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build +++ third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("sent_packet_gn") diff --git third_party/libwebrtc/rtc_base/network_constants_gn/moz.build third_party/libwebrtc/rtc_base/network_constants_gn/moz.build -index 9b7fb4a6703e..c5b7fcd69e98 100644 +index 083e18ac8eb2..2728e4fc1e0e 100644 --- third_party/libwebrtc/rtc_base/network_constants_gn/moz.build +++ third_party/libwebrtc/rtc_base/network_constants_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("network_constants_gn") diff --git third_party/libwebrtc/rtc_base/network_route_gn/moz.build third_party/libwebrtc/rtc_base/network_route_gn/moz.build -index 7b0f634578f3..1ec2058feb83 100644 +index c35c498d443d..907f5af871eb 100644 --- third_party/libwebrtc/rtc_base/network_route_gn/moz.build +++ third_party/libwebrtc/rtc_base/network_route_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("network_route_gn") diff --git third_party/libwebrtc/rtc_base/null_socket_server_gn/moz.build third_party/libwebrtc/rtc_base/null_socket_server_gn/moz.build -index f77bcf8aa788..df6cf74c5b16 100644 +index 7385764373a0..22553cd1b0bf 100644 --- third_party/libwebrtc/rtc_base/null_socket_server_gn/moz.build +++ third_party/libwebrtc/rtc_base/null_socket_server_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("null_socket_server_gn") diff --git third_party/libwebrtc/rtc_base/one_time_event_gn/moz.build third_party/libwebrtc/rtc_base/one_time_event_gn/moz.build -index ac24f995c6c1..a8d26b774863 100644 +index d5afd56fb614..0e0257215437 100644 --- third_party/libwebrtc/rtc_base/one_time_event_gn/moz.build +++ third_party/libwebrtc/rtc_base/one_time_event_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("one_time_event_gn") diff --git third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build -index c580f7e67a0a..3fea9a2d6b27 100644 +index 6e962e328066..83c2d573d1d9 100644 --- third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build +++ third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("platform_thread_gn") diff --git third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build -index 713a9cc2fdf7..99ec083c6586 100644 +index 0e817e6eb986..9059a39f8aac 100644 --- third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build +++ third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("platform_thread_types_gn") diff --git third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build -index a5a3d7492137..d9d75b3b91be 100644 +index 7f1e533b39c4..4abe79939615 100644 --- third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build +++ third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("protobuf_utils_gn") diff --git third_party/libwebrtc/rtc_base/race_checker_gn/moz.build third_party/libwebrtc/rtc_base/race_checker_gn/moz.build -index 514f8957fee9..e3529cc2a54b 100644 +index 2fab6231568d..bdd70e6e3d8b 100644 --- third_party/libwebrtc/rtc_base/race_checker_gn/moz.build +++ third_party/libwebrtc/rtc_base/race_checker_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("race_checker_gn") diff --git third_party/libwebrtc/rtc_base/random_gn/moz.build third_party/libwebrtc/rtc_base/random_gn/moz.build -index 9b3592566474..9c8984a140d6 100644 +index 394eefde596a..c0bea1606f76 100644 --- third_party/libwebrtc/rtc_base/random_gn/moz.build +++ third_party/libwebrtc/rtc_base/random_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("random_gn") diff --git third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build -index 969a79b712df..51b27be6a666 100644 +index cf10767d72d0..3b3fba53974d 100644 --- third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build +++ third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rate_limiter_gn") diff --git third_party/libwebrtc/rtc_base/rate_statistics_gn/moz.build third_party/libwebrtc/rtc_base/rate_statistics_gn/moz.build -index b40a4fdda662..ec6d4550feef 100644 +index 657f0a65979a..62e2c13f1f01 100644 --- third_party/libwebrtc/rtc_base/rate_statistics_gn/moz.build +++ third_party/libwebrtc/rtc_base/rate_statistics_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rate_statistics_gn") diff --git third_party/libwebrtc/rtc_base/rate_tracker_gn/moz.build third_party/libwebrtc/rtc_base/rate_tracker_gn/moz.build -index 26f81f4f5ed3..a7abd9b6b0e7 100644 +index f8ebf228f169..6396cbeff915 100644 --- third_party/libwebrtc/rtc_base/rate_tracker_gn/moz.build +++ third_party/libwebrtc/rtc_base/rate_tracker_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rate_tracker_gn") diff --git third_party/libwebrtc/rtc_base/refcount_gn/moz.build third_party/libwebrtc/rtc_base/refcount_gn/moz.build -index f8c49daa900e..091d88e0545b 100644 +index a1b2bcfeccf2..53c96cdbae3a 100644 --- third_party/libwebrtc/rtc_base/refcount_gn/moz.build +++ third_party/libwebrtc/rtc_base/refcount_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("refcount_gn") diff --git third_party/libwebrtc/rtc_base/rolling_accumulator_gn/moz.build third_party/libwebrtc/rtc_base/rolling_accumulator_gn/moz.build -index eef6c6bc5d45..f04b9eb51ce7 100644 +index c5cbc0cb54b5..ecb221864f89 100644 --- third_party/libwebrtc/rtc_base/rolling_accumulator_gn/moz.build +++ third_party/libwebrtc/rtc_base/rolling_accumulator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rolling_accumulator_gn") diff --git third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build -index db71c35a1add..d03fb3f4e7c8 100644 +index a3bb657070e1..48c882b1fbad 100644 --- third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build +++ third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_event_gn") diff --git third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build -index 65d2c5bb2a2b..1b6e8cb951db 100644 +index 1c0d84013b28..5c7773f371b8 100644 --- third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build +++ third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,179 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_numerics_gn") diff --git third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build -index ae0702954d53..8e76dcf845cb 100644 +index 21635e570bc3..a0e7ee73dc4b 100644 --- third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build +++ third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rtc_task_queue_gn") diff --git third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build -index 706eb51c9788..5dba9b3a8401 100644 +index fdcf248573b0..1e96f7ad161b 100644 --- third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build +++ third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("safe_compare_gn") diff --git third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build -index 545467bc2319..bc31d2ede82f 100644 +index 5901f174a670..481f97d18267 100644 --- third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build +++ third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("safe_conversions_gn") diff --git third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build -index 51c1b7bacdf8..fb72b6128335 100644 +index c01e7c799bcf..444ff334be9f 100644 --- third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build +++ third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("safe_minmax_gn") diff --git third_party/libwebrtc/rtc_base/sample_counter_gn/moz.build third_party/libwebrtc/rtc_base/sample_counter_gn/moz.build -index a477e2cd2de2..f8c37e47fe73 100644 +index 99c6eb8f5374..22bf6f11a0ed 100644 --- third_party/libwebrtc/rtc_base/sample_counter_gn/moz.build +++ third_party/libwebrtc/rtc_base/sample_counter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("sample_counter_gn") diff --git third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build -index efdfb15485e3..d22a78d96416 100644 +index 43e96ee8102f..512ec69172c1 100644 --- third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build +++ third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("sanitizer_gn") diff --git third_party/libwebrtc/rtc_base/socket_address_gn/moz.build third_party/libwebrtc/rtc_base/socket_address_gn/moz.build -index 8315d358e6ec..40ffca5c22d9 100644 +index 86ef2dc1a70b..15d61fd11419 100644 --- third_party/libwebrtc/rtc_base/socket_address_gn/moz.build +++ third_party/libwebrtc/rtc_base/socket_address_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("socket_address_gn") diff --git third_party/libwebrtc/rtc_base/socket_factory_gn/moz.build third_party/libwebrtc/rtc_base/socket_factory_gn/moz.build -index 43a7eff46eba..4ba64ef8e106 100644 +index 3a2f72d1e6b2..fc1bcda9d6bb 100644 --- third_party/libwebrtc/rtc_base/socket_factory_gn/moz.build +++ third_party/libwebrtc/rtc_base/socket_factory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,115 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,119 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -157,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -161,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("socket_factory_gn") diff --git third_party/libwebrtc/rtc_base/socket_gn/moz.build third_party/libwebrtc/rtc_base/socket_gn/moz.build -index 8fa7b5f8b019..d603411799ed 100644 +index 0d1760a15cac..a3866ef3ba39 100644 --- third_party/libwebrtc/rtc_base/socket_gn/moz.build +++ third_party/libwebrtc/rtc_base/socket_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("socket_gn") diff --git third_party/libwebrtc/rtc_base/socket_server_gn/moz.build third_party/libwebrtc/rtc_base/socket_server_gn/moz.build -index 19fae93cf479..8f5896e37a22 100644 +index 48972cbb4c6a..9177418df790 100644 --- third_party/libwebrtc/rtc_base/socket_server_gn/moz.build +++ third_party/libwebrtc/rtc_base/socket_server_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,115 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,119 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -157,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -161,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("socket_server_gn") diff --git third_party/libwebrtc/rtc_base/ssl_gn/moz.build third_party/libwebrtc/rtc_base/ssl_gn/moz.build -index 79c9fd515372..ed15371747a9 100644 +index 4be1ae97668d..72d951163eca 100644 --- third_party/libwebrtc/rtc_base/ssl_gn/moz.build +++ third_party/libwebrtc/rtc_base/ssl_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("ssl_gn") diff --git third_party/libwebrtc/rtc_base/stringutils_gn/moz.build third_party/libwebrtc/rtc_base/stringutils_gn/moz.build -index c2ae423ea9b5..a65888b3d464 100644 +index 58008d114a2b..9576a81b9996 100644 --- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build +++ third_party/libwebrtc/rtc_base/stringutils_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,179 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,183 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("stringutils_gn") diff --git third_party/libwebrtc/rtc_base/swap_queue_gn/moz.build third_party/libwebrtc/rtc_base/swap_queue_gn/moz.build -index 630648f5f5fa..2863ba28d144 100644 +index 3bffe145d679..36cf22a65ed7 100644 --- third_party/libwebrtc/rtc_base/swap_queue_gn/moz.build +++ third_party/libwebrtc/rtc_base/swap_queue_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("swap_queue_gn") diff --git third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build -index 34792dc4327c..fc8b3b58110e 100644 +index 979933060652..c0b7597564dc 100644 --- third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build +++ third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("mutex_gn") diff --git third_party/libwebrtc/rtc_base/synchronization/sequence_checker_internal_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/sequence_checker_internal_gn/moz.build -index 85cf1f73b599..fb8a358b2eaa 100644 +index a43e97a8c23c..4d146c5058d6 100644 --- third_party/libwebrtc/rtc_base/synchronization/sequence_checker_internal_gn/moz.build +++ third_party/libwebrtc/rtc_base/synchronization/sequence_checker_internal_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("sequence_checker_internal_gn") diff --git third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build -index 363b084539be..1fe57f535305 100644 +index ac962ac0a281..9649e4f55e8e 100644 --- third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build +++ third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("yield_gn") diff --git third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build -index 9356f30910a3..edfb4475bbd2 100644 +index 7adceec9b45a..a11e7ba0278c 100644 --- third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build +++ third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("yield_policy_gn") diff --git third_party/libwebrtc/rtc_base/system/arch_gn/moz.build third_party/libwebrtc/rtc_base/system/arch_gn/moz.build -index 4f8f93c154e2..a836f5db63f0 100644 +index 136948d0f2b8..88c849682045 100644 --- third_party/libwebrtc/rtc_base/system/arch_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/arch_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("arch_gn") diff --git third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build deleted file mode 100644 -index ab3e701885e8..000000000000 +index b99d782d883b..000000000000 --- third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build +++ /dev/null -@@ -1,80 +0,0 @@ +@@ -1,81 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ARCH_ARM"] = True -DEFINES["WEBRTC_ARCH_ARM_V7"] = True +-DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_HAS_NEON"] = True -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_LINUX"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_GNU_SOURCE"] = True -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True - - OS_LIBS += [ - "android_support", - "unwind" - ] - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - -Library("asm_defines_gn") diff --git third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build deleted file mode 100644 -index f897cf46fc39..000000000000 +index 429299b4807a..000000000000 --- third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build +++ /dev/null @@ -1,67 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/rtc_base/system/cocoa_threading.mm" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("cocoa_threading_gn") diff --git third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build -index 9954e2772e10..7cc6dfb3b3a6 100644 +index 6d0a52310337..f1f0224d6a0f 100644 --- third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("file_wrapper_gn") diff --git third_party/libwebrtc/rtc_base/system/gcd_helpers_gn/moz.build third_party/libwebrtc/rtc_base/system/gcd_helpers_gn/moz.build deleted file mode 100644 -index 99fbd80dd967..000000000000 +index 243694e1d552..000000000000 --- third_party/libwebrtc/rtc_base/system/gcd_helpers_gn/moz.build +++ /dev/null @@ -1,67 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/rtc_base/system/gcd_helpers.m" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("gcd_helpers_gn") diff --git third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build -index 396d7286299f..ae27ee47b74f 100644 +index 61bbeefabcc6..6d4f5ece7c64 100644 --- third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("ignore_warnings_gn") diff --git third_party/libwebrtc/rtc_base/system/inline_gn/moz.build third_party/libwebrtc/rtc_base/system/inline_gn/moz.build -index 110c04a6be19..47a6efea00c5 100644 +index 574d7958f121..67980e94049a 100644 --- third_party/libwebrtc/rtc_base/system/inline_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/inline_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("inline_gn") diff --git third_party/libwebrtc/rtc_base/system/no_unique_address_gn/moz.build third_party/libwebrtc/rtc_base/system/no_unique_address_gn/moz.build -index bbf86f67bb61..8b4b89ce8c24 100644 +index 4d51581c1b45..8b0594e1642f 100644 --- third_party/libwebrtc/rtc_base/system/no_unique_address_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/no_unique_address_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("no_unique_address_gn") diff --git third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build -index a26fbd0aecc7..7773038a2267 100644 +index e4d340d3c6be..807b97ad0643 100644 --- third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtc_export_gn") diff --git third_party/libwebrtc/rtc_base/system/unused_gn/moz.build third_party/libwebrtc/rtc_base/system/unused_gn/moz.build -index c53e1ab3ba55..3c5c6131f5b6 100644 +index c6dd8a6bab8f..8ba9c7a33e6b 100644 --- third_party/libwebrtc/rtc_base/system/unused_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/unused_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("unused_gn") diff --git third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build -index 6d5043ae77f0..68764f971a8c 100644 +index 3aa57ac48eab..5fc4802fd2f4 100644 --- third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build +++ third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("warn_current_thread_is_deadlocked_gn") diff --git third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build -index 8aecd5889008..677563f0eafb 100644 +index 224f77682849..fc5427430c09 100644 --- third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build +++ third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("repeating_task_gn") diff --git third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build -index 6077e21b3779..af27c83c7e93 100644 +index 0d35da2f19ba..6a868ab4ba72 100644 --- third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build +++ third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("base64_gn") diff --git third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build -index 3f4690993100..c78bc1de22c4 100644 +index 906a4a9e8155..2005c1b47194 100644 --- third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build +++ third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("sigslot_gn") diff --git third_party/libwebrtc/rtc_base/threading_gn/moz.build third_party/libwebrtc/rtc_base/threading_gn/moz.build -index 39235d88fc45..74684735d856 100644 +index 199af4b1d30e..71991469ebe2 100644 --- third_party/libwebrtc/rtc_base/threading_gn/moz.build +++ third_party/libwebrtc/rtc_base/threading_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,187 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,191 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("threading_gn") diff --git third_party/libwebrtc/rtc_base/timeutils_gn/moz.build third_party/libwebrtc/rtc_base/timeutils_gn/moz.build -index 3f184279a3a0..432c438bdad6 100644 +index c4eb7ac8de41..29f5854612cb 100644 --- third_party/libwebrtc/rtc_base/timeutils_gn/moz.build +++ third_party/libwebrtc/rtc_base/timeutils_gn/moz.build -@@ -12,12 +12,21 @@ AllowCompilerWarnings() +@@ -12,12 +12,22 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_EXCLUDE_SYSTEM_TIME"] = True DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -45,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("timeutils_gn") diff --git third_party/libwebrtc/rtc_base/type_traits_gn/moz.build third_party/libwebrtc/rtc_base/type_traits_gn/moz.build -index b5c9fb51224c..7ff959ba5f38 100644 +index 1f72327af376..4b0f96afeafd 100644 --- third_party/libwebrtc/rtc_base/type_traits_gn/moz.build +++ third_party/libwebrtc/rtc_base/type_traits_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("type_traits_gn") diff --git third_party/libwebrtc/rtc_base/unique_id_generator_gn/moz.build third_party/libwebrtc/rtc_base/unique_id_generator_gn/moz.build -index 4ff4d51c78ea..93be9abd91cd 100644 +index 975562a20870..e32671858969 100644 --- third_party/libwebrtc/rtc_base/unique_id_generator_gn/moz.build +++ third_party/libwebrtc/rtc_base/unique_id_generator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -149,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("unique_id_generator_gn") diff --git third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build -index 35e3af076731..22bf007b975e 100644 +index bb68c4ea3c97..501410447cce 100644 --- third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build +++ third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -153,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("unit_base_gn") diff --git third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build -index 93a833f2a3a7..c1c245b6e62b 100644 +index a7cf9dd19e0f..6cb2d2ab092b 100644 --- third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build +++ third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("weak_ptr_gn") diff --git third_party/libwebrtc/rtc_base/win/create_direct3d_device_gn/moz.build third_party/libwebrtc/rtc_base/win/create_direct3d_device_gn/moz.build deleted file mode 100644 -index d5882af2bb01..000000000000 +index a33d30608038..000000000000 --- third_party/libwebrtc/rtc_base/win/create_direct3d_device_gn/moz.build +++ /dev/null -@@ -1,84 +0,0 @@ +@@ -1,85 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -DEFINES["NOMINMAX"] = True -DEFINES["NTDDI_VERSION"] = "0x0A000000" -DEFINES["PSAPI_VERSION"] = "2" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True +-DEFINES["RTC_ENABLE_WIN_WGC"] = True -DEFINES["UNICODE"] = True -DEFINES["USE_AURA"] = "1" -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["WEBRTC_WIN"] = True -DEFINES["WIN32"] = True -DEFINES["WIN32_LEAN_AND_MEAN"] = True -DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -DEFINES["WINVER"] = "0x0A00" -DEFINES["_ATL_NO_OPENGL"] = True -DEFINES["_CRT_RAND_S"] = True -DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -DEFINES["_HAS_EXCEPTIONS"] = "0" -DEFINES["_HAS_NODISCARD"] = True -DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -DEFINES["_SECURE_ATL"] = True -DEFINES["_UNICODE"] = True -DEFINES["_WIN32_WINNT"] = "0x0A00" -DEFINES["_WINDOWS"] = True -DEFINES["__STD_C"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/rtc_base/win/create_direct3d_device.cc" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("create_direct3d_device_gn") diff --git third_party/libwebrtc/rtc_base/win/get_activation_factory_gn/moz.build third_party/libwebrtc/rtc_base/win/get_activation_factory_gn/moz.build deleted file mode 100644 -index d2449d9860b7..000000000000 +index 387109c968dc..000000000000 --- third_party/libwebrtc/rtc_base/win/get_activation_factory_gn/moz.build +++ /dev/null -@@ -1,84 +0,0 @@ +@@ -1,85 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -DEFINES["NOMINMAX"] = True -DEFINES["NTDDI_VERSION"] = "0x0A000000" -DEFINES["PSAPI_VERSION"] = "2" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True +-DEFINES["RTC_ENABLE_WIN_WGC"] = True -DEFINES["UNICODE"] = True -DEFINES["USE_AURA"] = "1" -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["WEBRTC_WIN"] = True -DEFINES["WIN32"] = True -DEFINES["WIN32_LEAN_AND_MEAN"] = True -DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -DEFINES["WINVER"] = "0x0A00" -DEFINES["_ATL_NO_OPENGL"] = True -DEFINES["_CRT_RAND_S"] = True -DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -DEFINES["_HAS_EXCEPTIONS"] = "0" -DEFINES["_HAS_NODISCARD"] = True -DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -DEFINES["_SECURE_ATL"] = True -DEFINES["_UNICODE"] = True -DEFINES["_WIN32_WINNT"] = "0x0A00" -DEFINES["_WINDOWS"] = True -DEFINES["__STD_C"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/rtc_base/win/get_activation_factory.cc" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("get_activation_factory_gn") diff --git third_party/libwebrtc/rtc_base/win/hstring_gn/moz.build third_party/libwebrtc/rtc_base/win/hstring_gn/moz.build deleted file mode 100644 -index 3a495f5b6ca0..000000000000 +index c69cce6983f8..000000000000 --- third_party/libwebrtc/rtc_base/win/hstring_gn/moz.build +++ /dev/null -@@ -1,84 +0,0 @@ +@@ -1,85 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -DEFINES["NOMINMAX"] = True -DEFINES["NTDDI_VERSION"] = "0x0A000000" -DEFINES["PSAPI_VERSION"] = "2" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True +-DEFINES["RTC_ENABLE_WIN_WGC"] = True -DEFINES["UNICODE"] = True -DEFINES["USE_AURA"] = "1" -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["WEBRTC_WIN"] = True -DEFINES["WIN32"] = True -DEFINES["WIN32_LEAN_AND_MEAN"] = True -DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -DEFINES["WINVER"] = "0x0A00" -DEFINES["_ATL_NO_OPENGL"] = True -DEFINES["_CRT_RAND_S"] = True -DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -DEFINES["_HAS_EXCEPTIONS"] = "0" -DEFINES["_HAS_NODISCARD"] = True -DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -DEFINES["_SECURE_ATL"] = True -DEFINES["_UNICODE"] = True -DEFINES["_WIN32_WINNT"] = "0x0A00" -DEFINES["_WINDOWS"] = True -DEFINES["__STD_C"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -SOURCES += [ - "/third_party/libwebrtc/rtc_base/win/hstring.cc" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("hstring_gn") diff --git third_party/libwebrtc/rtc_base/win/windows_version_gn/moz.build third_party/libwebrtc/rtc_base/win/windows_version_gn/moz.build deleted file mode 100644 -index 88dc67ea4893..000000000000 +index 33b46947a497..000000000000 --- third_party/libwebrtc/rtc_base/win/windows_version_gn/moz.build +++ /dev/null -@@ -1,84 +0,0 @@ +@@ -1,85 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -DEFINES["NOMINMAX"] = True -DEFINES["NTDDI_VERSION"] = "0x0A000000" -DEFINES["PSAPI_VERSION"] = "2" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True +-DEFINES["RTC_ENABLE_WIN_WGC"] = True -DEFINES["UNICODE"] = True -DEFINES["USE_AURA"] = "1" -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["WEBRTC_WIN"] = True -DEFINES["WIN32"] = True -DEFINES["WIN32_LEAN_AND_MEAN"] = True -DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -DEFINES["WINVER"] = "0x0A00" -DEFINES["_ATL_NO_OPENGL"] = True -DEFINES["_CRT_RAND_S"] = True -DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -DEFINES["_HAS_EXCEPTIONS"] = "0" -DEFINES["_HAS_NODISCARD"] = True -DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -DEFINES["_SECURE_ATL"] = True -DEFINES["_UNICODE"] = True -DEFINES["_WIN32_WINNT"] = "0x0A00" -DEFINES["_WINDOWS"] = True -DEFINES["__STD_C"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/rtc_base/win/windows_version.cc" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("windows_version_gn") diff --git third_party/libwebrtc/rtc_base/win32_gn/moz.build third_party/libwebrtc/rtc_base/win32_gn/moz.build deleted file mode 100644 -index 656bd4014be6..000000000000 +index 607a23eb5e96..000000000000 --- third_party/libwebrtc/rtc_base/win32_gn/moz.build +++ /dev/null -@@ -1,93 +0,0 @@ +@@ -1,92 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -DEFINES["NOMINMAX"] = True -DEFINES["NTDDI_VERSION"] = "0x0A000000" -DEFINES["PSAPI_VERSION"] = "2" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True +-DEFINES["RTC_ENABLE_WIN_WGC"] = True -DEFINES["UNICODE"] = True -DEFINES["USE_AURA"] = "1" -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["WEBRTC_WIN"] = True -DEFINES["WIN32"] = True -DEFINES["WIN32_LEAN_AND_MEAN"] = True -DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -DEFINES["WINVER"] = "0x0A00" -DEFINES["_ATL_NO_OPENGL"] = True -DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True -DEFINES["_CRT_RAND_S"] = True -DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -DEFINES["_HAS_EXCEPTIONS"] = "0" -DEFINES["_HAS_NODISCARD"] = True -DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -DEFINES["_SECURE_ATL"] = True -DEFINES["_UNICODE"] = True -DEFINES["_WIN32_WINNT"] = "0x0A00" -DEFINES["_WINDOWS"] = True -DEFINES["__STD_C"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -OS_LIBS += [ - "crypt32", - "iphlpapi", -- "secur32", -- "winmm" +- "secur32" -] - -UNIFIED_SOURCES += [ -- "/third_party/libwebrtc/rtc_base/win32.cc", -- "/third_party/libwebrtc/rtc_base/win32_window.cc" +- "/third_party/libwebrtc/rtc_base/win32.cc" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("win32_gn") diff --git third_party/libwebrtc/rtc_base/zero_memory_gn/moz.build third_party/libwebrtc/rtc_base/zero_memory_gn/moz.build -index b186530b19c6..eaf3581aaff9 100644 +index 1029a25252bc..0eae58b028b7 100644 --- third_party/libwebrtc/rtc_base/zero_memory_gn/moz.build +++ third_party/libwebrtc/rtc_base/zero_memory_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("zero_memory_gn") diff --git third_party/libwebrtc/sdk/base_objc_gn/moz.build third_party/libwebrtc/sdk/base_objc_gn/moz.build deleted file mode 100644 -index 976c7fceb752..000000000000 +index 7b25d1f0596a..000000000000 --- third_party/libwebrtc/sdk/base_objc_gn/moz.build +++ /dev/null @@ -1,79 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMFLAGS += [ - "-fobjc-arc" -] - -CMMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/sdk/objc/", - "/third_party/libwebrtc/sdk/objc/base/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/sdk/objc/base/RTCEncodedImage.m", - "/third_party/libwebrtc/sdk/objc/base/RTCLogging.mm", - "/third_party/libwebrtc/sdk/objc/base/RTCVideoCapturer.m", - "/third_party/libwebrtc/sdk/objc/base/RTCVideoCodecInfo.m", - "/third_party/libwebrtc/sdk/objc/base/RTCVideoEncoderQpThresholds.m", - "/third_party/libwebrtc/sdk/objc/base/RTCVideoEncoderSettings.m", - "/third_party/libwebrtc/sdk/objc/base/RTCVideoFrame.mm" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("base_objc_gn") diff --git third_party/libwebrtc/sdk/helpers_objc_gn/moz.build third_party/libwebrtc/sdk/helpers_objc_gn/moz.build deleted file mode 100644 -index 7634e1aa7bb0..000000000000 +index a910dc1cb579..000000000000 --- third_party/libwebrtc/sdk/helpers_objc_gn/moz.build +++ /dev/null @@ -1,75 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMFLAGS += [ - "-fobjc-arc" -] - -CMMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/sdk/objc/", - "/third_party/libwebrtc/sdk/objc/base/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/sdk/objc/helpers/AVCaptureSession+DevicePosition.mm", - "/third_party/libwebrtc/sdk/objc/helpers/NSString+StdString.mm", - "/third_party/libwebrtc/sdk/objc/helpers/RTCDispatcher.m" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("helpers_objc_gn") diff --git third_party/libwebrtc/sdk/videocapture_objc_gn/moz.build third_party/libwebrtc/sdk/videocapture_objc_gn/moz.build deleted file mode 100644 -index 64a7dbcb6366..000000000000 +index 7bfe020e4d49..000000000000 --- third_party/libwebrtc/sdk/videocapture_objc_gn/moz.build +++ /dev/null @@ -1,70 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/sdk/objc/", - "/third_party/libwebrtc/sdk/objc/base/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/sdk/objc/components/capturer/RTCCameraVideoCapturer.m", - "/third_party/libwebrtc/sdk/objc/components/capturer/RTCFileVideoCapturer.m" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("videocapture_objc_gn") diff --git third_party/libwebrtc/sdk/videoframebuffer_objc_gn/moz.build third_party/libwebrtc/sdk/videoframebuffer_objc_gn/moz.build deleted file mode 100644 -index dea03fa57466..000000000000 +index 9e7f52704a52..000000000000 --- third_party/libwebrtc/sdk/videoframebuffer_objc_gn/moz.build +++ /dev/null @@ -1,73 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# 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/. - - - ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### - ### DO NOT edit it by hand. ### - -CMMFLAGS += [ - "-fobjc-arc" -] - -COMPILE_FLAGS["OS_INCLUDES"] = [] -AllowCompilerWarnings() - -DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" -DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True -DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" -DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_MAC"] = True -DEFINES["WEBRTC_MOZILLA_BUILD"] = True -DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -DEFINES["WEBRTC_POSIX"] = True -DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -DEFINES["__STDC_CONSTANT_MACROS"] = True -DEFINES["__STDC_FORMAT_MACROS"] = True - -FINAL_LIBRARY = "webrtc" - - -LOCAL_INCLUDES += [ - "!/ipc/ipdl/_ipdlheaders", - "!/third_party/libwebrtc/gen", - "/ipc/chromium/src", - "/media/libyuv/", - "/media/libyuv/libyuv/include/", - "/third_party/libwebrtc/", - "/third_party/libwebrtc/sdk/objc/", - "/third_party/libwebrtc/sdk/objc/base/", - "/third_party/libwebrtc/third_party/abseil-cpp/", - "/tools/profiler/public" -] - -UNIFIED_SOURCES += [ - "/third_party/libwebrtc/sdk/objc/api/video_frame_buffer/RTCNativeI420Buffer.mm", - "/third_party/libwebrtc/sdk/objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.mm", - "/third_party/libwebrtc/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.mm" -] - -if not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" - DEFINES["NDEBUG"] = True - DEFINES["NVALGRIND"] = True - -if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - DEFINES["_DEBUG"] = True - --if CONFIG["CPU_ARCH"] == "aarch64": +-if CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -Library("videoframebuffer_objc_gn") diff --git third_party/libwebrtc/system_wrappers/denormal_disabler_gn/moz.build third_party/libwebrtc/system_wrappers/denormal_disabler_gn/moz.build -index 10482ec2ea89..064ddd6f7ea0 100644 +index 5a007d6343e2..e58095f60b94 100644 --- third_party/libwebrtc/system_wrappers/denormal_disabler_gn/moz.build +++ third_party/libwebrtc/system_wrappers/denormal_disabler_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("denormal_disabler_gn") diff --git third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build -index 9bbb11725944..53f2c83c65cc 100644 +index e23512e42579..5b24ada78a23 100644 --- third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build +++ third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("field_trial_gn") diff --git third_party/libwebrtc/system_wrappers/metrics_gn/moz.build third_party/libwebrtc/system_wrappers/metrics_gn/moz.build -index b4982671c9fb..a5e24c852a0d 100644 +index aa35ad0401a8..1da178fc929e 100644 --- third_party/libwebrtc/system_wrappers/metrics_gn/moz.build +++ third_party/libwebrtc/system_wrappers/metrics_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("metrics_gn") diff --git third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build -index bfc6aa12f922..2c316fbc9e0f 100644 +index e53ea6babd3d..df52edb77169 100644 --- third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build +++ third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -47,200 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,204 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - LOCAL_INCLUDES += [ - "/config/external/nspr/", - "/nsprpub/lib/ds/", - "/nsprpub/pr/include/" - ] - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("system_wrappers_gn") diff --git third_party/libwebrtc/test/rtp_test_utils_gn/moz.build third_party/libwebrtc/test/rtp_test_utils_gn/moz.build -index a93c14603d74..c15a9ae02722 100644 +index f3ffb448cd30..e86bdab557d1 100644 --- third_party/libwebrtc/test/rtp_test_utils_gn/moz.build +++ third_party/libwebrtc/test/rtp_test_utils_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,119 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,123 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -161,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -165,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("rtp_test_utils_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build -index 31acde4e32f6..a07cf094c60f 100644 +index f0562eabf500..a07cf094c60f 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("algorithm_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build -index ca1f9f85bf02..ea98e82e69b0 100644 +index 74a9d1986ea5..ea98e82e69b0 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("container_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build -index 5b1e4a8e0ac3..49c783cd4c81 100644 +index e3b931a7b2fe..49c783cd4c81 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("atomic_hook_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build -index e21dd2812a91..ac7916a85e5d 100644 +index 783c3186bb9e..ac7916a85e5d 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("base_internal_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build -index d226f5a9e03c..a1d553dad6db 100644 +index ba78602e5eea..a1d553dad6db 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("config_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build -index 9bb661c458d7..3e445069597d 100644 +index e19ecba14a74..3e445069597d 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("core_headers_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build -index a237d04bb798..edd5959dc1b8 100644 +index a24939362860..e80e5c86aaea 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("log_severity_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build -index 8be2f4c300d7..f55dd72d008a 100644 +index 8402338b9899..d3b730672fc6 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("raw_logging_internal_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/throw_delegate_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/throw_delegate_gn/moz.build -index 813eed764791..bc411d424827 100644 +index 78f0a49f704c..04e6ae930cb3 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/base/throw_delegate_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/throw_delegate_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("throw_delegate_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_gn/moz.build -index 6cd0d6b473dd..367c6bd433a3 100644 +index 590a21038a80..367c6bd433a3 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("cleanup_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_internal_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_internal_gn/moz.build -index b0fd90e5e1aa..3f4fc9ed0f88 100644 +index 269410ddabce..3f4fc9ed0f88 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_internal_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/cleanup/cleanup_internal_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("cleanup_internal_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build -index 29587550a341..38403c4daf5f 100644 +index ee9640db8bb1..38403c4daf5f 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("compressed_tuple_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build -index 9cebdf041bf3..f3c3c2ec8183 100644 +index bdf3ab137437..f3c3c2ec8183 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("inlined_vector_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build -index 6bd470bb56b8..b5c250da1c55 100644 +index a77c5b9bbf02..b5c250da1c55 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("inlined_vector_internal_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/functional/any_invocable_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/functional/any_invocable_gn/moz.build -index c71de94dba7d..8cc78181cb75 100644 +index 34944872348d..8cc78181cb75 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/functional/any_invocable_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/functional/any_invocable_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("any_invocable_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/functional/bind_front_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/functional/bind_front_gn/moz.build -index 6844d6e45b13..5c92f038c84f 100644 +index 564670abf0d0..5c92f038c84f 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/functional/bind_front_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/functional/bind_front_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("bind_front_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build -index 092f878b8e82..cf5df0d3048a 100644 +index bd6abd19836c..cf5df0d3048a 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("memory_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build -index ddb9d262175a..d7c6a3f7be95 100644 +index 5d0b080cb880..d7c6a3f7be95 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("type_traits_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/bits_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/bits_gn/moz.build -index 9c8d37ad517d..09fa161e8735 100644 +index 1923a18b1f3d..09fa161e8735 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/bits_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/bits_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("bits_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build -index a15b4f43bbe4..0e364e67c4fc 100644 +index ec45e9281f85..947feb765e92 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("int128_gn") -diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build -index 2a53b9e647f7..71fd3a4a576d 100644 ---- third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build -+++ third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view_gn/moz.build +index 16fa4aa49383..7a2c3c58f1a3 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" -@@ -40,138 +45,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("strings_gn") -diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build -index 3a88a0da486e..54aba92be8f6 100644 ---- third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build -+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build + Library("string_view_gn") +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build +index f748c5d9c15f..26ad6583df10 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -41,138 +46,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("bad_optional_access_gn") -diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build -index 08cc9180d644..edc6c3091d3e 100644 ---- third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build -+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build + Library("strings_gn") +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build +index a2eeaa3f05f3..c963ce692f25 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("bad_variant_access_gn") -diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build -index 96113b00bd5d..f68149f85c45 100644 ---- third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build -+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build + Library("bad_optional_access_gn") +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build +index e20623795d69..5d0ddb736b8b 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] +- +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": -- - DEFINES["_DEBUG"] = True - --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- +- CXXFLAGS += [ +- "-msse2" +- ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + - DEFINES["_GNU_SOURCE"] = True -- - Library("optional_gn") -diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build -index 31e83327e0d0..293b2b62e2e5 100644 ---- third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build -+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build ++ DEFINES["USE_X11"] = "1" + + Library("bad_variant_access_gn") +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build +index 252d8a837643..f68149f85c45 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["_GNU_SOURCE"] = True +- + Library("optional_gn") +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build +index 91f8106b2788..293b2b62e2e5 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build +@@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] + AllowCompilerWarnings() + + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True + + FINAL_LIBRARY = "webrtc" + +@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True +- DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True +- +-if CONFIG["TARGET_CPU"] == "mips32": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- + DEFINES["_DEBUG"] = True + +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- +- OS_LIBS += [ +- "android_support" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("span_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build -index 90e8e3b9d115..59ea6584a0f4 100644 +index 1f2c40273d74..59ea6584a0f4 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("variant_gn") diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build -index 180c8a2fbbf7..c06e16fa60f4 100644 +index 172b27fecbd9..c06e16fa60f4 100644 --- third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build +++ third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build @@ -10,6 +10,11 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True FINAL_LIBRARY = "webrtc" @@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_NONSTDC_NO_DEPRECATE"] = True - DEFINES["_CRT_NONSTDC_NO_WARNINGS"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("utility_gn") diff --git third_party/libwebrtc/third_party/drm/drm_gn/moz.build third_party/libwebrtc/third_party/drm/drm_gn/moz.build -index 78ba6b526064..29c9ceb54264 100644 +index a397ac2643f2..ae35e8229645 100644 --- third_party/libwebrtc/third_party/drm/drm_gn/moz.build +++ third_party/libwebrtc/third_party/drm/drm_gn/moz.build -@@ -12,20 +12,16 @@ AllowCompilerWarnings() +@@ -12,21 +12,17 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["USE_AURA"] = "1" DEFINES["USE_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True +DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_LINUX"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" DEFINES["_FILE_OFFSET_BITS"] = "64" -DEFINES["_GNU_SOURCE"] = True DEFINES["_LARGEFILE64_SOURCE"] = True DEFINES["_LARGEFILE_SOURCE"] = True DEFINES["__STDC_CONSTANT_MACROS"] = True -@@ -62,12 +58,6 @@ if CONFIG["CPU_ARCH"] == "aarch64": +@@ -63,12 +59,6 @@ if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True -@@ -81,7 +71,7 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -82,7 +72,7 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" diff --git third_party/libwebrtc/third_party/gbm/gbm_gn/moz.build third_party/libwebrtc/third_party/gbm/gbm_gn/moz.build -index 173399cf13bd..9ca41fcadeaa 100644 +index badbac28ea59..7e55d47e63a2 100644 --- third_party/libwebrtc/third_party/gbm/gbm_gn/moz.build +++ third_party/libwebrtc/third_party/gbm/gbm_gn/moz.build -@@ -12,20 +12,16 @@ AllowCompilerWarnings() +@@ -12,21 +12,17 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["USE_AURA"] = "1" DEFINES["USE_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True +DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_LINUX"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" DEFINES["_FILE_OFFSET_BITS"] = "64" -DEFINES["_GNU_SOURCE"] = True DEFINES["_LARGEFILE64_SOURCE"] = True DEFINES["_LARGEFILE_SOURCE"] = True DEFINES["__STDC_CONSTANT_MACROS"] = True -@@ -60,12 +56,6 @@ if CONFIG["CPU_ARCH"] == "aarch64": +@@ -61,12 +57,6 @@ if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True -@@ -79,7 +69,7 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -80,7 +70,7 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" diff --git third_party/libwebrtc/third_party/libepoxy/libepoxy_gn/moz.build third_party/libwebrtc/third_party/libepoxy/libepoxy_gn/moz.build -index 646e12d72d60..d307f2650a1b 100644 +index 000380105901..ef88818e351d 100644 --- third_party/libwebrtc/third_party/libepoxy/libepoxy_gn/moz.build +++ third_party/libwebrtc/third_party/libepoxy/libepoxy_gn/moz.build -@@ -12,20 +12,16 @@ AllowCompilerWarnings() +@@ -12,21 +12,17 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True -DEFINES["USE_AURA"] = "1" DEFINES["USE_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True +DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True -DEFINES["WEBRTC_LINUX"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" DEFINES["_FILE_OFFSET_BITS"] = "64" -DEFINES["_GNU_SOURCE"] = True DEFINES["_LARGEFILE64_SOURCE"] = True DEFINES["_LARGEFILE_SOURCE"] = True DEFINES["__STDC_CONSTANT_MACROS"] = True -@@ -61,12 +57,6 @@ if CONFIG["CPU_ARCH"] == "aarch64": +@@ -62,12 +58,6 @@ if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True -@@ -80,7 +70,7 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -81,7 +71,7 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" -diff --git third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build -index 2d97f962e7f9..dcece6e53f93 100644 ---- third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build -+++ third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +diff --git third_party/libwebrtc/third_party/libvpx/libvpx_gn/moz.build third_party/libwebrtc/third_party/libvpx/libvpx_gn/moz.build +index b57c7bd060a9..ce336e9a598d 100644 +--- third_party/libwebrtc/third_party/libvpx/libvpx_gn/moz.build ++++ third_party/libwebrtc/third_party/libvpx/libvpx_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -41,103 +50,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -40,107 +50,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -147,57 +70,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -150,57 +70,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - - Library("yuv_gn") -diff --git third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build -index 27095596f717..5394d07cc759 100644 ---- third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build -+++ third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build -@@ -9,6 +9,14 @@ - COMPILE_FLAGS["OS_INCLUDES"] = [] - AllowCompilerWarnings() - + Library("vpx_gn") +diff --git third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build +index 5c9e66f4083d..bec84e2f5a4d 100644 +--- third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build ++++ third_party/libwebrtc/third_party/libyuv/libyuv_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True -+ - FINAL_LIBRARY = "webrtc" + FINAL_LIBRARY = "webrtc" -@@ -33,151 +41,28 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -41,107 +51,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["WEBRTC_ANDROID"] = True +- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True -- DEFINES["_USE_MATH_DEFINES"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True -- --if CONFIG["CPU_ARCH"] == "arm": -- -- CFLAGS += [ -- "-mfpu=neon" -- ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "aarch64": - DEFINES["PFFFT_SIMD_DISABLE"] = True -- DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True - if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": - DEFINES["PFFFT_SIMD_DISABLE"] = True + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "ppc64": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["PFFFT_SIMD_DISABLE"] = True +@@ -151,57 +71,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_X11"] = "1" -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": - - CFLAGS += [ - "-msse2" - ] - +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- -- CFLAGS += [ -- "-msse2" -- ] +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - - Library("pffft_gn") -diff --git third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build -index 86a0daf8fa51..7b5a76defe4e 100644 ---- third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build -+++ third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build -@@ -12,21 +12,17 @@ AllowCompilerWarnings() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True - DEFINES["RTC_ENABLE_VP9"] = True --DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" --DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" --DEFINES["USE_UDEV"] = True -+DEFINES["WEBRTC_BSD"] = True - DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" - DEFINES["WEBRTC_LIBRARY_IMPL"] = True --DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_MOZILLA_BUILD"] = True - DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" - DEFINES["WEBRTC_POSIX"] = True - DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" --DEFINES["_GNU_SOURCE"] = True - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True -@@ -61,12 +57,6 @@ if CONFIG["CPU_ARCH"] == "aarch64": - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": -- -- DEFINES["WEBRTC_ARCH_ARM"] = True -- DEFINES["WEBRTC_ARCH_ARM_V7"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["MIPS32_LE"] = True -@@ -80,7 +70,7 @@ if CONFIG["CPU_ARCH"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - -diff --git third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build -index 2a3db9a62207..087012313675 100644 ---- third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build -+++ third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build + Library("yuv_gn") +diff --git third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build +index ee4fd18a3eb4..fe026d923759 100644 +--- third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build ++++ third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build @@ -9,6 +9,14 @@ COMPILE_FLAGS["OS_INCLUDES"] = [] AllowCompilerWarnings() +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True + FINAL_LIBRARY = "webrtc" -@@ -33,144 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -33,155 +41,28 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["_GNU_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_USE_MATH_DEFINES"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True +- +-if CONFIG["TARGET_CPU"] == "arm": +- +- CFLAGS += [ +- "-mfpu=neon" +- ] ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["PFFFT_SIMD_DISABLE"] = True +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "mips64": + + DEFINES["PFFFT_SIMD_DISABLE"] = True +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "ppc64": + + DEFINES["PFFFT_SIMD_DISABLE"] = True + +-if CONFIG["TARGET_CPU"] == "riscv64": +- +- DEFINES["PFFFT_SIMD_DISABLE"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CFLAGS += [ + "-msse2" + ] + +- OS_LIBS += [ +- "android_support" +- ] ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +- +- CFLAGS += [ +- "-msse2" +- ] +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["USE_X11"] = "1" + + Library("pffft_gn") +diff --git third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build +index 6209fa98cc55..bc0fbed530b4 100644 +--- third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build ++++ third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build +@@ -12,22 +12,18 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True +-DEFINES["USE_AURA"] = "1" + DEFINES["USE_GLIB"] = "1" +-DEFINES["USE_NSS_CERTS"] = "1" + DEFINES["USE_OZONE"] = "1" +-DEFINES["USE_UDEV"] = True ++DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True +-DEFINES["WEBRTC_LINUX"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" + DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" + DEFINES["WEBRTC_USE_PIPEWIRE"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" +-DEFINES["_GNU_SOURCE"] = True + DEFINES["_LARGEFILE64_SOURCE"] = True + DEFINES["_LARGEFILE_SOURCE"] = True + DEFINES["__STDC_CONSTANT_MACROS"] = True +@@ -62,12 +58,6 @@ if CONFIG["TARGET_CPU"] == "aarch64": + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True +@@ -81,7 +71,7 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + +diff --git third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build +index afb7f87ccf80..7c0c3d96945e 100644 +--- third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build ++++ third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build +@@ -9,6 +9,14 @@ + COMPILE_FLAGS["OS_INCLUDES"] = [] + AllowCompilerWarnings() + ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True ++ + FINAL_LIBRARY = "webrtc" + + +@@ -33,144 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_DEBUG"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": CXXFLAGS += [ "-msse2" ] - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("rnn_vad_gn") diff --git third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build -index 1459a2b50d95..c019774c6343 100644 +index 2d1fd69ed05d..ee1b5000f55a 100644 --- third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build +++ third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -52,191 +61,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -52,195 +62,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_adaptation_gn") diff --git third_party/libwebrtc/video/config/encoder_config_gn/moz.build third_party/libwebrtc/video/config/encoder_config_gn/moz.build -index ea2b54bfb866..2dc027987bb6 100644 +index 1c2c9ef83579..f417c976fc09 100644 --- third_party/libwebrtc/video/config/encoder_config_gn/moz.build +++ third_party/libwebrtc/video/config/encoder_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("encoder_config_gn") diff --git third_party/libwebrtc/video/config/streams_config_gn/moz.build third_party/libwebrtc/video/config/streams_config_gn/moz.build -index 9e174cff3ccb..3ab1b0d83805 100644 +index e2d2f9963d84..bf53b31dbe77 100644 --- third_party/libwebrtc/video/config/streams_config_gn/moz.build +++ third_party/libwebrtc/video/config/streams_config_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -44,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,195 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("streams_config_gn") diff --git third_party/libwebrtc/video/decode_synchronizer_gn/moz.build third_party/libwebrtc/video/decode_synchronizer_gn/moz.build -index de01a944eadc..f306e996bb22 100644 +index d0e4adeda239..c30a81d15c5e 100644 --- third_party/libwebrtc/video/decode_synchronizer_gn/moz.build +++ third_party/libwebrtc/video/decode_synchronizer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "webrtc" + +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["WEBRTC_ANDROID"] = True +- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_GNU_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +- OS_LIBS += [ +- "log" +- ] +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +- OS_LIBS += [ +- "rt" +- ] +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True +- +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" +- ] ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +- OS_LIBS += [ +- "android_support" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["USE_X11"] = "1" + + Library("decode_synchronizer_gn") +diff --git third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build +index 51ec86b2cf18..be8a118afa55 100644 +--- third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build ++++ third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "webrtc" + +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: + if CONFIG["MOZ_DEBUG"] == "1": + + DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["ANDROID"] = True +- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" +- DEFINES["HAVE_SYS_UIO_H"] = True +- DEFINES["WEBRTC_ANDROID"] = True +- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_GNU_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +- OS_LIBS += [ +- "log" +- ] +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +- OS_LIBS += [ +- "rt" +- ] +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True +- DEFINES["_SECURE_ATL"] = True +- DEFINES["_UNICODE"] = True +- DEFINES["_WIN32_WINNT"] = "0x0A00" +- DEFINES["_WINDOWS"] = True +- DEFINES["__STD_C"] = True +- +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" +- ] ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" +- ] +- +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" +- +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "android_support", +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +- OS_LIBS += [ +- "android_support" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["USE_X11"] = "1" + + Library("frame_cadence_adapter_gn") +diff --git third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build +index a53fde81f207..748c6fbb6acf 100644 +--- third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build ++++ third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,122 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": -- -- CXXFLAGS += [ -- "-mfpu=neon" -- ] +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": + +@@ -164,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_X11"] = "1" -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - - Library("decode_synchronizer_gn") -diff --git third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build -index 2f7abf4617c9..f0eff3beb31c 100644 ---- third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build -+++ third_party/libwebrtc/video/frame_cadence_adapter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + Library("frame_decode_scheduler_gn") +diff --git third_party/libwebrtc/video/frame_decode_timing_gn/moz.build third_party/libwebrtc/video/frame_decode_timing_gn/moz.build +index ca09fac23b1d..bf76b80dce48 100644 +--- third_party/libwebrtc/video/frame_decode_timing_gn/moz.build ++++ third_party/libwebrtc/video/frame_decode_timing_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("frame_cadence_adapter_gn") -diff --git third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build -index 834d9880e79f..b37ca42dd139 100644 ---- third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build -+++ third_party/libwebrtc/video/frame_decode_scheduler_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True - DEFINES["RTC_ENABLE_VP9"] = True -+DEFINES["USE_GLIB"] = "1" -+DEFINES["USE_OZONE"] = "1" -+DEFINES["WEBRTC_BSD"] = True - DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" - DEFINES["WEBRTC_LIBRARY_IMPL"] = True - DEFINES["WEBRTC_MOZILLA_BUILD"] = True - DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -+DEFINES["WEBRTC_POSIX"] = True - DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -+DEFINES["_FILE_OFFSET_BITS"] = "64" -+DEFINES["_LARGEFILE64_SOURCE"] = True -+DEFINES["_LARGEFILE_SOURCE"] = True -+DEFINES["__STDC_CONSTANT_MACROS"] = True -+DEFINES["__STDC_FORMAT_MACROS"] = True - - FINAL_LIBRARY = "webrtc" - -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: - if CONFIG["MOZ_DEBUG"] == "1": - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" -- --if CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["ANDROID"] = True -- DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" -- DEFINES["HAVE_SYS_UIO_H"] = True -- DEFINES["WEBRTC_ANDROID"] = True -- DEFINES["WEBRTC_ANDROID_OPENSLES"] = True -- DEFINES["WEBRTC_LINUX"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_GNU_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- -- OS_LIBS += [ -- "log" -- ] -- --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_AURA"] = "1" -- DEFINES["USE_GLIB"] = "1" -- DEFINES["USE_NSS_CERTS"] = "1" -- DEFINES["USE_OZONE"] = "1" -- DEFINES["USE_UDEV"] = True -- DEFINES["WEBRTC_LINUX"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- -- OS_LIBS += [ -- "rt" -- ] -- --if CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["USE_GLIB"] = "1" -- DEFINES["USE_OZONE"] = "1" -- DEFINES["USE_X11"] = "1" -- DEFINES["WEBRTC_BSD"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -- DEFINES["NOMINMAX"] = True -- DEFINES["NTDDI_VERSION"] = "0x0A000000" -- DEFINES["PSAPI_VERSION"] = "2" -- DEFINES["UNICODE"] = True -- DEFINES["USE_AURA"] = "1" -- DEFINES["WEBRTC_WIN"] = True -- DEFINES["WIN32"] = True -- DEFINES["WIN32_LEAN_AND_MEAN"] = True -- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" -- DEFINES["WINVER"] = "0x0A00" -- DEFINES["_ATL_NO_OPENGL"] = True -- DEFINES["_CRT_RAND_S"] = True -- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True -- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True -- DEFINES["_HAS_EXCEPTIONS"] = "0" -- DEFINES["_HAS_NODISCARD"] = True -- DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True -- DEFINES["_SECURE_ATL"] = True -- DEFINES["_UNICODE"] = True -- DEFINES["_WIN32_WINNT"] = "0x0A00" -- DEFINES["_WINDOWS"] = True -- DEFINES["__STD_C"] = True -- -- OS_LIBS += [ -- "crypt32", -- "iphlpapi", -- "secur32", -- "winmm" -- ] -+ DEFINES["_DEBUG"] = True - - if CONFIG["CPU_ARCH"] == "aarch64": - - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - --if CONFIG["CPU_ARCH"] == "arm": -- -- DEFINES["WEBRTC_ARCH_ARM"] = True -- DEFINES["WEBRTC_ARCH_ARM_V7"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": -- -- DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "x86": - -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" -- --if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": -- -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- - Library("frame_decode_scheduler_gn") -diff --git third_party/libwebrtc/video/frame_decode_timing_gn/moz.build third_party/libwebrtc/video/frame_decode_timing_gn/moz.build -index 570b927d3a81..40d9a4ffcc46 100644 ---- third_party/libwebrtc/video/frame_decode_timing_gn/moz.build -+++ third_party/libwebrtc/video/frame_decode_timing_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("frame_decode_timing_gn") +diff --git third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build +index 39e9878bd229..080bbd8999f7 100644 +--- third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build ++++ third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ +- "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("frame_decode_timing_gn") -diff --git third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build -index 3266e8f07fbf..254d05acd491 100644 ---- third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build -+++ third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("frame_dumping_decoder_gn") +diff --git third_party/libwebrtc/video/frame_dumping_encoder_gn/moz.build third_party/libwebrtc/video/frame_dumping_encoder_gn/moz.build +index 615033eb1d1c..18b7d57c46ae 100644 +--- third_party/libwebrtc/video/frame_dumping_encoder_gn/moz.build ++++ third_party/libwebrtc/video/frame_dumping_encoder_gn/moz.build +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" - Library("frame_dumping_decoder_gn") + Library("frame_dumping_encoder_gn") diff --git third_party/libwebrtc/video/render/incoming_video_stream_gn/moz.build third_party/libwebrtc/video/render/incoming_video_stream_gn/moz.build -index c8b8614b0499..42958c3afcef 100644 +index ad1d7fbfb348..bb86b6904a1e 100644 --- third_party/libwebrtc/video/render/incoming_video_stream_gn/moz.build +++ third_party/libwebrtc/video/render/incoming_video_stream_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("incoming_video_stream_gn") diff --git third_party/libwebrtc/video/render/video_render_frames_gn/moz.build third_party/libwebrtc/video/render/video_render_frames_gn/moz.build -index 951c654ef6d2..a3b28f438f5d 100644 +index d5de8cd1781e..c959f629c28c 100644 --- third_party/libwebrtc/video/render/video_render_frames_gn/moz.build +++ third_party/libwebrtc/video/render/video_render_frames_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_render_frames_gn") diff --git third_party/libwebrtc/video/task_queue_frame_decode_scheduler_gn/moz.build third_party/libwebrtc/video/task_queue_frame_decode_scheduler_gn/moz.build -index e9e33818dec5..f8bc9184d923 100644 +index 2651f290bc5b..72717c771efc 100644 --- third_party/libwebrtc/video/task_queue_frame_decode_scheduler_gn/moz.build +++ third_party/libwebrtc/video/task_queue_frame_decode_scheduler_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("task_queue_frame_decode_scheduler_gn") diff --git third_party/libwebrtc/video/unique_timestamp_counter_gn/moz.build third_party/libwebrtc/video/unique_timestamp_counter_gn/moz.build -index de254b0f678e..177b8617949e 100644 +index 24b3c5a30b6e..0d30b9bd4787 100644 --- third_party/libwebrtc/video/unique_timestamp_counter_gn/moz.build +++ third_party/libwebrtc/video/unique_timestamp_counter_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("unique_timestamp_counter_gn") diff --git third_party/libwebrtc/video/video_gn/moz.build third_party/libwebrtc/video/video_gn/moz.build -index 392c0c16c828..c3232b0bd0ff 100644 +index e8ac15dc40e6..a7091e452af6 100644 --- third_party/libwebrtc/video/video_gn/moz.build +++ third_party/libwebrtc/video/video_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -64,191 +73,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -63,195 +73,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_gn") diff --git third_party/libwebrtc/video/video_receive_stream_timeout_tracker_gn/moz.build third_party/libwebrtc/video/video_receive_stream_timeout_tracker_gn/moz.build -index 0de224d0dfb5..b74708587cec 100644 +index 8fb9a9c73712..bd076121f04b 100644 --- third_party/libwebrtc/video/video_receive_stream_timeout_tracker_gn/moz.build +++ third_party/libwebrtc/video/video_receive_stream_timeout_tracker_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,194 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_receive_stream_timeout_tracker_gn") diff --git third_party/libwebrtc/video/video_stream_buffer_controller_gn/moz.build third_party/libwebrtc/video/video_stream_buffer_controller_gn/moz.build -index a18b990a8d75..8b1e03633a54 100644 +index e60151d9678e..d3d87dd6dc37 100644 --- third_party/libwebrtc/video/video_stream_buffer_controller_gn/moz.build +++ third_party/libwebrtc/video/video_stream_buffer_controller_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,195 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_stream_buffer_controller_gn") diff --git third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build -index cd70bcde35e5..004e04207c71 100644 +index 2ea2fce60b58..ebcf5af12e54 100644 --- third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build +++ third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -48,191 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,195 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "iphlpapi", - "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - DEFINES["_GNU_SOURCE"] = True + DEFINES["USE_X11"] = "1" Library("video_stream_encoder_impl_gn") diff --git third_party/libwebrtc/video/video_stream_encoder_interface_gn/moz.build third_party/libwebrtc/video/video_stream_encoder_interface_gn/moz.build -index e058513d4fb8..d51109a08c5f 100644 +index 0d40ef9c8f22..82e65469d09c 100644 --- third_party/libwebrtc/video/video_stream_encoder_interface_gn/moz.build +++ third_party/libwebrtc/video/video_stream_encoder_interface_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": -@@ -153,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,57 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["_GNU_SOURCE"] = True - Library("video_stream_encoder_interface_gn") diff --git third_party/libwebrtc/webrtc_gn/moz.build third_party/libwebrtc/webrtc_gn/moz.build -index b91e518cabc7..495fb5b35f3d 100644 +index f71e5851253d..4b3dba6c6883 100644 --- third_party/libwebrtc/webrtc_gn/moz.build +++ third_party/libwebrtc/webrtc_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_OFFSET_BITS"] = "64" +DEFINES["_LARGEFILE64_SOURCE"] = True +DEFINES["_LARGEFILE_SOURCE"] = True +DEFINES["__STDC_CONSTANT_MACROS"] = True +DEFINES["__STDC_FORMAT_MACROS"] = True FINAL_LIBRARY = "webrtc" -@@ -39,139 +48,23 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -39,143 +49,23 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "GLESv2", - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - LOCAL_INCLUDES += [ - "/third_party/libwebrtc/sdk/objc/", - "/third_party/libwebrtc/sdk/objc/base/" - ] - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "rt" - ] - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - DEFINES["_SCL_SECURE_NO_DEPRECATE"] = True - DEFINES["_SECURE_ATL"] = True - DEFINES["_UNICODE"] = True - DEFINES["_WIN32_WINNT"] = "0x0A00" - DEFINES["_WINDOWS"] = True - DEFINES["__STD_C"] = True - - OS_LIBS += [ - "crypt32", - "d3d11", +- "dwmapi", - "dxgi", - "iphlpapi", - "ole32", - "oleaut32", - "secur32", - "shcore", - "strmiids", - "user32", - "winmm" - ] + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True + DEFINES["WEBRTC_USE_PIPEWIRE"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True + LOCAL_INCLUDES += [ + "/third_party/pipewire/" + ] - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/third_party/pipewire/" -@@ -180,7 +73,6 @@ if CONFIG["CPU_ARCH"] == "mips32": - if CONFIG["CPU_ARCH"] == "mips64": +@@ -184,7 +74,6 @@ if CONFIG["TARGET_CPU"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips64": DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True LOCAL_INCLUDES += [ "/third_party/pipewire/" -@@ -189,32 +81,22 @@ if CONFIG["CPU_ARCH"] == "mips64": - if CONFIG["CPU_ARCH"] == "x86": +@@ -193,32 +82,22 @@ if CONFIG["TARGET_CPU"] == "mips64": + if CONFIG["TARGET_CPU"] == "x86": DEFINES["WEBRTC_ENABLE_AVX2"] = True + DEFINES["WEBRTC_USE_PIPEWIRE"] = True + + LOCAL_INCLUDES += [ + "/third_party/pipewire/" + ] - if CONFIG["CPU_ARCH"] == "x86_64": + if CONFIG["TARGET_CPU"] == "x86_64": DEFINES["WEBRTC_ENABLE_AVX2"] = True + DEFINES["WEBRTC_USE_PIPEWIRE"] = True -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" + LOCAL_INCLUDES += [ + "/third_party/pipewire/" + ] -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": DEFINES["USE_X11"] = "1" -@@ -229,53 +111,4 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - "Xtst" +@@ -232,53 +111,4 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": + "Xrender" ] --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ - "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - OS_LIBS += [ - "android_support" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - - LOCAL_INCLUDES += [ - "/third_party/pipewire/" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - - LOCAL_INCLUDES += [ - "/third_party/pipewire/" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - - LOCAL_INCLUDES += [ - "/third_party/pipewire/" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - - LOCAL_INCLUDES += [ - "/third_party/pipewire/" - ] - Library("webrtc_gn") diff --git a/www/librewolf/files/patch-mozglue_misc_SSE.h b/www/librewolf/files/patch-mozglue_misc_SSE.h index 296c50d060d3..d60e1a0c9659 100644 --- a/www/librewolf/files/patch-mozglue_misc_SSE.h +++ b/www/librewolf/files/patch-mozglue_misc_SSE.h @@ -1,84 +1,84 @@ commit 70c3be521da1296f7ba47bd07b67927e43634d1b Author: Christoph Moench-Tegeder disable SSE and friends in builds for legacy architectures diff --git gfx/thebes/moz.build gfx/thebes/moz.build index 71903756ea19..3591cc0f38e8 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build @@ -174,7 +174,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": ] # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp. -if CONFIG["INTEL_ARCHITECTURE"]: -+if CONFIG["INTEL_ARCHITECTURE"] and CONFIG['CPU_ARCH'] == 'x86_64': ++if CONFIG["INTEL_ARCHITECTURE"] and CONFIG['TARGET_CPU'] == 'x86_64': SOURCES += ["gfxAlphaRecoverySSE2.cpp"] # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. diff --git mozglue/misc/SSE.h mozglue/misc/SSE.h index 0b87366a8043..af0a0b38d23c 100644 --- mozglue/misc/SSE.h +++ mozglue/misc/SSE.h @@ -100,36 +100,50 @@ # define MOZILLA_PRESUME_MMX 1 # endif # ifdef __SSE__ +# if !defined(__386__) // It's ok to use SSE instructions based on the -march option (or // the default for x86_64 or for Intel Mac). # define MOZILLA_PRESUME_SSE 1 # endif +# endif # ifdef __SSE2__ +# if !defined(__386__) // It's ok to use SSE2 instructions based on the -march option (or // the default for x86_64 or for Intel Mac). # define MOZILLA_PRESUME_SSE2 1 # endif +# endif # ifdef __SSE3__ +# if !defined(__386__) // It's ok to use SSE3 instructions based on the -march option (or the // default for Intel Mac). # define MOZILLA_PRESUME_SSE3 1 # endif +# endif # ifdef __SSSE3__ +# if !defined(__386__) // It's ok to use SSSE3 instructions based on the -march option. # define MOZILLA_PRESUME_SSSE3 1 # endif +# endif # ifdef __SSE4A__ +# if !defined(__386__) // It's ok to use SSE4A instructions based on the -march option. # define MOZILLA_PRESUME_SSE4A 1 # endif +# endif # ifdef __SSE4_1__ +# if !defined(__386__) // It's ok to use SSE4.1 instructions based on the -march option. # define MOZILLA_PRESUME_SSE4_1 1 # endif +# endif # ifdef __SSE4_2__ +# if !defined(__386__) // It's ok to use SSE4.2 instructions based on the -march option. # define MOZILLA_PRESUME_SSE4_2 1 # endif +# endif # ifdef __AVX__ // It's ok to use AVX instructions based on the -march option. # define MOZILLA_PRESUME_AVX 1 @@ -144,8 +158,10 @@ # endif # ifdef HAVE_CPUID_H +# if !defined(__i386__) # define MOZILLA_SSE_HAVE_CPUID_DETECTION # endif +# endif #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64)) diff --git a/www/librewolf/files/patch-rust-1.73.0 b/www/librewolf/files/patch-rust-1.73.0 deleted file mode 100644 index b838ffd90d28..000000000000 --- a/www/librewolf/files/patch-rust-1.73.0 +++ /dev/null @@ -1,83 +0,0 @@ -From a79edf4cfc54aad30a5630b217645c4b8274d8f7 Mon Sep 17 00:00:00 2001 -From: Oli Scherer -Date: Mon, 10 Jul 2023 09:46:53 +0000 -Subject: [PATCH] Stop using old-style `simd_shuffle` - ---- - src/codegen/llvm.rs | 20 +++++++------------- - 1 file changed, 7 insertions(+), 13 deletions(-) - -diff --git third_party/rust/packed_simd_2/src/codegen/llvm.rs third_party/rust/packed_simd_2/src/codegen/llvm.rs -index b4c09849..bb482fac 100644 ---- third_party/rust/packed_simd_2/src/codegen/llvm.rs -+++ third_party/rust/packed_simd_2/src/codegen/llvm.rs -@@ -5,14 +5,8 @@ use crate::sealed::Shuffle; - #[allow(unused_imports)] // FIXME: spurious warning? - use crate::sealed::Simd; - --// Shuffle intrinsics: expanded in users' crates, therefore public. - extern "platform-intrinsic" { -- pub fn simd_shuffle2(x: T, y: T, idx: [u32; 2]) -> U; -- pub fn simd_shuffle4(x: T, y: T, idx: [u32; 4]) -> U; -- pub fn simd_shuffle8(x: T, y: T, idx: [u32; 8]) -> U; -- pub fn simd_shuffle16(x: T, y: T, idx: [u32; 16]) -> U; -- pub fn simd_shuffle32(x: T, y: T, idx: [u32; 32]) -> U; -- pub fn simd_shuffle64(x: T, y: T, idx: [u32; 64]) -> U; -+ fn simd_shuffle(x: T, y: T, idx: I) -> U; - } - - #[allow(clippy::missing_safety_doc)] -@@ -22,7 +16,7 @@ where - T: Simd, - ::Element: Shuffle<[u32; 2], Output = U>, - { -- simd_shuffle2(x, y, IDX) -+ simd_shuffle(x, y, IDX) - } - - #[allow(clippy::missing_safety_doc)] -@@ -32,7 +26,7 @@ where - T: Simd, - ::Element: Shuffle<[u32; 4], Output = U>, - { -- simd_shuffle4(x, y, IDX) -+ simd_shuffle(x, y, IDX) - } - - #[allow(clippy::missing_safety_doc)] -@@ -42,7 +36,7 @@ where - T: Simd, - ::Element: Shuffle<[u32; 8], Output = U>, - { -- simd_shuffle8(x, y, IDX) -+ simd_shuffle(x, y, IDX) - } - - #[allow(clippy::missing_safety_doc)] -@@ -52,7 +46,7 @@ where - T: Simd, - ::Element: Shuffle<[u32; 16], Output = U>, - { -- simd_shuffle16(x, y, IDX) -+ simd_shuffle(x, y, IDX) - } - - #[allow(clippy::missing_safety_doc)] -@@ -62,7 +56,7 @@ where - T: Simd, - ::Element: Shuffle<[u32; 32], Output = U>, - { -- simd_shuffle32(x, y, IDX) -+ simd_shuffle(x, y, IDX) - } - - #[allow(clippy::missing_safety_doc)] -@@ -72,7 +66,7 @@ where - T: Simd, - ::Element: Shuffle<[u32; 64], Output = U>, - { -- simd_shuffle64(x, y, IDX) -+ simd_shuffle(x, y, IDX) - } - - extern "platform-intrinsic" { diff --git a/www/librewolf/files/patch-toolkit_compontents_processtools_procinfo__bsd.c b/www/librewolf/files/patch-toolkit_components_processtools_procinfo__bsd.c similarity index 100% rename from www/librewolf/files/patch-toolkit_compontents_processtools_procinfo__bsd.c rename to www/librewolf/files/patch-toolkit_components_processtools_procinfo__bsd.c diff --git a/www/librewolf/files/patch-toolkit_xre_glxtest.cpp b/www/librewolf/files/patch-toolkit_xre_glxtest.cpp deleted file mode 100644 index a054f2032cd2..000000000000 --- a/www/librewolf/files/patch-toolkit_xre_glxtest.cpp +++ /dev/null @@ -1,17 +0,0 @@ ---- toolkit/xre/glxtest/glxtest.cpp.orig 2023-05-28 22:08:21.663847000 +0200 -+++ toolkit/xre/glxtest/glxtest.cpp 2023-05-28 22:09:33.647075000 +0200 -@@ -195,9 +195,14 @@ - static void get_pci_status() { - log("GLX_TEST: get_pci_status start\n"); - -+#if defined(__FreeBSD__) -+ if (access("/dev/pci", F_OK) != 0) { -+ record_warning("cannot access /dev/pci"); -+#else - if (access("/sys/bus/pci/", F_OK) != 0 && - access("/sys/bus/pci_express/", F_OK) != 0) { - record_warning("cannot access /sys/bus/pci"); -+#endif - return; - } - diff --git a/www/librewolf/files/patch-toolkit_xre_nsXREDirProvider.cpp b/www/librewolf/files/patch-toolkit_xre_nsXREDirProvider.cpp new file mode 100644 index 000000000000..7c89097408dc --- /dev/null +++ b/www/librewolf/files/patch-toolkit_xre_nsXREDirProvider.cpp @@ -0,0 +1,11 @@ +--- toolkit/xre/nsXREDirProvider.cpp.orig 2024-03-19 15:15:35 UTC ++++ toolkit/xre/nsXREDirProvider.cpp +@@ -1430,7 +1430,7 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* + if (gAppData->profile) { + profile = gAppData->profile; + } else { +- appName = gAppData->name; ++ appName = "Librewolf"; + vendor = gAppData->vendor; + } + diff --git a/www/librewolf/files/patch-wayland-proxy b/www/librewolf/files/patch-wayland-proxy new file mode 100644 index 000000000000..d9cb16bd2215 --- /dev/null +++ b/www/librewolf/files/patch-wayland-proxy @@ -0,0 +1,15 @@ +--- third_party/wayland-proxy/wayland-proxy.cpp.orig 2024-02-29 09:10:59.939556000 +0100 ++++ third_party/wayland-proxy/wayland-proxy.cpp 2024-02-29 15:07:13.914375000 +0100 +@@ -318,10 +318,10 @@ + } + + bool ProxiedConnection::ConnectToCompositor() { +- if (!(mCompositorFlags & POLLOUT)) { ++ /* if (!(mCompositorFlags & POLLOUT)) { + // Try again later + return true; +- } ++ }*/ + + struct sockaddr_un addr = {}; + addr.sun_family = AF_UNIX; diff --git a/www/librewolf/files/patch-widget_gtk_nsMenuBar.cpp b/www/librewolf/files/patch-widget_gtk_nsMenuBar.cpp deleted file mode 100644 index dfa5ea927c77..000000000000 --- a/www/librewolf/files/patch-widget_gtk_nsMenuBar.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- widget/gtk/nsMenuBar.cpp.orig 2023-10-06 21:47:06.056933000 +0200 -+++ widget/gtk/nsMenuBar.cpp 2023-10-06 21:44:31.623574000 +0200 -@@ -190,7 +190,7 @@ - - mEventListener = new DocEventListener(this); - -- mDocument = do_QueryInterface(ContentNode()->OwnerDoc()); -+ mDocument = ContentNode()->OwnerDoc(); - - mAccessKey = Preferences::GetInt("ui.key.menuAccessKey"); - if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_SHIFT) { diff --git a/www/librewolf/files/patch-widget_gtk_nsMenuObject.cpp b/www/librewolf/files/patch-widget_gtk_nsMenuObject.cpp deleted file mode 100644 index 6badb2fdee21..000000000000 --- a/www/librewolf/files/patch-widget_gtk_nsMenuObject.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#https://bugzilla.mozilla.org/show_bug.cgi?id=1853867 -#https://aur.archlinux.org/cgit/aur.git/commit/unity-menubar.patch?h=firefox-appmenu&id=1ab4aad0eaaa2f5313aee62606420b0b92c3d238 ---- widget/gtk/nsMenuObject.cpp.orig 2023-10-06 21:50:32.804805000 +0200 -+++ widget/gtk/nsMenuObject.cpp 2023-10-06 21:11:59.559090000 +0200 -@@ -82,7 +82,7 @@ - nsMenuObject *mOwner; - RefPtr mImageRequest; - nsCOMPtr mURI; -- nsIntRect mImageRect; -+ - }; - - NS_IMPL_ISUPPORTS(nsMenuObjectIconLoader, imgINotificationObserver) -@@ -136,10 +136,8 @@ - return; - } - -- if (!mImageRect.IsEmpty()) { -- img = ImageOps::Clip(img, mImageRect); -- } - -+ - int32_t width, height; - img->GetWidth(&width); - img->GetHeight(&height); -@@ -174,7 +172,7 @@ - dom::Document *doc = mOwner->ContentNode()->OwnerDoc(); - - nsCOMPtr uri; -- nsIntRect imageRect; -+ - imgRequestProxy *imageRequest = nullptr; - - nsAutoString uriString; -@@ -197,9 +195,6 @@ - imageRequest = list->mListStyleImage.GetImageRequest(); - if (imageRequest) { - imageRequest->GetURI(getter_AddRefs(uri)); -- auto& rect = list->mImageRegion.AsRect(); -- imageRect = rect.ToLayoutRect().ToNearestPixels( -- pc->AppUnitsPerDevPixel()); - } - } - -@@ -217,7 +212,7 @@ - - bool same; - if (mURI && NS_SUCCEEDED(mURI->Equals(uri, &same)) && same && -- (!imageRequest || imageRect == mImageRect)) { -+ (!imageRequest)) { - return; - } - -@@ -229,10 +224,10 @@ - mURI = uri; - - if (imageRequest) { -- mImageRect = imageRect; -+ - imageRequest->Clone(this, nullptr, getter_AddRefs(mImageRequest)); - } else { -- mImageRect.SetEmpty(); -+ - nsCOMPtr loadGroup = doc->GetDocumentLoadGroup(); - RefPtr loader = - nsContentUtils::GetImgLoaderForDocument(doc); diff --git a/www/librewolf/files/unity-menubar.patch b/www/librewolf/files/unity-menubar.patch new file mode 100644 index 000000000000..fb80c7749738 --- /dev/null +++ b/www/librewolf/files/unity-menubar.patch @@ -0,0 +1,5268 @@ +--- a/browser/base/content/browser-menubar.inc ++++ b/browser/base/content/browser-menubar.inc +@@ -7,7 +7,12 @@ + # On macOS, we don't track whether activation of the native menubar happened + # with the keyboard. + #ifndef XP_MACOSX +- onpopupshowing="if (event.target.parentNode.parentNode == this) ++ onpopupshowing="if (event.target.parentNode.parentNode == this && ++#ifdef MOZ_WIDGET_GTK ++ document.documentElement.getAttribute('shellshowingmenubar') != 'true') ++#else ++ true) ++#endif + this.setAttribute('openedwithkey', + event.target.parentNode.openedWithKey);" + #endif +--- a/browser/base/content/browser.js ++++ b/browser/base/content/browser.js +@@ -6466,11 +6466,18 @@ function onViewToolbarsPopupShowing(aEve + MozXULElement.insertFTLIfNeeded("browser/toolbarContextMenu.ftl"); + let firstMenuItem = aInsertPoint || popup.firstElementChild; + let toolbarNodes = gNavToolbox.querySelectorAll("toolbar"); ++ ++ let shellShowingMenubar = document.documentElement.getAttribute("shellshowingmenubar") == "true"; ++ + for (let toolbar of toolbarNodes) { + if (!toolbar.hasAttribute("toolbarname")) { + continue; + } + ++ if (shellShowingMenubar && toolbar.id == "toolbar-menubar") { ++ continue; ++ } ++ + if (toolbar.id == "PersonalToolbar") { + let menu = BookmarkingUI.buildBookmarksToolbarSubmenu(toolbar); + popup.insertBefore(menu, firstMenuItem); +--- a/browser/components/places/content/places.xhtml ++++ b/browser/components/places/content/places.xhtml +@@ -165,6 +165,7 @@ + #else + + + +--- a/dom/xul/XULPopupElement.cpp ++++ b/dom/xul/XULPopupElement.cpp +@@ -208,6 +208,10 @@ void XULPopupElement::GetState(nsString& + // set this here in case there's no frame for the popup + aState.AssignLiteral("closed"); + ++#ifdef MOZ_WIDGET_GTK ++ nsAutoString nativeState; ++#endif ++ + if (nsXULPopupManager* pm = nsXULPopupManager::GetInstance()) { + switch (pm->GetPopupState(this)) { + case ePopupShown: +@@ -230,6 +234,11 @@ void XULPopupElement::GetState(nsString& + break; + } + } ++#ifdef MOZ_WIDGET_GTK ++ else if (GetAttr(kNameSpaceID_None, nsGkAtoms::_moz_nativemenupopupstate, nativeState)) { ++ aState = nativeState; ++ } ++#endif + } + + nsINode* XULPopupElement::GetTriggerNode() const { +--- a/dom/xul/moz.build ++++ b/dom/xul/moz.build +@@ -82,4 +82,9 @@ LOCAL_INCLUDES += [ + + include("/ipc/chromium/chromium-config.mozbuild") + ++if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": ++ LOCAL_INCLUDES += [ ++ "/widget/gtk", ++ ] ++ + FINAL_LIBRARY = "xul" +--- a/layout/build/moz.build ++++ b/layout/build/moz.build +@@ -70,6 +70,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "an + "/dom/system", + "/dom/system/android", + ] ++elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": ++ LOCAL_INCLUDES += [ ++ "/widget/gtk", ++ ] + + XPCOM_MANIFESTS += [ + "components.conf", +--- a/modules/libpref/init/all.js ++++ b/modules/libpref/init/all.js +@@ -311,6 +311,9 @@ pref("dom.mouseevent.click.hack.use_lega + // Fastback caching - if this pref is negative, then we calculate the number + // of content viewers to cache based on the amount of available memory. + pref("browser.sessionhistory.max_total_viewers", -1); ++#ifdef MOZ_WIDGET_GTK ++pref("ui.use_unity_menubar", true); ++#endif + + // min font device pixel size at which to turn on high quality + pref("browser.display.auto_quality_min_font_size", 20); +--- a/toolkit/content/xul.css ++++ b/toolkit/content/xul.css +@@ -229,6 +229,13 @@ toolbox { + } + } + ++@media (-moz-platform: linux) { ++*|*:root[shellshowingmenubar="true"] ++toolbar[type="menubar"]:not([customizing="true"]) { ++ display: none !important; ++} ++} ++ + toolbarspring { + -moz-box-flex: 1000; + } +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -77,6 +77,15 @@ UNIFIED_SOURCES += [ + + SOURCES += [ + "MediaKeysEventSourceFactory.cpp", ++ "nsDbusmenu.cpp", ++ "nsMenu.cpp", # conflicts with X11 headers ++ "nsMenuBar.cpp", ++ "nsMenuContainer.cpp", ++ "nsMenuItem.cpp", ++ "nsMenuObject.cpp", ++ "nsMenuSeparator.cpp", ++ "nsNativeMenuDocListener.cpp", ++ "nsNativeMenuService.cpp", + "nsNativeThemeGTK.cpp", # conflicts with X11 headers + "nsWindow.cpp", # conflicts with X11 headers + "WaylandVsyncSource.cpp", # conflicts with X11 headers +@@ -152,6 +161,7 @@ LOCAL_INCLUDES += [ + "/layout/base", + "/layout/forms", + "/layout/generic", ++ "/layout/style", + "/layout/xul", + "/other-licenses/atk-1.0", + "/third_party/cups/include", +--- /dev/null ++++ b/widget/gtk/nsDbusmenu.cpp +@@ -0,0 +1,61 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "nsDbusmenu.h" ++#include "prlink.h" ++#include "mozilla/ArrayUtils.h" ++ ++#define FUNC(name, type, params) \ ++nsDbusmenuFunctions::_##name##_fn nsDbusmenuFunctions::s_##name; ++DBUSMENU_GLIB_FUNCTIONS ++DBUSMENU_GTK_FUNCTIONS ++#undef FUNC ++ ++static PRLibrary *gDbusmenuGlib = nullptr; ++static PRLibrary *gDbusmenuGtk = nullptr; ++ ++typedef void (*nsDbusmenuFunc)(); ++struct nsDbusmenuDynamicFunction { ++ const char *functionName; ++ nsDbusmenuFunc *function; ++}; ++ ++/* static */ nsresult ++nsDbusmenuFunctions::Init() ++{ ++#define FUNC(name, type, params) \ ++ { #name, (nsDbusmenuFunc *)&nsDbusmenuFunctions::s_##name }, ++ static const nsDbusmenuDynamicFunction kDbusmenuGlibSymbols[] = { ++ DBUSMENU_GLIB_FUNCTIONS ++ }; ++ static const nsDbusmenuDynamicFunction kDbusmenuGtkSymbols[] = { ++ DBUSMENU_GTK_FUNCTIONS ++ }; ++ ++#define LOAD_LIBRARY(symbol, name) \ ++ if (!g##symbol) { \ ++ g##symbol = PR_LoadLibrary(name); \ ++ if (!g##symbol) { \ ++ return NS_ERROR_FAILURE; \ ++ } \ ++ } \ ++ for (uint32_t i = 0; i < mozilla::ArrayLength(k##symbol##Symbols); ++i) { \ ++ *k##symbol##Symbols[i].function = \ ++ PR_FindFunctionSymbol(g##symbol, k##symbol##Symbols[i].functionName); \ ++ if (!*k##symbol##Symbols[i].function) { \ ++ return NS_ERROR_FAILURE; \ ++ } \ ++ } ++ ++ LOAD_LIBRARY(DbusmenuGlib, "libdbusmenu-glib.so.4") ++#ifdef MOZ_WIDGET_GTK ++ LOAD_LIBRARY(DbusmenuGtk, "libdbusmenu-gtk3.so.4") ++#endif ++#undef LOAD_LIBRARY ++ ++ return NS_OK; ++} +--- /dev/null ++++ b/widget/gtk/nsDbusmenu.h +@@ -0,0 +1,101 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsDbusmenu_h__ ++#define __nsDbusmenu_h__ ++ ++#include "nsError.h" ++ ++#include ++#include ++ ++#define DBUSMENU_GLIB_FUNCTIONS \ ++ FUNC(dbusmenu_menuitem_child_add_position, gboolean, (DbusmenuMenuitem *mi, DbusmenuMenuitem *child, guint position)) \ ++ FUNC(dbusmenu_menuitem_child_append, gboolean, (DbusmenuMenuitem *mi, DbusmenuMenuitem *child)) \ ++ FUNC(dbusmenu_menuitem_child_delete, gboolean, (DbusmenuMenuitem *mi, DbusmenuMenuitem *child)) \ ++ FUNC(dbusmenu_menuitem_get_children, GList*, (DbusmenuMenuitem *mi)) \ ++ FUNC(dbusmenu_menuitem_new, DbusmenuMenuitem*, (void)) \ ++ FUNC(dbusmenu_menuitem_property_get, const gchar*, (DbusmenuMenuitem *mi, const gchar *property)) \ ++ FUNC(dbusmenu_menuitem_property_get_bool, gboolean, (DbusmenuMenuitem *mi, const gchar *property)) \ ++ FUNC(dbusmenu_menuitem_property_remove, void, (DbusmenuMenuitem *mi, const gchar *property)) \ ++ FUNC(dbusmenu_menuitem_property_set, gboolean, (DbusmenuMenuitem *mi, const gchar *property, const gchar *value)) \ ++ FUNC(dbusmenu_menuitem_property_set_bool, gboolean, (DbusmenuMenuitem *mi, const gchar *property, const gboolean value)) \ ++ FUNC(dbusmenu_menuitem_property_set_int, gboolean, (DbusmenuMenuitem *mi, const gchar *property, const gint value)) \ ++ FUNC(dbusmenu_menuitem_show_to_user, void, (DbusmenuMenuitem *mi, guint timestamp)) \ ++ FUNC(dbusmenu_menuitem_take_children, GList*, (DbusmenuMenuitem *mi)) \ ++ FUNC(dbusmenu_server_new, DbusmenuServer*, (const gchar *object)) \ ++ FUNC(dbusmenu_server_set_root, void, (DbusmenuServer *server, DbusmenuMenuitem *root)) \ ++ FUNC(dbusmenu_server_set_status, void, (DbusmenuServer *server, DbusmenuStatus status)) ++ ++#define DBUSMENU_GTK_FUNCTIONS \ ++ FUNC(dbusmenu_menuitem_property_set_image, gboolean, (DbusmenuMenuitem *menuitem, const gchar *property, const GdkPixbuf *data)) \ ++ FUNC(dbusmenu_menuitem_property_set_shortcut, gboolean, (DbusmenuMenuitem *menuitem, guint key, GdkModifierType modifier)) ++ ++typedef struct _DbusmenuMenuitem DbusmenuMenuitem; ++typedef struct _DbusmenuServer DbusmenuServer; ++ ++enum DbusmenuStatus { ++ DBUSMENU_STATUS_NORMAL, ++ DBUSMENU_STATUS_NOTICE ++}; ++ ++#define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu" ++#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display" ++#define DBUSMENU_MENUITEM_PROP_ENABLED "enabled" ++#define DBUSMENU_MENUITEM_PROP_ICON_DATA "icon-data" ++#define DBUSMENU_MENUITEM_PROP_LABEL "label" ++#define DBUSMENU_MENUITEM_PROP_SHORTCUT "shortcut" ++#define DBUSMENU_MENUITEM_PROP_TYPE "type" ++#define DBUSMENU_MENUITEM_PROP_TOGGLE_STATE "toggle-state" ++#define DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE "toggle-type" ++#define DBUSMENU_MENUITEM_PROP_VISIBLE "visible" ++#define DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW "about-to-show" ++#define DBUSMENU_MENUITEM_SIGNAL_EVENT "event" ++#define DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED "item-activated" ++#define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark" ++#define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio" ++#define DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED 1 ++#define DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED 0 ++#define DBUSMENU_SERVER_PROP_DBUS_OBJECT "dbus-object" ++ ++class nsDbusmenuFunctions ++{ ++public: ++ nsDbusmenuFunctions() = delete; ++ ++ static nsresult Init(); ++ ++#define FUNC(name, type, params) \ ++ typedef type (*_##name##_fn) params; \ ++ static _##name##_fn s_##name; ++ DBUSMENU_GLIB_FUNCTIONS ++ DBUSMENU_GTK_FUNCTIONS ++#undef FUNC ++ ++}; ++ ++#define dbusmenu_menuitem_child_add_position nsDbusmenuFunctions::s_dbusmenu_menuitem_child_add_position ++#define dbusmenu_menuitem_child_append nsDbusmenuFunctions::s_dbusmenu_menuitem_child_append ++#define dbusmenu_menuitem_child_delete nsDbusmenuFunctions::s_dbusmenu_menuitem_child_delete ++#define dbusmenu_menuitem_get_children nsDbusmenuFunctions::s_dbusmenu_menuitem_get_children ++#define dbusmenu_menuitem_new nsDbusmenuFunctions::s_dbusmenu_menuitem_new ++#define dbusmenu_menuitem_property_get nsDbusmenuFunctions::s_dbusmenu_menuitem_property_get ++#define dbusmenu_menuitem_property_get_bool nsDbusmenuFunctions::s_dbusmenu_menuitem_property_get_bool ++#define dbusmenu_menuitem_property_remove nsDbusmenuFunctions::s_dbusmenu_menuitem_property_remove ++#define dbusmenu_menuitem_property_set nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set ++#define dbusmenu_menuitem_property_set_bool nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_bool ++#define dbusmenu_menuitem_property_set_int nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_int ++#define dbusmenu_menuitem_show_to_user nsDbusmenuFunctions::s_dbusmenu_menuitem_show_to_user ++#define dbusmenu_menuitem_take_children nsDbusmenuFunctions::s_dbusmenu_menuitem_take_children ++#define dbusmenu_server_new nsDbusmenuFunctions::s_dbusmenu_server_new ++#define dbusmenu_server_set_root nsDbusmenuFunctions::s_dbusmenu_server_set_root ++#define dbusmenu_server_set_status nsDbusmenuFunctions::s_dbusmenu_server_set_status ++ ++#define dbusmenu_menuitem_property_set_image nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_image ++#define dbusmenu_menuitem_property_set_shortcut nsDbusmenuFunctions::s_dbusmenu_menuitem_property_set_shortcut ++ ++#endif /* __nsDbusmenu_h__ */ +--- /dev/null ++++ b/widget/gtk/nsMenu.cpp +@@ -0,0 +1,795 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#define _IMPL_NS_LAYOUT ++ ++#include "mozilla/dom/Document.h" ++#include "mozilla/dom/Element.h" ++#include "mozilla/Assertions.h" ++#include "mozilla/ComputedStyleInlines.h" ++#include "mozilla/EventDispatcher.h" ++#include "mozilla/MouseEvents.h" ++#include "mozilla/PresShell.h" ++#include "mozilla/PresShellInlines.h" ++#include "nsComponentManagerUtils.h" ++#include "nsContentUtils.h" ++#include "nsCSSValue.h" ++#include "nsGkAtoms.h" ++#include "nsGtkUtils.h" ++#include "nsAtom.h" ++#include "nsIContent.h" ++#include "nsIRunnable.h" ++#include "nsITimer.h" ++#include "nsString.h" ++#include "nsStyleStruct.h" ++#include "nsThreadUtils.h" ++ ++#include "nsNativeMenuDocListener.h" ++ ++#include ++ ++#include "nsMenu.h" ++ ++using namespace mozilla; ++ ++class nsMenuContentInsertedEvent : public Runnable ++{ ++public: ++ nsMenuContentInsertedEvent(nsMenu *aMenu, ++ nsIContent *aContainer, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling) : ++ Runnable("nsMenuContentInsertedEvent"), ++ mWeakMenu(aMenu), ++ mContainer(aContainer), ++ mChild(aChild), ++ mPrevSibling(aPrevSibling) { } ++ ++ NS_IMETHODIMP Run() ++ { ++ if (!mWeakMenu) { ++ return NS_OK; ++ } ++ ++ static_cast(mWeakMenu.get())->HandleContentInserted(mContainer, ++ mChild, ++ mPrevSibling); ++ return NS_OK; ++ } ++ ++private: ++ nsWeakMenuObject mWeakMenu; ++ ++ nsCOMPtr mContainer; ++ nsCOMPtr mChild; ++ nsCOMPtr mPrevSibling; ++}; ++ ++class nsMenuContentRemovedEvent : public Runnable ++{ ++public: ++ nsMenuContentRemovedEvent(nsMenu *aMenu, ++ nsIContent *aContainer, ++ nsIContent *aChild) : ++ Runnable("nsMenuContentRemovedEvent"), ++ mWeakMenu(aMenu), ++ mContainer(aContainer), ++ mChild(aChild) { } ++ ++ NS_IMETHODIMP Run() ++ { ++ if (!mWeakMenu) { ++ return NS_OK; ++ } ++ ++ static_cast(mWeakMenu.get())->HandleContentRemoved(mContainer, ++ mChild); ++ return NS_OK; ++ } ++ ++private: ++ nsWeakMenuObject mWeakMenu; ++ ++ nsCOMPtr mContainer; ++ nsCOMPtr mChild; ++}; ++ ++static void ++DispatchMouseEvent(nsIContent *aTarget, mozilla::EventMessage aMsg) ++{ ++ if (!aTarget) { ++ return; ++ } ++ ++ WidgetMouseEvent event(true, aMsg, nullptr, WidgetMouseEvent::eReal); ++ EventDispatcher::Dispatch(aTarget, nullptr, &event); ++} ++ ++void ++nsMenu::SetPopupState(EPopupState aState) ++{ ++ mPopupState = aState; ++ ++ if (!mPopupContent) { ++ return; ++ } ++ ++ nsAutoString state; ++ switch (aState) { ++ case ePopupState_Showing: ++ state.Assign(u"showing"_ns); ++ break; ++ case ePopupState_Open: ++ state.Assign(u"open"_ns); ++ break; ++ case ePopupState_Hiding: ++ state.Assign(u"hiding"_ns); ++ break; ++ default: ++ break; ++ } ++ ++ if (state.IsEmpty()) { ++ mPopupContent->AsElement()->UnsetAttr( ++ kNameSpaceID_None, nsGkAtoms::_moz_nativemenupopupstate, ++ false); ++ } else { ++ mPopupContent->AsElement()->SetAttr( ++ kNameSpaceID_None, nsGkAtoms::_moz_nativemenupopupstate, ++ state, false); ++ } ++} ++ ++/* static */ void ++nsMenu::DoOpenCallback(nsITimer *aTimer, void *aClosure) ++{ ++ nsMenu* self = static_cast(aClosure); ++ ++ dbusmenu_menuitem_show_to_user(self->GetNativeData(), 0); ++ ++ self->mOpenDelayTimer = nullptr; ++} ++ ++/* static */ void ++nsMenu::menu_event_cb(DbusmenuMenuitem *menu, ++ const gchar *name, ++ GVariant *value, ++ guint timestamp, ++ gpointer user_data) ++{ ++ nsMenu *self = static_cast(user_data); ++ ++ nsAutoCString event(name); ++ ++ if (event.Equals("closed"_ns)) { ++ self->OnClose(); ++ return; ++ } ++ ++ if (event.Equals("opened"_ns)) { ++ self->OnOpen(); ++ return; ++ } ++} ++ ++void ++nsMenu::MaybeAddPlaceholderItem() ++{ ++ MOZ_ASSERT(!IsInBatchedUpdate(), ++ "Shouldn't be modifying the native menu structure now"); ++ ++ GList *children = dbusmenu_menuitem_get_children(GetNativeData()); ++ if (!children) { ++ MOZ_ASSERT(!mPlaceholderItem); ++ ++ mPlaceholderItem = dbusmenu_menuitem_new(); ++ if (!mPlaceholderItem) { ++ return; ++ } ++ ++ dbusmenu_menuitem_property_set_bool(mPlaceholderItem, ++ DBUSMENU_MENUITEM_PROP_VISIBLE, ++ false); ++ ++ MOZ_ALWAYS_TRUE( ++ dbusmenu_menuitem_child_append(GetNativeData(), mPlaceholderItem)); ++ } ++} ++ ++void ++nsMenu::EnsureNoPlaceholderItem() ++{ ++ MOZ_ASSERT(!IsInBatchedUpdate(), ++ "Shouldn't be modifying the native menu structure now"); ++ ++ if (!mPlaceholderItem) { ++ return; ++ } ++ ++ MOZ_ALWAYS_TRUE( ++ dbusmenu_menuitem_child_delete(GetNativeData(), mPlaceholderItem)); ++ MOZ_ASSERT(!dbusmenu_menuitem_get_children(GetNativeData())); ++ ++ g_object_unref(mPlaceholderItem); ++ mPlaceholderItem = nullptr; ++} ++ ++void ++nsMenu::OnOpen() ++{ ++ if (mNeedsRebuild) { ++ Build(); ++ } ++ ++ nsWeakMenuObject self(this); ++ nsCOMPtr origPopupContent(mPopupContent); ++ { ++ nsNativeMenuDocListener::BlockUpdatesScope updatesBlocker; ++ ++ SetPopupState(ePopupState_Showing); ++ DispatchMouseEvent(mPopupContent, eXULPopupShowing); ++ ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, nsGkAtoms::open, ++ u"true"_ns, true); ++ } ++ ++ if (!self) { ++ // We were deleted! ++ return; ++ } ++ ++ // I guess that the popup could have changed ++ if (origPopupContent != mPopupContent) { ++ return; ++ } ++ ++ nsNativeMenuDocListener::BlockUpdatesScope updatesBlocker; ++ ++ size_t count = ChildCount(); ++ for (size_t i = 0; i < count; ++i) { ++ ChildAt(i)->ContainerIsOpening(); ++ } ++ ++ SetPopupState(ePopupState_Open); ++ DispatchMouseEvent(mPopupContent, eXULPopupShown); ++} ++ ++void ++nsMenu::Build() ++{ ++ mNeedsRebuild = false; ++ ++ while (ChildCount() > 0) { ++ RemoveChildAt(0); ++ } ++ ++ InitializePopup(); ++ ++ if (!mPopupContent) { ++ return; ++ } ++ ++ uint32_t count = mPopupContent->GetChildCount(); ++ for (uint32_t i = 0; i < count; ++i) { ++ nsIContent *childContent = mPopupContent->GetChildAt_Deprecated(i); ++ ++ UniquePtr child = CreateChild(childContent); ++ ++ if (!child) { ++ continue; ++ } ++ ++ AppendChild(std::move(child)); ++ } ++} ++ ++void ++nsMenu::InitializePopup() ++{ ++ nsCOMPtr oldPopupContent; ++ oldPopupContent.swap(mPopupContent); ++ ++ for (uint32_t i = 0; i < ContentNode()->GetChildCount(); ++i) { ++ nsIContent *child = ContentNode()->GetChildAt_Deprecated(i); ++ ++ if (child->NodeInfo()->NameAtom() == nsGkAtoms::menupopup) { ++ mPopupContent = child; ++ break; ++ } ++ } ++ ++ if (oldPopupContent == mPopupContent) { ++ return; ++ } ++ ++ // The popup has changed ++ ++ if (oldPopupContent) { ++ DocListener()->UnregisterForContentChanges(oldPopupContent); ++ } ++ ++ SetPopupState(ePopupState_Closed); ++ ++ if (!mPopupContent) { ++ return; ++ } ++ ++ DocListener()->RegisterForContentChanges(mPopupContent, this); ++} ++ ++void ++nsMenu::RemoveChildAt(size_t aIndex) ++{ ++ MOZ_ASSERT(IsInBatchedUpdate() || !mPlaceholderItem, ++ "Shouldn't have a placeholder menuitem"); ++ ++ nsMenuContainer::RemoveChildAt(aIndex, !IsInBatchedUpdate()); ++ StructureMutated(); ++ ++ if (!IsInBatchedUpdate()) { ++ MaybeAddPlaceholderItem(); ++ } ++} ++ ++void ++nsMenu::RemoveChild(nsIContent *aChild) ++{ ++ size_t index = IndexOf(aChild); ++ if (index == NoIndex) { ++ return; ++ } ++ ++ RemoveChildAt(index); ++} ++ ++void ++nsMenu::InsertChildAfter(UniquePtr aChild, ++ nsIContent *aPrevSibling) ++{ ++ if (!IsInBatchedUpdate()) { ++ EnsureNoPlaceholderItem(); ++ } ++ ++ nsMenuContainer::InsertChildAfter(std::move(aChild), aPrevSibling, ++ !IsInBatchedUpdate()); ++ StructureMutated(); ++} ++ ++void ++nsMenu::AppendChild(UniquePtr aChild) ++{ ++ if (!IsInBatchedUpdate()) { ++ EnsureNoPlaceholderItem(); ++ } ++ ++ nsMenuContainer::AppendChild(std::move(aChild), !IsInBatchedUpdate()); ++ StructureMutated(); ++} ++ ++bool ++nsMenu::IsInBatchedUpdate() const ++{ ++ return mBatchedUpdateState != eBatchedUpdateState_Inactive; ++} ++ ++void ++nsMenu::StructureMutated() ++{ ++ if (!IsInBatchedUpdate()) { ++ return; ++ } ++ ++ mBatchedUpdateState = eBatchedUpdateState_DidMutate; ++} ++ ++bool ++nsMenu::CanOpen() const ++{ ++ bool isVisible = dbusmenu_menuitem_property_get_bool(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_VISIBLE); ++ bool isDisabled = ContentNode()->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::disabled, ++ nsGkAtoms::_true, ++ eCaseMatters); ++ ++ return (isVisible && !isDisabled); ++} ++ ++void ++nsMenu::HandleContentInserted(nsIContent *aContainer, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling) ++{ ++ if (aContainer == mPopupContent) { ++ UniquePtr child = CreateChild(aChild); ++ ++ if (child) { ++ InsertChildAfter(std::move(child), aPrevSibling); ++ } ++ } else { ++ Build(); ++ } ++} ++ ++void ++nsMenu::HandleContentRemoved(nsIContent *aContainer, nsIContent *aChild) ++{ ++ if (aContainer == mPopupContent) { ++ RemoveChild(aChild); ++ } else { ++ Build(); ++ } ++} ++ ++void ++nsMenu::InitializeNativeData() ++{ ++ // Dbusmenu provides an "about-to-show" signal, and also "opened" and ++ // "closed" events. However, Unity is the only thing that sends ++ // both "about-to-show" and "opened" events. Unity 2D and the HUD only ++ // send "opened" events, so we ignore "about-to-show" (I don't think ++ // there's any real difference between them anyway). ++ // To complicate things, there are certain conditions where we don't ++ // get a "closed" event, so we need to be able to handle this :/ ++ g_signal_connect(G_OBJECT(GetNativeData()), "event", ++ G_CALLBACK(menu_event_cb), this); ++ ++ mNeedsRebuild = true; ++ mNeedsUpdate = true; ++ ++ MaybeAddPlaceholderItem(); ++} ++ ++void ++nsMenu::Update(const ComputedStyle *aComputedStyle) ++{ ++ if (mNeedsUpdate) { ++ mNeedsUpdate = false; ++ ++ UpdateLabel(); ++ UpdateSensitivity(); ++ } ++ ++ UpdateVisibility(aComputedStyle); ++ UpdateIcon(aComputedStyle); ++} ++ ++nsMenuObject::PropertyFlags ++nsMenu::SupportedProperties() const ++{ ++ return static_cast( ++ nsMenuObject::ePropLabel | ++ nsMenuObject::ePropEnabled | ++ nsMenuObject::ePropVisible | ++ nsMenuObject::ePropIconData | ++ nsMenuObject::ePropChildDisplay ++ ); ++} ++ ++void ++nsMenu::OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) ++{ ++ MOZ_ASSERT(aContent == ContentNode() || aContent == mPopupContent, ++ "Received an event that wasn't meant for us!"); ++ ++ if (mNeedsUpdate) { ++ return; ++ } ++ ++ if (aContent != ContentNode()) { ++ return; ++ } ++ ++ if (!Parent()->IsBeingDisplayed()) { ++ mNeedsUpdate = true; ++ return; ++ } ++ ++ if (aAttribute == nsGkAtoms::disabled) { ++ UpdateSensitivity(); ++ } else if (aAttribute == nsGkAtoms::label || ++ aAttribute == nsGkAtoms::accesskey || ++ aAttribute == nsGkAtoms::crop) { ++ UpdateLabel(); ++ } else if (aAttribute == nsGkAtoms::hidden || ++ aAttribute == nsGkAtoms::collapsed) { ++ RefPtr style = GetComputedStyle(); ++ UpdateVisibility(style); ++ } else if (aAttribute == nsGkAtoms::image) { ++ RefPtr style = GetComputedStyle(); ++ UpdateIcon(style); ++ } ++} ++ ++void ++nsMenu::OnContentInserted(nsIContent *aContainer, nsIContent *aChild, ++ nsIContent *aPrevSibling) ++{ ++ MOZ_ASSERT(aContainer == ContentNode() || aContainer == mPopupContent, ++ "Received an event that wasn't meant for us!"); ++ ++ if (mNeedsRebuild) { ++ return; ++ } ++ ++ if (mPopupState == ePopupState_Closed) { ++ mNeedsRebuild = true; ++ return; ++ } ++ ++ nsContentUtils::AddScriptRunner( ++ new nsMenuContentInsertedEvent(this, aContainer, aChild, ++ aPrevSibling)); ++} ++ ++void ++nsMenu::OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) ++{ ++ MOZ_ASSERT(aContainer == ContentNode() || aContainer == mPopupContent, ++ "Received an event that wasn't meant for us!"); ++ ++ if (mNeedsRebuild) { ++ return; ++ } ++ ++ if (mPopupState == ePopupState_Closed) { ++ mNeedsRebuild = true; ++ return; ++ } ++ ++ nsContentUtils::AddScriptRunner( ++ new nsMenuContentRemovedEvent(this, aContainer, aChild)); ++} ++ ++/* ++ * Some menus (eg, the History menu in Firefox) refresh themselves on ++ * opening by removing all children and then re-adding new ones. As this ++ * happens whilst the menu is opening in Unity, it causes some flickering ++ * as the menu popup is resized multiple times. To avoid this, we try to ++ * reuse native menu items when the menu structure changes during a ++ * batched update. If we can handle menu structure changes from Gecko ++ * just by updating properties of native menu items (rather than destroying ++ * and creating new ones), then we eliminate any flickering that occurs as ++ * the menu is opened. To do this, we don't modify any native menu items ++ * until the end of the update batch. ++ */ ++ ++void ++nsMenu::OnBeginUpdates(nsIContent *aContent) ++{ ++ MOZ_ASSERT(aContent == ContentNode() || aContent == mPopupContent, ++ "Received an event that wasn't meant for us!"); ++ MOZ_ASSERT(!IsInBatchedUpdate(), "Already in an update batch!"); ++ ++ if (aContent != mPopupContent) { ++ return; ++ } ++ ++ mBatchedUpdateState = eBatchedUpdateState_Active; ++} ++ ++void ++nsMenu::OnEndUpdates() ++{ ++ if (!IsInBatchedUpdate()) { ++ return; ++ } ++ ++ bool didMutate = mBatchedUpdateState == eBatchedUpdateState_DidMutate; ++ mBatchedUpdateState = eBatchedUpdateState_Inactive; ++ ++ /* Optimize for the case where we only had attribute changes */ ++ if (!didMutate) { ++ return; ++ } ++ ++ EnsureNoPlaceholderItem(); ++ ++ GList *nextNativeChild = dbusmenu_menuitem_get_children(GetNativeData()); ++ DbusmenuMenuitem *nextOwnedNativeChild = nullptr; ++ ++ size_t count = ChildCount(); ++ ++ // Find the first native menu item that is `owned` by a corresponding ++ // Gecko menuitem ++ for (size_t i = 0; i < count; ++i) { ++ if (ChildAt(i)->GetNativeData()) { ++ nextOwnedNativeChild = ChildAt(i)->GetNativeData(); ++ break; ++ } ++ } ++ ++ // Now iterate over all Gecko menuitems ++ for (size_t i = 0; i < count; ++i) { ++ nsMenuObject *child = ChildAt(i); ++ ++ if (child->GetNativeData()) { ++ // This child already has a corresponding native menuitem. ++ // Remove all preceding orphaned native items. At this point, we ++ // modify the native menu structure. ++ while (nextNativeChild && ++ nextNativeChild->data != nextOwnedNativeChild) { ++ ++ DbusmenuMenuitem *data = ++ static_cast(nextNativeChild->data); ++ nextNativeChild = nextNativeChild->next; ++ ++ MOZ_ALWAYS_TRUE(dbusmenu_menuitem_child_delete(GetNativeData(), ++ data)); ++ } ++ ++ if (nextNativeChild) { ++ nextNativeChild = nextNativeChild->next; ++ } ++ ++ // Now find the next native menu item that is `owned` ++ nextOwnedNativeChild = nullptr; ++ for (size_t j = i + 1; j < count; ++j) { ++ if (ChildAt(j)->GetNativeData()) { ++ nextOwnedNativeChild = ChildAt(j)->GetNativeData(); ++ break; ++ } ++ } ++ } else { ++ // This child is new, and doesn't have a native menu item. Find one! ++ if (nextNativeChild && ++ nextNativeChild->data != nextOwnedNativeChild) { ++ ++ DbusmenuMenuitem *data = ++ static_cast(nextNativeChild->data); ++ ++ if (NS_SUCCEEDED(child->AdoptNativeData(data))) { ++ nextNativeChild = nextNativeChild->next; ++ } ++ } ++ ++ // There wasn't a suitable one available, so create a new one. ++ // At this point, we modify the native menu structure. ++ if (!child->GetNativeData()) { ++ child->CreateNativeData(); ++ MOZ_ALWAYS_TRUE( ++ dbusmenu_menuitem_child_add_position(GetNativeData(), ++ child->GetNativeData(), ++ i)); ++ } ++ } ++ } ++ ++ while (nextNativeChild) { ++ DbusmenuMenuitem *data = ++ static_cast(nextNativeChild->data); ++ nextNativeChild = nextNativeChild->next; ++ ++ MOZ_ALWAYS_TRUE(dbusmenu_menuitem_child_delete(GetNativeData(), data)); ++ } ++ ++ MaybeAddPlaceholderItem(); ++} ++ ++nsMenu::nsMenu(nsMenuContainer *aParent, nsIContent *aContent) : ++ nsMenuContainer(aParent, aContent), ++ mNeedsRebuild(false), ++ mNeedsUpdate(false), ++ mPlaceholderItem(nullptr), ++ mPopupState(ePopupState_Closed), ++ mBatchedUpdateState(eBatchedUpdateState_Inactive) ++{ ++ MOZ_COUNT_CTOR(nsMenu); ++} ++ ++nsMenu::~nsMenu() ++{ ++ if (IsInBatchedUpdate()) { ++ OnEndUpdates(); ++ } ++ ++ // Although nsTArray will take care of this in its destructor, ++ // we have to manually ensure children are removed from our native menu ++ // item, just in case our parent recycles us ++ while (ChildCount() > 0) { ++ RemoveChildAt(0); ++ } ++ ++ EnsureNoPlaceholderItem(); ++ ++ if (DocListener() && mPopupContent) { ++ DocListener()->UnregisterForContentChanges(mPopupContent); ++ } ++ ++ if (GetNativeData()) { ++ g_signal_handlers_disconnect_by_func(GetNativeData(), ++ FuncToGpointer(menu_event_cb), ++ this); ++ } ++ ++ MOZ_COUNT_DTOR(nsMenu); ++} ++ ++nsMenuObject::EType ++nsMenu::Type() const ++{ ++ return eType_Menu; ++} ++ ++bool ++nsMenu::IsBeingDisplayed() const ++{ ++ return mPopupState == ePopupState_Open; ++} ++ ++bool ++nsMenu::NeedsRebuild() const ++{ ++ return mNeedsRebuild; ++} ++ ++void ++nsMenu::OpenMenu() ++{ ++ if (!CanOpen()) { ++ return; ++ } ++ ++ if (mOpenDelayTimer) { ++ return; ++ } ++ ++ // Here, we synchronously fire popupshowing and popupshown events and then ++ // open the menu after a short delay. This allows the menu to refresh before ++ // it's shown, and avoids an issue where keyboard focus is not on the first ++ // item of the history menu in Firefox when opening it with the keyboard, ++ // because extra items to appear at the top of the menu ++ ++ OnOpen(); ++ ++ mOpenDelayTimer = NS_NewTimer(); ++ if (!mOpenDelayTimer) { ++ return; ++ } ++ ++ if (NS_FAILED(mOpenDelayTimer->InitWithNamedFuncCallback(DoOpenCallback, ++ this, ++ 100, ++ nsITimer::TYPE_ONE_SHOT, ++ "nsMenu::DoOpenCallback"))) { ++ mOpenDelayTimer = nullptr; ++ } ++} ++ ++void ++nsMenu::OnClose() ++{ ++ if (mPopupState == ePopupState_Closed) { ++ return; ++ } ++ ++ MOZ_ASSERT(nsContentUtils::IsSafeToRunScript()); ++ ++ // We do this to avoid mutating our view of the menu until ++ // after we have finished ++ nsNativeMenuDocListener::BlockUpdatesScope updatesBlocker; ++ ++ SetPopupState(ePopupState_Hiding); ++ DispatchMouseEvent(mPopupContent, eXULPopupHiding); ++ ++ // Sigh, make sure all of our descendants are closed, as we don't ++ // always get closed events for submenus when scrubbing quickly through ++ // the menu ++ size_t count = ChildCount(); ++ for (size_t i = 0; i < count; ++i) { ++ if (ChildAt(i)->Type() == nsMenuObject::eType_Menu) { ++ static_cast(ChildAt(i))->OnClose(); ++ } ++ } ++ ++ SetPopupState(ePopupState_Closed); ++ DispatchMouseEvent(mPopupContent, eXULPopupHidden); ++ ++ ContentNode()->AsElement()->UnsetAttr(kNameSpaceID_None, nsGkAtoms::open, ++ true); ++} ++ +--- /dev/null ++++ b/widget/gtk/nsMenu.h +@@ -0,0 +1,123 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsMenu_h__ ++#define __nsMenu_h__ ++ ++#include "mozilla/Attributes.h" ++#include "mozilla/UniquePtr.h" ++#include "nsCOMPtr.h" ++ ++#include "nsDbusmenu.h" ++#include "nsMenuContainer.h" ++#include "nsMenuObject.h" ++ ++#include ++ ++class nsAtom; ++class nsIContent; ++class nsITimer; ++ ++#define NSMENU_NUMBER_OF_POPUPSTATE_BITS 2U ++#define NSMENU_NUMBER_OF_FLAGS 4U ++ ++// This class represents a menu ++class nsMenu final : public nsMenuContainer ++{ ++public: ++ nsMenu(nsMenuContainer *aParent, nsIContent *aContent); ++ ~nsMenu(); ++ ++ nsMenuObject::EType Type() const override; ++ ++ bool IsBeingDisplayed() const override; ++ bool NeedsRebuild() const override; ++ ++ // Tell the desktop shell to display this menu ++ void OpenMenu(); ++ ++ // Normally called via the shell, but it's public so that child ++ // menuitems can do the shells work. Sigh.... ++ void OnClose(); ++ ++private: ++ friend class nsMenuContentInsertedEvent; ++ friend class nsMenuContentRemovedEvent; ++ ++ enum EPopupState { ++ ePopupState_Closed, ++ ePopupState_Showing, ++ ePopupState_Open, ++ ePopupState_Hiding ++ }; ++ ++ void SetPopupState(EPopupState aState); ++ ++ static void DoOpenCallback(nsITimer *aTimer, void *aClosure); ++ static void menu_event_cb(DbusmenuMenuitem *menu, ++ const gchar *name, ++ GVariant *value, ++ guint timestamp, ++ gpointer user_data); ++ ++ // We add a placeholder item to empty menus so that Unity actually treats ++ // us as a proper menu, rather than a menuitem without a submenu ++ void MaybeAddPlaceholderItem(); ++ ++ // Removes a placeholder item if it exists and asserts that this succeeds ++ void EnsureNoPlaceholderItem(); ++ ++ void OnOpen(); ++ void Build(); ++ void InitializePopup(); ++ void RemoveChildAt(size_t aIndex); ++ void RemoveChild(nsIContent *aChild); ++ void InsertChildAfter(mozilla::UniquePtr aChild, ++ nsIContent *aPrevSibling); ++ void AppendChild(mozilla::UniquePtr aChild); ++ bool IsInBatchedUpdate() const; ++ void StructureMutated(); ++ bool CanOpen() const; ++ ++ void HandleContentInserted(nsIContent *aContainer, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling); ++ void HandleContentRemoved(nsIContent *aContainer, ++ nsIContent *aChild); ++ ++ void InitializeNativeData() override; ++ void Update(const mozilla::ComputedStyle *aComputedStyle) override; ++ nsMenuObject::PropertyFlags SupportedProperties() const override; ++ ++ void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) override; ++ void OnContentInserted(nsIContent *aContainer, nsIContent *aChild, ++ nsIContent *aPrevSibling) override; ++ void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) override; ++ void OnBeginUpdates(nsIContent *aContent) override; ++ void OnEndUpdates() override; ++ ++ bool mNeedsRebuild; ++ bool mNeedsUpdate; ++ ++ DbusmenuMenuitem *mPlaceholderItem; ++ ++ EPopupState mPopupState; ++ ++ enum EBatchedUpdateState { ++ eBatchedUpdateState_Inactive, ++ eBatchedUpdateState_Active, ++ eBatchedUpdateState_DidMutate ++ }; ++ ++ EBatchedUpdateState mBatchedUpdateState; ++ ++ nsCOMPtr mPopupContent; ++ ++ nsCOMPtr mOpenDelayTimer; ++}; ++ ++#endif /* __nsMenu_h__ */ +--- /dev/null ++++ b/widget/gtk/nsMenuBar.cpp +@@ -0,0 +1,548 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "mozilla/Assertions.h" ++#include "mozilla/DebugOnly.h" ++#include "mozilla/dom/Document.h" ++#include "mozilla/dom/Element.h" ++#include "mozilla/dom/Event.h" ++#include "mozilla/dom/KeyboardEvent.h" ++#include "mozilla/dom/KeyboardEventBinding.h" ++#include "mozilla/Preferences.h" ++#include "nsContentUtils.h" ++#include "nsIDOMEventListener.h" ++#include "nsIRunnable.h" ++#include "nsIWidget.h" ++#include "nsTArray.h" ++#include "nsUnicharUtils.h" ++ ++#include "nsMenu.h" ++#include "nsNativeMenuService.h" ++ ++#include ++#include ++#include ++#include ++ ++#include "nsMenuBar.h" ++ ++using namespace mozilla; ++ ++static bool ++ShouldHandleKeyEvent(dom::KeyboardEvent *aEvent) ++{ ++ return !aEvent->DefaultPrevented() && aEvent->IsTrusted(); ++} ++ ++class nsMenuBarContentInsertedEvent : public Runnable ++{ ++public: ++ nsMenuBarContentInsertedEvent(nsMenuBar *aMenuBar, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling) : ++ Runnable("nsMenuBarContentInsertedEvent"), ++ mWeakMenuBar(aMenuBar), ++ mChild(aChild), ++ mPrevSibling(aPrevSibling) { } ++ ++ NS_IMETHODIMP Run() ++ { ++ if (!mWeakMenuBar) { ++ return NS_OK; ++ } ++ ++ static_cast(mWeakMenuBar.get())->HandleContentInserted(mChild, ++ mPrevSibling); ++ return NS_OK; ++ } ++ ++private: ++ nsWeakMenuObject mWeakMenuBar; ++ ++ nsCOMPtr mChild; ++ nsCOMPtr mPrevSibling; ++}; ++ ++class nsMenuBarContentRemovedEvent : public Runnable ++{ ++public: ++ nsMenuBarContentRemovedEvent(nsMenuBar *aMenuBar, ++ nsIContent *aChild) : ++ Runnable("nsMenuBarContentRemovedEvent"), ++ mWeakMenuBar(aMenuBar), ++ mChild(aChild) { } ++ ++ NS_IMETHODIMP Run() ++ { ++ if (!mWeakMenuBar) { ++ return NS_OK; ++ } ++ ++ static_cast(mWeakMenuBar.get())->HandleContentRemoved(mChild); ++ return NS_OK; ++ } ++ ++private: ++ nsWeakMenuObject mWeakMenuBar; ++ ++ nsCOMPtr mChild; ++}; ++ ++class nsMenuBar::DocEventListener final : public nsIDOMEventListener ++{ ++public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_NSIDOMEVENTLISTENER ++ ++ DocEventListener(nsMenuBar *aOwner) : mOwner(aOwner) { }; ++ ++private: ++ ~DocEventListener() { }; ++ ++ nsMenuBar *mOwner; ++}; ++ ++NS_IMPL_ISUPPORTS(nsMenuBar::DocEventListener, nsIDOMEventListener) ++ ++NS_IMETHODIMP ++nsMenuBar::DocEventListener::HandleEvent(dom::Event *aEvent) ++{ ++ nsAutoString type; ++ aEvent->GetType(type); ++ ++ if (type.Equals(u"focus"_ns)) { ++ mOwner->Focus(); ++ } else if (type.Equals(u"blur"_ns)) { ++ mOwner->Blur(); ++ } ++ ++ RefPtr keyEvent = aEvent->AsKeyboardEvent(); ++ if (!keyEvent) { ++ return NS_OK; ++ } ++ ++ if (type.Equals(u"keypress"_ns)) { ++ return mOwner->Keypress(keyEvent); ++ } else if (type.Equals(u"keydown"_ns)) { ++ return mOwner->KeyDown(keyEvent); ++ } else if (type.Equals(u"keyup"_ns)) { ++ return mOwner->KeyUp(keyEvent); ++ } ++ ++ return NS_OK; ++} ++ ++nsMenuBar::nsMenuBar(nsIContent *aMenuBarNode) : ++ nsMenuContainer(new nsNativeMenuDocListener(aMenuBarNode), aMenuBarNode), ++ mTopLevel(nullptr), ++ mServer(nullptr), ++ mIsActive(false) ++{ ++ MOZ_COUNT_CTOR(nsMenuBar); ++} ++ ++nsresult ++nsMenuBar::Init(nsIWidget *aParent) ++{ ++ MOZ_ASSERT(aParent); ++ ++ GdkWindow *gdkWin = static_cast( ++ aParent->GetNativeData(NS_NATIVE_WINDOW)); ++ if (!gdkWin) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ gpointer user_data = nullptr; ++ gdk_window_get_user_data(gdkWin, &user_data); ++ if (!user_data || !GTK_IS_CONTAINER(user_data)) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ mTopLevel = gtk_widget_get_toplevel(GTK_WIDGET(user_data)); ++ if (!mTopLevel) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ g_object_ref(mTopLevel); ++ ++ nsAutoCString path; ++ path.Append("/com/canonical/menu/"_ns); ++ char xid[10]; ++ sprintf(xid, "%X", static_cast( ++ GDK_WINDOW_XID(gtk_widget_get_window(mTopLevel)))); ++ path.Append(xid); ++ ++ mServer = dbusmenu_server_new(path.get()); ++ if (!mServer) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ CreateNativeData(); ++ if (!GetNativeData()) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ dbusmenu_server_set_root(mServer, GetNativeData()); ++ ++ mEventListener = new DocEventListener(this); ++ ++ mDocument = ContentNode()->OwnerDoc(); ++ ++ mAccessKey = Preferences::GetInt("ui.key.menuAccessKey"); ++ if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_SHIFT) { ++ mAccessKeyMask = eModifierShift; ++ } else if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_CONTROL) { ++ mAccessKeyMask = eModifierCtrl; ++ } else if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_ALT) { ++ mAccessKeyMask = eModifierAlt; ++ } else if (mAccessKey == dom::KeyboardEvent_Binding::DOM_VK_META) { ++ mAccessKeyMask = eModifierMeta; ++ } else { ++ mAccessKeyMask = eModifierAlt; ++ } ++ ++ return NS_OK; ++} ++ ++void ++nsMenuBar::Build() ++{ ++ uint32_t count = ContentNode()->GetChildCount(); ++ for (uint32_t i = 0; i < count; ++i) { ++ nsIContent *childContent = ContentNode()->GetChildAt_Deprecated(i); ++ ++ UniquePtr child = CreateChild(childContent); ++ ++ if (!child) { ++ continue; ++ } ++ ++ AppendChild(std::move(child)); ++ } ++} ++ ++void ++nsMenuBar::DisconnectDocumentEventListeners() ++{ ++ mDocument->RemoveEventListener(u"focus"_ns, ++ mEventListener, ++ true); ++ mDocument->RemoveEventListener(u"blur"_ns, ++ mEventListener, ++ true); ++ mDocument->RemoveEventListener(u"keypress"_ns, ++ mEventListener, ++ false); ++ mDocument->RemoveEventListener(u"keydown"_ns, ++ mEventListener, ++ false); ++ mDocument->RemoveEventListener(u"keyup"_ns, ++ mEventListener, ++ false); ++} ++ ++void ++nsMenuBar::SetShellShowingMenuBar(bool aShowing) ++{ ++ ContentNode()->OwnerDoc()->GetRootElement()->SetAttr( ++ kNameSpaceID_None, nsGkAtoms::shellshowingmenubar, ++ aShowing ? u"true"_ns : u"false"_ns, ++ true); ++} ++ ++void ++nsMenuBar::Focus() ++{ ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, ++ nsGkAtoms::openedwithkey, ++ u"false"_ns, true); ++} ++ ++void ++nsMenuBar::Blur() ++{ ++ // We do this here in case we lose focus before getting the ++ // keyup event, which leaves the menubar state looking like ++ // the alt key is stuck down ++ dbusmenu_server_set_status(mServer, DBUSMENU_STATUS_NORMAL); ++} ++ ++nsMenuBar::ModifierFlags ++nsMenuBar::GetModifiersFromEvent(dom::KeyboardEvent *aEvent) ++{ ++ ModifierFlags modifiers = static_cast(0); ++ ++ if (aEvent->AltKey()) { ++ modifiers = static_cast(modifiers | eModifierAlt); ++ } ++ ++ if (aEvent->ShiftKey()) { ++ modifiers = static_cast(modifiers | eModifierShift); ++ } ++ ++ if (aEvent->CtrlKey()) { ++ modifiers = static_cast(modifiers | eModifierCtrl); ++ } ++ ++ if (aEvent->MetaKey()) { ++ modifiers = static_cast(modifiers | eModifierMeta); ++ } ++ ++ return modifiers; ++} ++ ++nsresult ++nsMenuBar::Keypress(dom::KeyboardEvent *aEvent) ++{ ++ if (!ShouldHandleKeyEvent(aEvent)) { ++ return NS_OK; ++ } ++ ++ ModifierFlags modifiers = GetModifiersFromEvent(aEvent); ++ if (((modifiers & mAccessKeyMask) == 0) || ++ ((modifiers & ~mAccessKeyMask) != 0)) { ++ return NS_OK; ++ } ++ ++ uint32_t charCode = aEvent->CharCode(); ++ if (charCode == 0) { ++ return NS_OK; ++ } ++ ++ char16_t ch = char16_t(charCode); ++ char16_t chl = ToLowerCase(ch); ++ char16_t chu = ToUpperCase(ch); ++ ++ nsMenuObject *found = nullptr; ++ uint32_t count = ChildCount(); ++ for (uint32_t i = 0; i < count; ++i) { ++ nsAutoString accesskey; ++ ChildAt(i)->ContentNode()->AsElement()->GetAttr(kNameSpaceID_None, ++ nsGkAtoms::accesskey, ++ accesskey); ++ const nsAutoString::char_type *key = accesskey.BeginReading(); ++ if (*key == chu || *key == chl) { ++ found = ChildAt(i); ++ break; ++ } ++ } ++ ++ if (!found || found->Type() != nsMenuObject::eType_Menu) { ++ return NS_OK; ++ } ++ ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, ++ nsGkAtoms::openedwithkey, ++ u"true"_ns, true); ++ static_cast(found)->OpenMenu(); ++ ++ aEvent->StopPropagation(); ++ aEvent->PreventDefault(); ++ ++ return NS_OK; ++} ++ ++nsresult ++nsMenuBar::KeyDown(dom::KeyboardEvent *aEvent) ++{ ++ if (!ShouldHandleKeyEvent(aEvent)) { ++ return NS_OK; ++ } ++ ++ uint32_t keyCode = aEvent->KeyCode(); ++ ModifierFlags modifiers = GetModifiersFromEvent(aEvent); ++ if ((keyCode != mAccessKey) || ((modifiers & ~mAccessKeyMask) != 0)) { ++ return NS_OK; ++ } ++ ++ dbusmenu_server_set_status(mServer, DBUSMENU_STATUS_NOTICE); ++ ++ return NS_OK; ++} ++ ++nsresult ++nsMenuBar::KeyUp(dom::KeyboardEvent *aEvent) ++{ ++ if (!ShouldHandleKeyEvent(aEvent)) { ++ return NS_OK; ++ } ++ ++ uint32_t keyCode = aEvent->KeyCode(); ++ if (keyCode == mAccessKey) { ++ dbusmenu_server_set_status(mServer, DBUSMENU_STATUS_NORMAL); ++ } ++ ++ return NS_OK; ++} ++ ++void ++nsMenuBar::HandleContentInserted(nsIContent *aChild, nsIContent *aPrevSibling) ++{ ++ UniquePtr child = CreateChild(aChild); ++ ++ if (!child) { ++ return; ++ } ++ ++ InsertChildAfter(std::move(child), aPrevSibling); ++} ++ ++void ++nsMenuBar::HandleContentRemoved(nsIContent *aChild) ++{ ++ RemoveChild(aChild); ++} ++ ++void ++nsMenuBar::OnContentInserted(nsIContent *aContainer, nsIContent *aChild, ++ nsIContent *aPrevSibling) ++{ ++ MOZ_ASSERT(aContainer == ContentNode(), ++ "Received an event that wasn't meant for us"); ++ ++ nsContentUtils::AddScriptRunner( ++ new nsMenuBarContentInsertedEvent(this, aChild, aPrevSibling)); ++} ++ ++void ++nsMenuBar::OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) ++{ ++ MOZ_ASSERT(aContainer == ContentNode(), ++ "Received an event that wasn't meant for us"); ++ ++ nsContentUtils::AddScriptRunner( ++ new nsMenuBarContentRemovedEvent(this, aChild)); ++} ++ ++nsMenuBar::~nsMenuBar() ++{ ++ nsNativeMenuService *service = nsNativeMenuService::GetSingleton(); ++ if (service) { ++ service->NotifyNativeMenuBarDestroyed(this); ++ } ++ ++ if (ContentNode()) { ++ SetShellShowingMenuBar(false); ++ } ++ ++ // We want to destroy all children before dropping our reference ++ // to the doc listener ++ while (ChildCount() > 0) { ++ RemoveChildAt(0); ++ } ++ ++ if (mTopLevel) { ++ g_object_unref(mTopLevel); ++ } ++ ++ if (DocListener()) { ++ DocListener()->Stop(); ++ } ++ ++ if (mDocument) { ++ DisconnectDocumentEventListeners(); ++ } ++ ++ if (mServer) { ++ g_object_unref(mServer); ++ } ++ ++ MOZ_COUNT_DTOR(nsMenuBar); ++} ++ ++/* static */ UniquePtr ++nsMenuBar::Create(nsIWidget *aParent, nsIContent *aMenuBarNode) ++{ ++ UniquePtr menubar(new nsMenuBar(aMenuBarNode)); ++ if (NS_FAILED(menubar->Init(aParent))) { ++ return nullptr; ++ } ++ ++ return menubar; ++} ++ ++nsMenuObject::EType ++nsMenuBar::Type() const ++{ ++ return eType_MenuBar; ++} ++ ++bool ++nsMenuBar::IsBeingDisplayed() const ++{ ++ return true; ++} ++ ++uint32_t ++nsMenuBar::WindowId() const ++{ ++ return static_cast(GDK_WINDOW_XID(gtk_widget_get_window(mTopLevel))); ++} ++ ++nsCString ++nsMenuBar::ObjectPath() const ++{ ++ gchar *tmp; ++ g_object_get(mServer, DBUSMENU_SERVER_PROP_DBUS_OBJECT, &tmp, NULL); ++ ++ nsCString result; ++ result.Adopt(tmp); ++ ++ return result; ++} ++ ++void ++nsMenuBar::Activate() ++{ ++ if (mIsActive) { ++ return; ++ } ++ ++ mIsActive = true; ++ ++ mDocument->AddEventListener(u"focus"_ns, ++ mEventListener, ++ true); ++ mDocument->AddEventListener(u"blur"_ns, ++ mEventListener, ++ true); ++ mDocument->AddEventListener(u"keypress"_ns, ++ mEventListener, ++ false); ++ mDocument->AddEventListener(u"keydown"_ns, ++ mEventListener, ++ false); ++ mDocument->AddEventListener(u"keyup"_ns, ++ mEventListener, ++ false); ++ ++ // Clear this. Not sure if we really need to though ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, ++ nsGkAtoms::openedwithkey, ++ u"false"_ns, true); ++ ++ DocListener()->Start(); ++ Build(); ++ SetShellShowingMenuBar(true); ++} ++ ++void ++nsMenuBar::Deactivate() ++{ ++ if (!mIsActive) { ++ return; ++ } ++ ++ mIsActive = false; ++ ++ SetShellShowingMenuBar(false); ++ while (ChildCount() > 0) { ++ RemoveChildAt(0); ++ } ++ DocListener()->Stop(); ++ DisconnectDocumentEventListeners(); ++} +--- /dev/null ++++ b/widget/gtk/nsMenuBar.h +@@ -0,0 +1,111 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsMenuBar_h__ ++#define __nsMenuBar_h__ ++ ++#include "mozilla/Attributes.h" ++#include "mozilla/UniquePtr.h" ++#include "nsCOMPtr.h" ++#include "nsString.h" ++ ++#include "nsDbusmenu.h" ++#include "nsMenuContainer.h" ++#include "nsMenuObject.h" ++ ++#include ++ ++class nsIContent; ++class nsIWidget; ++class nsMenuBarDocEventListener; ++ ++namespace mozilla { ++namespace dom { ++class Document; ++class KeyboardEvent; ++} ++} ++ ++/* ++ * The menubar class. There is one of these per window (and the window ++ * owns its menubar). Each menubar has an object path, and the service is ++ * responsible for telling the desktop shell which object path corresponds ++ * to a particular window. A menubar and its hierarchy also own a ++ * nsNativeMenuDocListener. ++ */ ++class nsMenuBar final : public nsMenuContainer ++{ ++public: ++ ~nsMenuBar() override; ++ ++ static mozilla::UniquePtr Create(nsIWidget *aParent, ++ nsIContent *aMenuBarNode); ++ ++ nsMenuObject::EType Type() const override; ++ ++ bool IsBeingDisplayed() const override; ++ ++ // Get the native window ID for this menubar ++ uint32_t WindowId() const; ++ ++ // Get the object path for this menubar ++ nsCString ObjectPath() const; ++ ++ // Get the top-level GtkWindow handle ++ GtkWidget* TopLevelWindow() { return mTopLevel; } ++ ++ // Called from the menuservice when the menubar is about to be registered. ++ // Causes the native menubar to be created, and the XUL menubar to be hidden ++ void Activate(); ++ ++ // Called from the menuservice when the menubar is no longer registered ++ // with the desktop shell. Will cause the XUL menubar to be shown again ++ void Deactivate(); ++ ++private: ++ class DocEventListener; ++ friend class nsMenuBarContentInsertedEvent; ++ friend class nsMenuBarContentRemovedEvent; ++ ++ enum ModifierFlags { ++ eModifierShift = (1 << 0), ++ eModifierCtrl = (1 << 1), ++ eModifierAlt = (1 << 2), ++ eModifierMeta = (1 << 3) ++ }; ++ ++ nsMenuBar(nsIContent *aMenuBarNode); ++ nsresult Init(nsIWidget *aParent); ++ void Build(); ++ void DisconnectDocumentEventListeners(); ++ void SetShellShowingMenuBar(bool aShowing); ++ void Focus(); ++ void Blur(); ++ ModifierFlags GetModifiersFromEvent(mozilla::dom::KeyboardEvent *aEvent); ++ nsresult Keypress(mozilla::dom::KeyboardEvent *aEvent); ++ nsresult KeyDown(mozilla::dom::KeyboardEvent *aEvent); ++ nsresult KeyUp(mozilla::dom::KeyboardEvent *aEvent); ++ ++ void HandleContentInserted(nsIContent *aChild, ++ nsIContent *aPrevSibling); ++ void HandleContentRemoved(nsIContent *aChild); ++ ++ void OnContentInserted(nsIContent *aContainer, nsIContent *aChild, ++ nsIContent *aPrevSibling) override; ++ void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) override; ++ ++ GtkWidget *mTopLevel; ++ DbusmenuServer *mServer; ++ nsCOMPtr mDocument; ++ RefPtr mEventListener; ++ ++ uint32_t mAccessKey; ++ ModifierFlags mAccessKeyMask; ++ bool mIsActive; ++}; ++ ++#endif /* __nsMenuBar_h__ */ +--- /dev/null ++++ b/widget/gtk/nsMenuContainer.cpp +@@ -0,0 +1,170 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "mozilla/DebugOnly.h" ++#include "nsGkAtoms.h" ++#include "nsIContent.h" ++ ++#include "nsDbusmenu.h" ++#include "nsMenu.h" ++#include "nsMenuItem.h" ++#include "nsMenuSeparator.h" ++ ++#include "nsMenuContainer.h" ++ ++using namespace mozilla; ++ ++const nsMenuContainer::ChildTArray::index_type nsMenuContainer::NoIndex = nsMenuContainer::ChildTArray::NoIndex; ++ ++typedef UniquePtr (*nsMenuObjectConstructor)(nsMenuContainer*, ++ nsIContent*); ++ ++template ++static UniquePtr CreateMenuObject(nsMenuContainer *aContainer, ++ nsIContent *aContent) ++{ ++ return UniquePtr(new T(aContainer, aContent)); ++} ++ ++static nsMenuObjectConstructor ++GetMenuObjectConstructor(nsIContent *aContent) ++{ ++ if (aContent->IsXULElement(nsGkAtoms::menuitem)) { ++ return CreateMenuObject; ++ } else if (aContent->IsXULElement(nsGkAtoms::menu)) { ++ return CreateMenuObject; ++ } else if (aContent->IsXULElement(nsGkAtoms::menuseparator)) { ++ return CreateMenuObject; ++ } ++ ++ return nullptr; ++} ++ ++static bool ++ContentIsSupported(nsIContent *aContent) ++{ ++ return GetMenuObjectConstructor(aContent) ? true : false; ++} ++ ++nsMenuContainer::nsMenuContainer(nsMenuContainer *aParent, ++ nsIContent *aContent) : ++ nsMenuObject(aParent, aContent) ++{ ++} ++ ++nsMenuContainer::nsMenuContainer(nsNativeMenuDocListener *aListener, ++ nsIContent *aContent) : ++ nsMenuObject(aListener, aContent) ++{ ++} ++ ++UniquePtr ++nsMenuContainer::CreateChild(nsIContent *aContent) ++{ ++ nsMenuObjectConstructor ctor = GetMenuObjectConstructor(aContent); ++ if (!ctor) { ++ // There are plenty of node types we might stumble across that ++ // aren't supported ++ return nullptr; ++ } ++ ++ UniquePtr res = ctor(this, aContent); ++ return res; ++} ++ ++size_t ++nsMenuContainer::IndexOf(nsIContent *aChild) const ++{ ++ if (!aChild) { ++ return NoIndex; ++ } ++ ++ size_t count = ChildCount(); ++ for (size_t i = 0; i < count; ++i) { ++ if (ChildAt(i)->ContentNode() == aChild) { ++ return i; ++ } ++ } ++ ++ return NoIndex; ++} ++ ++void ++nsMenuContainer::RemoveChildAt(size_t aIndex, bool aUpdateNative) ++{ ++ MOZ_ASSERT(aIndex < ChildCount()); ++ ++ if (aUpdateNative) { ++ MOZ_ALWAYS_TRUE( ++ dbusmenu_menuitem_child_delete(GetNativeData(), ++ ChildAt(aIndex)->GetNativeData())); ++ } ++ ++ mChildren.RemoveElementAt(aIndex); ++} ++ ++void ++nsMenuContainer::RemoveChild(nsIContent *aChild, bool aUpdateNative) ++{ ++ size_t index = IndexOf(aChild); ++ if (index == NoIndex) { ++ return; ++ } ++ ++ RemoveChildAt(index, aUpdateNative); ++} ++ ++void ++nsMenuContainer::InsertChildAfter(UniquePtr aChild, ++ nsIContent *aPrevSibling, ++ bool aUpdateNative) ++{ ++ size_t index = IndexOf(aPrevSibling); ++ MOZ_ASSERT(!aPrevSibling || index != NoIndex); ++ ++ ++index; ++ ++ if (aUpdateNative) { ++ aChild->CreateNativeData(); ++ MOZ_ALWAYS_TRUE( ++ dbusmenu_menuitem_child_add_position(GetNativeData(), ++ aChild->GetNativeData(), ++ index)); ++ } ++ ++ mChildren.InsertElementAt(index, std::move(aChild)); ++} ++ ++void ++nsMenuContainer::AppendChild(UniquePtr aChild, ++ bool aUpdateNative) ++{ ++ if (aUpdateNative) { ++ aChild->CreateNativeData(); ++ MOZ_ALWAYS_TRUE( ++ dbusmenu_menuitem_child_append(GetNativeData(), ++ aChild->GetNativeData())); ++ } ++ ++ mChildren.AppendElement(std::move(aChild)); ++} ++ ++bool ++nsMenuContainer::NeedsRebuild() const ++{ ++ return false; ++} ++ ++/* static */ nsIContent* ++nsMenuContainer::GetPreviousSupportedSibling(nsIContent *aContent) ++{ ++ do { ++ aContent = aContent->GetPreviousSibling(); ++ } while (aContent && !ContentIsSupported(aContent)); ++ ++ return aContent; ++} +--- /dev/null ++++ b/widget/gtk/nsMenuContainer.h +@@ -0,0 +1,70 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsMenuContainer_h__ ++#define __nsMenuContainer_h__ ++ ++#include "mozilla/UniquePtr.h" ++#include "nsTArray.h" ++ ++#include "nsMenuObject.h" ++ ++class nsIContent; ++class nsNativeMenuDocListener; ++ ++// Base class for containers (menus and menubars) ++class nsMenuContainer : public nsMenuObject ++{ ++public: ++ typedef nsTArray > ChildTArray; ++ ++ // Determine if this container is being displayed on screen. Must be ++ // implemented by subclasses. Must return true if the container is ++ // in the fully open state, or false otherwise ++ virtual bool IsBeingDisplayed() const = 0; ++ ++ // Determine if this container will be rebuilt the next time it opens. ++ // Returns false by default but can be overridden by subclasses ++ virtual bool NeedsRebuild() const; ++ ++ // Return the first previous sibling that is of a type supported by the ++ // menu system ++ static nsIContent* GetPreviousSupportedSibling(nsIContent *aContent); ++ ++ static const ChildTArray::index_type NoIndex; ++ ++protected: ++ nsMenuContainer(nsMenuContainer *aParent, nsIContent *aContent); ++ nsMenuContainer(nsNativeMenuDocListener *aListener, nsIContent *aContent); ++ ++ // Create a new child element for the specified content node ++ mozilla::UniquePtr CreateChild(nsIContent *aContent); ++ ++ // Return the index of the child for the specified content node ++ size_t IndexOf(nsIContent *aChild) const; ++ ++ size_t ChildCount() const { return mChildren.Length(); } ++ nsMenuObject* ChildAt(size_t aIndex) const { return mChildren[aIndex].get(); } ++ ++ void RemoveChildAt(size_t aIndex, bool aUpdateNative = true); ++ ++ // Remove the child that owns the specified content node ++ void RemoveChild(nsIContent *aChild, bool aUpdateNative = true); ++ ++ // Insert a new child after the child that owns the specified content node ++ void InsertChildAfter(mozilla::UniquePtr aChild, ++ nsIContent *aPrevSibling, ++ bool aUpdateNative = true); ++ ++ void AppendChild(mozilla::UniquePtr aChild, ++ bool aUpdateNative = true); ++ ++private: ++ ChildTArray mChildren; ++}; ++ ++#endif /* __nsMenuContainer_h__ */ +--- /dev/null ++++ b/widget/gtk/nsMenuItem.cpp +@@ -0,0 +1,766 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "mozilla/ArrayUtils.h" ++#include "mozilla/Assertions.h" ++#include "mozilla/dom/Document.h" ++#include "mozilla/dom/Element.h" ++#include "mozilla/dom/KeyboardEventBinding.h" ++#include "mozilla/dom/XULCommandEvent.h" ++#include "mozilla/Preferences.h" ++#include "mozilla/TextEvents.h" ++#include "nsContentUtils.h" ++#include "nsCRT.h" ++#include "nsGkAtoms.h" ++#include "nsGlobalWindowInner.h" ++#include "nsGtkUtils.h" ++#include "nsIContent.h" ++#include "nsIRunnable.h" ++#include "nsQueryObject.h" ++#include "nsReadableUtils.h" ++#include "nsString.h" ++#include "nsThreadUtils.h" ++ ++#include "nsMenu.h" ++#include "nsMenuBar.h" ++#include "nsMenuContainer.h" ++#include "nsNativeMenuDocListener.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "nsMenuItem.h" ++ ++using namespace mozilla; ++ ++struct KeyCodeData { ++ const char* str; ++ size_t strlength; ++ uint32_t keycode; ++}; ++ ++static struct KeyCodeData gKeyCodes[] = { ++#define NS_DEFINE_VK(aDOMKeyName, aDOMKeyCode) \ ++ { #aDOMKeyName, sizeof(#aDOMKeyName) - 1, aDOMKeyCode }, ++#include "mozilla/VirtualKeyCodeList.h" ++#undef NS_DEFINE_VK ++ { nullptr, 0, 0 } ++}; ++ ++struct KeyPair { ++ uint32_t DOMKeyCode; ++ guint GDKKeyval; ++}; ++ ++// ++// Netscape keycodes are defined in widget/public/nsGUIEvent.h ++// GTK keycodes are defined in ++// ++static const KeyPair gKeyPairs[] = { ++ { NS_VK_CANCEL, GDK_Cancel }, ++ { NS_VK_BACK, GDK_BackSpace }, ++ { NS_VK_TAB, GDK_Tab }, ++ { NS_VK_TAB, GDK_ISO_Left_Tab }, ++ { NS_VK_CLEAR, GDK_Clear }, ++ { NS_VK_RETURN, GDK_Return }, ++ { NS_VK_SHIFT, GDK_Shift_L }, ++ { NS_VK_SHIFT, GDK_Shift_R }, ++ { NS_VK_SHIFT, GDK_Shift_Lock }, ++ { NS_VK_CONTROL, GDK_Control_L }, ++ { NS_VK_CONTROL, GDK_Control_R }, ++ { NS_VK_ALT, GDK_Alt_L }, ++ { NS_VK_ALT, GDK_Alt_R }, ++ { NS_VK_META, GDK_Meta_L }, ++ { NS_VK_META, GDK_Meta_R }, ++ ++ // Assume that Super or Hyper is always mapped to physical Win key. ++ { NS_VK_WIN, GDK_Super_L }, ++ { NS_VK_WIN, GDK_Super_R }, ++ { NS_VK_WIN, GDK_Hyper_L }, ++ { NS_VK_WIN, GDK_Hyper_R }, ++ ++ // GTK's AltGraph key is similar to Mac's Option (Alt) key. However, ++ // unfortunately, browsers on Mac are using NS_VK_ALT for it even though ++ // it's really different from Alt key on Windows. ++ // On the other hand, GTK's AltGrapsh keys are really different from ++ // Alt key. However, there is no AltGrapsh key on Windows. On Windows, ++ // both Ctrl and Alt keys are pressed internally when AltGr key is pressed. ++ // For some languages' users, AltGraph key is important, so, web ++ // applications on such locale may want to know AltGraph key press. ++ // Therefore, we should map AltGr keycode for them only on GTK. ++ { NS_VK_ALTGR, GDK_ISO_Level3_Shift }, ++ { NS_VK_ALTGR, GDK_ISO_Level5_Shift }, ++ // We assume that Mode_switch is always used for level3 shift. ++ { NS_VK_ALTGR, GDK_Mode_switch }, ++ ++ { NS_VK_PAUSE, GDK_Pause }, ++ { NS_VK_CAPS_LOCK, GDK_Caps_Lock }, ++ { NS_VK_KANA, GDK_Kana_Lock }, ++ { NS_VK_KANA, GDK_Kana_Shift }, ++ { NS_VK_HANGUL, GDK_Hangul }, ++ // { NS_VK_JUNJA, GDK_XXX }, ++ // { NS_VK_FINAL, GDK_XXX }, ++ { NS_VK_HANJA, GDK_Hangul_Hanja }, ++ { NS_VK_KANJI, GDK_Kanji }, ++ { NS_VK_ESCAPE, GDK_Escape }, ++ { NS_VK_CONVERT, GDK_Henkan }, ++ { NS_VK_NONCONVERT, GDK_Muhenkan }, ++ // { NS_VK_ACCEPT, GDK_XXX }, ++ // { NS_VK_MODECHANGE, GDK_XXX }, ++ { NS_VK_SPACE, GDK_space }, ++ { NS_VK_PAGE_UP, GDK_Page_Up }, ++ { NS_VK_PAGE_DOWN, GDK_Page_Down }, ++ { NS_VK_END, GDK_End }, ++ { NS_VK_HOME, GDK_Home }, ++ { NS_VK_LEFT, GDK_Left }, ++ { NS_VK_UP, GDK_Up }, ++ { NS_VK_RIGHT, GDK_Right }, ++ { NS_VK_DOWN, GDK_Down }, ++ { NS_VK_SELECT, GDK_Select }, ++ { NS_VK_PRINT, GDK_Print }, ++ { NS_VK_EXECUTE, GDK_Execute }, ++ { NS_VK_PRINTSCREEN, GDK_Print }, ++ { NS_VK_INSERT, GDK_Insert }, ++ { NS_VK_DELETE, GDK_Delete }, ++ { NS_VK_HELP, GDK_Help }, ++ ++ // keypad keys ++ { NS_VK_LEFT, GDK_KP_Left }, ++ { NS_VK_RIGHT, GDK_KP_Right }, ++ { NS_VK_UP, GDK_KP_Up }, ++ { NS_VK_DOWN, GDK_KP_Down }, ++ { NS_VK_PAGE_UP, GDK_KP_Page_Up }, ++ // Not sure what these are ++ //{ NS_VK_, GDK_KP_Prior }, ++ //{ NS_VK_, GDK_KP_Next }, ++ { NS_VK_CLEAR, GDK_KP_Begin }, // Num-unlocked 5 ++ { NS_VK_PAGE_DOWN, GDK_KP_Page_Down }, ++ { NS_VK_HOME, GDK_KP_Home }, ++ { NS_VK_END, GDK_KP_End }, ++ { NS_VK_INSERT, GDK_KP_Insert }, ++ { NS_VK_DELETE, GDK_KP_Delete }, ++ { NS_VK_RETURN, GDK_KP_Enter }, ++ ++ { NS_VK_NUM_LOCK, GDK_Num_Lock }, ++ { NS_VK_SCROLL_LOCK,GDK_Scroll_Lock }, ++ ++ // Function keys ++ { NS_VK_F1, GDK_F1 }, ++ { NS_VK_F2, GDK_F2 }, ++ { NS_VK_F3, GDK_F3 }, ++ { NS_VK_F4, GDK_F4 }, ++ { NS_VK_F5, GDK_F5 }, ++ { NS_VK_F6, GDK_F6 }, ++ { NS_VK_F7, GDK_F7 }, ++ { NS_VK_F8, GDK_F8 }, ++ { NS_VK_F9, GDK_F9 }, ++ { NS_VK_F10, GDK_F10 }, ++ { NS_VK_F11, GDK_F11 }, ++ { NS_VK_F12, GDK_F12 }, ++ { NS_VK_F13, GDK_F13 }, ++ { NS_VK_F14, GDK_F14 }, ++ { NS_VK_F15, GDK_F15 }, ++ { NS_VK_F16, GDK_F16 }, ++ { NS_VK_F17, GDK_F17 }, ++ { NS_VK_F18, GDK_F18 }, ++ { NS_VK_F19, GDK_F19 }, ++ { NS_VK_F20, GDK_F20 }, ++ { NS_VK_F21, GDK_F21 }, ++ { NS_VK_F22, GDK_F22 }, ++ { NS_VK_F23, GDK_F23 }, ++ { NS_VK_F24, GDK_F24 }, ++ ++ // context menu key, keysym 0xff67, typically keycode 117 on 105-key (Microsoft) ++ // x86 keyboards, located between right 'Windows' key and right Ctrl key ++ { NS_VK_CONTEXT_MENU, GDK_Menu }, ++ { NS_VK_SLEEP, GDK_Sleep }, ++ ++ { NS_VK_ATTN, GDK_3270_Attn }, ++ { NS_VK_CRSEL, GDK_3270_CursorSelect }, ++ { NS_VK_EXSEL, GDK_3270_ExSelect }, ++ { NS_VK_EREOF, GDK_3270_EraseEOF }, ++ { NS_VK_PLAY, GDK_3270_Play }, ++ //{ NS_VK_ZOOM, GDK_XXX }, ++ { NS_VK_PA1, GDK_3270_PA1 }, ++}; ++ ++static guint ++ConvertGeckoKeyNameToGDKKeyval(nsAString& aKeyName) ++{ ++ NS_ConvertUTF16toUTF8 keyName(aKeyName); ++ ToUpperCase(keyName); // We want case-insensitive comparison with data ++ // stored as uppercase. ++ ++ uint32_t keyCode = 0; ++ ++ uint32_t keyNameLength = keyName.Length(); ++ const char* keyNameStr = keyName.get(); ++ for (uint16_t i = 0; i < ArrayLength(gKeyCodes); ++i) { ++ if (keyNameLength == gKeyCodes[i].strlength && ++ !nsCRT::strcmp(gKeyCodes[i].str, keyNameStr)) { ++ keyCode = gKeyCodes[i].keycode; ++ break; ++ } ++ } ++ ++ // First, try to handle alphanumeric input, not listed in nsKeycodes: ++ // most likely, more letters will be getting typed in than things in ++ // the key list, so we will look through these first. ++ ++ if (keyCode >= NS_VK_A && keyCode <= NS_VK_Z) { ++ // gdk and DOM both use the ASCII codes for these keys. ++ return keyCode; ++ } ++ ++ // numbers ++ if (keyCode >= NS_VK_0 && keyCode <= NS_VK_9) { ++ // gdk and DOM both use the ASCII codes for these keys. ++ return keyCode - NS_VK_0 + GDK_0; ++ } ++ ++ switch (keyCode) { ++ // keys in numpad ++ case NS_VK_MULTIPLY: return GDK_KP_Multiply; ++ case NS_VK_ADD: return GDK_KP_Add; ++ case NS_VK_SEPARATOR: return GDK_KP_Separator; ++ case NS_VK_SUBTRACT: return GDK_KP_Subtract; ++ case NS_VK_DECIMAL: return GDK_KP_Decimal; ++ case NS_VK_DIVIDE: return GDK_KP_Divide; ++ case NS_VK_NUMPAD0: return GDK_KP_0; ++ case NS_VK_NUMPAD1: return GDK_KP_1; ++ case NS_VK_NUMPAD2: return GDK_KP_2; ++ case NS_VK_NUMPAD3: return GDK_KP_3; ++ case NS_VK_NUMPAD4: return GDK_KP_4; ++ case NS_VK_NUMPAD5: return GDK_KP_5; ++ case NS_VK_NUMPAD6: return GDK_KP_6; ++ case NS_VK_NUMPAD7: return GDK_KP_7; ++ case NS_VK_NUMPAD8: return GDK_KP_8; ++ case NS_VK_NUMPAD9: return GDK_KP_9; ++ // other prinable keys ++ case NS_VK_SPACE: return GDK_space; ++ case NS_VK_COLON: return GDK_colon; ++ case NS_VK_SEMICOLON: return GDK_semicolon; ++ case NS_VK_LESS_THAN: return GDK_less; ++ case NS_VK_EQUALS: return GDK_equal; ++ case NS_VK_GREATER_THAN: return GDK_greater; ++ case NS_VK_QUESTION_MARK: return GDK_question; ++ case NS_VK_AT: return GDK_at; ++ case NS_VK_CIRCUMFLEX: return GDK_asciicircum; ++ case NS_VK_EXCLAMATION: return GDK_exclam; ++ case NS_VK_DOUBLE_QUOTE: return GDK_quotedbl; ++ case NS_VK_HASH: return GDK_numbersign; ++ case NS_VK_DOLLAR: return GDK_dollar; ++ case NS_VK_PERCENT: return GDK_percent; ++ case NS_VK_AMPERSAND: return GDK_ampersand; ++ case NS_VK_UNDERSCORE: return GDK_underscore; ++ case NS_VK_OPEN_PAREN: return GDK_parenleft; ++ case NS_VK_CLOSE_PAREN: return GDK_parenright; ++ case NS_VK_ASTERISK: return GDK_asterisk; ++ case NS_VK_PLUS: return GDK_plus; ++ case NS_VK_PIPE: return GDK_bar; ++ case NS_VK_HYPHEN_MINUS: return GDK_minus; ++ case NS_VK_OPEN_CURLY_BRACKET: return GDK_braceleft; ++ case NS_VK_CLOSE_CURLY_BRACKET: return GDK_braceright; ++ case NS_VK_TILDE: return GDK_asciitilde; ++ case NS_VK_COMMA: return GDK_comma; ++ case NS_VK_PERIOD: return GDK_period; ++ case NS_VK_SLASH: return GDK_slash; ++ case NS_VK_BACK_QUOTE: return GDK_grave; ++ case NS_VK_OPEN_BRACKET: return GDK_bracketleft; ++ case NS_VK_BACK_SLASH: return GDK_backslash; ++ case NS_VK_CLOSE_BRACKET: return GDK_bracketright; ++ case NS_VK_QUOTE: return GDK_apostrophe; ++ } ++ ++ // misc other things ++ for (uint32_t i = 0; i < ArrayLength(gKeyPairs); ++i) { ++ if (gKeyPairs[i].DOMKeyCode == keyCode) { ++ return gKeyPairs[i].GDKKeyval; ++ } ++ } ++ ++ return 0; ++} ++ ++class nsMenuItemUncheckSiblingsRunnable final : public Runnable ++{ ++public: ++ NS_IMETHODIMP Run() ++ { ++ if (mMenuItem) { ++ static_cast(mMenuItem.get())->UncheckSiblings(); ++ } ++ return NS_OK; ++ } ++ ++ nsMenuItemUncheckSiblingsRunnable(nsMenuItem *aMenuItem) : ++ Runnable("nsMenuItemUncheckSiblingsRunnable"), ++ mMenuItem(aMenuItem) { }; ++ ++private: ++ nsWeakMenuObject mMenuItem; ++}; ++ ++bool ++nsMenuItem::IsCheckboxOrRadioItem() const ++{ ++ return mType == eMenuItemType_Radio || ++ mType == eMenuItemType_CheckBox; ++} ++ ++/* static */ void ++nsMenuItem::item_activated_cb(DbusmenuMenuitem *menuitem, ++ guint timestamp, ++ gpointer user_data) ++{ ++ nsMenuItem *item = static_cast(user_data); ++ item->Activate(timestamp); ++} ++ ++void ++nsMenuItem::Activate(uint32_t aTimestamp) ++{ ++ GdkWindow *window = gtk_widget_get_window(MenuBar()->TopLevelWindow()); ++ gdk_x11_window_set_user_time( ++ window, std::min(aTimestamp, gdk_x11_get_server_time(window))); ++ ++ // We do this to avoid mutating our view of the menu until ++ // after we have finished ++ nsNativeMenuDocListener::BlockUpdatesScope updatesBlocker; ++ ++ if (!ContentNode()->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::autocheck, ++ nsGkAtoms::_false, ++ eCaseMatters) && ++ (mType == eMenuItemType_CheckBox || ++ (mType == eMenuItemType_Radio && !mIsChecked))) { ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, ++ nsGkAtoms::checked, ++ mIsChecked ? ++ u"false"_ns ++ : u"true"_ns, ++ true); ++ } ++ ++ dom::Document *doc = ContentNode()->OwnerDoc(); ++ ErrorResult rv; ++ RefPtr event = ++ doc->CreateEvent(u"xulcommandevent"_ns, ++ dom::CallerType::System, rv); ++ if (!rv.Failed()) { ++ RefPtr command = event->AsXULCommandEvent(); ++ if (command) { ++ command->InitCommandEvent(u"command"_ns, true, true, ++ nsGlobalWindowInner::Cast(doc->GetInnerWindow()), ++ 0, false, false, false, false, 0, nullptr, 0, rv); ++ if (!rv.Failed()) { ++ event->SetTrusted(true); ++ ContentNode()->DispatchEvent(*event, rv); ++ if (rv.Failed()) { ++ NS_WARNING("Failed to dispatch event"); ++ rv.SuppressException(); ++ } ++ } else { ++ NS_WARNING("Failed to initialize command event"); ++ rv.SuppressException(); ++ } ++ } ++ } else { ++ NS_WARNING("CreateEvent failed"); ++ rv.SuppressException(); ++ } ++ ++ // This kinda sucks, but Unity doesn't send a closed event ++ // after activating a menuitem ++ nsMenuObject *ancestor = Parent(); ++ while (ancestor && ancestor->Type() == eType_Menu) { ++ static_cast(ancestor)->OnClose(); ++ ancestor = ancestor->Parent(); ++ } ++} ++ ++void ++nsMenuItem::CopyAttrFromNodeIfExists(nsIContent *aContent, nsAtom *aAttribute) ++{ ++ nsAutoString value; ++ if (aContent->AsElement()->GetAttr(kNameSpaceID_None, aAttribute, value)) { ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, aAttribute, ++ value, true); ++ } ++} ++ ++void ++nsMenuItem::UpdateState() ++{ ++ if (!IsCheckboxOrRadioItem()) { ++ return; ++ } ++ ++ mIsChecked = ContentNode()->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::checked, ++ nsGkAtoms::_true, ++ eCaseMatters); ++ dbusmenu_menuitem_property_set_int(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, ++ mIsChecked ? ++ DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : ++ DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); ++} ++ ++void ++nsMenuItem::UpdateTypeAndState() ++{ ++ static mozilla::dom::Element::AttrValuesArray attrs[] = ++ { nsGkAtoms::checkbox, nsGkAtoms::radio, nullptr }; ++ int32_t type = ContentNode()->AsElement()->FindAttrValueIn(kNameSpaceID_None, ++ nsGkAtoms::type, ++ attrs, eCaseMatters); ++ ++ if (type >= 0 && type < 2) { ++ if (type == 0) { ++ dbusmenu_menuitem_property_set(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, ++ DBUSMENU_MENUITEM_TOGGLE_CHECK); ++ mType = eMenuItemType_CheckBox; ++ } else if (type == 1) { ++ dbusmenu_menuitem_property_set(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, ++ DBUSMENU_MENUITEM_TOGGLE_RADIO); ++ mType = eMenuItemType_Radio; ++ } ++ ++ UpdateState(); ++ } else { ++ dbusmenu_menuitem_property_remove(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE); ++ dbusmenu_menuitem_property_remove(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_TOGGLE_STATE); ++ mType = eMenuItemType_Normal; ++ } ++} ++ ++void ++nsMenuItem::UpdateAccel() ++{ ++ dom::Document *doc = ContentNode()->GetUncomposedDoc(); ++ if (doc) { ++ nsCOMPtr oldKeyContent; ++ oldKeyContent.swap(mKeyContent); ++ ++ nsAutoString key; ++ ContentNode()->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::key, ++ key); ++ if (!key.IsEmpty()) { ++ mKeyContent = doc->GetElementById(key); ++ } ++ ++ if (mKeyContent != oldKeyContent) { ++ if (oldKeyContent) { ++ DocListener()->UnregisterForContentChanges(oldKeyContent); ++ } ++ if (mKeyContent) { ++ DocListener()->RegisterForContentChanges(mKeyContent, this); ++ } ++ } ++ } ++ ++ if (!mKeyContent) { ++ dbusmenu_menuitem_property_remove(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_SHORTCUT); ++ return; ++ } ++ ++ nsAutoString modifiers; ++ mKeyContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::modifiers, ++ modifiers); ++ ++ uint32_t modifier = 0; ++ ++ if (!modifiers.IsEmpty()) { ++ char* str = ToNewUTF8String(modifiers); ++ char *token = strtok(str, ", \t"); ++ while(token) { ++ if (nsCRT::strcmp(token, "shift") == 0) { ++ modifier |= GDK_SHIFT_MASK; ++ } else if (nsCRT::strcmp(token, "alt") == 0) { ++ modifier |= GDK_MOD1_MASK; ++ } else if (nsCRT::strcmp(token, "meta") == 0) { ++ modifier |= GDK_META_MASK; ++ } else if (nsCRT::strcmp(token, "control") == 0) { ++ modifier |= GDK_CONTROL_MASK; ++ } else if (nsCRT::strcmp(token, "accel") == 0) { ++ int32_t accel = Preferences::GetInt("ui.key.accelKey"); ++ if (accel == dom::KeyboardEvent_Binding::DOM_VK_META) { ++ modifier |= GDK_META_MASK; ++ } else if (accel == dom::KeyboardEvent_Binding::DOM_VK_ALT) { ++ modifier |= GDK_MOD1_MASK; ++ } else { ++ modifier |= GDK_CONTROL_MASK; ++ } ++ } ++ ++ token = strtok(nullptr, ", \t"); ++ } ++ ++ free(str); ++ } ++ ++ nsAutoString keyStr; ++ mKeyContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::key, ++ keyStr); ++ ++ guint key = 0; ++ if (!keyStr.IsEmpty()) { ++ key = gdk_unicode_to_keyval(*keyStr.BeginReading()); ++ } ++ ++ if (key == 0) { ++ mKeyContent->AsElement()->GetAttr(kNameSpaceID_None, ++ nsGkAtoms::keycode, keyStr); ++ if (!keyStr.IsEmpty()) { ++ key = ConvertGeckoKeyNameToGDKKeyval(keyStr); ++ } ++ } ++ ++ if (key == 0) { ++ key = GDK_VoidSymbol; ++ } ++ ++ if (key != GDK_VoidSymbol) { ++ dbusmenu_menuitem_property_set_shortcut(GetNativeData(), key, ++ static_cast(modifier)); ++ } else { ++ dbusmenu_menuitem_property_remove(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_SHORTCUT); ++ } ++} ++ ++nsMenuBar* ++nsMenuItem::MenuBar() ++{ ++ nsMenuObject *tmp = this; ++ while (tmp->Parent()) { ++ tmp = tmp->Parent(); ++ } ++ ++ MOZ_ASSERT(tmp->Type() == eType_MenuBar, "The top-level should be a menubar"); ++ ++ return static_cast(tmp); ++} ++ ++void ++nsMenuItem::UncheckSiblings() ++{ ++ if (!ContentNode()->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::type, ++ nsGkAtoms::radio, ++ eCaseMatters)) { ++ // If we're not a radio button, we don't care ++ return; ++ } ++ ++ nsAutoString name; ++ ContentNode()->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::name, ++ name); ++ ++ nsIContent *parent = ContentNode()->GetParent(); ++ if (!parent) { ++ return; ++ } ++ ++ uint32_t count = parent->GetChildCount(); ++ for (uint32_t i = 0; i < count; ++i) { ++ nsIContent *sibling = parent->GetChildAt_Deprecated(i); ++ ++ if (sibling->IsComment()) { ++ continue; ++ } ++ ++ nsAutoString otherName; ++ sibling->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::name, ++ otherName); ++ ++ if (sibling != ContentNode() && otherName == name && ++ sibling->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::type, ++ nsGkAtoms::radio, ++ eCaseMatters)) { ++ sibling->AsElement()->UnsetAttr(kNameSpaceID_None, ++ nsGkAtoms::checked, true); ++ } ++ } ++} ++ ++void ++nsMenuItem::InitializeNativeData() ++{ ++ g_signal_connect(G_OBJECT(GetNativeData()), ++ DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, ++ G_CALLBACK(item_activated_cb), this); ++ mNeedsUpdate = true; ++} ++ ++void ++nsMenuItem::UpdateContentAttributes() ++{ ++ dom::Document *doc = ContentNode()->GetUncomposedDoc(); ++ if (!doc) { ++ return; ++ } ++ ++ nsAutoString command; ++ ContentNode()->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::command, ++ command); ++ if (command.IsEmpty()) { ++ return; ++ } ++ ++ nsCOMPtr commandContent = doc->GetElementById(command); ++ if (!commandContent) { ++ return; ++ } ++ ++ if (commandContent->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::disabled, ++ nsGkAtoms::_true, ++ eCaseMatters)) { ++ ContentNode()->AsElement()->SetAttr(kNameSpaceID_None, ++ nsGkAtoms::disabled, ++ u"true"_ns, true); ++ } else { ++ ContentNode()->AsElement()->UnsetAttr(kNameSpaceID_None, ++ nsGkAtoms::disabled, true); ++ } ++ ++ CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::checked); ++ CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::accesskey); ++ CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::label); ++ CopyAttrFromNodeIfExists(commandContent, nsGkAtoms::hidden); ++} ++ ++void ++nsMenuItem::Update(const ComputedStyle *aComputedStyle) ++{ ++ if (mNeedsUpdate) { ++ mNeedsUpdate = false; ++ ++ UpdateTypeAndState(); ++ UpdateAccel(); ++ UpdateLabel(); ++ UpdateSensitivity(); ++ } ++ ++ UpdateVisibility(aComputedStyle); ++ UpdateIcon(aComputedStyle); ++} ++ ++bool ++nsMenuItem::IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const ++{ ++ return nsCRT::strcmp(dbusmenu_menuitem_property_get(aNativeData, ++ DBUSMENU_MENUITEM_PROP_TYPE), ++ "separator") != 0; ++} ++ ++nsMenuObject::PropertyFlags ++nsMenuItem::SupportedProperties() const ++{ ++ return static_cast( ++ nsMenuObject::ePropLabel | ++ nsMenuObject::ePropEnabled | ++ nsMenuObject::ePropVisible | ++ nsMenuObject::ePropIconData | ++ nsMenuObject::ePropShortcut | ++ nsMenuObject::ePropToggleType | ++ nsMenuObject::ePropToggleState ++ ); ++} ++ ++void ++nsMenuItem::OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) ++{ ++ MOZ_ASSERT(aContent == ContentNode() || aContent == mKeyContent, ++ "Received an event that wasn't meant for us!"); ++ ++ if (aContent == ContentNode() && aAttribute == nsGkAtoms::checked && ++ aContent->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::checked, ++ nsGkAtoms::_true, eCaseMatters)) { ++ nsContentUtils::AddScriptRunner( ++ new nsMenuItemUncheckSiblingsRunnable(this)); ++ } ++ ++ if (mNeedsUpdate) { ++ return; ++ } ++ ++ if (!Parent()->IsBeingDisplayed()) { ++ mNeedsUpdate = true; ++ return; ++ } ++ ++ if (aContent == ContentNode()) { ++ if (aAttribute == nsGkAtoms::key) { ++ UpdateAccel(); ++ } else if (aAttribute == nsGkAtoms::label || ++ aAttribute == nsGkAtoms::accesskey || ++ aAttribute == nsGkAtoms::crop) { ++ UpdateLabel(); ++ } else if (aAttribute == nsGkAtoms::disabled) { ++ UpdateSensitivity(); ++ } else if (aAttribute == nsGkAtoms::type) { ++ UpdateTypeAndState(); ++ } else if (aAttribute == nsGkAtoms::checked) { ++ UpdateState(); ++ } else if (aAttribute == nsGkAtoms::hidden || ++ aAttribute == nsGkAtoms::collapsed) { ++ RefPtr style = GetComputedStyle(); ++ UpdateVisibility(style); ++ } else if (aAttribute == nsGkAtoms::image) { ++ RefPtr style = GetComputedStyle(); ++ UpdateIcon(style); ++ } ++ } else if (aContent == mKeyContent && ++ (aAttribute == nsGkAtoms::key || ++ aAttribute == nsGkAtoms::keycode || ++ aAttribute == nsGkAtoms::modifiers)) { ++ UpdateAccel(); ++ } ++} ++ ++nsMenuItem::nsMenuItem(nsMenuContainer *aParent, nsIContent *aContent) : ++ nsMenuObject(aParent, aContent), ++ mType(eMenuItemType_Normal), ++ mIsChecked(false), ++ mNeedsUpdate(false) ++{ ++ MOZ_COUNT_CTOR(nsMenuItem); ++} ++ ++nsMenuItem::~nsMenuItem() ++{ ++ if (DocListener() && mKeyContent) { ++ DocListener()->UnregisterForContentChanges(mKeyContent); ++ } ++ ++ if (GetNativeData()) { ++ g_signal_handlers_disconnect_by_func(GetNativeData(), ++ FuncToGpointer(item_activated_cb), ++ this); ++ } ++ ++ MOZ_COUNT_DTOR(nsMenuItem); ++} ++ ++nsMenuObject::EType ++nsMenuItem::Type() const ++{ ++ return eType_MenuItem; ++} +--- /dev/null ++++ b/widget/gtk/nsMenuItem.h +@@ -0,0 +1,80 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsMenuItem_h__ ++#define __nsMenuItem_h__ ++ ++#include "mozilla/Attributes.h" ++#include "nsCOMPtr.h" ++ ++#include "nsDbusmenu.h" ++#include "nsMenuObject.h" ++ ++#include ++ ++class nsAtom; ++class nsIContent; ++class nsMenuBar; ++class nsMenuContainer; ++ ++/* ++ * This class represents 3 main classes of menuitems: labels, checkboxes and ++ * radio buttons (with/without an icon) ++ */ ++class nsMenuItem final : public nsMenuObject ++{ ++public: ++ nsMenuItem(nsMenuContainer *aParent, nsIContent *aContent); ++ ~nsMenuItem() override; ++ ++ nsMenuObject::EType Type() const override; ++ ++private: ++ friend class nsMenuItemUncheckSiblingsRunnable; ++ ++ enum { ++ eMenuItemFlag_ToggleState = (1 << 0) ++ }; ++ ++ enum EMenuItemType { ++ eMenuItemType_Normal, ++ eMenuItemType_Radio, ++ eMenuItemType_CheckBox ++ }; ++ ++ bool IsCheckboxOrRadioItem() const; ++ ++ static void item_activated_cb(DbusmenuMenuitem *menuitem, ++ guint timestamp, ++ gpointer user_data); ++ void Activate(uint32_t aTimestamp); ++ ++ void CopyAttrFromNodeIfExists(nsIContent *aContent, nsAtom *aAtom); ++ void UpdateState(); ++ void UpdateTypeAndState(); ++ void UpdateAccel(); ++ nsMenuBar* MenuBar(); ++ void UncheckSiblings(); ++ ++ void InitializeNativeData() override; ++ void UpdateContentAttributes() override; ++ void Update(const mozilla::ComputedStyle *aComputedStyle) override; ++ bool IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const override; ++ nsMenuObject::PropertyFlags SupportedProperties() const override; ++ ++ void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) override; ++ ++ EMenuItemType mType; ++ ++ bool mIsChecked; ++ ++ bool mNeedsUpdate; ++ ++ nsCOMPtr mKeyContent; ++}; ++ ++#endif /* __nsMenuItem_h__ */ +--- /dev/null ++++ b/widget/gtk/nsMenuObject.cpp +@@ -0,0 +1,653 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "ImageOps.h" ++#include "imgIContainer.h" ++#include "imgINotificationObserver.h" ++#include "imgLoader.h" ++#include "imgRequestProxy.h" ++#include "mozilla/ArrayUtils.h" ++#include "mozilla/Assertions.h" ++#include "mozilla/dom/Document.h" ++#include "mozilla/dom/Element.h" ++#include "mozilla/Preferences.h" ++#include "mozilla/PresShell.h" ++#include "mozilla/PresShellInlines.h" ++#include "mozilla/GRefPtr.h" ++#include "nsAttrValue.h" ++#include "nsComputedDOMStyle.h" ++#include "nsContentUtils.h" ++#include "nsGkAtoms.h" ++#include "nsIContent.h" ++#include "nsIContentPolicy.h" ++#include "nsILoadGroup.h" ++#include "nsImageToPixbuf.h" ++#include "nsIURI.h" ++#include "nsNetUtil.h" ++#include "nsPresContext.h" ++#include "nsRect.h" ++#include "nsServiceManagerUtils.h" ++#include "nsString.h" ++#include "nsStyleConsts.h" ++#include "nsStyleStruct.h" ++#include "nsUnicharUtils.h" ++ ++#include "nsMenuContainer.h" ++#include "nsNativeMenuDocListener.h" ++ ++#include ++#include ++#include ++ ++#include "nsMenuObject.h" ++ ++// X11's None clashes with StyleDisplay::None ++#include "X11UndefineNone.h" ++ ++#undef None ++ ++using namespace mozilla; ++using mozilla::image::ImageOps; ++ ++#define MAX_WIDTH 350000 ++ ++const char *gPropertyStrings[] = { ++#define DBUSMENU_PROPERTY(e, s, b) s, ++ DBUSMENU_PROPERTIES ++#undef DBUSMENU_PROPERTY ++ nullptr ++}; ++ ++nsWeakMenuObject* nsWeakMenuObject::sHead; ++PangoLayout* gPangoLayout = nullptr; ++ ++class nsMenuObjectIconLoader final : public imgINotificationObserver ++{ ++public: ++ NS_DECL_ISUPPORTS ++ NS_DECL_IMGINOTIFICATIONOBSERVER ++ ++ nsMenuObjectIconLoader(nsMenuObject *aOwner) : mOwner(aOwner) { }; ++ ++ void LoadIcon(const ComputedStyle *aComputedStyle); ++ void Destroy(); ++ ++private: ++ ~nsMenuObjectIconLoader() { }; ++ ++ nsMenuObject *mOwner; ++ RefPtr mImageRequest; ++ nsCOMPtr mURI; ++}; ++ ++NS_IMPL_ISUPPORTS(nsMenuObjectIconLoader, imgINotificationObserver) ++ ++void ++nsMenuObjectIconLoader::Notify(imgIRequest *aProxy, ++ int32_t aType, const nsIntRect *aRect) ++{ ++ if (!mOwner) { ++ return; ++ } ++ ++ if (aProxy != mImageRequest) { ++ return; ++ } ++ ++ if (aType == imgINotificationObserver::LOAD_COMPLETE) { ++ uint32_t status = imgIRequest::STATUS_ERROR; ++ if (NS_FAILED(mImageRequest->GetImageStatus(&status)) || ++ (status & imgIRequest::STATUS_ERROR)) { ++ mImageRequest->Cancel(NS_BINDING_ABORTED); ++ mImageRequest = nullptr; ++ return; ++ } ++ ++ nsCOMPtr image; ++ mImageRequest->GetImage(getter_AddRefs(image)); ++ MOZ_ASSERT(image); ++ ++ // Ask the image to decode at its intrinsic size. ++ int32_t width = 0, height = 0; ++ image->GetWidth(&width); ++ image->GetHeight(&height); ++ image->RequestDecodeForSize(nsIntSize(width, height), imgIContainer::FLAG_NONE); ++ return; ++ } ++ ++ if (aType == imgINotificationObserver::DECODE_COMPLETE) { ++ mImageRequest->Cancel(NS_BINDING_ABORTED); ++ mImageRequest = nullptr; ++ return; ++ } ++ ++ if (aType != imgINotificationObserver::FRAME_COMPLETE) { ++ return; ++ } ++ ++ nsCOMPtr img; ++ mImageRequest->GetImage(getter_AddRefs(img)); ++ if (!img) { ++ return; ++ } ++ ++ int32_t width, height; ++ img->GetWidth(&width); ++ img->GetHeight(&height); ++ ++ if (width <= 0 || height <= 0) { ++ mOwner->ClearIcon(); ++ return; ++ } ++ ++ if (width > 100 || height > 100) { ++ // The icon data needs to go across DBus. Make sure the icon ++ // data isn't too large, else our connection gets terminated and ++ // GDbus helpfully aborts the application. Thank you :) ++ NS_WARNING("Icon data too large"); ++ mOwner->ClearIcon(); ++ return; ++ } ++ ++ RefPtr pixbuf = nsImageToPixbuf::ImageToPixbuf(img); ++ if (pixbuf) { ++ dbusmenu_menuitem_property_set_image(mOwner->GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_ICON_DATA, ++ pixbuf); ++ } ++ ++ return; ++} ++ ++void ++nsMenuObjectIconLoader::LoadIcon(const ComputedStyle *aComputedStyle) ++{ ++ dom::Document *doc = mOwner->ContentNode()->OwnerDoc(); ++ ++ nsCOMPtr uri; ++ imgRequestProxy *imageRequest = nullptr; ++ ++ nsAutoString uriString; ++ if (mOwner->ContentNode()->AsElement()->GetAttr(kNameSpaceID_None, ++ nsGkAtoms::image, ++ uriString)) { ++ NS_NewURI(getter_AddRefs(uri), uriString); ++ } else { ++ PresShell *shell = doc->GetPresShell(); ++ if (!shell) { ++ return; ++ } ++ ++ nsPresContext *pc = shell->GetPresContext(); ++ if (!pc || !aComputedStyle) { ++ return; ++ } ++ ++ const nsStyleList *list = aComputedStyle->StyleList(); ++ imageRequest = list->mListStyleImage.GetImageRequest(); ++ if (imageRequest) { ++ imageRequest->GetURI(getter_AddRefs(uri)); ++ } ++ } ++ ++ if (!uri) { ++ mOwner->ClearIcon(); ++ mURI = nullptr; ++ ++ if (mImageRequest) { ++ mImageRequest->Cancel(NS_BINDING_ABORTED); ++ mImageRequest = nullptr; ++ } ++ ++ return; ++ } ++ ++ bool same; ++ if (mURI && NS_SUCCEEDED(mURI->Equals(uri, &same)) && same && ++ !imageRequest) { ++ return; ++ } ++ ++ if (mImageRequest) { ++ mImageRequest->Cancel(NS_BINDING_ABORTED); ++ mImageRequest = nullptr; ++ } ++ ++ mURI = uri; ++ ++ if (imageRequest) { ++ imageRequest->Clone(this, nullptr, getter_AddRefs(mImageRequest)); ++ } else { ++ nsCOMPtr loadGroup = doc->GetDocumentLoadGroup(); ++ RefPtr loader = ++ nsContentUtils::GetImgLoaderForDocument(doc); ++ if (!loader || !loadGroup) { ++ NS_WARNING("Failed to get loader or load group for image load"); ++ return; ++ } ++ ++ loader->LoadImage(uri, nullptr, nullptr, ++ nullptr, 0, loadGroup, this, nullptr, nullptr, ++ nsIRequest::LOAD_NORMAL, nullptr, ++ nsIContentPolicy::TYPE_IMAGE, EmptyString(), ++ false, false, 0, getter_AddRefs(mImageRequest)); ++ } ++} ++ ++void ++nsMenuObjectIconLoader::Destroy() ++{ ++ if (mImageRequest) { ++ mImageRequest->CancelAndForgetObserver(NS_BINDING_ABORTED); ++ mImageRequest = nullptr; ++ } ++ ++ mOwner = nullptr; ++} ++ ++static int ++CalculateTextWidth(const nsAString& aText) ++{ ++ if (!gPangoLayout) { ++ PangoFontMap *fontmap = pango_cairo_font_map_get_default(); ++ PangoContext *ctx = pango_font_map_create_context(fontmap); ++ gPangoLayout = pango_layout_new(ctx); ++ g_object_unref(ctx); ++ } ++ ++ pango_layout_set_text(gPangoLayout, NS_ConvertUTF16toUTF8(aText).get(), -1); ++ ++ int width, dummy; ++ pango_layout_get_size(gPangoLayout, &width, &dummy); ++ ++ return width; ++} ++ ++static const nsDependentString ++GetEllipsis() ++{ ++ static char16_t sBuf[4] = { 0, 0, 0, 0 }; ++ if (!sBuf[0]) { ++ nsString ellipsis; ++ Preferences::GetLocalizedString("intl.ellipsis", ellipsis); ++ if (!ellipsis.IsEmpty()) { ++ uint32_t l = ellipsis.Length(); ++ const nsString::char_type *c = ellipsis.BeginReading(); ++ uint32_t i = 0; ++ while (i < 3 && i < l) { ++ sBuf[i++] = *(c++); ++ } ++ } else { ++ sBuf[0] = '.'; ++ sBuf[1] = '.'; ++ sBuf[2] = '.'; ++ } ++ } ++ ++ return nsDependentString(sBuf); ++} ++ ++static int ++GetEllipsisWidth() ++{ ++ static int sEllipsisWidth = -1; ++ ++ if (sEllipsisWidth == -1) { ++ sEllipsisWidth = CalculateTextWidth(GetEllipsis()); ++ } ++ ++ return sEllipsisWidth; ++} ++ ++nsMenuObject::nsMenuObject(nsMenuContainer *aParent, nsIContent *aContent) : ++ mContent(aContent), ++ mListener(aParent->DocListener()), ++ mParent(aParent), ++ mNativeData(nullptr) ++{ ++ MOZ_ASSERT(mContent); ++ MOZ_ASSERT(mListener); ++ MOZ_ASSERT(mParent); ++} ++ ++nsMenuObject::nsMenuObject(nsNativeMenuDocListener *aListener, ++ nsIContent *aContent) : ++ mContent(aContent), ++ mListener(aListener), ++ mParent(nullptr), ++ mNativeData(nullptr) ++{ ++ MOZ_ASSERT(mContent); ++ MOZ_ASSERT(mListener); ++} ++ ++void ++nsMenuObject::UpdateLabel() ++{ ++ // Gecko stores the label and access key in separate attributes ++ // so we need to convert label="Foo_Bar"/accesskey="F" in to ++ // label="_Foo__Bar" for dbusmenu ++ ++ nsAutoString label; ++ mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::label, label); ++ ++ nsAutoString accesskey; ++ mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey, ++ accesskey); ++ ++ const nsAutoString::char_type *akey = accesskey.BeginReading(); ++ char16_t keyLower = ToLowerCase(*akey); ++ char16_t keyUpper = ToUpperCase(*akey); ++ ++ const nsAutoString::char_type *iter = label.BeginReading(); ++ const nsAutoString::char_type *end = label.EndReading(); ++ uint32_t length = label.Length(); ++ uint32_t pos = 0; ++ bool foundAccessKey = false; ++ ++ while (iter != end) { ++ if (*iter != char16_t('_')) { ++ if ((*iter != keyLower && *iter != keyUpper) || foundAccessKey) { ++ ++iter; ++ ++pos; ++ continue; ++ } ++ foundAccessKey = true; ++ } ++ ++ label.SetLength(++length); ++ ++ iter = label.BeginReading() + pos; ++ end = label.EndReading(); ++ nsAutoString::char_type *cur = label.BeginWriting() + pos; ++ ++ memmove(cur + 1, cur, (length - 1 - pos) * sizeof(nsAutoString::char_type)); ++ *cur = nsAutoString::char_type('_'); ++ ++ iter += 2; ++ pos += 2; ++ } ++ ++ if (CalculateTextWidth(label) <= MAX_WIDTH) { ++ dbusmenu_menuitem_property_set(mNativeData, ++ DBUSMENU_MENUITEM_PROP_LABEL, ++ NS_ConvertUTF16toUTF8(label).get()); ++ return; ++ } ++ ++ // This sucks. ++ // This should be done at the point where the menu is drawn (hello Unity), ++ // but unfortunately it doesn't do that and will happily fill your entire ++ // screen width with a menu if you have a bookmark with a really long title. ++ // This leaves us with no other option but to ellipsize here, with no proper ++ // knowledge of Unity's render path, font size etc. This is better than nothing ++ nsAutoString truncated; ++ int target = MAX_WIDTH - GetEllipsisWidth(); ++ length = label.Length(); ++ ++ static mozilla::dom::Element::AttrValuesArray strings[] = { ++ nsGkAtoms::left, nsGkAtoms::start, ++ nsGkAtoms::center, nsGkAtoms::right, ++ nsGkAtoms::end, nullptr ++ }; ++ ++ int32_t type = mContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, ++ nsGkAtoms::crop, ++ strings, eCaseMatters); ++ ++ switch (type) { ++ case 0: ++ case 1: ++ // FIXME: Implement left cropping ++ case 2: ++ // FIXME: Implement center cropping ++ case 3: ++ case 4: ++ default: ++ for (uint32_t i = 0; i < length; i++) { ++ truncated.Append(label.CharAt(i)); ++ if (CalculateTextWidth(truncated) > target) { ++ break; ++ } ++ } ++ ++ truncated.Append(GetEllipsis()); ++ } ++ ++ dbusmenu_menuitem_property_set(mNativeData, ++ DBUSMENU_MENUITEM_PROP_LABEL, ++ NS_ConvertUTF16toUTF8(truncated).get()); ++} ++ ++void ++nsMenuObject::UpdateVisibility(const ComputedStyle *aComputedStyle) ++{ ++ bool vis = true; ++ ++ if (aComputedStyle && ++ (aComputedStyle->StyleDisplay()->mDisplay == StyleDisplay::None || ++ aComputedStyle->StyleVisibility()->mVisible == ++ StyleVisibility::Collapse)) { ++ vis = false; ++ } ++ ++ dbusmenu_menuitem_property_set_bool(mNativeData, ++ DBUSMENU_MENUITEM_PROP_VISIBLE, ++ vis); ++} ++ ++void ++nsMenuObject::UpdateSensitivity() ++{ ++ bool disabled = mContent->AsElement()->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::disabled, ++ nsGkAtoms::_true, ++ eCaseMatters); ++ ++ dbusmenu_menuitem_property_set_bool(mNativeData, ++ DBUSMENU_MENUITEM_PROP_ENABLED, ++ !disabled); ++ ++} ++ ++void ++nsMenuObject::UpdateIcon(const ComputedStyle *aComputedStyle) ++{ ++ if (ShouldShowIcon()) { ++ if (!mIconLoader) { ++ mIconLoader = new nsMenuObjectIconLoader(this); ++ } ++ ++ mIconLoader->LoadIcon(aComputedStyle); ++ } else { ++ if (mIconLoader) { ++ mIconLoader->Destroy(); ++ mIconLoader = nullptr; ++ } ++ ++ ClearIcon(); ++ } ++} ++ ++already_AddRefed ++nsMenuObject::GetComputedStyle() ++{ ++ RefPtr style = ++ nsComputedDOMStyle::GetComputedStyleNoFlush( ++ mContent->AsElement()); ++ ++ return style.forget(); ++} ++ ++void ++nsMenuObject::InitializeNativeData() ++{ ++} ++ ++nsMenuObject::PropertyFlags ++nsMenuObject::SupportedProperties() const ++{ ++ return static_cast(0); ++} ++ ++bool ++nsMenuObject::IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const ++{ ++ return true; ++} ++ ++void ++nsMenuObject::UpdateContentAttributes() ++{ ++} ++ ++void ++nsMenuObject::Update(const ComputedStyle *aComputedStyle) ++{ ++} ++ ++bool ++nsMenuObject::ShouldShowIcon() const ++{ ++ // Ideally we want to know the visibility of the anonymous XUL image in ++ // our menuitem, but this isn't created because we don't have a frame. ++ // The following works by default (because xul.css hides images in menuitems ++ // that don't have the "menuitem-with-favicon" class). It's possible a third ++ // party theme could override this, but, oh well... ++ const nsAttrValue *classes = mContent->AsElement()->GetClasses(); ++ if (!classes) { ++ return false; ++ } ++ ++ for (uint32_t i = 0; i < classes->GetAtomCount(); ++i) { ++ if (classes->AtomAt(i) == nsGkAtoms::menuitem_with_favicon) { ++ return true; ++ } ++ } ++ ++ return false; ++} ++ ++void ++nsMenuObject::ClearIcon() ++{ ++ dbusmenu_menuitem_property_remove(mNativeData, ++ DBUSMENU_MENUITEM_PROP_ICON_DATA); ++} ++ ++nsMenuObject::~nsMenuObject() ++{ ++ nsWeakMenuObject::NotifyDestroyed(this); ++ ++ if (mIconLoader) { ++ mIconLoader->Destroy(); ++ } ++ ++ if (mListener) { ++ mListener->UnregisterForContentChanges(mContent); ++ } ++ ++ if (mNativeData) { ++ g_object_unref(mNativeData); ++ mNativeData = nullptr; ++ } ++} ++ ++void ++nsMenuObject::CreateNativeData() ++{ ++ MOZ_ASSERT(mNativeData == nullptr, "This node already has a DbusmenuMenuitem. The old one will be leaked"); ++ ++ mNativeData = dbusmenu_menuitem_new(); ++ InitializeNativeData(); ++ if (mParent && mParent->IsBeingDisplayed()) { ++ ContainerIsOpening(); ++ } ++ ++ mListener->RegisterForContentChanges(mContent, this); ++} ++ ++nsresult ++nsMenuObject::AdoptNativeData(DbusmenuMenuitem *aNativeData) ++{ ++ MOZ_ASSERT(mNativeData == nullptr, "This node already has a DbusmenuMenuitem. The old one will be leaked"); ++ ++ if (!IsCompatibleWithNativeData(aNativeData)) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ mNativeData = aNativeData; ++ g_object_ref(mNativeData); ++ ++ PropertyFlags supported = SupportedProperties(); ++ PropertyFlags mask = static_cast(1); ++ ++ for (uint32_t i = 0; gPropertyStrings[i]; ++i) { ++ if (!(mask & supported)) { ++ dbusmenu_menuitem_property_remove(mNativeData, gPropertyStrings[i]); ++ } ++ mask = static_cast(mask << 1); ++ } ++ ++ InitializeNativeData(); ++ if (mParent && mParent->IsBeingDisplayed()) { ++ ContainerIsOpening(); ++ } ++ ++ mListener->RegisterForContentChanges(mContent, this); ++ ++ return NS_OK; ++} ++ ++void ++nsMenuObject::ContainerIsOpening() ++{ ++ MOZ_ASSERT(nsContentUtils::IsSafeToRunScript()); ++ ++ UpdateContentAttributes(); ++ ++ RefPtr style = GetComputedStyle(); ++ Update(style); ++} ++ ++/* static */ void ++nsWeakMenuObject::AddWeakReference(nsWeakMenuObject *aWeak) ++{ ++ aWeak->mPrev = sHead; ++ sHead = aWeak; ++} ++ ++/* static */ void ++nsWeakMenuObject::RemoveWeakReference(nsWeakMenuObject *aWeak) ++{ ++ if (aWeak == sHead) { ++ sHead = aWeak->mPrev; ++ return; ++ } ++ ++ nsWeakMenuObject *weak = sHead; ++ while (weak && weak->mPrev != aWeak) { ++ weak = weak->mPrev; ++ } ++ ++ if (weak) { ++ weak->mPrev = aWeak->mPrev; ++ } ++} ++ ++/* static */ void ++nsWeakMenuObject::NotifyDestroyed(nsMenuObject *aMenuObject) ++{ ++ nsWeakMenuObject *weak = sHead; ++ while (weak) { ++ if (weak->mMenuObject == aMenuObject) { ++ weak->mMenuObject = nullptr; ++ } ++ ++ weak = weak->mPrev; ++ } ++} +--- /dev/null ++++ b/widget/gtk/nsMenuObject.h +@@ -0,0 +1,169 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsMenuObject_h__ ++#define __nsMenuObject_h__ ++ ++#include "mozilla/Attributes.h" ++#include "mozilla/ComputedStyleInlines.h" ++#include "nsCOMPtr.h" ++ ++#include "nsDbusmenu.h" ++#include "nsNativeMenuDocListener.h" ++ ++class nsIContent; ++class nsMenuContainer; ++class nsMenuObjectIconLoader; ++ ++#define DBUSMENU_PROPERTIES \ ++ DBUSMENU_PROPERTY(Label, DBUSMENU_MENUITEM_PROP_LABEL, 0) \ ++ DBUSMENU_PROPERTY(Enabled, DBUSMENU_MENUITEM_PROP_ENABLED, 1) \ ++ DBUSMENU_PROPERTY(Visible, DBUSMENU_MENUITEM_PROP_VISIBLE, 2) \ ++ DBUSMENU_PROPERTY(IconData, DBUSMENU_MENUITEM_PROP_ICON_DATA, 3) \ ++ DBUSMENU_PROPERTY(Type, DBUSMENU_MENUITEM_PROP_TYPE, 4) \ ++ DBUSMENU_PROPERTY(Shortcut, DBUSMENU_MENUITEM_PROP_SHORTCUT, 5) \ ++ DBUSMENU_PROPERTY(ToggleType, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE, 6) \ ++ DBUSMENU_PROPERTY(ToggleState, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, 7) \ ++ DBUSMENU_PROPERTY(ChildDisplay, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY, 8) ++ ++/* ++ * This is the base class for all menu nodes. Each instance represents ++ * a single node in the menu hierarchy. It wraps the corresponding DOM node and ++ * native menu node, keeps them in sync and transfers events between the two. ++ * It is not reference counted - each node is owned by its parent (the top ++ * level menubar is owned by the window) and keeps a weak pointer to its ++ * parent (which is guaranteed to always be valid because a node will never ++ * outlive its parent). It is not safe to keep a reference to nsMenuObject ++ * externally. ++ */ ++class nsMenuObject : public nsNativeMenuChangeObserver ++{ ++public: ++ enum EType { ++ eType_MenuBar, ++ eType_Menu, ++ eType_MenuItem ++ }; ++ ++ virtual ~nsMenuObject(); ++ ++ // Get the native menu item node ++ DbusmenuMenuitem* GetNativeData() const { return mNativeData; } ++ ++ // Get the parent menu object ++ nsMenuContainer* Parent() const { return mParent; } ++ ++ // Get the content node ++ nsIContent* ContentNode() const { return mContent; } ++ ++ // Get the type of this node. Must be provided by subclasses ++ virtual EType Type() const = 0; ++ ++ // Get the document listener ++ nsNativeMenuDocListener* DocListener() const { return mListener; } ++ ++ // Create the native menu item node (called by containers) ++ void CreateNativeData(); ++ ++ // Adopt the specified native menu item node (called by containers) ++ nsresult AdoptNativeData(DbusmenuMenuitem *aNativeData); ++ ++ // Called by the container to tell us that it's opening ++ void ContainerIsOpening(); ++ ++protected: ++ nsMenuObject(nsMenuContainer *aParent, nsIContent *aContent); ++ nsMenuObject(nsNativeMenuDocListener *aListener, nsIContent *aContent); ++ ++ enum PropertyFlags { ++#define DBUSMENU_PROPERTY(e, s, b) eProp##e = (1 << b), ++ DBUSMENU_PROPERTIES ++#undef DBUSMENU_PROPERTY ++ }; ++ ++ void UpdateLabel(); ++ void UpdateVisibility(const mozilla::ComputedStyle *aComputedStyle); ++ void UpdateSensitivity(); ++ void UpdateIcon(const mozilla::ComputedStyle *aComputedStyle); ++ ++ already_AddRefed GetComputedStyle(); ++ ++private: ++ friend class nsMenuObjectIconLoader; ++ ++ // Set up initial properties on the native data, connect to signals etc. ++ // This should be implemented by subclasses ++ virtual void InitializeNativeData(); ++ ++ // Return the properties that this menu object type supports ++ // This should be implemented by subclasses ++ virtual PropertyFlags SupportedProperties() const; ++ ++ // Determine whether this menu object could use the specified ++ // native item. Returns true by default but can be overridden by subclasses ++ virtual bool ++ IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const; ++ ++ // Update attributes on this objects content node when the container opens. ++ // This is called before style resolution, and should be implemented by ++ // subclasses who want to modify attributes that might affect style. ++ // This will not be called when there are script blockers ++ virtual void UpdateContentAttributes(); ++ ++ // Update properties that should be refreshed when the container opens. ++ // This should be implemented by subclasses that have properties which ++ // need refreshing ++ virtual void Update(const mozilla::ComputedStyle *aComputedStyle); ++ ++ bool ShouldShowIcon() const; ++ void ClearIcon(); ++ ++ nsCOMPtr mContent; ++ // mListener is a strong ref for simplicity - someone in the tree needs to ++ // own it, and this only really needs to be the top-level object (as no ++ // children outlives their parent). However, we need to keep it alive until ++ // after running the nsMenuObject destructor for the top-level menu object, ++ // hence the strong ref ++ RefPtr mListener; ++ nsMenuContainer *mParent; // [weak] ++ DbusmenuMenuitem *mNativeData; // [strong] ++ RefPtr mIconLoader; ++}; ++ ++// Keep a weak pointer to a menu object ++class nsWeakMenuObject ++{ ++public: ++ nsWeakMenuObject() : mPrev(nullptr), mMenuObject(nullptr) {} ++ ++ nsWeakMenuObject(nsMenuObject *aMenuObject) : ++ mPrev(nullptr), mMenuObject(aMenuObject) ++ { ++ AddWeakReference(this); ++ } ++ ++ ~nsWeakMenuObject() { RemoveWeakReference(this); } ++ ++ nsMenuObject* get() const { return mMenuObject; } ++ ++ nsMenuObject* operator->() const { return mMenuObject; } ++ ++ explicit operator bool() const { return !!mMenuObject; } ++ ++ static void NotifyDestroyed(nsMenuObject *aMenuObject); ++ ++private: ++ static void AddWeakReference(nsWeakMenuObject *aWeak); ++ static void RemoveWeakReference(nsWeakMenuObject *aWeak); ++ ++ nsWeakMenuObject *mPrev; ++ static nsWeakMenuObject *sHead; ++ ++ nsMenuObject *mMenuObject; ++}; ++ ++#endif /* __nsMenuObject_h__ */ +--- /dev/null ++++ b/widget/gtk/nsMenuSeparator.cpp +@@ -0,0 +1,82 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "mozilla/Assertions.h" ++#include "nsCRT.h" ++#include "nsGkAtoms.h" ++ ++#include "nsDbusmenu.h" ++ ++#include "nsMenuContainer.h" ++#include "nsMenuSeparator.h" ++ ++using namespace mozilla; ++ ++void ++nsMenuSeparator::InitializeNativeData() ++{ ++ dbusmenu_menuitem_property_set(GetNativeData(), ++ DBUSMENU_MENUITEM_PROP_TYPE, ++ "separator"); ++} ++ ++void ++nsMenuSeparator::Update(const ComputedStyle *aComputedStyle) ++{ ++ UpdateVisibility(aComputedStyle); ++} ++ ++bool ++nsMenuSeparator::IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const ++{ ++ return nsCRT::strcmp(dbusmenu_menuitem_property_get(aNativeData, ++ DBUSMENU_MENUITEM_PROP_TYPE), ++ "separator") == 0; ++} ++ ++nsMenuObject::PropertyFlags ++nsMenuSeparator::SupportedProperties() const ++{ ++ return static_cast( ++ nsMenuObject::ePropVisible | ++ nsMenuObject::ePropType ++ ); ++} ++ ++void ++nsMenuSeparator::OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) ++{ ++ MOZ_ASSERT(aContent == ContentNode(), "Received an event that wasn't meant for us!"); ++ ++ if (!Parent()->IsBeingDisplayed()) { ++ return; ++ } ++ ++ if (aAttribute == nsGkAtoms::hidden || ++ aAttribute == nsGkAtoms::collapsed) { ++ RefPtr style = GetComputedStyle(); ++ UpdateVisibility(style); ++ } ++} ++ ++nsMenuSeparator::nsMenuSeparator(nsMenuContainer *aParent, ++ nsIContent *aContent) : ++ nsMenuObject(aParent, aContent) ++{ ++ MOZ_COUNT_CTOR(nsMenuSeparator); ++} ++ ++nsMenuSeparator::~nsMenuSeparator() ++{ ++ MOZ_COUNT_DTOR(nsMenuSeparator); ++} ++ ++nsMenuObject::EType ++nsMenuSeparator::Type() const ++{ ++ return eType_MenuItem; ++} +--- /dev/null ++++ b/widget/gtk/nsMenuSeparator.h +@@ -0,0 +1,37 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsMenuSeparator_h__ ++#define __nsMenuSeparator_h__ ++ ++#include "mozilla/Attributes.h" ++ ++#include "nsMenuObject.h" ++ ++class nsIContent; ++class nsAtom; ++class nsMenuContainer; ++ ++// Menu separator class ++class nsMenuSeparator final : public nsMenuObject ++{ ++public: ++ nsMenuSeparator(nsMenuContainer *aParent, nsIContent *aContent); ++ ~nsMenuSeparator(); ++ ++ nsMenuObject::EType Type() const override; ++ ++private: ++ void InitializeNativeData() override; ++ void Update(const mozilla::ComputedStyle *aComputedStyle) override; ++ bool IsCompatibleWithNativeData(DbusmenuMenuitem *aNativeData) const override; ++ nsMenuObject::PropertyFlags SupportedProperties() const override; ++ ++ void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) override; ++}; ++ ++#endif /* __nsMenuSeparator_h__ */ +--- /dev/null ++++ b/widget/gtk/nsNativeMenuDocListener.cpp +@@ -0,0 +1,347 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "mozilla/Assertions.h" ++#include "mozilla/DebugOnly.h" ++#include "mozilla/dom/Document.h" ++#include "mozilla/dom/Element.h" ++#include "nsContentUtils.h" ++#include "nsAtom.h" ++#include "nsIContent.h" ++ ++#include "nsMenuContainer.h" ++ ++#include "nsNativeMenuDocListener.h" ++ ++using namespace mozilla; ++ ++uint32_t nsNativeMenuDocListener::sUpdateBlockersCount = 0; ++ ++nsNativeMenuDocListenerTArray *gPendingListeners; ++ ++/* ++ * Small helper which caches a single listener, so that consecutive ++ * events which go to the same node avoid multiple hash table lookups ++ */ ++class MOZ_STACK_CLASS DispatchHelper ++{ ++public: ++ DispatchHelper(nsNativeMenuDocListener *aListener, ++ nsIContent *aContent) : ++ mObserver(nullptr) ++ { ++ if (aContent == aListener->mLastSource) { ++ mObserver = aListener->mLastTarget; ++ } else { ++ mObserver = aListener->mContentToObserverTable.Get(aContent); ++ if (mObserver) { ++ aListener->mLastSource = aContent; ++ aListener->mLastTarget = mObserver; ++ } ++ } ++ } ++ ++ ~DispatchHelper() { }; ++ ++ nsNativeMenuChangeObserver* Observer() const { return mObserver; } ++ ++ bool HasObserver() const { return !!mObserver; } ++ ++private: ++ nsNativeMenuChangeObserver *mObserver; ++}; ++ ++NS_IMPL_ISUPPORTS(nsNativeMenuDocListener, nsIMutationObserver) ++ ++nsNativeMenuDocListener::~nsNativeMenuDocListener() ++{ ++ MOZ_ASSERT(mContentToObserverTable.Count() == 0, ++ "Some nodes forgot to unregister listeners. This is bad! (and we're lucky we made it this far)"); ++ MOZ_COUNT_DTOR(nsNativeMenuDocListener); ++} ++ ++void ++nsNativeMenuDocListener::AttributeChanged(mozilla::dom::Element *aElement, ++ int32_t aNameSpaceID, ++ nsAtom *aAttribute, ++ int32_t aModType, ++ const nsAttrValue* aOldValue) ++{ ++ if (sUpdateBlockersCount == 0) { ++ DoAttributeChanged(aElement, aAttribute); ++ return; ++ } ++ ++ MutationRecord *m = mPendingMutations.AppendElement(MakeUnique())->get(); ++ m->mType = MutationRecord::eAttributeChanged; ++ m->mTarget = aElement; ++ m->mAttribute = aAttribute; ++ ++ ScheduleFlush(this); ++} ++ ++void ++nsNativeMenuDocListener::ContentAppended(nsIContent *aFirstNewContent) ++{ ++ for (nsIContent *c = aFirstNewContent; c; c = c->GetNextSibling()) { ++ ContentInserted(c); ++ } ++} ++ ++void ++nsNativeMenuDocListener::ContentInserted(nsIContent *aChild) ++{ ++ nsIContent* container = aChild->GetParent(); ++ if (!container) { ++ return; ++ } ++ ++ nsIContent *prevSibling = nsMenuContainer::GetPreviousSupportedSibling(aChild); ++ ++ if (sUpdateBlockersCount == 0) { ++ DoContentInserted(container, aChild, prevSibling); ++ return; ++ } ++ ++ MutationRecord *m = mPendingMutations.AppendElement(MakeUnique())->get(); ++ m->mType = MutationRecord::eContentInserted; ++ m->mTarget = container; ++ m->mChild = aChild; ++ m->mPrevSibling = prevSibling; ++ ++ ScheduleFlush(this); ++} ++ ++void ++nsNativeMenuDocListener::ContentRemoved(nsIContent *aChild, ++ nsIContent *aPreviousSibling) ++{ ++ nsIContent* container = aChild->GetParent(); ++ if (!container) { ++ return; ++ } ++ ++ if (sUpdateBlockersCount == 0) { ++ DoContentRemoved(container, aChild); ++ return; ++ } ++ ++ MutationRecord *m = mPendingMutations.AppendElement(MakeUnique())->get(); ++ m->mType = MutationRecord::eContentRemoved; ++ m->mTarget = container; ++ m->mChild = aChild; ++ ++ ScheduleFlush(this); ++} ++ ++void ++nsNativeMenuDocListener::NodeWillBeDestroyed(nsINode *aNode) ++{ ++ mDocument = nullptr; ++} ++ ++void ++nsNativeMenuDocListener::DoAttributeChanged(nsIContent *aContent, ++ nsAtom *aAttribute) ++{ ++ DispatchHelper h(this, aContent); ++ if (h.HasObserver()) { ++ h.Observer()->OnAttributeChanged(aContent, aAttribute); ++ } ++} ++ ++void ++nsNativeMenuDocListener::DoContentInserted(nsIContent *aContainer, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling) ++{ ++ DispatchHelper h(this, aContainer); ++ if (h.HasObserver()) { ++ h.Observer()->OnContentInserted(aContainer, aChild, aPrevSibling); ++ } ++} ++ ++void ++nsNativeMenuDocListener::DoContentRemoved(nsIContent *aContainer, ++ nsIContent *aChild) ++{ ++ DispatchHelper h(this, aContainer); ++ if (h.HasObserver()) { ++ h.Observer()->OnContentRemoved(aContainer, aChild); ++ } ++} ++ ++void ++nsNativeMenuDocListener::DoBeginUpdates(nsIContent *aTarget) ++{ ++ DispatchHelper h(this, aTarget); ++ if (h.HasObserver()) { ++ h.Observer()->OnBeginUpdates(aTarget); ++ } ++} ++ ++void ++nsNativeMenuDocListener::DoEndUpdates(nsIContent *aTarget) ++{ ++ DispatchHelper h(this, aTarget); ++ if (h.HasObserver()) { ++ h.Observer()->OnEndUpdates(); ++ } ++} ++ ++void ++nsNativeMenuDocListener::FlushPendingMutations() ++{ ++ nsIContent *currentTarget = nullptr; ++ bool inUpdateSequence = false; ++ ++ while (mPendingMutations.Length() > 0) { ++ MutationRecord *m = mPendingMutations[0].get(); ++ ++ if (m->mTarget != currentTarget) { ++ if (inUpdateSequence) { ++ DoEndUpdates(currentTarget); ++ inUpdateSequence = false; ++ } ++ ++ currentTarget = m->mTarget; ++ ++ if (mPendingMutations.Length() > 1 && ++ mPendingMutations[1]->mTarget == currentTarget) { ++ DoBeginUpdates(currentTarget); ++ inUpdateSequence = true; ++ } ++ } ++ ++ switch (m->mType) { ++ case MutationRecord::eAttributeChanged: ++ DoAttributeChanged(m->mTarget, m->mAttribute); ++ break; ++ case MutationRecord::eContentInserted: ++ DoContentInserted(m->mTarget, m->mChild, m->mPrevSibling); ++ break; ++ case MutationRecord::eContentRemoved: ++ DoContentRemoved(m->mTarget, m->mChild); ++ break; ++ default: ++ MOZ_ASSERT_UNREACHABLE("Invalid type"); ++ } ++ ++ mPendingMutations.RemoveElementAt(0); ++ } ++ ++ if (inUpdateSequence) { ++ DoEndUpdates(currentTarget); ++ } ++} ++ ++/* static */ void ++nsNativeMenuDocListener::ScheduleFlush(nsNativeMenuDocListener *aListener) ++{ ++ MOZ_ASSERT(sUpdateBlockersCount > 0, "Shouldn't be doing this now"); ++ ++ if (!gPendingListeners) { ++ gPendingListeners = new nsNativeMenuDocListenerTArray; ++ } ++ ++ if (gPendingListeners->IndexOf(aListener) == ++ nsNativeMenuDocListenerTArray::NoIndex) { ++ gPendingListeners->AppendElement(aListener); ++ } ++} ++ ++/* static */ void ++nsNativeMenuDocListener::CancelFlush(nsNativeMenuDocListener *aListener) ++{ ++ if (!gPendingListeners) { ++ return; ++ } ++ ++ gPendingListeners->RemoveElement(aListener); ++} ++ ++/* static */ void ++nsNativeMenuDocListener::RemoveUpdateBlocker() ++{ ++ if (sUpdateBlockersCount == 1 && gPendingListeners) { ++ while (gPendingListeners->Length() > 0) { ++ (*gPendingListeners)[0]->FlushPendingMutations(); ++ gPendingListeners->RemoveElementAt(0); ++ } ++ } ++ ++ MOZ_ASSERT(sUpdateBlockersCount > 0, "Negative update blockers count!"); ++ sUpdateBlockersCount--; ++} ++ ++nsNativeMenuDocListener::nsNativeMenuDocListener(nsIContent *aRootNode) : ++ mRootNode(aRootNode), ++ mDocument(nullptr), ++ mLastSource(nullptr), ++ mLastTarget(nullptr) ++{ ++ MOZ_COUNT_CTOR(nsNativeMenuDocListener); ++} ++ ++void ++nsNativeMenuDocListener::RegisterForContentChanges(nsIContent *aContent, ++ nsNativeMenuChangeObserver *aObserver) ++{ ++ MOZ_ASSERT(aContent, "Need content parameter"); ++ MOZ_ASSERT(aObserver, "Need observer parameter"); ++ if (!aContent || !aObserver) { ++ return; ++ } ++ ++ DebugOnly old; ++ MOZ_ASSERT(!mContentToObserverTable.Get(aContent, &old) || old == aObserver, ++ "Multiple observers for the same content node are not supported"); ++ ++ mContentToObserverTable.InsertOrUpdate(aContent, aObserver); ++} ++ ++void ++nsNativeMenuDocListener::UnregisterForContentChanges(nsIContent *aContent) ++{ ++ MOZ_ASSERT(aContent, "Need content parameter"); ++ if (!aContent) { ++ return; ++ } ++ ++ mContentToObserverTable.Remove(aContent); ++ if (aContent == mLastSource) { ++ mLastSource = nullptr; ++ mLastTarget = nullptr; ++ } ++} ++ ++void ++nsNativeMenuDocListener::Start() ++{ ++ if (mDocument) { ++ return; ++ } ++ ++ mDocument = mRootNode->OwnerDoc(); ++ if (!mDocument) { ++ return; ++ } ++ ++ mDocument->AddMutationObserver(this); ++} ++ ++void ++nsNativeMenuDocListener::Stop() ++{ ++ if (mDocument) { ++ mDocument->RemoveMutationObserver(this); ++ mDocument = nullptr; ++ } ++ ++ CancelFlush(this); ++ mPendingMutations.Clear(); ++} +--- /dev/null ++++ b/widget/gtk/nsNativeMenuDocListener.h +@@ -0,0 +1,152 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsNativeMenuDocListener_h__ ++#define __nsNativeMenuDocListener_h__ ++ ++#include "mozilla/Attributes.h" ++#include "mozilla/RefPtr.h" ++#include "mozilla/UniquePtr.h" ++#include "nsTHashMap.h" ++#include "nsStubMutationObserver.h" ++#include "nsTArray.h" ++ ++class nsAtom; ++class nsIContent; ++class nsNativeMenuChangeObserver; ++ ++namespace mozilla { ++namespace dom { ++class Document; ++} ++} ++ ++/* ++ * This class keeps a mapping of content nodes to observers and forwards DOM ++ * mutations to these. There is exactly one of these for every menubar. ++ */ ++class nsNativeMenuDocListener final : nsStubMutationObserver ++{ ++public: ++ NS_DECL_ISUPPORTS ++ ++ nsNativeMenuDocListener(nsIContent *aRootNode); ++ ++ // Register an observer to receive mutation events for the specified ++ // content node. The caller must keep the observer alive until ++ // UnregisterForContentChanges is called. ++ void RegisterForContentChanges(nsIContent *aContent, ++ nsNativeMenuChangeObserver *aObserver); ++ ++ // Unregister the registered observer for the specified content node ++ void UnregisterForContentChanges(nsIContent *aContent); ++ ++ // Start listening to the document and forwarding DOM mutations to ++ // registered observers. ++ void Start(); ++ ++ // Stop listening to the document. No DOM mutations will be forwarded ++ // to registered observers. ++ void Stop(); ++ ++ /* ++ * This class is intended to be used inside GObject signal handlers. ++ * It allows us to queue updates until we have finished delivering ++ * events to Gecko, and then we can batch updates to our view of the ++ * menu. This allows us to do menu updates without altering the structure ++ * seen by the OS. ++ */ ++ class MOZ_STACK_CLASS BlockUpdatesScope ++ { ++ public: ++ BlockUpdatesScope() ++ { ++ nsNativeMenuDocListener::AddUpdateBlocker(); ++ } ++ ++ ~BlockUpdatesScope() ++ { ++ nsNativeMenuDocListener::RemoveUpdateBlocker(); ++ } ++ }; ++ ++private: ++ friend class DispatchHelper; ++ ++ struct MutationRecord { ++ enum RecordType { ++ eAttributeChanged, ++ eContentInserted, ++ eContentRemoved ++ } mType; ++ ++ nsCOMPtr mTarget; ++ nsCOMPtr mChild; ++ nsCOMPtr mPrevSibling; ++ RefPtr mAttribute; ++ }; ++ ++ ~nsNativeMenuDocListener(); ++ ++ NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED ++ NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED ++ NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED ++ NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED ++ NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED ++ ++ void DoAttributeChanged(nsIContent *aContent, nsAtom *aAttribute); ++ void DoContentInserted(nsIContent *aContainer, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling); ++ void DoContentRemoved(nsIContent *aContainer, nsIContent *aChild); ++ void DoBeginUpdates(nsIContent *aTarget); ++ void DoEndUpdates(nsIContent *aTarget); ++ ++ void FlushPendingMutations(); ++ static void ScheduleFlush(nsNativeMenuDocListener *aListener); ++ static void CancelFlush(nsNativeMenuDocListener *aListener); ++ ++ static void AddUpdateBlocker() { ++sUpdateBlockersCount; } ++ static void RemoveUpdateBlocker(); ++ ++ nsCOMPtr mRootNode; ++ mozilla::dom::Document *mDocument; ++ nsIContent *mLastSource; ++ nsNativeMenuChangeObserver *mLastTarget; ++ nsTArray > mPendingMutations; ++ nsTHashMap, nsNativeMenuChangeObserver *> mContentToObserverTable; ++ ++ static uint32_t sUpdateBlockersCount; ++}; ++ ++typedef nsTArray > nsNativeMenuDocListenerTArray; ++ ++/* ++ * Implemented by classes that want to listen to mutation events from content ++ * nodes. ++ */ ++class nsNativeMenuChangeObserver ++{ ++public: ++ virtual void OnAttributeChanged(nsIContent *aContent, nsAtom *aAttribute) {} ++ ++ virtual void OnContentInserted(nsIContent *aContainer, ++ nsIContent *aChild, ++ nsIContent *aPrevSibling) {} ++ ++ virtual void OnContentRemoved(nsIContent *aContainer, nsIContent *aChild) {} ++ ++ // Signals the start of a sequence of more than 1 event for the specified ++ // node. This only happens when events are flushed as all BlockUpdatesScope ++ // instances go out of scope ++ virtual void OnBeginUpdates(nsIContent *aContent) {}; ++ ++ // Signals the end of a sequence of events ++ virtual void OnEndUpdates() {}; ++}; ++ ++#endif /* __nsNativeMenuDocListener_h__ */ +--- /dev/null ++++ b/widget/gtk/nsNativeMenuService.cpp +@@ -0,0 +1,478 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#include "mozilla/dom/Element.h" ++#include "mozilla/Assertions.h" ++#include "mozilla/Preferences.h" ++#include "mozilla/UniquePtr.h" ++#include "nsCOMPtr.h" ++#include "nsCRT.h" ++#include "nsGtkUtils.h" ++#include "nsIContent.h" ++#include "nsIWidget.h" ++#include "nsServiceManagerUtils.h" ++#include "nsWindow.h" ++#include "prlink.h" ++ ++#include "nsDbusmenu.h" ++#include "nsMenuBar.h" ++#include "nsNativeMenuDocListener.h" ++ ++#include ++#include ++#include ++ ++#include "nsNativeMenuService.h" ++ ++using namespace mozilla; ++ ++nsNativeMenuService* nsNativeMenuService::sService = nullptr; ++ ++extern PangoLayout* gPangoLayout; ++extern nsNativeMenuDocListenerTArray* gPendingListeners; ++ ++#undef g_dbus_proxy_new_for_bus ++#undef g_dbus_proxy_new_for_bus_finish ++#undef g_dbus_proxy_call ++#undef g_dbus_proxy_call_finish ++#undef g_dbus_proxy_get_name_owner ++ ++typedef void (*_g_dbus_proxy_new_for_bus_fn)(GBusType, GDBusProxyFlags, ++ GDBusInterfaceInfo*, ++ const gchar*, const gchar*, ++ const gchar*, GCancellable*, ++ GAsyncReadyCallback, gpointer); ++ ++typedef GDBusProxy* (*_g_dbus_proxy_new_for_bus_finish_fn)(GAsyncResult*, ++ GError**); ++typedef void (*_g_dbus_proxy_call_fn)(GDBusProxy*, const gchar*, GVariant*, ++ GDBusCallFlags, gint, GCancellable*, ++ GAsyncReadyCallback, gpointer); ++typedef GVariant* (*_g_dbus_proxy_call_finish_fn)(GDBusProxy*, GAsyncResult*, ++ GError**); ++typedef gchar* (*_g_dbus_proxy_get_name_owner_fn)(GDBusProxy*); ++ ++static _g_dbus_proxy_new_for_bus_fn _g_dbus_proxy_new_for_bus; ++static _g_dbus_proxy_new_for_bus_finish_fn _g_dbus_proxy_new_for_bus_finish; ++static _g_dbus_proxy_call_fn _g_dbus_proxy_call; ++static _g_dbus_proxy_call_finish_fn _g_dbus_proxy_call_finish; ++static _g_dbus_proxy_get_name_owner_fn _g_dbus_proxy_get_name_owner; ++ ++#define g_dbus_proxy_new_for_bus _g_dbus_proxy_new_for_bus ++#define g_dbus_proxy_new_for_bus_finish _g_dbus_proxy_new_for_bus_finish ++#define g_dbus_proxy_call _g_dbus_proxy_call ++#define g_dbus_proxy_call_finish _g_dbus_proxy_call_finish ++#define g_dbus_proxy_get_name_owner _g_dbus_proxy_get_name_owner ++ ++static PRLibrary *gGIOLib = nullptr; ++ ++static nsresult ++GDBusInit() ++{ ++ gGIOLib = PR_LoadLibrary("libgio-2.0.so.0"); ++ if (!gGIOLib) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ g_dbus_proxy_new_for_bus = (_g_dbus_proxy_new_for_bus_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_new_for_bus"); ++ g_dbus_proxy_new_for_bus_finish = (_g_dbus_proxy_new_for_bus_finish_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_new_for_bus_finish"); ++ g_dbus_proxy_call = (_g_dbus_proxy_call_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_call"); ++ g_dbus_proxy_call_finish = (_g_dbus_proxy_call_finish_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_call_finish"); ++ g_dbus_proxy_get_name_owner = (_g_dbus_proxy_get_name_owner_fn)PR_FindFunctionSymbol(gGIOLib, "g_dbus_proxy_get_name_owner"); ++ ++ if (!g_dbus_proxy_new_for_bus || ++ !g_dbus_proxy_new_for_bus_finish || ++ !g_dbus_proxy_call || ++ !g_dbus_proxy_call_finish || ++ !g_dbus_proxy_get_name_owner) { ++ return NS_ERROR_FAILURE; ++ } ++ ++ return NS_OK; ++} ++ ++NS_IMPL_ISUPPORTS(nsNativeMenuService, nsINativeMenuService) ++ ++nsNativeMenuService::nsNativeMenuService() : ++ mCreateProxyCancellable(nullptr), mDbusProxy(nullptr), mOnline(false) ++{ ++} ++ ++nsNativeMenuService::~nsNativeMenuService() ++{ ++ SetOnline(false); ++ ++ if (mCreateProxyCancellable) { ++ g_cancellable_cancel(mCreateProxyCancellable); ++ g_object_unref(mCreateProxyCancellable); ++ mCreateProxyCancellable = nullptr; ++ } ++ ++ // Make sure we disconnect map-event handlers ++ while (mMenuBars.Length() > 0) { ++ NotifyNativeMenuBarDestroyed(mMenuBars[0]); ++ } ++ ++ Preferences::UnregisterCallback(PrefChangedCallback, ++ "ui.use_unity_menubar"); ++ ++ if (mDbusProxy) { ++ g_signal_handlers_disconnect_by_func(mDbusProxy, ++ FuncToGpointer(name_owner_changed_cb), ++ NULL); ++ g_object_unref(mDbusProxy); ++ } ++ ++ if (gPendingListeners) { ++ delete gPendingListeners; ++ gPendingListeners = nullptr; ++ } ++ if (gPangoLayout) { ++ g_object_unref(gPangoLayout); ++ gPangoLayout = nullptr; ++ } ++ ++ MOZ_ASSERT(sService == this); ++ sService = nullptr; ++} ++ ++nsresult ++nsNativeMenuService::Init() ++{ ++ nsresult rv = nsDbusmenuFunctions::Init(); ++ if (NS_FAILED(rv)) { ++ return rv; ++ } ++ ++ rv = GDBusInit(); ++ if (NS_FAILED(rv)) { ++ return rv; ++ } ++ ++ Preferences::RegisterCallback(PrefChangedCallback, ++ "ui.use_unity_menubar"); ++ ++ mCreateProxyCancellable = g_cancellable_new(); ++ ++ g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, ++ static_cast( ++ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | ++ G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | ++ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START), ++ nullptr, ++ "com.canonical.AppMenu.Registrar", ++ "/com/canonical/AppMenu/Registrar", ++ "com.canonical.AppMenu.Registrar", ++ mCreateProxyCancellable, proxy_created_cb, ++ nullptr); ++ ++ /* We don't technically know that the shell will draw the menubar until ++ * we know whether anybody owns the name of the menubar service on the ++ * session bus. However, discovering this happens asynchronously so ++ * we optimize for the common case here by assuming that the shell will ++ * draw window menubars if we are running inside Unity. This should ++ * mean that we avoid temporarily displaying the window menubar ourselves ++ */ ++ const char *desktop = getenv("XDG_CURRENT_DESKTOP"); ++ if (nsCRT::strcmp(desktop, "Unity") == 0) { ++ SetOnline(true); ++ } ++ ++ return NS_OK; ++} ++ ++/* static */ void ++nsNativeMenuService::EnsureInitialized() ++{ ++ if (sService) { ++ return; ++ } ++ nsCOMPtr service = ++ do_GetService("@mozilla.org/widget/nativemenuservice;1"); ++} ++ ++void ++nsNativeMenuService::SetOnline(bool aOnline) ++{ ++ if (!Preferences::GetBool("ui.use_unity_menubar", true)) { ++ aOnline = false; ++ } ++ ++ mOnline = aOnline; ++ if (aOnline) { ++ for (uint32_t i = 0; i < mMenuBars.Length(); ++i) { ++ RegisterNativeMenuBar(mMenuBars[i]); ++ } ++ } else { ++ for (uint32_t i = 0; i < mMenuBars.Length(); ++i) { ++ mMenuBars[i]->Deactivate(); ++ } ++ } ++} ++ ++void ++nsNativeMenuService::RegisterNativeMenuBar(nsMenuBar *aMenuBar) ++{ ++ if (!mOnline) { ++ return; ++ } ++ ++ // This will effectively create the native menubar for ++ // exporting over the session bus, and hide the XUL menubar ++ aMenuBar->Activate(); ++ ++ if (!mDbusProxy || ++ !gtk_widget_get_mapped(aMenuBar->TopLevelWindow()) || ++ mMenuBarRegistrationCancellables.Get(aMenuBar, nullptr)) { ++ // Don't go further if we don't have a proxy for the shell menu ++ // service, the window isn't mapped or there is a request in progress. ++ return; ++ } ++ ++ uint32_t xid = aMenuBar->WindowId(); ++ nsCString path = aMenuBar->ObjectPath(); ++ if (xid == 0 || path.IsEmpty()) { ++ NS_WARNING("Menubar has invalid XID or object path"); ++ return; ++ } ++ ++ GCancellable *cancellable = g_cancellable_new(); ++ mMenuBarRegistrationCancellables.InsertOrUpdate(aMenuBar, cancellable); ++ ++ // We keep a weak ref because we can't assume that GDBus cancellation ++ // is reliable (see https://launchpad.net/bugs/953562) ++ ++ g_dbus_proxy_call(mDbusProxy, "RegisterWindow", ++ g_variant_new("(uo)", xid, path.get()), ++ G_DBUS_CALL_FLAGS_NONE, -1, ++ cancellable, ++ register_native_menubar_cb, aMenuBar); ++} ++ ++/* static */ void ++nsNativeMenuService::name_owner_changed_cb(GObject *gobject, ++ GParamSpec *pspec, ++ gpointer user_data) ++{ ++ nsNativeMenuService::GetSingleton()->OnNameOwnerChanged(); ++} ++ ++/* static */ void ++nsNativeMenuService::proxy_created_cb(GObject *source_object, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ GError *error = nullptr; ++ GDBusProxy *proxy = g_dbus_proxy_new_for_bus_finish(res, &error); ++ if (error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { ++ g_error_free(error); ++ return; ++ } ++ ++ if (error) { ++ g_error_free(error); ++ } ++ ++ // We need this check because we can't assume that GDBus cancellation ++ // is reliable (see https://launchpad.net/bugs/953562) ++ nsNativeMenuService *self = nsNativeMenuService::GetSingleton(); ++ if (!self) { ++ if (proxy) { ++ g_object_unref(proxy); ++ } ++ return; ++ } ++ ++ self->OnProxyCreated(proxy); ++} ++ ++/* static */ void ++nsNativeMenuService::register_native_menubar_cb(GObject *source_object, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ nsMenuBar *menuBar = static_cast(user_data); ++ ++ GError *error = nullptr; ++ GVariant *results = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), ++ res, &error); ++ if (results) { ++ // There's nothing useful in the response ++ g_variant_unref(results); ++ } ++ ++ bool success = error ? false : true; ++ if (error && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { ++ g_error_free(error); ++ return; ++ } ++ ++ if (error) { ++ g_error_free(error); ++ } ++ ++ nsNativeMenuService *self = nsNativeMenuService::GetSingleton(); ++ if (!self) { ++ return; ++ } ++ ++ self->OnNativeMenuBarRegistered(menuBar, success); ++} ++ ++/* static */ gboolean ++nsNativeMenuService::map_event_cb(GtkWidget *widget, ++ GdkEvent *event, ++ gpointer user_data) ++{ ++ nsMenuBar *menubar = static_cast(user_data); ++ nsNativeMenuService::GetSingleton()->RegisterNativeMenuBar(menubar); ++ ++ return FALSE; ++} ++ ++void ++nsNativeMenuService::OnNameOwnerChanged() ++{ ++ char *owner = g_dbus_proxy_get_name_owner(mDbusProxy); ++ SetOnline(owner ? true : false); ++ g_free(owner); ++} ++ ++void ++nsNativeMenuService::OnProxyCreated(GDBusProxy *aProxy) ++{ ++ mDbusProxy = aProxy; ++ ++ g_object_unref(mCreateProxyCancellable); ++ mCreateProxyCancellable = nullptr; ++ ++ if (!mDbusProxy) { ++ SetOnline(false); ++ return; ++ } ++ ++ g_signal_connect(mDbusProxy, "notify::g-name-owner", ++ G_CALLBACK(name_owner_changed_cb), nullptr); ++ ++ OnNameOwnerChanged(); ++} ++ ++void ++nsNativeMenuService::OnNativeMenuBarRegistered(nsMenuBar *aMenuBar, ++ bool aSuccess) ++{ ++ // Don't assume that GDBus cancellation is reliable (ie, |aMenuBar| might ++ // have already been deleted (see https://launchpad.net/bugs/953562) ++ GCancellable *cancellable = nullptr; ++ if (!mMenuBarRegistrationCancellables.Get(aMenuBar, &cancellable)) { ++ return; ++ } ++ ++ g_object_unref(cancellable); ++ mMenuBarRegistrationCancellables.Remove(aMenuBar); ++ ++ if (!aSuccess) { ++ aMenuBar->Deactivate(); ++ } ++} ++ ++/* static */ void ++nsNativeMenuService::PrefChangedCallback(const char *aPref, ++ void *aClosure) ++{ ++ nsNativeMenuService::GetSingleton()->PrefChanged(); ++} ++ ++void ++nsNativeMenuService::PrefChanged() ++{ ++ if (!mDbusProxy) { ++ SetOnline(false); ++ return; ++ } ++ ++ OnNameOwnerChanged(); ++} ++ ++NS_IMETHODIMP ++nsNativeMenuService::CreateNativeMenuBar(nsIWidget *aParent, ++ mozilla::dom::Element *aMenuBarNode) ++{ ++ NS_ENSURE_ARG(aParent); ++ NS_ENSURE_ARG(aMenuBarNode); ++ ++ if (aMenuBarNode->AttrValueIs(kNameSpaceID_None, ++ nsGkAtoms::_moz_menubarkeeplocal, ++ nsGkAtoms::_true, ++ eCaseMatters)) { ++ return NS_OK; ++ } ++ ++ UniquePtr menubar(nsMenuBar::Create(aParent, aMenuBarNode)); ++ if (!menubar) { ++ NS_WARNING("Failed to create menubar"); ++ return NS_ERROR_FAILURE; ++ } ++ ++ // Unity forgets our window if it is unmapped by the application, which ++ // happens with some extensions that add "minimize to tray" type ++ // functionality. We hook on to the MapNotify event to re-register our menu ++ // with Unity ++ g_signal_connect(G_OBJECT(menubar->TopLevelWindow()), ++ "map-event", G_CALLBACK(map_event_cb), ++ menubar.get()); ++ ++ mMenuBars.AppendElement(menubar.get()); ++ RegisterNativeMenuBar(menubar.get()); ++ ++ static_cast(aParent)->SetMenuBar(std::move(menubar)); ++ ++ return NS_OK; ++} ++ ++/* static */ already_AddRefed ++nsNativeMenuService::GetInstanceForServiceManager() ++{ ++ RefPtr service(sService); ++ ++ if (service) { ++ return service.forget(); ++ } ++ ++ service = new nsNativeMenuService(); ++ ++ if (NS_FAILED(service->Init())) { ++ return nullptr; ++ } ++ ++ sService = service.get(); ++ return service.forget(); ++} ++ ++/* static */ nsNativeMenuService* ++nsNativeMenuService::GetSingleton() ++{ ++ EnsureInitialized(); ++ return sService; ++} ++ ++void ++nsNativeMenuService::NotifyNativeMenuBarDestroyed(nsMenuBar *aMenuBar) ++{ ++ g_signal_handlers_disconnect_by_func(aMenuBar->TopLevelWindow(), ++ FuncToGpointer(map_event_cb), ++ aMenuBar); ++ ++ mMenuBars.RemoveElement(aMenuBar); ++ ++ GCancellable *cancellable = nullptr; ++ if (mMenuBarRegistrationCancellables.Get(aMenuBar, &cancellable)) { ++ mMenuBarRegistrationCancellables.Remove(aMenuBar); ++ g_cancellable_cancel(cancellable); ++ g_object_unref(cancellable); ++ } ++} +--- /dev/null ++++ b/widget/gtk/nsNativeMenuService.h +@@ -0,0 +1,85 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* vim:expandtab:shiftwidth=4:tabstop=4: ++ */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef __nsNativeMenuService_h__ ++#define __nsNativeMenuService_h__ ++ ++#include "mozilla/Attributes.h" ++#include "nsCOMPtr.h" ++#include "nsTHashMap.h" ++#include "nsINativeMenuService.h" ++#include "nsTArray.h" ++ ++#include ++#include ++#include ++ ++class nsMenuBar; ++ ++/* ++ * The main native menu service singleton. ++ * NativeMenuSupport::CreateNativeMenuBar calls in to this when a new top level ++ * window is created. ++ * ++ * Menubars are owned by their nsWindow. This service holds a weak reference to ++ * each menubar for the purpose of re-registering them with the shell if it ++ * needs to. The menubar is responsible for notifying the service when the last ++ * reference to it is dropped. ++ */ ++class nsNativeMenuService final : public nsINativeMenuService ++{ ++public: ++ NS_DECL_ISUPPORTS ++ ++ NS_IMETHOD CreateNativeMenuBar(nsIWidget* aParent, mozilla::dom::Element* aMenuBarNode) override; ++ ++ // Returns the singleton addref'd for the service manager ++ static already_AddRefed GetInstanceForServiceManager(); ++ ++ // Returns the singleton without increasing the reference count ++ static nsNativeMenuService* GetSingleton(); ++ ++ // Called by a menubar when it is deleted ++ void NotifyNativeMenuBarDestroyed(nsMenuBar *aMenuBar); ++ ++private: ++ nsNativeMenuService(); ++ ~nsNativeMenuService(); ++ nsresult Init(); ++ ++ static void EnsureInitialized(); ++ void SetOnline(bool aOnline); ++ void RegisterNativeMenuBar(nsMenuBar *aMenuBar); ++ static void name_owner_changed_cb(GObject *gobject, ++ GParamSpec *pspec, ++ gpointer user_data); ++ static void proxy_created_cb(GObject *source_object, ++ GAsyncResult *res, ++ gpointer user_data); ++ static void register_native_menubar_cb(GObject *source_object, ++ GAsyncResult *res, ++ gpointer user_data); ++ static gboolean map_event_cb(GtkWidget *widget, GdkEvent *event, ++ gpointer user_data); ++ void OnNameOwnerChanged(); ++ void OnProxyCreated(GDBusProxy *aProxy); ++ void OnNativeMenuBarRegistered(nsMenuBar *aMenuBar, ++ bool aSuccess); ++ static void PrefChangedCallback(const char *aPref, void *aClosure); ++ void PrefChanged(); ++ ++ GCancellable *mCreateProxyCancellable; ++ GDBusProxy *mDbusProxy; ++ bool mOnline; ++ nsTArray mMenuBars; ++ nsTHashMap, GCancellable*> mMenuBarRegistrationCancellables; ++ ++ static bool sShutdown; ++ static nsNativeMenuService *sService; ++}; ++ ++#endif /* __nsNativeMenuService_h__ */ +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -7060,6 +7060,10 @@ void nsWindow::HideWindowChrome(bool aSh + SetWindowDecoration(aShouldHide ? BorderStyle::None : mBorderStyle); + } + ++void nsWindow::SetMenuBar(UniquePtr aMenuBar) { ++ mMenuBar = std::move(aMenuBar); ++} ++ + bool nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY, bool aIsWheel, + bool aAlwaysRollup) { + LOG("nsWindow::CheckForRollup() aAlwaysRollup %d", aAlwaysRollup); +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -26,6 +26,8 @@ + #include "nsRefPtrHashtable.h" + #include "IMContextWrapper.h" + ++#include "nsMenuBar.h" ++ + #ifdef ACCESSIBILITY + # include "mozilla/a11y/LocalAccessible.h" + #endif +@@ -172,6 +174,8 @@ class nsWindow final : public nsBaseWidg + nsresult MakeFullScreen(bool aFullScreen) override; + void HideWindowChrome(bool aShouldHide) override; + ++ void SetMenuBar(mozilla::UniquePtr aMenuBar); ++ + /** + * GetLastUserInputTime returns a timestamp for the most recent user input + * event. This is intended for pointer grab requests (including drags). +@@ -824,6 +828,8 @@ class nsWindow final : public nsBaseWidg + + static bool sTransparentMainWindow; + ++ mozilla::UniquePtr mMenuBar; ++ + #ifdef ACCESSIBILITY + RefPtr mRootAccessible; + +--- /dev/null ++++ b/xpcom/ds/NativeMenuAtoms.py +@@ -0,0 +1,9 @@ ++from Atom import Atom ++ ++NATIVE_MENU_ATOMS = [ ++ Atom("menuitem_with_favicon", "menuitem-with-favicon"), ++ Atom("_moz_menubarkeeplocal", "_moz-menubarkeeplocal"), ++ Atom("_moz_nativemenupopupstate", "_moz-nativemenupopupstate"), ++ Atom("openedwithkey", "openedwithkey"), ++ Atom("shellshowingmenubar", "shellshowingmenubar"), ++] +--- a/xpcom/ds/StaticAtoms.py ++++ b/xpcom/ds/StaticAtoms.py +@@ -7,6 +7,7 @@ + PseudoElementAtom, + ) + from HTMLAtoms import HTML_PARSER_ATOMS ++from NativeMenuAtoms import NATIVE_MENU_ATOMS + + # Static atom definitions, used to generate nsGkAtomList.h. + # +@@ -2529,7 +2530,7 @@ STATIC_ATOMS = [ + InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"), + InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"), + # END ATOMS +-] + HTML_PARSER_ATOMS ++] + HTML_PARSER_ATOMS + NATIVE_MENU_ATOMS + # fmt: on + + +--- a/widget/gtk/components.conf ++++ b/widget/gtk/components.conf +@@ -76,6 +76,14 @@ Classes = [ + 'headers': ['/widget/gtk/nsUserIdleServiceGTK.h'], + 'constructor': 'nsUserIdleServiceGTK::GetInstance', + }, ++ { ++ 'cid': '{0b3fe5aa-bc72-4303-85ae-76365df1251d}', ++ 'contract_ids': ['@mozilla.org/widget/nativemenuservice;1'], ++ 'singleton': True, ++ 'type': 'nsNativeMenuService', ++ 'constructor': 'nsNativeMenuService::GetInstanceForServiceManager', ++ 'headers': ['/widget/gtk/nsNativeMenuService.h'], ++ }, + ] + + if defined('NS_PRINTING'): +--- a/xpfe/appshell/AppWindow.cpp ++++ b/xpfe/appshell/AppWindow.cpp +@@ -80,7 +80,7 @@ + + #include "mozilla/dom/DocumentL10n.h" + +-#ifdef XP_MACOSX ++#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) + # include "mozilla/widget/NativeMenuSupport.h" + # define USE_NATIVE_MENUS + #endif +--- a/widget/gtk/NativeMenuSupport.cpp ++++ b/widget/gtk/NativeMenuSupport.cpp +@@ -7,6 +7,8 @@ + + #include "MainThreadUtils.h" + #include "NativeMenuGtk.h" ++#include "nsINativeMenuService.h" ++#include "nsServiceManagerUtils.h" + + namespace mozilla::widget { + +@@ -14,7 +16,14 @@ void NativeMenuSupport::CreateNativeMenu + dom::Element* aMenuBarElement) { + MOZ_RELEASE_ASSERT(NS_IsMainThread(), + "Attempting to create native menu bar on wrong thread!"); +- // TODO ++ ++ nsCOMPtr nms = ++ do_GetService("@mozilla.org/widget/nativemenuservice;1"); ++ if (!nms) { ++ return; ++ } ++ ++ nms->CreateNativeMenuBar(aParent, aMenuBarElement); + } + + already_AddRefed NativeMenuSupport::CreateNativeContextMenu( +--- /dev/null ++++ b/widget/gtk/NativeMenuSupport.h +@@ -0,0 +1,31 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef mozilla_widget_NativeMenuSupport_h ++#define mozilla_widget_NativeMenuSupport_h ++ ++class nsIWidget; ++ ++namespace mozilla { ++ ++namespace dom { ++class Element; ++} ++ ++namespace widget { ++ ++class NativeMenuSupport final { ++public: ++ // Given a top-level window widget and a menu bar DOM node, sets up native ++ // menus. Once created, native menus are controlled via the DOM, including ++ // destruction. ++ static void CreateNativeMenuBar(nsIWidget* aParent, ++ dom::Element* aMenuBarElement); ++}; ++ ++} // namespace widget ++} // namespace mozilla ++ ++#endif // mozilla_widget_NativeMenuSupport_h +--- a/widget/moz.build ++++ b/widget/moz.build +@@ -157,6 +157,11 @@ EXPORTS += [ + "PuppetWidget.h", + ] + ++if toolkit == "gtk": ++ EXPORTS += [ ++ "nsINativeMenuService.h", ++ ] ++ + EXPORTS.mozilla += [ + "BasicEvents.h", + "ColorScheme.h", +--- /dev/null ++++ b/widget/nsINativeMenuService.h +@@ -0,0 +1,39 @@ ++/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * 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/. */ ++ ++#ifndef nsINativeMenuService_h_ ++#define nsINativeMenuService_h_ ++ ++#include "nsISupports.h" ++ ++class nsIWidget; ++class nsIContent; ++namespace mozilla { ++namespace dom { ++class Element; ++} ++} // namespace mozilla ++ ++// {90DF88F9-F084-4EF3-829A-49496E636DED} ++#define NS_INATIVEMENUSERVICE_IID \ ++ { \ ++ 0x90DF88F9, 0xF084, 0x4EF3, { \ ++ 0x82, 0x9A, 0x49, 0x49, 0x6E, 0x63, 0x6D, 0xED \ ++ } \ ++ } ++ ++class nsINativeMenuService : public nsISupports { ++ public: ++ NS_DECLARE_STATIC_IID_ACCESSOR(NS_INATIVEMENUSERVICE_IID) ++ // Given a top-level window widget and a menu bar DOM node, sets up native ++ // menus. Once created, native menus are controlled via the DOM, including ++ // destruction. ++ NS_IMETHOD CreateNativeMenuBar(nsIWidget* aParent, ++ mozilla::dom::Element* aMenuBarNode) = 0; ++}; ++ ++NS_DEFINE_STATIC_IID_ACCESSOR(nsINativeMenuService, NS_INATIVEMENUSERVICE_IID) ++ ++#endif // nsINativeMenuService_h_ +--- a/widget/nsWidgetsCID.h ++++ b/widget/nsWidgetsCID.h +@@ -66,6 +66,14 @@ + // Menus + //----------------------------------------------------------- + ++// {0B3FE5AA-BC72-4303-85AE-76365DF1251D} ++#define NS_NATIVEMENUSERVICE_CID \ ++ { \ ++ 0x0B3FE5AA, 0xBC72, 0x4303, { \ ++ 0x85, 0xAE, 0x76, 0x36, 0x5D, 0xF1, 0x25, 0x1D \ ++ } \ ++ } ++ + // {F6CD4F21-53AF-11d2-8DC4-00609703C14E} + #define NS_POPUPMENU_CID \ + { \