diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile index 50e0c2f90e12..1a85da360c7d 100644 --- a/www/firefox-esr/Makefile +++ b/www/firefox-esr/Makefile @@ -1,70 +1,70 @@ PORTNAME= firefox -DISTVERSION= 115.15.0 +DISTVERSION= 128.2.0 PORTEPOCH= 1 CATEGORIES= www wayland MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}esr-candidates/build1/source PKGNAMESUFFIX= -esr DISTFILES= ${DISTNAME}esr.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla WWW= https://www.mozilla.com/firefox BUILD_DEPENDS= nspr>=4.32:devel/nspr \ - nss>=3.90:security/nss \ + nss>=3.101:security/nss \ icu>=73.1,1:devel/icu \ libevent>=2.1.8:devel/libevent \ - harfbuzz>=7.3.0:print/harfbuzz \ + harfbuzz>=8.5.0:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ - png>=1.6.39:graphics/png \ + png>=1.6.43:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ - libvpx>=1.13.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 USE_GECKO= gecko CPE_PRODUCT= ${PORTNAME}_esr CONFLICTS_INSTALL= firefox USE_MOZILLA= -sqlite CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234 CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" USES= tar:xz FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/${MOZILLA}-snap/${MOZILLA}.desktop MOZ_OPTIONS= --enable-application=browser \ --enable-official-branding .include "${.CURDIR}/../../www/firefox/Makefile.options" .include .if ${ARCH} == powerpc64 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/%u/%U/' -e '/X-MultipleArgs/d' \ -e '/^Icon/s/=.*/=${FIREFOX_ICON:R}/' \ ${FIREFOX_DESKTOP} @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp post-install: ${INSTALL_DATA} ${FIREFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/ ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON} .include diff --git a/www/firefox-esr/distinfo b/www/firefox-esr/distinfo index 1be978c18a8e..69a755a38707 100644 --- a/www/firefox-esr/distinfo +++ b/www/firefox-esr/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1724686968 -SHA256 (firefox-115.15.0esr.source.tar.xz) = effed92aa0d961871614c611259dfe3eab72e5ebfe8f2405f9bc92c5e7feae81 -SIZE (firefox-115.15.0esr.source.tar.xz) = 507920832 +TIMESTAMP = 1725799196 +SHA256 (firefox-128.2.0esr.source.tar.xz) = 9617a1e547d373fe25c2f5477ba1b2fc482b642dc54adf28d815fc36ed72d0c2 +SIZE (firefox-128.2.0esr.source.tar.xz) = 560831528 diff --git a/www/firefox-esr/files/patch-addon-search b/www/firefox-esr/files/patch-addon-search index b6dbf7924b43..a0adc808c9fa 100644 --- a/www/firefox-esr/files/patch-addon-search +++ b/www/firefox-esr/files/patch-addon-search @@ -1,53 +1,53 @@ https://github.com/mozilla/addons/issues/708 https://github.com/mozilla/addons-frontend/issues/4610 diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js -index 621900f90fc1..401ef9074bd0 100644 +index 5964d40ca3a3..ed81b06af8d5 100644 --- browser/app/profile/firefox.js +++ browser/app/profile/firefox.js -@@ -38,7 +38,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true); +@@ -39,7 +39,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true); // Preferences for AMO integration pref("extensions.getAddons.cache.enabled", true); pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%"); -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); +pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%"); pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/"); pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%"); pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%"); -@@ -204,8 +204,8 @@ pref("app.update.langpack.enabled", true); +@@ -214,8 +214,8 @@ pref("app.update.langpack.enabled", true); // .. etc .. // pref("extensions.update.enabled", true); -pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); -pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); +pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); +pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%"); pref("extensions.update.interval", 86400); // Check for updates to Extensions and // Themes every day diff --git toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs -index f906f244b658..7bb2eb6697c6 100644 +index e854e04b3ce2..27e8247eb886 100644 --- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs +++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs -@@ -596,7 +596,7 @@ export var AddonRepository = { +@@ -715,7 +715,7 @@ export var AddonRepository = { addon.version = String(aEntry.current_version.version); if (Array.isArray(aEntry.current_version.files)) { for (let file of aEntry.current_version.files) { - if (file.platform == "all" || file.platform == lazy.PLATFORM) { + if (file.platform == "all" || file.platform == "linux" || file.platform == lazy.PLATFORM) { if (file.url) { addon.sourceURI = lazy.NetUtil.newURI(file.url); } -diff --git toolkit/mozapps/extensions/internal/XPIDatabase.jsm toolkit/mozapps/extensions/internal/XPIDatabase.jsm -index 03186dad43a4..4053fc6f2702 100644 ---- toolkit/mozapps/extensions/internal/XPIDatabase.jsm -+++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm -@@ -634,7 +634,7 @@ class AddonInternal { +diff --git toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs +index 5d1d2c19706b..4dcba06a95f4 100644 +--- toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs ++++ toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs +@@ -632,7 +632,7 @@ export class AddonInternal { // Something is causing errors in here try { for (let platform of this.targetPlatforms) { - if (platform.os == Services.appinfo.OS) { + if (platform.os == "Linux" || platform.os == Services.appinfo.OS) { if (platform.abi) { needsABI = true; if (platform.abi === abi) { diff --git a/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp b/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp index 68cb778b95a7..3b9097714e21 100644 --- a/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp +++ b/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp @@ -1,12 +1,14 @@ ---- browser/app/nsBrowserApp.cpp.orig 2016-09-19 16:19:28 UTC +diff --git browser/app/nsBrowserApp.cpp browser/app/nsBrowserApp.cpp +index 87c2e16..a41f1d9 100644 +--- browser/app/nsBrowserApp.cpp +++ browser/app/nsBrowserApp.cpp -@@ -324,6 +324,9 @@ int main(int argc, char* argv[], char* e - { - mozilla::TimeStamp start = mozilla::TimeStamp::Now(); +@@ -337,6 +337,9 @@ int main(int argc, char* argv[], char* envp[]) { + } + #endif + setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + #ifdef HAS_DLL_BLOCKLIST - DllBlocklist_Initialize(); - + DllBlocklist_Initialize(gBlocklistInitFlags); + #endif diff --git a/www/firefox-esr/files/patch-bug1427152 b/www/firefox-esr/files/patch-bug1427152 deleted file mode 100644 index 49bd5a581ac8..000000000000 --- a/www/firefox-esr/files/patch-bug1427152 +++ /dev/null @@ -1,10 +0,0 @@ ---- modules/libpref/Preferences.cpp.orig 2023-05-11 21:42:41 UTC -+++ modules/libpref/Preferences.cpp -@@ -6126,6 +6126,7 @@ static const PrefListEntry sDynamicPrefOverrideList[]{ - PREF_LIST_ENTRY("logging.config.LOG_FILE"), - PREF_LIST_ENTRY("media.audio_loopback_dev"), - PREF_LIST_ENTRY("media.decoder-doctor."), -+ PREF_LIST_ENTRY("media.cubeb.backend"), - PREF_LIST_ENTRY("media.cubeb.output_device"), - PREF_LIST_ENTRY("media.getusermedia.fake-camera-name"), - PREF_LIST_ENTRY("media.hls.server.url"), diff --git a/www/firefox-esr/files/patch-bug1559213 b/www/firefox-esr/files/patch-bug1559213 index 49bbb0fb05ff..ae11fb38f989 100644 --- a/www/firefox-esr/files/patch-bug1559213 +++ b/www/firefox-esr/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 ab77121..75595d9 100644 +index 2fc8df57992e..63d18e50a961 100644 --- config/external/moz.build +++ config/external/moz.build -@@ -49,8 +49,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 a1b58eb..65729f9 100644 ---- config/system-headers.mozbuild -+++ config/system-headers.mozbuild -@@ -1289,6 +1289,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 8509aec..eb6f129 100644 +index 5c6e25b3980b..ce99ebfb6d3f 100644 --- dom/media/platforms/moz.build +++ dom/media/platforms/moz.build -@@ -78,6 +78,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 0069865..e806fc8 100644 ---- media/ffvpx/libavcodec/moz.build.orig +index 761fc8cf4cd9..793a5b8697a8 100644 +--- media/ffvpx/libavcodec/moz.build +++ media/ffvpx/libavcodec/moz.build -@@ -108,10 +108,14 @@ - 'vp9prob.c', - 'vp9recon.c' +@@ -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'] ++ CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] ++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] + else: -+ USE_LIBS += [ -+ 'dav1d', -+ 'media_libdav1d_asm', -+ ] - if CONFIG['MOZ_WAYLAND']: ++ 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 0069865..e806fc8 100644 +index f93a5d64fec8..814357f4e979 100644 --- toolkit/moz.configure +++ toolkit/moz.configure -@@ -523,7 +523,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 -@@ -539,6 +555,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/firefox-esr/files/patch-bug1626236 b/www/firefox-esr/files/patch-bug1626236 index ccb417b61f15..ae3b522f6b90 100644 --- a/www/firefox-esr/files/patch-bug1626236 +++ b/www/firefox-esr/files/patch-bug1626236 @@ -1,88 +1,92 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1626236 https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096 # HG changeset patch # User msirringhaus@suse.de # Date 1582805876 -3600 # Thu Feb 27 13:17:56 2020 +0100 # Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158 # Parent 9cd90914846f667f18babc491a74c164ae5d6e9f imported patch decoder_workaround.patch -diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp ---- image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -422,6 +422,9 @@ +diff --git image/decoders/nsGIFDecoder2.cpp image/decoders/nsGIFDecoder2.cpp +index ebb0b7d..d52ef47 100644 +--- image/decoders/nsGIFDecoder2.cpp ++++ image/decoders/nsGIFDecoder2.cpp +@@ -422,6 +422,9 @@ void nsGIFDecoder2::ConvertColormap(uint32_t* aColormap, uint32_t aColors) { MOZ_ASSERT(mSwizzleFn); uint8_t* data = reinterpret_cast(aColormap); mSwizzleFn(data, data, aColors); +#if MOZ_BIG_ENDIAN() + SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors); +#endif } LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator, -diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp ---- image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -263,6 +263,9 @@ +diff --git image/decoders/nsJPEGDecoder.cpp image/decoders/nsJPEGDecoder.cpp +index 9ea4403..d82772c 100644 +--- image/decoders/nsJPEGDecoder.cpp ++++ image/decoders/nsJPEGDecoder.cpp +@@ -257,6 +257,9 @@ LexerTransition nsJPEGDecoder::ReadJPEGData( case JCS_YCbCr: // By default, we will output directly to BGRA. If we need to apply // special color transforms, this may change. +#if MOZ_BIG_ENDIAN() + mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB; +#else switch (SurfaceFormat::OS_RGBX) { case SurfaceFormat::B8G8R8X8: mInfo.out_color_space = JCS_EXT_BGRX; -@@ -277,6 +280,7 @@ +@@ -271,6 +274,7 @@ LexerTransition nsJPEGDecoder::ReadJPEGData( mState = JPEG_ERROR; return Transition::TerminateFailure(); } +#endif break; case JCS_CMYK: case JCS_YCCK: -diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp ---- image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -361,7 +361,7 @@ +diff --git image/decoders/nsPNGDecoder.cpp image/decoders/nsPNGDecoder.cpp +index e3e4ef4..3cc7315 100644 +--- image/decoders/nsPNGDecoder.cpp ++++ image/decoders/nsPNGDecoder.cpp +@@ -356,7 +356,7 @@ LexerResult nsPNGDecoder::DoDecode(SourceBufferIterator& aIterator, IResumable* aOnResume) { MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!"); - return mLexer.Lex(aIterator, aOnResume, + LexerResult res = mLexer.Lex(aIterator, aOnResume, [=](State aState, const char* aData, size_t aLength) { switch (aState) { case State::PNG_DATA: -@@ -371,6 +371,14 @@ +@@ -366,6 +366,14 @@ LexerResult nsPNGDecoder::DoDecode(SourceBufferIterator& aIterator, } MOZ_CRASH("Unknown State"); }); + +#if MOZ_BIG_ENDIAN() + if(res.is() && res.as() == TerminalState::SUCCESS) { + NativeEndian::swapToLittleEndianInPlace((uint32_t*)(mImageData), mImageDataLength / 4); + } +#endif + + return res; } LexerTransition nsPNGDecoder::ReadPNGData( -diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp ---- image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -237,7 +237,12 @@ +diff --git image/decoders/nsWebPDecoder.cpp image/decoders/nsWebPDecoder.cpp +index e58ca92..2056ebb 100644 +--- image/decoders/nsWebPDecoder.cpp ++++ image/decoders/nsWebPDecoder.cpp +@@ -247,7 +247,12 @@ nsresult nsWebPDecoder::CreateFrame(const OrientedIntRect& aFrameRect) { // WebP doesn't guarantee that the alpha generated matches the hint in the // header, so we always need to claim the input is BGRA. If the output is // BGRX, swizzling will mask off the alpha channel. +#if MOZ_BIG_ENDIAN() + mBuffer.colorspace = MODE_ARGB; + SurfaceFormat inFormat = mFormat; +#else SurfaceFormat inFormat = SurfaceFormat::OS_RGBA; +#endif SurfacePipeFlags pipeFlags = SurfacePipeFlags(); if (mFormat == SurfaceFormat::OS_RGBA && diff --git a/www/firefox-esr/files/patch-bug1628567 b/www/firefox-esr/files/patch-bug1628567 deleted file mode 100644 index 32b0dc260d22..000000000000 --- a/www/firefox-esr/files/patch-bug1628567 +++ /dev/null @@ -1,32 +0,0 @@ -Don't pass --target when CC/CXX contains clang - -diff --git third_party/rust/cc/src/lib.rs third_party/rust/cc/src/lib.rs -index 9d133a0..273e520 100644 ---- third_party/rust/cc/src/lib.rs -+++ third_party/rust/cc/src/lib.rs -@@ -2667,24 +2667,7 @@ impl Tool { - } - - fn with_features(path: PathBuf, clang_driver: Option<&str>, cuda: bool) -> Self { -- // Try to detect family of the tool from its name, falling back to Gnu. -- let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) { -- if fname.contains("clang-cl") { -- ToolFamily::Msvc { clang_cl: true } -- } else if fname.ends_with("cl") || fname == "cl.exe" { -- ToolFamily::Msvc { clang_cl: false } -- } else if fname.contains("clang") { -- match clang_driver { -- Some("cl") => ToolFamily::Msvc { clang_cl: true }, -- _ => ToolFamily::Clang, -- } -- } else { -- ToolFamily::Gnu -- } -- } else { -- ToolFamily::Gnu -- }; -- -+ let family = ToolFamily::Gnu; - Tool { - path: path, - cc_wrapper_path: None, diff --git a/www/firefox-esr/files/patch-bug1680982 b/www/firefox-esr/files/patch-bug1680982 deleted file mode 100644 index c9fc2344bb44..000000000000 --- a/www/firefox-esr/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/firefox-esr/files/patch-bug1841919 b/www/firefox-esr/files/patch-bug1841919 deleted file mode 100644 index 93bd00f462ae..000000000000 --- a/www/firefox-esr/files/patch-bug1841919 +++ /dev/null @@ -1,75 +0,0 @@ -commit 54ebf78999815570c3cd4d94bf00daa7dec6061d -Author: Mike Hommey -Date: Thu Jul 6 02:34:07 2023 +0000 - - Bug 1841919 - Fix "variable does not need to be mutable" warnings in webrender. r=gfx-reviewers,lsalzman - - Differential Revision: https://phabricator.services.mozilla.com/D182851 - -diff --git gfx/wr/webrender/src/compositor/sw_compositor.rs gfx/wr/webrender/src/compositor/sw_compositor.rs -index e623870c86f3..854fef6fe2b9 100644 ---- gfx/wr/webrender/src/compositor/sw_compositor.rs -+++ gfx/wr/webrender/src/compositor/sw_compositor.rs -@@ -1026,7 +1026,7 @@ impl SwCompositor { - if let Some(surface) = self.surfaces.get_mut(id) { - if let Some(external_image) = surface.external_image { - assert!(!surface.tiles.is_empty()); -- let mut tile = &mut surface.tiles[0]; -+ let tile = &mut surface.tiles[0]; - if let Some(info) = self.composite_surfaces.get(&external_image) { - tile.valid_rect = DeviceIntRect::from_size(info.size); - return; -diff --git gfx/wr/webrender/src/picture.rs gfx/wr/webrender/src/picture.rs -index bd685d48a113..72c0e1efa038 100644 ---- gfx/wr/webrender/src/picture.rs -+++ gfx/wr/webrender/src/picture.rs -@@ -2888,7 +2888,7 @@ impl TileCacheInstance { - let prim_clip_chain = &prim_instance.vis.clip_chain; - - // Accumulate the exact (clipped) local rect in to the parent surface -- let mut surface = &mut surfaces[prim_surface_index.0]; -+ let surface = &mut surfaces[prim_surface_index.0]; - surface.clipped_local_rect = surface.clipped_local_rect.union(&prim_clip_chain.pic_coverage_rect); - - // If the primitive is directly drawn onto this picture cache surface, then -diff --git gfx/wr/webrender_api/src/display_item_cache.rs gfx/wr/webrender_api/src/display_item_cache.rs -index 6cd1eb3e3a44..60d41c591d36 100644 ---- gfx/wr/webrender_api/src/display_item_cache.rs -+++ gfx/wr/webrender_api/src/display_item_cache.rs -@@ -58,13 +58,13 @@ pub struct DisplayItemCache { - - impl DisplayItemCache { - fn add_item(&mut self, key: ItemKey, item: CachedDisplayItem) { -- let mut entry = &mut self.entries[key as usize]; -+ let entry = &mut self.entries[key as usize]; - entry.items.push(item); - entry.occupied = true; - } - - fn clear_entry(&mut self, key: ItemKey) { -- let mut entry = &mut self.entries[key as usize]; -+ let entry = &mut self.entries[key as usize]; - entry.items.clear(); - entry.occupied = false; - } -commit 8300555a01bdcc478ae103dcf2b469bf24e4dd41 -Author: Mike Hommey -Date: Thu Jul 6 04:26:41 2023 +0000 - - Bug 1841919 - Fix "variable does not need to be mutable" warning in wrench. r=gfx-reviewers,jrmuizel - - Differential Revision: https://phabricator.services.mozilla.com/D182858 - -diff --git gfx/wr/wrench/src/reftest.rs gfx/wr/wrench/src/reftest.rs -index 136a4477205d..0e900224b883 100644 ---- gfx/wr/wrench/src/reftest.rs -+++ gfx/wr/wrench/src/reftest.rs -@@ -514,7 +514,7 @@ impl ReftestManifest { - max_difference: options.allow_max_difference, - num_differences: options.allow_num_differences }), - 1 => { -- let mut fuzzy = &mut fuzziness[0]; -+ let fuzzy = &mut fuzziness[0]; - fuzzy.max_difference = cmp::max(fuzzy.max_difference, options.allow_max_difference); - fuzzy.num_differences = cmp::max(fuzzy.num_differences, options.allow_num_differences); - }, diff --git a/www/firefox-esr/files/patch-bug1873379 b/www/firefox-esr/files/patch-bug1873379 deleted file mode 100644 index 658bc576eef1..000000000000 --- a/www/firefox-esr/files/patch-bug1873379 +++ /dev/null @@ -1,34 +0,0 @@ -commit 627cc80defb3fa48e82ce656536d666176b9f8d1 -Author: Emilio Cobos Álvarez -Date: Sat Jan 13 14:35:33 2024 +0000 - - Bug 1873379 - Ignore std::tuple harder. r=firefox-style-system-reviewers,zrhoffman - - In libc++ 18 it seems to be in a nested namespace. Make sure to account - for that. - - Differential Revision: https://phabricator.services.mozilla.com/D198398 - -diff --git layout/style/ServoBindings.toml layout/style/ServoBindings.toml -index 2aea31f8f911..2deafbfb14b6 100644 ---- layout/style/ServoBindings.toml -+++ layout/style/ServoBindings.toml -@@ -366,6 +366,9 @@ opaque-types = [ - "std::namespace::atomic___base", "std::atomic__My_base", - "std::atomic", - "std::atomic___base", -+ "std::tuple.*", # Causes "Cannot find type _Pred in this scope" error on mac, like rust-skia#571 -+ "std::.*::tuple.*", -+ - # We want everything but FontVariation and Float to be opaque but we don't - # have negative regexes. - "mozilla::gfx::(.{0,4}|.{6,12}|.{14,}|([^F][^o][^n][^t][^V][^a][^r][^i][^a][^t][^i][^o][^n])|([^F][^l][^o][^a][^t]))", -@@ -391,8 +394,6 @@ opaque-types = [ - # for clang. - "mozilla::SeenPtrs", - "mozilla::SupportsWeakPtr", -- "std::tuple", -- "std::tuple_.*", # Causes "Cannot find type _Pred in this scope" error on mac, like rust-skia#571 - "SupportsWeakPtr", - "mozilla::detail::WeakReference", - "mozilla::WeakPtr", diff --git a/www/firefox-esr/files/patch-bug1876366 b/www/firefox-esr/files/patch-bug1876366 new file mode 100644 index 000000000000..78483c3fbab7 --- /dev/null +++ b/www/firefox-esr/files/patch-bug1876366 @@ -0,0 +1,23 @@ +commit 46a89fb0319d673b3139a068e3d89aed9f44fc16 +Author: Christoph Moench-Tegeder + + use gdk legacy cursor interface by default + + Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=1876366#c16 + hints that we could re-test this once we have GTK 3.24.42 (with the + now-current gtk3-3.24.41 the original problem is still reproducable, + but toggling this flag does fix it for me) + +diff --git modules/libpref/init/StaticPrefList.yaml modules/libpref/init/StaticPrefList.yaml +index 835450712a12..f2249006c36d 100644 +--- modules/libpref/init/StaticPrefList.yaml ++++ modules/libpref/init/StaticPrefList.yaml +@@ -16070,7 +16070,7 @@ + # Whether to use gtk legacy cursor API. + - name: widget.gtk.legacy-cursors.enabled + type: bool +- value: false ++ value: true + mirror: always + + # Whether to use gtk high contrast themes to disable content styling like on diff --git a/www/firefox-esr/files/patch-bug847568 b/www/firefox-esr/files/patch-bug847568 index 2b3c5e14e99e..2ee46579d43d 100644 --- a/www/firefox-esr/files/patch-bug847568 +++ b/www/firefox-esr/files/patch-bug847568 @@ -1,288 +1,260 @@ # Allow building against system-wide graphite2/harfbuzz. diff --git config/system-headers.mozbuild config/system-headers.mozbuild -index a1b58eb..a0a0943 100644 +index 0c06f581b33b..10f125be25ab 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild -@@ -1289,6 +1289,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: - 'proxy.h', +@@ -1307,6 +1307,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 14c9f9dd96fb..bd1c8f241e9b 100644 --- dom/base/moz.build +++ dom/base/moz.build -@@ -576,6 +576,9 @@ FINAL_LIBRARY = "xul" +@@ -606,6 +606,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 ---- 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 ++FINAL_LIBRARY = 'xul' +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 fd1fcf236d81..958d3f699ffd 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build -@@ -286,7 +286,13 @@ if CONFIG["MOZ_WAYLAND"]: +@@ -293,7 +293,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 c926d14707d1..35a3f33e2885 100644 --- netwerk/dns/moz.build +++ netwerk/dns/moz.build -@@ -102,6 +102,9 @@ GeneratedFile( +@@ -112,6 +112,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 2ca88a20a4b3..88bc9b873eff 100644 --- old-configure.in +++ old-configure.in -@@ -1335,6 +1335,27 @@ fi +@@ -1067,6 +1067,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 76746f308011..f6844f4c400b 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build -@@ -269,6 +269,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]: +@@ -292,6 +292,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 a060a59f728f..f0778d1ae2d6 100644 --- toolkit/moz.configure +++ toolkit/moz.configure -@@ -1058,6 +1058,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom - return False - return True +@@ -1218,6 +1218,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info): + set_config("MOZ_ENABLE_CAIRO_FT", True, when=enable_cairo_ft) + set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=enable_cairo_ft) +# 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", + # WebDriver (HTTP / BiDi) + # ============================================================== diff --git a/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp b/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp deleted file mode 100644 index 6dc197d9455e..000000000000 --- a/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp +++ /dev/null @@ -1,23 +0,0 @@ -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).isEmpty(); - #else - return false; - #endif diff --git a/www/firefox-esr/files/patch-dom_media_webrtc_third__party__build_webrtc.mozbuild b/www/firefox-esr/files/patch-dom_media_webrtc_third__party__build_webrtc.mozbuild new file mode 100644 index 000000000000..3242763d64a6 --- /dev/null +++ b/www/firefox-esr/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/firefox-esr/files/patch-gfx_skia_skia_src_base_SkEndian.h b/www/firefox-esr/files/patch-gfx_skia_skia_src_base_SkEndian.h index 656127071a78..4bfe48f0592c 100644 --- a/www/firefox-esr/files/patch-gfx_skia_skia_src_base_SkEndian.h +++ b/www/firefox-esr/files/patch-gfx_skia_skia_src_base_SkEndian.h @@ -1,11 +1,13 @@ ---- gfx/skia/skia/src/base/SkEndian.h.orig 2023-06-16 01:32:16.999830000 +0200 -+++ gfx/skia/skia/src/base/SkEndian.h 2023-06-16 01:32:41.701673000 +0200 -@@ -131,7 +131,7 @@ - #define SkTEndian_SwapLE64(n) (n) - #else // SK_CPU_BENDIAN - #define SkEndian_SwapBE16(n) (n) -- #define SkEndian_SwapBE32(n) (n) -+ #define SkEndian_SwapBE32(n) uint32_t(n) - #define SkEndian_SwapBE64(n) (n) - #define SkEndian_SwapLE16(n) SkEndianSwap16(n) - #define SkEndian_SwapLE32(n) SkEndianSwap32(n) +diff --git gfx/skia/skia/src/base/SkEndian.h gfx/skia/skia/src/base/SkEndian.h +index d015f8bff2bf..cc390a53f30c 100644 +--- gfx/skia/skia/src/base/SkEndian.h ++++ gfx/skia/skia/src/base/SkEndian.h +@@ -140,7 +140,7 @@ static inline void SkEndianSwap64s(uint64_t array[], int count) { + #define SkEndian_SwapLE64(n) SkEndianSwap64(n) + + #define SkTEndian_SwapBE16(n) (n) +- #define SkTEndian_SwapBE32(n) (n) ++ #define SkTEndian_SwapBE32(n) uint32_t(n) + #define SkTEndian_SwapBE64(n) (n) + #define SkTEndian_SwapLE16(n) SkTEndianSwap16::value + #define SkTEndian_SwapLE32(n) SkTEndianSwap32::value diff --git a/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkCpu.cpp b/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkCpu.cpp deleted file mode 100644 index 0cee5dac92a1..000000000000 --- a/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkCpu.cpp +++ /dev/null @@ -1,32 +0,0 @@ -Regressed by https://svnweb.freebsd.org/changeset/base/324815 - -gfx/skia/skia/src/core/SkCpu.cpp:81:27: error: use of undeclared identifier 'getauxval' - uint32_t hwcaps = getauxval(AT_HWCAP); - ^ - ---- gfx/skia/skia/src/core/SkCpu.cpp.orig 2020-02-07 22:13:22 UTC -+++ gfx/skia/skia/src/core/SkCpu.cpp -@@ -72,6 +72,23 @@ - return features; - } - -+#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__) -+ #include -+ #ifndef ID_AA64ISAR0_CRC32_VAL -+ #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 -+ #endif -+ -+ static uint32_t read_cpu_features() { -+ uint32_t features = 0; -+ uint64_t id_aa64isar0; -+ -+ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); -+ if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) { -+ features |= SkCpu::CRC32; -+ } -+ return features; -+ } -+ - #elif defined(SK_CPU_ARM64) && __has_include() - #include - diff --git a/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h b/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h index 64e279cf29f0..05cf110b1192 100644 --- a/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h +++ b/www/firefox-esr/files/patch-gfx_skia_skia_src_core_SkRasterPipeline.h @@ -1,11 +1,13 @@ ---- gfx/skia/skia/src/core/SkRasterPipeline.h.orig 2023-06-10 14:20:18.155477000 +0200 -+++ gfx/skia/skia/src/core/SkRasterPipeline.h 2023-06-10 14:20:30.760915000 +0200 -@@ -24,7 +24,7 @@ - struct SkImageInfo; +diff --git gfx/skia/skia/src/core/SkRasterPipeline.h gfx/skia/skia/src/core/SkRasterPipeline.h +index 2475ea0d398d..67967483656d 100644 +--- gfx/skia/skia/src/core/SkRasterPipeline.h ++++ gfx/skia/skia/src/core/SkRasterPipeline.h +@@ -27,7 +27,7 @@ struct SkImageInfo; struct skcms_TransferFunction; --#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) -+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc__) + #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \ +- !defined(SK_CPU_LOONGARCH) ++ !defined(SK_CPU_LOONGARCH) && !defined(__powerpc__) #define SK_HAS_MUSTTAIL 1 #else #define SK_HAS_MUSTTAIL 0 diff --git a/www/firefox-esr/files/patch-libwebrtc-generated b/www/firefox-esr/files/patch-libwebrtc-generated index 9790b777a007..5393b4007e4f 100644 --- a/www/firefox-esr/files/patch-libwebrtc-generated +++ b/www/firefox-esr/files/patch-libwebrtc-generated @@ -1,95952 +1,98849 @@ -commit c15a16ffc6046403213dc435ecb26962706a0da4 +commit 9d36885c30adb54fc4e4a8b0112a6e7379706390 Author: Christoph Moench-Tegeder - regenerate FreeBSD libwebrtc patch for Firefox 115esr + regenerate FreeBSD libwebrtc patch for Firefox 128esr 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 2dbd5881583e..332ca04819ee 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 df2c86715cac..6c4e403f6dc1 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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"] == "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("array_view_gn") +diff --git third_party/libwebrtc/api/async_dns_resolver_gn/moz.build third_party/libwebrtc/api/async_dns_resolver_gn/moz.build +index 4d678a1de7c9..e163a7c1f440 100644 +--- third_party/libwebrtc/api/async_dns_resolver_gn/moz.build ++++ third_party/libwebrtc/api/async_dns_resolver_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 = "xul" + +@@ -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 += [ -- "android_support" +- "GLESv2", +- "log" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": - +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- 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": +- +- 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["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +@@ -161,50 +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["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if 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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - - Library("array_view_gn") +-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("async_dns_resolver_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 cbd6f2e6f0d5..3bfa575693b2 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 746585483f96..33ea9b79d47b 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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 e2561db08f06..59da7761dd35 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" + FINAL_LIBRARY = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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 7dd1c4b91100..960b60c3311c 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 36d43783a3e7..fd0111ba0ffd 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 06f43e765114..6c06b87bcfe3 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 5811f4d9321b..0f11017e2f6c 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 f4fb06ef3f09..90113fd85d92 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 faed7e9b0f61..84835da8965c 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" + FINAL_LIBRARY = "xul" -@@ -46,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,185 +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 5de9c2960769..a0d91297b550 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" + FINAL_LIBRARY = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,189 +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 5ff7dfd0ffd4..334acbe7d342 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" + FINAL_LIBRARY = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,189 +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 e1c8fa6a08bc..7799b83b91bb 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 39513d15b310..aff5480ad0b3 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 cf9228dcab3c..7eb3130288e3 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 3b1a814ac7b2..048ddee2cbdb 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 57bdfeaf74c0..f04086fa4375 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ae2d4f5dc9b4..8d5eb0cadc34 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 2ec1c97ea240..ee5d451c740d 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ff9d947abb85..cdb5435b0bf3 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 06926f2550c6..3bb8979209c8 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" + FINAL_LIBRARY = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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 a40417692306..11dc887d7856 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 a52b290d08bc..191d27589e54 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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 1847aa9f2334..b1a86854c6cd 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" + FINAL_LIBRARY = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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 b4ed20ad8589..220221aeeed4 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" + FINAL_LIBRARY = "xul" -@@ -48,175 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,174 +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 dc73c7abc386..b76dd0fcc777 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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 974d1dbdf2c7..90ca4ab68ba8 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 500eff54bbfd..a1f84da5a485 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 372f0888fbba..86c73a9fd726 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/api/callfactory_api_gn/moz.build -+++ third_party/libwebrtc/api/callfactory_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +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 2a9b6d96dd75..c032ee4fe916 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,118 +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 - -- 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": +@@ -153,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 f1716e6b6267..7d3b6bae0048 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - -- OS_LIBS += [ -- "android_support" +- 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("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 fae93b139253..5726c9c835be 100644 +--- third_party/libwebrtc/api/crypto/options_gn/moz.build ++++ third_party/libwebrtc/api/crypto/options_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 = "xul" + +@@ -43,174 +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["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +- 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["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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 ---- 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() +-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("options_gn") +diff --git third_party/libwebrtc/api/environment/environment_factory_gn/moz.build third_party/libwebrtc/api/environment/environment_factory_gn/moz.build +index 9388642ab5e6..2a4db566b430 100644 +--- third_party/libwebrtc/api/environment/environment_factory_gn/moz.build ++++ third_party/libwebrtc/api/environment/environment_factory_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if 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": - -@@ -149,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" +- "rt" - ] - --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_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 ---- third_party/libwebrtc/api/crypto/options_gn/moz.build -+++ third_party/libwebrtc/api/crypto/options_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,175 +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 -- --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "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_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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("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 ---- 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() + Library("environment_factory_gn") +diff --git third_party/libwebrtc/api/environment/environment_gn/moz.build third_party/libwebrtc/api/environment/environment_gn/moz.build +index 5b7b361ac342..b18f7c018485 100644 +--- third_party/libwebrtc/api/environment/environment_gn/moz.build ++++ third_party/libwebrtc/api/environment/environment_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 4210c8af822d..bb3da46c855c 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() + Library("environment_gn") +diff --git third_party/libwebrtc/api/fec_controller_api_gn/moz.build third_party/libwebrtc/api/fec_controller_api_gn/moz.build +index 653eae8f233f..383f2f1c9661 100644 +--- third_party/libwebrtc/api/fec_controller_api_gn/moz.build ++++ third_party/libwebrtc/api/fec_controller_api_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 = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 76e121ec9f5e..544a531d83f1 100644 +--- third_party/libwebrtc/api/field_trials_registry_gn/moz.build ++++ third_party/libwebrtc/api/field_trials_registry_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- 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": + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" -- --if CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["ANDROID"] = True -- 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" +- CXXFLAGS += [ +- "-msse2" - ] -+ DEFINES["_DEBUG"] = True - - if CONFIG["CPU_ARCH"] == "aarch64": ++if CONFIG["TARGET_CPU"] == "x86_64": - 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 ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["_DEBUG"] = True -- --if 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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +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_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 ---- third_party/libwebrtc/api/function_view_gn/moz.build -+++ third_party/libwebrtc/api/function_view_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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 a6ac64bf50c6..541f2359270f 100644 +--- third_party/libwebrtc/api/field_trials_view_gn/moz.build ++++ third_party/libwebrtc/api/field_trials_view_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 = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 2ed19fd691d7..5a66e1d8aace 100644 +--- third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build ++++ third_party/libwebrtc/api/frame_transformer_interface_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 feea8c2c0ba6..7c48aab74157 100644 +--- third_party/libwebrtc/api/function_view_gn/moz.build ++++ third_party/libwebrtc/api/function_view_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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/make_ref_counted_gn/moz.build third_party/libwebrtc/api/make_ref_counted_gn/moz.build -index 8b3a500acb00..2565408ce87a 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() + 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 6729abedf9bd..314418594b0e 100644 +--- third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build ++++ third_party/libwebrtc/api/libjingle_logging_api_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 f815d7da4e62..d8c0189951f6 100644 +--- third_party/libwebrtc/api/libjingle_peerconnection_api_gn/moz.build ++++ third_party/libwebrtc/api/libjingle_peerconnection_api_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 = "xul" -@@ -43,183 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/api/metronome/metronome_gn/moz.build -+++ third_party/libwebrtc/api/metronome/metronome_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + Library("jingle_peerconnection_api_gn") +diff --git third_party/libwebrtc/api/location_gn/moz.build third_party/libwebrtc/api/location_gn/moz.build +index 706b1d5026cc..673b106c6cea 100644 +--- third_party/libwebrtc/api/location_gn/moz.build ++++ third_party/libwebrtc/api/location_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 = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 6bedaf55cd03..6f4e516cb13f 100644 +--- third_party/libwebrtc/api/make_ref_counted_gn/moz.build ++++ third_party/libwebrtc/api/make_ref_counted_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 = "xul" -@@ -43,190 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 8cc4995908e8..4d4d0bbcdb02 100644 +--- third_party/libwebrtc/api/media_stream_interface_gn/moz.build ++++ third_party/libwebrtc/api/media_stream_interface_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 5ffa4ac6c78f..6eaccfb29fc6 100644 +--- third_party/libwebrtc/api/metronome/metronome_gn/moz.build ++++ third_party/libwebrtc/api/metronome/metronome_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 = "xul" -@@ -39,118 +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 - -- 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": +@@ -153,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 0486a791d10f..254ccec7ed2e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 ---- 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() + 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 ec0207e6b81a..217b5be2076d 100644 +--- third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build ++++ third_party/libwebrtc/api/neteq/neteq_api_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/api/priority_gn/moz.build -+++ third_party/libwebrtc/api/priority_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 830a41cbcb2f..04fd38417177 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +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 - --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "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" +- "log" - ] - --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("priority_gn") -diff --git third_party/libwebrtc/api/refcountedbase_gn/moz.build third_party/libwebrtc/api/refcountedbase_gn/moz.build -index f2a22be84640..b048864ad448 100644 ---- third_party/libwebrtc/api/refcountedbase_gn/moz.build -+++ third_party/libwebrtc/api/refcountedbase_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_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/api/rtc_error_gn/moz.build -+++ third_party/libwebrtc/api/rtc_error_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 4f4101599f07..3129a92d497c 100644 +--- third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build ++++ third_party/libwebrtc/api/neteq/tick_timer_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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 ---- 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() + 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 84ec63723306..ff25666ad5f9 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,183 +53,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/api/rtp_headers_gn/moz.build -+++ third_party/libwebrtc/api/rtp_headers_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + 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 e90b551e4d69..d402c9d495af 100644 +--- third_party/libwebrtc/api/priority_gn/moz.build ++++ third_party/libwebrtc/api/priority_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 = "xul" -@@ -43,183 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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() +- + Library("priority_gn") +diff --git third_party/libwebrtc/api/ref_count_gn/moz.build third_party/libwebrtc/api/ref_count_gn/moz.build +index b5ded03ae3a4..2a36041b5e46 100644 +--- third_party/libwebrtc/api/ref_count_gn/moz.build ++++ third_party/libwebrtc/api/ref_count_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 = "xul" -@@ -43,183 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/api/rtp_parameters_gn/moz.build -+++ third_party/libwebrtc/api/rtp_parameters_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + Library("ref_count_gn") +diff --git third_party/libwebrtc/api/refcountedbase_gn/moz.build third_party/libwebrtc/api/refcountedbase_gn/moz.build +index 42e693bf022a..e2d783b7b812 100644 +--- third_party/libwebrtc/api/refcountedbase_gn/moz.build ++++ third_party/libwebrtc/api/refcountedbase_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 = "xul" -@@ -44,179 +53,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + Library("refcountedbase_gn") +diff --git third_party/libwebrtc/api/rtc_error_gn/moz.build third_party/libwebrtc/api/rtc_error_gn/moz.build +index 1ff7960b4dd0..47846b31a453 100644 +--- third_party/libwebrtc/api/rtc_error_gn/moz.build ++++ third_party/libwebrtc/api/rtc_error_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 e478cf3e4c3c..8a92a62b9562 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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("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 ---- 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() + 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 5b5cac9bf046..8691523b8dfc 100644 +--- third_party/libwebrtc/api/rtp_headers_gn/moz.build ++++ third_party/libwebrtc/api/rtp_headers_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/api/scoped_refptr_gn/moz.build -+++ third_party/libwebrtc/api/scoped_refptr_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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_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 7bd7a37fb361..67fffb26c146 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" + FINAL_LIBRARY = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/api/sequence_checker_gn/moz.build -+++ third_party/libwebrtc/api/sequence_checker_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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 ada3bfe3a22b..dd1ba2bc5bd3 100644 +--- third_party/libwebrtc/api/rtp_parameters_gn/moz.build ++++ third_party/libwebrtc/api/rtp_parameters_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,178 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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_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 5b41bb13cbbe..2ae22cf178d8 100644 +--- third_party/libwebrtc/api/rtp_sender_interface_gn/moz.build ++++ third_party/libwebrtc/api/rtp_sender_interface_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 = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 89f5c0fcc118..ba3ef53ada72 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 c3b4e7f67e56..1acea51df010 100644 +--- third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build ++++ third_party/libwebrtc/api/rtp_transceiver_direction_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 = "xul" -@@ -43,179 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 bd244c29b5cb..58ee4b71716c 100644 +--- third_party/libwebrtc/api/scoped_refptr_gn/moz.build ++++ third_party/libwebrtc/api/scoped_refptr_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 = "xul" -@@ -43,175 +52,32 @@ 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": -- -- 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 e129bf8a010e..c2d4b302936a 100644 +--- third_party/libwebrtc/api/sequence_checker_gn/moz.build ++++ third_party/libwebrtc/api/sequence_checker_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 = "xul" -@@ -39,111 +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 -- -- 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": +-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": +@@ -153,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 222193edde3f..8b3da9c6ba70 100644 +--- third_party/libwebrtc/api/simulated_network_api_gn/moz.build ++++ third_party/libwebrtc/api/simulated_network_api_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 = "xul" -@@ -43,183 +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 -- -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True +-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/default_task_queue_factory_gn/moz.build third_party/libwebrtc/api/task_queue/default_task_queue_factory_gn/moz.build +index 0d9947daa8ce..5d6f286d394b 100644 +--- third_party/libwebrtc/api/task_queue/default_task_queue_factory_gn/moz.build ++++ third_party/libwebrtc/api/task_queue/default_task_queue_factory_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 -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": + FINAL_LIBRARY = "xul" + +@@ -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["WEBRTC_ENABLE_AVX2"] = 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"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + 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 -+ 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 95cbec37f017..dee377f35156 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() + if CONFIG["TARGET_CPU"] == "x86": + +@@ -149,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("default_task_queue_factory_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 e0e0b4688e62..47a601850a28 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("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 ---- 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() + 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 b3eb74837f20..94718b5d1065 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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 ---- 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() + Library("task_queue_gn") +diff --git third_party/libwebrtc/api/transport/bandwidth_estimation_settings_gn/moz.build third_party/libwebrtc/api/transport/bandwidth_estimation_settings_gn/moz.build +index 0885f16a0655..ef5775ccf647 100644 +--- third_party/libwebrtc/api/transport/bandwidth_estimation_settings_gn/moz.build ++++ third_party/libwebrtc/api/transport/bandwidth_estimation_settings_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 = "xul" -@@ -43,179 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + Library("bandwidth_estimation_settings_gn") +diff --git third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build +index 42410686d0be..82767eaae01a 100644 +--- third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build ++++ third_party/libwebrtc/api/transport/bitrate_settings_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 = "xul" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 += [ -- "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": - -@@ -153,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 e0f8f023787b..b9b426e20a50 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/api/transport_api_gn/moz.build -+++ third_party/libwebrtc/api/transport_api_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 0b2e41f78c7b..665be1aad89b 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 70efa923b78f..6f3cfe2f16c5 100644 +--- third_party/libwebrtc/api/transport/goog_cc_gn/moz.build ++++ third_party/libwebrtc/api/transport/goog_cc_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 = "xul" -@@ -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 += [ +- "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("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 ---- 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() + 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 abbedfaee9af..08b107c8a46a 100644 +--- third_party/libwebrtc/api/transport/network_control_gn/moz.build ++++ third_party/libwebrtc/api/transport/network_control_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- third_party/libwebrtc/api/units/frequency_gn/moz.build -+++ third_party/libwebrtc/api/units/frequency_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 16ec75fa0170..dc43798be44c 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 ---- 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() + 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 83c88e8037fe..3656e84885cd 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ 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": -- -- 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": + +@@ -160,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/api/units/timestamp_gn/moz.build -+++ third_party/libwebrtc/api/units/timestamp_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + 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 51a16e295eef..62b2c614ce5a 100644 +--- third_party/libwebrtc/api/transport/stun_types_gn/moz.build ++++ third_party/libwebrtc/api/transport/stun_types_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 = "xul" -@@ -43,179 +52,32 @@ 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["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,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("stun_types_gn") +diff --git third_party/libwebrtc/api/transport_api_gn/moz.build third_party/libwebrtc/api/transport_api_gn/moz.build +index a726caad2813..f12489fba6e4 100644 +--- third_party/libwebrtc/api/transport_api_gn/moz.build ++++ third_party/libwebrtc/api/transport_api_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 = "xul" + +@@ -43,178 +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 ---- 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() + 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 398b03d0a231..41e7c078d060 100644 +--- third_party/libwebrtc/api/units/data_rate_gn/moz.build ++++ third_party/libwebrtc/api/units/data_rate_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 = "xul" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 ---- 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() + 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 8f61d0131463..5a8fb7125160 100644 +--- third_party/libwebrtc/api/units/data_size_gn/moz.build ++++ third_party/libwebrtc/api/units/data_size_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 ---- 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() + 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 40a6bf261710..fa6c15bc81e1 100644 +--- third_party/libwebrtc/api/units/frequency_gn/moz.build ++++ third_party/libwebrtc/api/units/frequency_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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 b4c504524c6f..ea11fb826b9e 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() + 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 d9ede8c812f2..b129d8b4f2d8 100644 +--- third_party/libwebrtc/api/units/time_delta_gn/moz.build ++++ third_party/libwebrtc/api/units/time_delta_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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_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 ---- 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() + 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 9e5ed8541e57..ca185af59de3 100644 +--- third_party/libwebrtc/api/units/timestamp_gn/moz.build ++++ third_party/libwebrtc/api/units/timestamp_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 = "xul" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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": - -@@ -153,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 cafafadf4452..0be4593415cf 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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 += [ +- "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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/api/video/resolution_gn/moz.build -+++ third_party/libwebrtc/api/video/resolution_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 d804e2fd3671..a40fcef67844 100644 +--- third_party/libwebrtc/api/video/encoded_frame_gn/moz.build ++++ third_party/libwebrtc/api/video/encoded_frame_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 a444a71189b9..01e5ec845e10 100644 +--- third_party/libwebrtc/api/video/encoded_image_gn/moz.build ++++ third_party/libwebrtc/api/video/encoded_image_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- 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() + 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 01a33c4b813f..35e492ad1546 100644 +--- third_party/libwebrtc/api/video/frame_buffer_gn/moz.build ++++ third_party/libwebrtc/api/video/frame_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" + FINAL_LIBRARY = "xul" -@@ -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 += [ +- "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_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 ---- 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() + 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 4d6199a71433..63f6010eb884 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 a0c4da6d5809..afb0f88ed8fd 100644 +--- third_party/libwebrtc/api/video/render_resolution_gn/moz.build ++++ third_party/libwebrtc/api/video/render_resolution_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 = "xul" -@@ -43,179 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 e55dfe7d2c22..d5993bf113b5 100644 +--- third_party/libwebrtc/api/video/resolution_gn/moz.build ++++ third_party/libwebrtc/api/video/resolution_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 c061e657ab8a..03c9ed5c202b 100644 +--- third_party/libwebrtc/api/video/video_adaptation_gn/moz.build ++++ third_party/libwebrtc/api/video/video_adaptation_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 = "xul" -@@ -54,183 +63,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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 ---- 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() + 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 9581b4202af9..d526540c4a75 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -50,183 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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 ---- 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() + 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 71a1a7f2dc3e..4ca5af462591 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ 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": -- -- 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": -- 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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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": +@@ -160,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 aecab75d2eac..0ad41db37d78 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 1ff8d8117fa6..5bcaf00344da 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -46,183 +55,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 37f7adf1843d..8697e1d06d1e 100644 +--- third_party/libwebrtc/api/video/video_frame_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_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 = "xul" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,185 +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": - -@@ -153,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 2b8bd493aff9..c6b33b8a1e23 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,185 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 8b4bd96df239..bcbd30fd4d21 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,191 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- 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() + 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 3416d040b2ea..263eaf0e7885 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 d9d7097f2f89..2603fe99c69f 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -53,183 +62,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 -- -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 2769bef0eb29..2b71c8370242 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() +- + 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 7c696af228c6..da97d3a9cc11 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,185 +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("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 ---- 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() + 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 f54c46500445..dd230e6e136c 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/audio/audio_gn/moz.build -+++ third_party/libwebrtc/audio/audio_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 b1bb1e3323e8..162090a6363d 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -55,191 +64,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 += [ -- "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": -- -- 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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 ca9c0f599a99..1b58004533ae 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,190 +54,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 += [ +- "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_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 2e887471579d..5bb0f70142e3 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() + 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 b0c90b8ad2ee..4933d9ebafdb 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -52,190 +61,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("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 ---- 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() + 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 de1ff19cd39c..f5d7824d0dc2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,185 +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": - -@@ -153,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build -+++ third_party/libwebrtc/call/bitrate_allocator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 394091421449..a19bee0723d3 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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 += [ +- "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("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 ---- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build -+++ third_party/libwebrtc/call/bitrate_configurator_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 636a3df69c9a..abcef0e2e4c3 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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 ++ 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,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("video_track_source_constraints_gn") +diff --git third_party/libwebrtc/audio/audio_gn/moz.build third_party/libwebrtc/audio/audio_gn/moz.build +index 2888ef09bd9b..0b9c1637ce34 100644 +--- third_party/libwebrtc/audio/audio_gn/moz.build ++++ third_party/libwebrtc/audio/audio_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 = "xul" + +@@ -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 += [ +- "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("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 ---- third_party/libwebrtc/call/call_gn/moz.build -+++ third_party/libwebrtc/call/call_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 315f691f3e09..1848f414171d 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,191 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,189 +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 ---- third_party/libwebrtc/call/call_interfaces_gn/moz.build -+++ third_party/libwebrtc/call/call_interfaces_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 3dab96b5a372..bcaf67293b6b 100644 +--- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build ++++ third_party/libwebrtc/call/adaptation/resource_adaptation_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 = "xul" -@@ -49,190 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -52,190 +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("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 ---- 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() + 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 6ca0ee773997..92276ee6b298 100644 +--- third_party/libwebrtc/call/audio_sender_interface_gn/moz.build ++++ third_party/libwebrtc/call/audio_sender_interface_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build -+++ third_party/libwebrtc/call/rtp_interfaces_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 57adb400db54..754fdf86307a 100644 +--- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build ++++ third_party/libwebrtc/call/bitrate_allocator_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 481a02fe5580..4b5e64a7b0a9 100644 ---- third_party/libwebrtc/call/rtp_receiver_gn/moz.build -+++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 59f87d2fdf4d..537c7fe06fcd 100644 +--- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build ++++ third_party/libwebrtc/call/bitrate_configurator_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 = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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_receiver_gn") -diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build -index f823d8ea77d3..2959f53394c1 100644 ---- third_party/libwebrtc/call/rtp_sender_gn/moz.build -+++ third_party/libwebrtc/call/rtp_sender_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("bitrate_configurator_gn") +diff --git third_party/libwebrtc/call/call_gn/moz.build third_party/libwebrtc/call/call_gn/moz.build +index da452122ce12..84614d18ac06 100644 +--- third_party/libwebrtc/call/call_gn/moz.build ++++ third_party/libwebrtc/call/call_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 = "xul" -@@ -45,190 +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 += [ +- "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 ---- third_party/libwebrtc/call/version_gn/moz.build -+++ third_party/libwebrtc/call/version_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("call_gn") +diff --git third_party/libwebrtc/call/call_interfaces_gn/moz.build third_party/libwebrtc/call/call_interfaces_gn/moz.build +index 3c7b6a05d3ab..a65ef1040061 100644 +--- third_party/libwebrtc/call/call_interfaces_gn/moz.build ++++ third_party/libwebrtc/call/call_interfaces_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,190 +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("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 ---- 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() + 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 0b3511082a51..52c6e002375f 100644 +--- third_party/libwebrtc/call/receive_stream_interface_gn/moz.build ++++ third_party/libwebrtc/call/receive_stream_interface_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 = "xul" -@@ -44,190 +53,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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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 += [ +- + 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 f2fb2ab649bb..ed390dd2fce3 100644 +--- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build ++++ third_party/libwebrtc/call/rtp_interfaces_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_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" + FINAL_LIBRARY = "xul" -@@ -50,137 +59,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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["_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" - ] ++ 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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "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"] == "arm": +- +- OS_LIBS += [ +- "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": - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": +- 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("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 ---- 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() + 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 35c68ca3368d..f18af2328452 100644 +--- third_party/libwebrtc/call/rtp_receiver_gn/moz.build ++++ third_party/libwebrtc/call/rtp_receiver_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 = "xul" -@@ -39,108 +48,17 @@ 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 += [ +- "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 - -- 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": - -@@ -150,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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_receiver_gn") +diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build +index c99d9d8e8a66..4e15db834a33 100644 +--- third_party/libwebrtc/call/rtp_sender_gn/moz.build ++++ third_party/libwebrtc/call/rtp_sender_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 = "xul" -@@ -80,113 +89,12 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,190 +55,32 @@ 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 += [ +- "GLESv2", - "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["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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 ++ DEFINES["_DEBUG"] = True - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", -@@ -194,26 +102,10 @@ if CONFIG["OS_TARGET"] == "WINNT": - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] + if CONFIG["TARGET_CPU"] == "aarch64": --if CONFIG["CPU_ARCH"] == "aarch64": -- -- DEFINES["WEBRTC_ARCH_ARM64"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- --if CONFIG["CPU_ARCH"] == "arm": + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": - -- CFLAGS += [ +- CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = 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": - - if CONFIG["CPU_ARCH"] == "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": - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - --if CONFIG["CPU_ARCH"] == "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["TARGET_CPU"] == "mips64": - - if CONFIG["CPU_ARCH"] == "x86": +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "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": -- -- 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 += [ + CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] +-if CONFIG["OS_TARGET"] == "Linux" 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"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": -- -- 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" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-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 - 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": - "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" - ] - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- -- 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": -- -- CFLAGS += [ +- CXXFLAGS += [ - "-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": - "/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 ---- 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() + Library("rtp_sender_gn") +diff --git third_party/libwebrtc/call/version_gn/moz.build third_party/libwebrtc/call/version_gn/moz.build +index 50ff0cff2e55..ee871323396a 100644 +--- third_party/libwebrtc/call/version_gn/moz.build ++++ third_party/libwebrtc/call/version_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 ---- 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() + 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 9aa475a12fc6..7488f3667ecd 100644 +--- third_party/libwebrtc/call/video_stream_api_gn/moz.build ++++ third_party/libwebrtc/call/video_stream_api_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 = "xul" -@@ -56,190 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 fc1e13a8933c..505627b692c3 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,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_ARCH_ARM64"] = True +DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = 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" + FINAL_LIBRARY = "xul" -@@ -46,148 +56,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,137 +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_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": -- -- 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"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- -if 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": - -- DEFINES["WEBRTC_ARCH_ARM64"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +- DEFINES["USE_X11"] = "1" - -- OS_LIBS += [ -- "android_support", -- "unwind" +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- CXXFLAGS += [ +- "-msse2" - ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -- -- 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 ---- 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() ++ 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 0827bbf31a41..7a873e6e680c 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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" + FINAL_LIBRARY = "xul" -@@ -45,148 +55,10 @@ 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 - -- 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 ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": - -- OS_LIBS += [ -- "crypt32", -- "iphlpapi", -- "secur32", -- "winmm" -- ] -- --if CONFIG["CPU_ARCH"] == "arm": +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True - -- CXXFLAGS += [ -- "-mfpu=neon" +- 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" - ] - -- DEFINES["WEBRTC_ARCH_ARM"] = True -- DEFINES["WEBRTC_ARCH_ARM_V7"] = 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": + +@@ -154,50 +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 - +- DEFINES["_DEBUG"] = True +- -if 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": -- -- 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 +- DEFINES["_GNU_SOURCE"] = 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 ---- 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() +-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("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 99cceabf2989..709978b9f184 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_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" + FINAL_LIBRARY = "xul" -@@ -45,159 +54,23 @@ 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" - ] - --if CONFIG["OS_TARGET"] == "Darwin": -- -- CXXFLAGS += [ -- "-msse2" +- 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["_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 - +- 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["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", +@@ -198,26 +103,10 @@ if CONFIG["OS_TARGET"] == "WINNT": + "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" + ] + +-if CONFIG["TARGET_CPU"] == "aarch64": - --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- DEFINES["WEBRTC_ARCH_ARM64"] = True +- DEFINES["WEBRTC_HAS_NEON"] = True - - DEFINES["_DEBUG"] = True +-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["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" +@@ -234,8 +123,6 @@ if CONFIG["TARGET_CPU"] == "mips32": + + 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", +@@ -250,88 +137,21 @@ if CONFIG["TARGET_CPU"] == "ppc64": + "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" + ] + +-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["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["TARGET_CPU"] == "riscv64": - CXXFLAGS += [ - "-msse2", - "-msse2" + 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"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- - OS_LIBS += [ -- "android_support" +- "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CFLAGS += [ + "-msse2" + ] + +- 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" +- ] - -- CXXFLAGS += [ -- "-msse2" +-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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- +- 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" +- ] +- +-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["CPU_ARCH"] == "x86_64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ -- "-msse2", - "-msse2" + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", +@@ -339,13 +159,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": + "/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": +- +- CFLAGS += [ +- "-msse2" +- ] ++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", +@@ -353,14 +169,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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- +- DEFINES["_GNU_SOURCE"] = True +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": -- CXXFLAGS += [ -- "-msse2" +- 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_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 ---- 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() + 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 1ab56ac80918..42e92caa7571 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 ---- 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() + 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 79a78f783794..12a1a532fbed 100644 +--- third_party/libwebrtc/common_audio/common_audio_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -56,189 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 acd2e8bc36f7..417e933a842e 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,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" + FINAL_LIBRARY = "xul" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,151 +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" - ] -+ 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["TARGET_CPU"] == "arm": - - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True -- DEFINES["_GNU_SOURCE"] = True +- CFLAGS += [ +- "-mfpu=neon" +- ] - --if CONFIG["CPU_ARCH"] == "mips64": +- DEFINES["WEBRTC_ARCH_ARM"] = True +- DEFINES["WEBRTC_ARCH_ARM_V7"] = True - -- 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 -- + DEFINES["_DEBUG"] = True + -if 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"] == "aarch64": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["WEBRTC_ARCH_ARM64"] = True - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- 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": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - -- DEFINES["_GNU_SOURCE"] = True +- DEFINES["WEBRTC_ARCH_ARM64"] = 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 ---- 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() + 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 c415a7145299..25ddc9cd7e7a 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,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" + FINAL_LIBRARY = "xul" -@@ -43,97 +52,7 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,151 +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" - ] -+ DEFINES["_DEBUG"] = True - - if CONFIG["CPU_ARCH"] == "aarch64": - -@@ -144,133 +63,42 @@ if CONFIG["CPU_ARCH"] == "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": - - 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": -- -- DEFINES["_GNU_SOURCE"] = True -- - if CONFIG["CPU_ARCH"] == "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": -- -- 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 -- + DEFINES["_DEBUG"] = True + -if 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"] == "aarch64": - -- DEFINES["USE_X11"] = "1" +- 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"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- - CXXFLAGS += [ - "-msse2", - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": -+ 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": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86_64": - - CXXFLAGS += [ -- "-msse2", - "-msse2" - ] - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+ 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": +- DEFINES["WEBRTC_ARCH_ARM64"] = True - -- 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 ---- 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() + 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 435c33a394e5..146ddde10702 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,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" + FINAL_LIBRARY = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,159 +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 -+ 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" +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" - ] - -- 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 -- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -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": -- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + CXXFLAGS += [ + "-msse2", "-msse2" ] -- OS_LIBS += [ -- "android_support" +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- CXXFLAGS += [ +- "-msse2", +- "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - -- 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("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 ---- 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() + 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 2faac2a93134..2bb083f83813 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,115 +48,21 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 - -- 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 - +- 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/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" +- 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 - -- 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": - - if CONFIG["CPU_ARCH"] == "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": - "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" - ] - --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "mips64": - -- UNIFIED_SOURCES += [ -- "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" -- ] -- - if CONFIG["CPU_ARCH"] == "x86": +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "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": -- -- 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 += [ + CXXFLAGS += [ "-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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - -- UNIFIED_SOURCES += [ -- "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-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 - 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": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- -- CFLAGS += [ +- CXXFLAGS += [ - "-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 ---- 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() + 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 af029033e761..47a1e94fccaa 100644 +--- third_party/libwebrtc/common_audio/fir_filter_gn/moz.build ++++ third_party/libwebrtc/common_audio/fir_filter_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 = "xul" -@@ -55,183 +64,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 962dbed44bf8..a3de988aa645 100644 +--- third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build ++++ third_party/libwebrtc/common_audio/sinc_resampler_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 6245fdf7ef93..c9bc0ab140da 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ 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": - DEFINES["WEBRTC_ARCH_ARM64"] = True - DEFINES["WEBRTC_HAS_NEON"] = True +@@ -148,128 +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 - - if CONFIG["CPU_ARCH"] == "mips32": +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc" +- ] +- + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": + + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc" + ] + +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "x86": +- + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" +- ] +- +-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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86_64": +- +- CXXFLAGS += [ +- "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": +- +- DEFINES["_GNU_SOURCE"] = True - +-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" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" + ] - 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 +-if CONFIG["OS_TARGET"] == "OpenBSD" and CONFIG["TARGET_CPU"] == "x86_64": +- +- CXXFLAGS += [ +- "-msse2" +- ] + 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 ---- 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() + 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 7c2503bc9ccd..9f95cef3ece3 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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" - ] ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True --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 ---- 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() +-if CONFIG["OS_TARGET"] == "Linux" and 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 ec09e725fff7..10e9f97d6da5 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -47,183 +56,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_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 - -- OS_LIBS += [ -- "winmm" +- 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": -- -- 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": +- 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["TARGET_CPU"] == "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": + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_mips.c" +@@ -159,8 +71,6 @@ if CONFIG["TARGET_CPU"] == "mips32": + 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" + ] +@@ -171,102 +81,34 @@ if CONFIG["TARGET_CPU"] == "ppc64": + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + +-if CONFIG["TARGET_CPU"] == "x86": +- - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["TARGET_CPU"] == "riscv64": + + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- - CXXFLAGS += [ +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if 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"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" +- ] +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": + DEFINES["WEBRTC_ENABLE_AVX2"] = True -- CXXFLAGS += [ + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + +-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 --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + +-if 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("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 ---- 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() + 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 fb64d190c30d..9a932841e6b6 100644 +--- third_party/libwebrtc/common_video/common_video_gn/moz.build ++++ third_party/libwebrtc/common_video/common_video_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 = "xul" -@@ -48,183 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -55,185 +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("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 ---- 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() + 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 08c88c4702cf..9db89bc82aab 100644 +--- third_party/libwebrtc/common_video/frame_counts_gn/moz.build ++++ third_party/libwebrtc/common_video/frame_counts_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 = "xul" -@@ -46,183 +55,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - - Library("rtc_event_field_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 ---- 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() +- + 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 b16531fbf8e2..d38bf09f56cb 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,179 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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_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 ---- 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() + 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 5e1ddc355d5b..eaa9a598140a 100644 +--- third_party/libwebrtc/experiments/registered_field_trials_gn/moz.build ++++ third_party/libwebrtc/experiments/registered_field_trials_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 = "xul" -@@ -43,183 +52,32 @@ 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["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,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("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 6c29dea76a50..3ae54a950c46 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 bf124013de2a..458504cb1a8a 100644 +--- third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_audio_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 = "xul" + +@@ -47,185 +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_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 ---- 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() + 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 c7c2a5f88033..05a45c19eaba 100644 +--- third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_bwe_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 = "xul" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,185 +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("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 ---- 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() + 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 630358f34942..84d1261d676d 100644 +--- third_party/libwebrtc/logging/rtc_event_field_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_field_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 = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,185 +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_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 ---- 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() + 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 46e013a0d4d4..35119b6eae57 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +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 -- -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/media/codec_gn/moz.build -+++ third_party/libwebrtc/media/codec_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + 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 4c491af3963c..aa2e0940ea0a 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,178 +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 += [ -- "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() + 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 aec4465f8ac3..90a07fc5ca25 100644 +--- third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_pacing_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + - 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 ---- third_party/libwebrtc/media/media_channel_gn/moz.build -+++ third_party/libwebrtc/media/media_channel_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 3edc922b8f08..828a59406490 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,119 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,189 +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": - -@@ -161,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 616e73dcf5ec..b0b40454f315 100644 +--- third_party/libwebrtc/logging/rtc_event_video_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_video_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/media/media_constants_gn/moz.build -+++ third_party/libwebrtc/media/media_constants_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 6fd95dde97d0..bf513371f32d 100644 +--- third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_stream_config_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- third_party/libwebrtc/media/rid_description_gn/moz.build -+++ third_party/libwebrtc/media/rid_description_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("rtc_stream_config_gn") +diff --git third_party/libwebrtc/media/adapted_video_track_source_gn/moz.build third_party/libwebrtc/media/adapted_video_track_source_gn/moz.build +index 1cb4f853abba..bbf25c8397df 100644 +--- third_party/libwebrtc/media/adapted_video_track_source_gn/moz.build ++++ third_party/libwebrtc/media/adapted_video_track_source_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -160,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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_encoder_simulcast_proxy_gn/moz.build third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build -index 040f27525274..f16bd9e3d193 100644 ---- third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build -+++ third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + Library("adapted_video_track_source_gn") +diff --git third_party/libwebrtc/media/codec_gn/moz.build third_party/libwebrtc/media/codec_gn/moz.build +index cf10ada0cf66..a2e116825f9e 100644 +--- third_party/libwebrtc/media/codec_gn/moz.build ++++ third_party/libwebrtc/media/codec_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 = "xul" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_encoder_simulcast_proxy_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 ---- 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() + Library("codec_gn") +diff --git third_party/libwebrtc/media/media_channel_gn/moz.build third_party/libwebrtc/media/media_channel_gn/moz.build +index fc0c50aa726b..65afa6523e40 100644 +--- third_party/libwebrtc/media/media_channel_gn/moz.build ++++ third_party/libwebrtc/media/media_channel_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 = "xul" -@@ -46,191 +55,32 @@ 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": -- -- 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": + +@@ -165,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True +-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 b7db93813a60..02018a9118e9 100644 +--- third_party/libwebrtc/media/media_channel_impl_gn/moz.build ++++ third_party/libwebrtc/media/media_channel_impl_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 -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": + FINAL_LIBRARY = "xul" + +@@ -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["WEBRTC_ENABLE_AVX2"] = 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"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + 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 -+ 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 ---- 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() + if CONFIG["TARGET_CPU"] == "x86": + +@@ -149,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("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 fb7440ec4a07..8b99c9931019 100644 +--- third_party/libwebrtc/media/media_constants_gn/moz.build ++++ third_party/libwebrtc/media/media_constants_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("media_constants_gn") +diff --git third_party/libwebrtc/media/rid_description_gn/moz.build third_party/libwebrtc/media/rid_description_gn/moz.build +index 22f56f08a780..b9d567d474ee 100644 +--- third_party/libwebrtc/media/rid_description_gn/moz.build ++++ third_party/libwebrtc/media/rid_description_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 = "xul" -@@ -43,191 +52,32 @@ 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 - -- 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": -- -- 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/media/rtp_utils_gn/moz.build -+++ third_party/libwebrtc/media/rtp_utils_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + 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 eb9cb4e29d04..d886ebdf06fa 100644 +--- third_party/libwebrtc/media/rtc_media_base_gn/moz.build ++++ third_party/libwebrtc/media/rtc_media_base_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -165,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/media/stream_params_gn/moz.build -+++ third_party/libwebrtc/media/stream_params_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 4b6ba11d7681..f8b511ad7260 100644 +--- third_party/libwebrtc/media/rtc_media_config_gn/moz.build ++++ third_party/libwebrtc/media/rtc_media_config_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + Library("rtc_media_config_gn") +diff --git third_party/libwebrtc/media/rtc_sdp_video_format_utils_gn/moz.build third_party/libwebrtc/media/rtc_sdp_video_format_utils_gn/moz.build +index 10b08d64fbe2..68edc3038e9b 100644 +--- third_party/libwebrtc/media/rtc_sdp_video_format_utils_gn/moz.build ++++ third_party/libwebrtc/media/rtc_sdp_video_format_utils_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + Library("rtc_sdp_video_format_utils_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 1929dd6e9399..285c3d71156e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -47,190 +56,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 - - 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 ---- 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() + 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 22b3cc9d6461..c7e26cb4b401 100644 +--- third_party/libwebrtc/media/rtp_utils_gn/moz.build ++++ third_party/libwebrtc/media/rtp_utils_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 67ed8e9a461d..7cd0a0f85eea 100644 +--- third_party/libwebrtc/media/stream_params_gn/moz.build ++++ third_party/libwebrtc/media/stream_params_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 = "xul" -@@ -43,183 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + Library("stream_params_gn") +diff --git third_party/libwebrtc/media/video_adapter_gn/moz.build third_party/libwebrtc/media/video_adapter_gn/moz.build +index 1ce6badaf84c..87e2c14c5774 100644 +--- third_party/libwebrtc/media/video_adapter_gn/moz.build ++++ third_party/libwebrtc/media/video_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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + Library("video_adapter_gn") +diff --git third_party/libwebrtc/media/video_broadcaster_gn/moz.build third_party/libwebrtc/media/video_broadcaster_gn/moz.build +index c1ebd4508d5a..851aace5f42c 100644 +--- third_party/libwebrtc/media/video_broadcaster_gn/moz.build ++++ third_party/libwebrtc/media/video_broadcaster_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- 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() + Library("video_broadcaster_gn") +diff --git third_party/libwebrtc/media/video_common_gn/moz.build third_party/libwebrtc/media/video_common_gn/moz.build +index b99fdbd29446..568207bcf3e4 100644 +--- third_party/libwebrtc/media/video_common_gn/moz.build ++++ third_party/libwebrtc/media/video_common_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 = "xul" -@@ -53,190 +62,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- 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() + Library("video_common_gn") +diff --git third_party/libwebrtc/media/video_source_base_gn/moz.build third_party/libwebrtc/media/video_source_base_gn/moz.build +index b74ce609e95f..48c6de6f6cd5 100644 +--- third_party/libwebrtc/media/video_source_base_gn/moz.build ++++ third_party/libwebrtc/media/video_source_base_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + Library("video_source_base_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 495a5d8cac13..cbf73a5b937e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": - -- CFLAGS += [ +- CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_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 += [ + CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if 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 += [ +- CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() + 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 995b2a2a3b31..867012af59fb 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,189 +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("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 ---- 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() + 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 470578709e2f..94099348743b 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,175 +52,32 @@ 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": -- -- CFLAGS += [ -- "-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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True - -- CFLAGS += [ -- "-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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 e484426fd2ab..197384a642be 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 1e7e932b55da..016f8f1e2439 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -111,190 +120,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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": - -- CFLAGS += [ +- CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_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 += [ + CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if 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 += [ +- CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() + 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 92221fcca1a0..2fafe9504826 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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("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 ---- 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() + 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 cb6c943d7c37..7505b52d141f 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -53,189 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 a0d24b9a5d28..48d685b4f5f3 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -46,175 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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": - -- CFLAGS += [ +- CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_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 += [ + CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if 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 += [ +- CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() + 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 dcf3567d5c55..d969b721268a 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 += [ -- "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 += [ +- 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": - - CXXFLAGS += [ + 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 -- CXXFLAGS += [ +- 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("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 ---- 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() + 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 b6962f1786ab..c37ec8d1a4f3 100644 +--- third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/g711_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 = "xul" -@@ -78,190 +87,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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("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 ---- 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() + 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 99188c0a5833..502a17cd0e34 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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" ] +-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 + +- CFLAGS += [ +- "-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("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 56ac627776c9..a936eb41a9a1 100644 +--- third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/g722_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 = "xul" + +@@ -44,185 +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["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["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if 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 += [ +- CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() + 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 9c374405df33..6e2fd6beb0d5 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -111,189 +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": - -- CXXFLAGS += [ +- 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": - - CXXFLAGS += [ + 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 -- CXXFLAGS += [ +- 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_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 ---- 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() + 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 f3546882a1a3..7700d43a1597 100644 +--- third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/ilbc_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 c0b5ae4a7a4c..214b9d2bed65 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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 ++ 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,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "crypt32", -- "iphlpapi", -- "secur32", -- "winmm" +- "unwind" - ] +- +-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("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 15040244a118..72275c755c49 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -46,174 +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": - -- CXXFLAGS += [ +- 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": - - CXXFLAGS += [ + 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 -- CXXFLAGS += [ +- 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("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 ---- 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() + 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 c03333a31981..ddbb058ccb47 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_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" + FINAL_LIBRARY = "xul" -@@ -48,183 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 a017d70518e7..63842535376f 100644 +--- third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/neteq_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_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" + FINAL_LIBRARY = "xul" -@@ -48,190 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -77,189 +87,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_GNU_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - - OS_LIBS += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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 ---- 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() + 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 1e7a8e8f6560..3763b892f8c5 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_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" + FINAL_LIBRARY = "xul" -@@ -47,183 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-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["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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CFLAGS += [ + "-msse2" + ] + +-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 + +- CFLAGS += [ +- "-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("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 2a2a2542335b..f79075092c57 100644 +--- third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/pcm16b_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 = "xul" + +@@ -45,185 +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("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 ---- 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() + 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 02ef2ce08e9c..9e46d6913b16 100644 +--- third_party/libwebrtc/modules/audio_coding/red_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/red_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 02f3bf49e1c1..2302a1064808 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 ---- 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() + 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 9665cd22c68e..010763da2910 100644 +--- third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build +@@ -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_APM_DEBUG_DUMP"] = "0" +DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_CODEC_ILBC"] = True + DEFINES["WEBRTC_CODEC_OPUS"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["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_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" + FINAL_LIBRARY = "xul" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,185 +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("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 ---- 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() + 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 2d219b5cc091..9409b7e3fdee 100644 +--- third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build +@@ -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" 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" + FINAL_LIBRARY = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -48,189 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 4c1faef88198..b2e255ce3d6e 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,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" 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" + FINAL_LIBRARY = "xul" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,185 +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": - -@@ -160,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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 += [ ++ 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("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 acd3896de105..f0da29e5d200 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_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" + FINAL_LIBRARY = "xul" -@@ -54,137 +63,16 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "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 ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "aarch64": + + DEFINES["WEBRTC_ARCH_ARM64"] = True + DEFINES["WEBRTC_HAS_NEON"] = True + +-if CONFIG["TARGET_CPU"] == "arm": - -- OS_LIBS += [ -- "crypt32", -- "iphlpapi", -- "secur32", -- "winmm" -- ] +- 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,50 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "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["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - CXXFLAGS += [ - "-msse2" - ] + 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"] == "Linux": -+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 ---- 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() +-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("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 24bd59bd5356..67fb1a20b25e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 c32088c064a8..7bf6880e3e0f 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,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" + FINAL_LIBRARY = "xul" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,189 +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": - -@@ -160,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 f994d264fc0d..0c5c8a020d6e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -100,190 +109,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 - -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 bfab3391fd95..91c95c95d416 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +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": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 b8c459326a74..3b08188a5f58 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,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"] = "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" + FINAL_LIBRARY = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -54,137 +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 -+ 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": +- OS_LIBS += [ +- "crypt32", +- "iphlpapi", +- "secur32", +- "winmm" +- ] - -- 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["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if 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": +- DEFINES["USE_X11"] = "1" - -- OS_LIBS += [ -- "android_support" +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- CXXFLAGS += [ +- "-msse2" - ] -- --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("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 ---- 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() ++ 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 8c8af7ad0246..a706c74c28dd 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 f29e37596167..a2b558b015d0 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +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": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 b984c66872a1..d3a048865141 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,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" + FINAL_LIBRARY = "xul" -@@ -39,111 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -100,189 +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": - -@@ -153,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 636d54205ecc..f3c9e69d0679 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +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 -- -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 0399096915b4..d38d62bb9ca0 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +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 -- -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 52ec8e5f7dfc..de62aae422cb 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,113 +53,7 @@ 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" - ] - -- 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": + DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True - SOURCES += [ -- "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_neon.cc" -- ] -- --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 - -- 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": + 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 - SOURCES += [ - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_mips.cc" -@@ -187,8 +76,6 @@ if CONFIG["CPU_ARCH"] == "mips32": - - if CONFIG["CPU_ARCH"] == "mips64": + if CONFIG["TARGET_CPU"] == "x86": -- 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": - "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] +@@ -153,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": --if CONFIG["CPU_ARCH"] == "riscv64": -- -- SOURCES += [ -- "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" -- ] -- - if CONFIG["CPU_ARCH"] == "x86": + 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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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"] == "x86": - - 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": - -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "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["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() + 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 712a4c357172..5c642468adb2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,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 - -- 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": -- -- 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": +-if CONFIG["TARGET_CPU"] == "mips64": - -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": -- -- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" -- --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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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" + if CONFIG["TARGET_CPU"] == "x86": -@@ -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": +@@ -153,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 198f71db4371..3a94c3362f81 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ 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": -- -- 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": + +@@ -160,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 ad723168abdc..97e0d9709187 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 ef89571beeca..8ae46e8c3f1e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 fc1a743ada41..575c93715eed 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ 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": - DEFINES["WEBRTC_ARCH_ARM64"] = True +@@ -162,20 +62,7 @@ if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": + SOURCES += [ +- "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_neon.cc" +- ] +- +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": +- SOURCES += [ ++ "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc", + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_neon.cc" + ] + +@@ -183,7 +70,6 @@ if CONFIG["TARGET_CPU"] == "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": + SOURCES += [ + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_mips.cc" +@@ -191,8 +77,6 @@ if CONFIG["TARGET_CPU"] == "mips32": + + if CONFIG["TARGET_CPU"] == "mips64": + +- DEFINES["_GNU_SOURCE"] = True +- + SOURCES += [ + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" + ] +@@ -203,90 +87,34 @@ if CONFIG["TARGET_CPU"] == "ppc64": + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" + ] +-if CONFIG["TARGET_CPU"] == "x86": +- - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" +- CXXFLAGS += [ +- "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +- SOURCES += [ +- "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" +- ] +- +-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" +- SOURCES += [ +- "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": ++if CONFIG["TARGET_CPU"] == "riscv64": + + SOURCES += [ + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] - 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": + SOURCES += [ + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True - 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 ---- 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() + SOURCES += [ + "/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc" + ] + ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ 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 c365d8251091..69cf5b32c800 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,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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 ---- 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() + 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 7f018adae5f0..c9930a29880f 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 d129ca31f30f..9e5843ca9d55 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 1b5ce0bb9058..94838195a243 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,189 +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("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 ---- 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() + 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 301502022710..9d3e621ef2c1 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,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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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_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 ---- 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() + 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 fe132f5f694c..35f0c449d032 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 ae1541ded6d8..9e7828c0e215 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 64f1d62c2def..057a01c35050 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 bc5907abea35..4ddef798f043 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 ---- 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() + 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 ed716566a46d..b746c1697b38 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,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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,189 +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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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("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 ---- 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() + 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 3f2132cc91d8..d80bca19c048 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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_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 ---- 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() + 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 9736df45221e..1b5b649273c9 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ 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["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,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("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 cd4bf219463d..b3d639b758c3 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,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 = "xul" + +@@ -45,189 +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("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 ---- 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() + 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 59a271492490..d57ecd1e8c07 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 bce906f682e9..4fb8352cdf6d 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,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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 ---- 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() + 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 06d77c98fdb8..eacf88cb2c77 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 9c27c5284f73..4a2e5ece584d 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +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": -@@ -149,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -164,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 c06de8a64d6b..5a79d30a9da3 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 ---- 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() + 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 68a10c5f8ca5..c905cd958ae1 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- 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("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 ---- 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 += [ - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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_PROTOBUF"] = "0" - DEFINES["WEBRTC_LIBRARY_IMPL"] = True - DEFINES["WEBRTC_MOZILLA_BUILD"] = True - DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" -+DEFINES["WEBRTC_POSIX"] = True - DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" -+DEFINES["_FILE_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"]: - if CONFIG["MOZ_DEBUG"] == "1": + CXXFLAGS += [ + "-msse2" + ] - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" -- --if CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - -- DEFINES["ANDROID"] = True -- 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": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - -- 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["_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_POSIX"] = True -- DEFINES["_FILE_OFFSET_BITS"] = "64" -- DEFINES["_LARGEFILE64_SOURCE"] = True -- DEFINES["_LARGEFILE_SOURCE"] = True -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if 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" -- ] -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["_DEBUG"] = True - --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- - DEFINES["_DEBUG"] = True +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "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": +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": - CXXFLAGS += [ - "-msse2" - ] +- DEFINES["_GNU_SOURCE"] = True ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["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["_GNU_SOURCE"] = True + 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 ---- 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() + 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 8d629f368af1..79d839518c86 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,118 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": - -@@ -160,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 89a8148e73b2..989a69261a88 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 a650860e3ed1..d64690a99e7e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,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 - -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True +-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 33988b17e143..790be6232bb6 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True -- CXXFLAGS += [ -- "-msse2" + FINAL_LIBRARY = "xul" + +@@ -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["CPU_ARCH"] == "x86_64": +- +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- 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 -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["TARGET_CPU"] == "mips64": +- +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +@@ -153,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64": + + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if 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["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" + 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 ---- 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() +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("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 1e27faa5870d..a3b90470369b 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 6ffad4636659..ecf6e2b21491 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +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 -- -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 38fbb48de3fe..3c36b3d1087c 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,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_APM_DEBUG_DUMP"] = "0" +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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,137 +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" - ] -+ 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 -- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -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": -- +-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"] == "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 +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - 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("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 ---- 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() + 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 d3bb22b9a525..5c642468adb2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -46,190 +55,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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 271c46c540d7..aebdf4b8ac28 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,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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,189 +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_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 ---- 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() + 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 cfb4bb80840a..da5dfc59ec93 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,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" + FINAL_LIBRARY = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 00e3216b4597..8f4f2eb9cd09 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -50,190 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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_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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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,175 +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 -- --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "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": -- -- 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("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 ---- 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() + 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 e0d5597d5605..73327af215a3 100644 +--- third_party/libwebrtc/modules/audio_processing/api_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/api_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 9b5e11e947d9..1bd5feb70d36 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,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" + FINAL_LIBRARY = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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 ---- 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() + 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 986ecc61c766..3d9e6a75e276 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,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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,189 +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("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 ---- 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() + 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 894361b57458..c605bd008d4e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -56,190 +65,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 7a283f1e109a..e9b1dc9e853e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +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 - -- 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": + +@@ -153,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 4acaa7f014eb..66c1eab00fc1 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,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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,189 +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("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 ---- 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() + 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 4f36694047af..1fac698b31d9 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 ba0901058580..d8273687ada4 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -47,190 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 2fd9b99a64df..62d3f34fa3be 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,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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 09d5dc988247..ce4fc0c9b48a 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 ---- 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() + 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 93c673ef1703..87ffa3a5cf65 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,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" + FINAL_LIBRARY = "xul" -@@ -44,179 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -56,189 +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("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 ---- 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() + 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 0af06a9c3544..8e0e151a81c8 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 ---- 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() + 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 8b21dc34fd6c..3a7dc84732d1 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -50,190 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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_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 9633f1ef4819..02587d185dd1 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 f3ccbefcdb8e..53e064f05b08 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,190 +54,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- 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,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("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 0ec5dcb6c535..b42e3cf6c30e 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -47,189 +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("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 ---- 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() + 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 50a6a9d55ce5..418e3f81e786 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 += [ -- "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 15f5a583ef24..ff1a426bf5d3 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 f1b3493b7a96..93278d71202e 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -45,190 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("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 ---- 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 12b385e2e905..fc6f3d337810 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -49,190 +58,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,178 +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("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 973d4bf32fab..49adaa09b004 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 f1e1bc555af4..7ef8884828c3 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("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 ---- 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() + 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 4794a478e8a0..8cf74ef26590 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,189 +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("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 ---- 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" + 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 59d06c939618..1fda98e1fc3f 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,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" + FINAL_LIBRARY = "xul" -@@ -44,183 +53,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 += [ +- "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" ] +-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("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 2a3d216e40c0..099616509cba 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -43,185 +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["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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 b138b59fc656..7e2398647c6a 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,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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,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 += [ +- "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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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 47ee346c89e8..2bd76ccbe13d 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,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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,189 +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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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 fa641fccfe18..fc883ee32524 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,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" + FINAL_LIBRARY = "xul" -@@ -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 += [ +- "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("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 ---- 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 d229d732df78..f1c13c16cc7d 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("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 6ee156d2f828..313ac07d0c15 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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 8065861f7854..efe50771e696 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,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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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("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 ---- 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() + 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 72c625902ca3..ce9cd35cdad2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 ---- 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() + 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 cb2bc83d2850..1da5621be1e2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_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" + FINAL_LIBRARY = "xul" -@@ -44,110 +53,23 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +53,32 @@ 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" +- ] +- -if CONFIG["OS_TARGET"] == "Darwin": -+if CONFIG["CPU_ARCH"] == "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": - - 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" +- ] ++ 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": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": - -- CXXFLAGS += [ -- "-msse2", -- "-msse2" +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-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" - ] -- - 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 8c56b6b8e5a4..a94fc562734c 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() ++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("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 af00c0132302..35073ee314de 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -70,554 +79,39 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 - -- UNIFIED_SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/mac/desktop_configuration_monitor.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" -- ] -- -- 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", +- "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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-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("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 52323451eb32..bbdcd96a5813 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,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 = "xul" + +@@ -44,189 +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["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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-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("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 9226c07dda23..7ccf74c4df65 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -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 +- +- 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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-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("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 c2b8fead8d15..fb3cad9e95c0 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -44,189 +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", -- "d3d11", -- "dxgi", - "iphlpapi", - "secur32", - "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/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 +- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True + DEFINES["MIPS_FPU_LE"] = 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/" -- ] +-if CONFIG["TARGET_CPU"] == "mips64": - -- SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" -- ] +- DEFINES["_GNU_SOURCE"] = True + + if CONFIG["TARGET_CPU"] == "x86": + +- DEFINES["WEBRTC_ENABLE_AVX2"] = True - -- 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["TARGET_CPU"] == "x86_64": +- +- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["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 += [ +- "unwind" - ] - - if CONFIG["CPU_ARCH"] == "mips32": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True -- DEFINES["WEBRTC_USE_PIPEWIRE"] = True +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": +- - 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/" +-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("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 c876f525cb70..577bf75c2d2a 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,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 = "xul" + +@@ -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["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 - -- SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.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["_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["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["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": +- +- CXXFLAGS += [ +- "-msse2", +- "-msse2" +- ] +- +-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 a4fb8b3162bd..f70faede2fba 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -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/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" +- "/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["CPU_ARCH"] == "mips64": +-if CONFIG["OS_TARGET"] == "Linux": - -- DEFINES["WEBRTC_USE_PIPEWIRE"] = True -- DEFINES["_GNU_SOURCE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = 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/" +- OS_LIBS += [ +- "rt" - ] - - SOURCES += [ -- "/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 += [ -- "/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" +- "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", +- "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" - ] - --if CONFIG["CPU_ARCH"] == "ppc64": +-if CONFIG["OS_TARGET"] == "OpenBSD": - +- DEFINES["USE_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/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["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 + DEFINES["WEBRTC_USE_PIPEWIRE"] = True +- DEFINES["_GNU_SOURCE"] = True + + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -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 += [ +@@ -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["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/", +@@ -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 += [ +@@ -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["TARGET_CPU"] == "mips64": + + DEFINES["WEBRTC_USE_PIPEWIRE"] = True +- DEFINES["_GNU_SOURCE"] = True + + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -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 += [ +@@ -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"] == "riscv64": +-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" -- ] ++ "/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": -- - CXXFLAGS += [ - "-msse2" - ] - -- DEFINES["WEBRTC_USE_PIPEWIRE"] = True -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": - -- 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/" -- ] +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_USE_X11"] = True - -- SOURCES += [ -- "/third_party/libwebrtc/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc" +- OS_LIBS += [ +- "X11", +- "Xcomposite", +- "Xdamage", +- "Xext", +- "Xfixes", +- "Xrandr", +- "Xrender" - ] - - 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" +- "/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"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["WEBRTC_USE_PIPEWIRE"] = True + CXXFLAGS += [ + "-msse2" + ] + ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + 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 += [ + + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -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" -- ] -- -- 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/base_capturer_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" + ] + + UNIFIED_SOURCES += [ +@@ -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["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/", +@@ -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 += [ +@@ -505,38 +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": ++ "/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"] == "arm": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_USE_X11"] = True +@@ -564,116 +275,42 @@ 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"] == "mips32": - - 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" -- ] -- --if CONFIG["CPU_ARCH"] == "mips32" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": ++ "/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["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True -- ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "ppc64": + - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" -- ] -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True +- "Xrender" ++ SOURCES += [ ++ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" + ] -- 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" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": - --if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True ++ "/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"] == "x86": +- - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True - - OS_LIBS += [ - "X11", - "Xcomposite", - "Xdamage", - "Xext", - "Xfixes", - "Xrandr", -- "Xrender", -- "Xtst" +- "Xrender" - ] -+if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD": ++if not CONFIG["MOZ_X11"] and CONFIG["OS_TARGET"] == "FreeBSD" and CONFIG["TARGET_CPU"] == "riscv64": 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" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_USE_X11"] = True -@@ -633,33 +127,8 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGE - "Xtst" - ] +-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" and CONFIG["TARGET_CPU"] == "riscv64": -- 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"] == "x86_64" 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" + SOURCES += [ + "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc" ] UNIFIED_SOURCES += [ -@@ -672,7 +141,9 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TA - "/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/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/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 6b5cd9286eb3..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" +-FINAL_LIBRARY = "xul" - - -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 927926f3e987..a578fb9b17ec 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" + FINAL_LIBRARY = "xul" -@@ -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": -- -- DEFINES["USE_X11"] = "1" -- --if CONFIG["CPU_ARCH"] == "riscv64": +-if CONFIG["TARGET_CPU"] == "ppc64": - - 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"] == "riscv64": +- +- DEFINES["USE_X11"] = "1" +- +-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 9b77a009fa9e..92a813cfb85e 100644 --- third_party/libwebrtc/modules/module_api_gn/moz.build +++ third_party/libwebrtc/modules/module_api_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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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("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 ---- 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 474dec612359..81d04236da2b 100644 +--- third_party/libwebrtc/modules/module_api_public_gn/moz.build ++++ third_party/libwebrtc/modules/module_api_public_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 = "xul" -@@ -43,179 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 61ece82430a2..5605df303cd7 100644 ---- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -+++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + 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 b69c69c3118c..05c37b4ffe8b 100644 +--- third_party/libwebrtc/modules/module_fec_api_gn/moz.build ++++ third_party/libwebrtc/modules/module_fec_api_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 = "xul" -@@ -50,190 +59,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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": + +@@ -149,50 +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": -- - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - --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("pacing_gn") -diff --git third_party/libwebrtc/modules/portal/portal_gn/moz.build third_party/libwebrtc/modules/portal/portal_gn/moz.build -deleted file mode 100644 -index 77603c780bdc..000000000000 ---- third_party/libwebrtc/modules/portal/portal_gn/moz.build -+++ /dev/null -@@ -1,109 +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/. - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- ### This moz.build was AUTOMATICALLY GENERATED from a GN config, ### -- ### DO NOT edit it by hand. ### --if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": -- CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] -- --COMPILE_FLAGS["OS_INCLUDES"] = [] --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_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 --DEFINES["__STDC_FORMAT_MACROS"] = True -- --FINAL_LIBRARY = "webrtc" -- -- --LOCAL_INCLUDES += [ -- "!/ipc/ipdl/_ipdlheaders", -- "!/third_party/libwebrtc/gen", -- "/gfx/angle/checkout/include/", -- "/ipc/chromium/src", -- "/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/libwebrtc/", -- "/third_party/libwebrtc/third_party/abseil-cpp/", -- "/third_party/pipewire/", -- "/tools/profiler/public" --] -- --UNIFIED_SOURCES += [ -- "/third_party/libwebrtc/modules/portal/pipewire_utils.cc", -- "/third_party/libwebrtc/modules/portal/scoped_glib.cc", -- "/third_party/libwebrtc/modules/portal/xdg_desktop_portal_utils.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": -- -- 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 -- --if CONFIG["CPU_ARCH"] == "x86": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - -- DEFINES["USE_X11"] = "1" +- DEFINES["_GNU_SOURCE"] = True - --Library("portal_gn") -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 ---- 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 2e3ab3d9878e..8cefa46cec03 100644 +--- third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build ++++ third_party/libwebrtc/modules/pacing/interval_budget_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 = "xul" -@@ -55,190 +64,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("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 ---- 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() + 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 d7aa189ef37b..ba9c8323abb3 100644 +--- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build ++++ third_party/libwebrtc/modules/pacing/pacing_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 = "xul" -@@ -43,175 +52,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 += [ +- "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("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 ---- 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() + Library("pacing_gn") +diff --git third_party/libwebrtc/modules/portal/portal_gn/moz.build third_party/libwebrtc/modules/portal/portal_gn/moz.build +index 93af22612ea0..d0d2d4a27fe2 100644 +--- third_party/libwebrtc/modules/portal/portal_gn/moz.build ++++ third_party/libwebrtc/modules/portal/portal_gn/moz.build +@@ -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 +@@ -76,16 +72,6 @@ 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 +@@ -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 eab6f3f9d0fc..473f820cccd1 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,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" + FINAL_LIBRARY = "xul" -@@ -85,190 +94,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -55,189 +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("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 5683b643c091..4ca036ae5563 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" - DEFINES["BWE_TEST_LOGGING_COMPILE_TIME_ENABLE"] = "0" + 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 6e1dfd18c099..42e99603f4f1 100644 +--- third_party/libwebrtc/modules/rtp_rtcp/leb128_gn/moz.build ++++ third_party/libwebrtc/modules/rtp_rtcp/leb128_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 = "xul" -@@ -95,190 +104,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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_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 ---- 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() + 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 b3425d3e67cf..e794e8940e60 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -85,189 +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_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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "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 517121987519..52af37433103 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,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" + FINAL_LIBRARY = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -98,190 +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": - -- CFLAGS += [ +- CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_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 += [ + CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if 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 += [ +- CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() + 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 bdee5bedc6db..1e2ecfd55661 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": - -- CFLAGS += [ +- CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_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 += [ + CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if 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 += [ +- CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 ---- 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() + 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 9afa4154ee37..d211f0d4e0c2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -47,175 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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_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 ---- third_party/libwebrtc/modules/utility/utility_gn/moz.build -+++ third_party/libwebrtc/modules/utility/utility_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 2fa1910cc844..6accc1d41aba 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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" -- ] -- -- 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": +-if CONFIG["TARGET_CPU"] == "arm": - -- CXXFLAGS += [ +- 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": - - CXXFLAGS += [ + 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 -- CXXFLAGS += [ +- 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("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 cd5557b826da..a481fb0e5df1 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 -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 d1ff3aaad348..f7b9d5799283 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -30,6 +39,13 @@ LOCAL_INCLUDES += [ - "/tools/profiler/public" - ] - -+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 not CONFIG["MOZ_DEBUG"]: - - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0" -@@ -39,216 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,174 +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" -- ] -- -- 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": +- +- 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": - -+ CXXFLAGS += [ -+ "-msse2" -+ ] -+ - DEFINES["WEBRTC_ENABLE_AVX2"] = True - - 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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True + CFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +- DEFINES["_GNU_SOURCE"] = True - -- CXXFLAGS += [ -- "-mfpu=neon" -- ] +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -- -- CXXFLAGS += [ +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CFLAGS += [ - "-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("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 ---- 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() ++ 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 97d828d64fc1..bd10964445c7 100644 +--- third_party/libwebrtc/modules/utility/utility_gn/moz.build ++++ third_party/libwebrtc/modules/utility/utility_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 = "xul" -@@ -47,191 +56,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 += [ -- "GLESv2", - "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 - -- 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": + +@@ -157,60 +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" - ] - -- OS_LIBS += [ -- "android_support" +- CXXFLAGS += [ +- "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-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("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 ---- 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() +- + 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 6af27f618bcd..d418565bbd05 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -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,152 +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 += [ - "log" - ] - -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = 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": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips32": - +- DEFINES["MIPS32_LE"] = True +- DEFINES["MIPS_FPU_LE"] = True + DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -209,76 +84,11 @@ if CONFIG["TARGET_CPU"] == "mips32": + "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" + ] +-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["TARGET_CPU"] == "x86": +- - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" +- CXXFLAGS += [ +- "-msse2" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- +-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 -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+ DEFINES["WEBRTC_ENABLE_AVX2"] = True -- CXXFLAGS += [ -- "-msse2" -- ] -+if CONFIG["CPU_ARCH"] == "x86_64": + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -297,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["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/", +@@ -319,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["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 --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -345,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["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 -+ 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 ---- 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() + LOCAL_INCLUDES += [ + "/gfx/angle/checkout/include/", +@@ -367,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 145e54928644..d53c45076c66 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,189 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 065cf604b5d3..e9eebffdbcd2 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 53a7fc384c3d..bd7362a67f30 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +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["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": + +@@ -153,50 +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["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- - OS_LIBS += [ -- "rt" +- "unwind" - ] - +-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("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 b9784482e9bd..d6db6b79cea3 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -43,185 +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_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 ---- 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() + 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 a086f7cb0b6f..6b870ee54300 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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_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 ---- 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() + 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 e8fdf3750a0c..a7f10d9ed7a9 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 ecd9c1dd8d37..864af3b1dda1 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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("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 ---- 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() + 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 187cf6089c53..45337d14f78e 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,189 +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("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 ---- 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() + 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 09929b1d482a..f3d5f329d665 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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" ] +-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("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 698684346412..da2c255ee0fc 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -43,185 +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["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 88f469760f7f..e0bfc360efea 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" + FINAL_LIBRARY = "xul" -@@ -50,183 +59,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -50,185 +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 d09a4aed3ab5..8d6c549ef978 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 2bd3634ba957..a7a401eb155d 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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/codec_timer_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build -index 59498feb917b..e0a3f25c615c 100644 ---- third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build -+++ third_party/libwebrtc/modules/video_coding/timing/codec_timer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +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 9c48932149b9..8bbe558a2477 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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("codec_timer_gn") + 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 0e5991cffd44..8c91c74e87f1 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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_gn/moz.build third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_gn/moz.build -index 765d42aade9c..2fc89d07d0c4 100644 ---- third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_gn/moz.build -+++ third_party/libwebrtc/modules/video_coding/timing/inter_frame_delay_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +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 a311c4a8024c..72c2e8f95f30 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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_gn") + 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 6d87c74bd732..42312fbebab1 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 e05eebc11f52..362ec70ca4a8 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 10e36ea24cf2..f02054e9631b 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 2ab95ef62991..4f51ffc604ee 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 0e18b1aecaed..838e14e931d2 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" + FINAL_LIBRARY = "xul" -@@ -44,183 +53,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,185 +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("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 a6034ad47653..0e51e76cfcea 100644 +index 709393035bb5..5eb98564a475 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" + FINAL_LIBRARY = "xul" -@@ -59,191 +68,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -57,190 +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 1de983a78646..92ff8a1d9819 100644 +index 75698c304f78..89bf22a8c48f 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" + FINAL_LIBRARY = "xul" -@@ -54,190 +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 += [ +- "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 ce59cc861c99..d9cbac447de8 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() +@@ -15,11 +15,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,178 +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 + DEFINES["_DEBUG"] = True - if CONFIG["CPU_ARCH"] == "aarch64": + if CONFIG["TARGET_CPU"] == "aarch64": DEFINES["WEBRTC_ARCH_ARM64"] = True DEFINES["WEBRTC_HAS_NEON"] = True --if CONFIG["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - - CXXFLAGS += [ - "-mfpu=neon" - ] - - DEFINES["WEBRTC_ARCH_ARM"] = True - DEFINES["WEBRTC_ARCH_ARM_V7"] = True - DEFINES["WEBRTC_HAS_NEON"] = True - - if CONFIG["CPU_ARCH"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 db366355de5e..8988f6d4b0ac 100644 +index 352458cf8e21..965ef96422be 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() +@@ -15,11 +15,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -46,190 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -49,190 +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_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 0338ba659e01..f1da16b805a7 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 db3848fb5759..64f1526a2eb2 100644 +index d7ae0d5805b3..9ebd70792c7b 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" + FINAL_LIBRARY = "xul" -@@ -48,190 +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 += [ +- "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 c0d16a8e5163..1cf6175508db 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() +@@ -15,11 +15,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -48,191 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -51,190 +61,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - 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 6abd453136c9..c0f5ab3b81ef 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" + FINAL_LIBRARY = "xul" -@@ -43,191 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 0920c2883cec..7579b40c86b7 100644 +index 3aa8fb086730..bef47f00e0a6 100644 --- third_party/libwebrtc/moz.build +++ third_party/libwebrtc/moz.build -@@ -262,6 +262,8 @@ DIRS += [ +@@ -273,6 +273,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", -@@ -456,86 +458,14 @@ DIRS += [ +@@ -472,102 +474,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["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "FreeBSD": - - 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"] == "aarch64": +- +- DIRS += [ +- "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", +- "/third_party/libwebrtc/common_audio/common_audio_neon_gn" +- ] +- +-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["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": +-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["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_avx2_gn", -@@ -545,128 +475,7 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": - "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" + "/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", +@@ -575,26 +486,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": + "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -- -- DIRS += [ +-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"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" 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": -- -- DIRS += [ + "/third_party/libwebrtc/modules/portal/portal_gn", + "/third_party/libwebrtc/third_party/drm/drm_gn", + "/third_party/libwebrtc/third_party/gbm/gbm_gn", +@@ -602,11 +496,9 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips32": + "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" + ] + +-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", -- "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn", -- "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" -- ] -- --if CONFIG["CPU_ARCH"] == "mips64" and CONFIG["OS_TARGET"] == "Linux": -- -- DIRS += [ + "/third_party/libwebrtc/modules/portal/portal_gn", + "/third_party/libwebrtc/third_party/drm/drm_gn", + "/third_party/libwebrtc/third_party/gbm/gbm_gn", +@@ -614,7 +506,7 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "mips64": + "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" + ] + +-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", +@@ -622,8 +514,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", -- "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn", -- "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" -- ] + "/third_party/libwebrtc/modules/portal/portal_gn", + "/third_party/libwebrtc/third_party/drm/drm_gn", + "/third_party/libwebrtc/third_party/gbm/gbm_gn", +@@ -631,7 +521,7 @@ if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" + ] + +-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", +@@ -639,69 +529,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "OpenBSD" and CONFIG["TARGET_CPU"] == "aarch64": - - 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", -- "/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" +- "/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"] == "Linux": +-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", -- "/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" +- "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "OpenBSD": +-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_64" and CONFIG["OS_TARGET"] == "OpenBSD": +-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"] == "aarch64" and CONFIG["OS_TARGET"] == "WINNT": -- -- 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_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"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT": -+if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": - - DIRS += [ - "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", -@@ -675,17 +484,3 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT": - "/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_dns_resolver_gn/moz.build third_party/libwebrtc/rtc_base/async_dns_resolver_gn/moz.build +index 415f09cfd1fe..de5b867157f4 100644 +--- third_party/libwebrtc/rtc_base/async_dns_resolver_gn/moz.build ++++ third_party/libwebrtc/rtc_base/async_dns_resolver_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 = "xul" + +@@ -43,186 +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["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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-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("async_dns_resolver_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 9f3ce4d4b600..fb11aa9b0f1c 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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"] == "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("async_packet_socket_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 70a2aa730b19..27f099ef7b90 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -43,185 +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 += [ -- "android_support" +- "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" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +- 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["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-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": - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +- DEFINES["USE_X11"] = "1" +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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 ---- 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() +-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("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 3dfd3b19d24b..933e5434bf8c 100644 +--- third_party/libwebrtc/rtc_base/bit_buffer_gn/moz.build ++++ third_party/libwebrtc/rtc_base/bit_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" + FINAL_LIBRARY = "xul" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 ---- 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() + Library("bit_buffer_gn") +diff --git third_party/libwebrtc/rtc_base/bitrate_tracker_gn/moz.build third_party/libwebrtc/rtc_base/bitrate_tracker_gn/moz.build +index 7b1ba50f99cf..b05e27ad3426 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 c82c4c9965bf..36b9f5b6c119 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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() + 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 5e5d11ff6f7e..fa3cb7950b6c 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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("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 89a2c9e84e1c..01e755bb6f7c 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" + FINAL_LIBRARY = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if CONFIG["TARGET_CPU"] == "x86_64": + - 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["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 b95d149625ed..4ed69f91caf9 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-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("byte_order_gn") +diff --git third_party/libwebrtc/rtc_base/checks_gn/moz.build third_party/libwebrtc/rtc_base/checks_gn/moz.build +index f147bdc64bd9..477bb6cf012e 100644 +--- third_party/libwebrtc/rtc_base/checks_gn/moz.build ++++ third_party/libwebrtc/rtc_base/checks_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/rtc_base/checks_gn/moz.build -+++ third_party/libwebrtc/rtc_base/checks_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 711466336e15..80475fdc6a41 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,179 +52,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 fa4fdc873993..7c49ec6a5edd 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 7c9b3edd1676..95a2855408fd 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 02d364fe30a5..a7902a51d2f6 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 dd687b90f3ff..8ed0bc7ee1af 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 d860667eb591..f09bb05f3fda 100644 +--- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build ++++ third_party/libwebrtc/rtc_base/criticalsection_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 ---- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build -+++ third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 5946a30db45f..1212206025b7 100644 +--- third_party/libwebrtc/rtc_base/divide_round_gn/moz.build ++++ third_party/libwebrtc/rtc_base/divide_round_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 = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 fd82b23b98e3..e83d2e34dc26 100644 +--- third_party/libwebrtc/rtc_base/dscp_gn/moz.build ++++ third_party/libwebrtc/rtc_base/dscp_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 = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/rtc_base/dscp_gn/moz.build -+++ third_party/libwebrtc/rtc_base/dscp_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 2ea470772f4b..1235e95439b9 100644 +--- third_party/libwebrtc/rtc_base/event_tracer_gn/moz.build ++++ third_party/libwebrtc/rtc_base/event_tracer_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 09174a3a20ab..f906bc9cd246 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 233c203847c4..0142ed0457e9 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 e8ae0afef0a3..a46ef7998d57 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 00af297d92c7..cfa672be2411 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 9866a74964c7..a09edc6dce96 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 520c4db65a2b..00eca302cf45 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,185 +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("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 ---- 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() + 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 397f0dd3ce6f..42e0bfc0b541 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -46,183 +55,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- 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() + 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 5cd3bb4a2bf0..09ebf5322ea7 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 9c3e585bf972..89f9af863d4a 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 a03ad630cd73..a008cbfdd569 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 d1b4330a18db..de18961b8154 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 8e75fbc3b032..79fc2e93ba33 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 0051ac37f9e8..fe9271425d64 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 995eaa1df3d0..cfbbbdb328ef 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + 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 2c239310fc08..5e98394eef8b 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 ---- 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() + Library("stable_target_rate_experiment_gn") +diff --git third_party/libwebrtc/rtc_base/frequency_tracker_gn/moz.build third_party/libwebrtc/rtc_base/frequency_tracker_gn/moz.build +index 87a5e335eb06..ba58d3df2494 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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") + 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 a6650bd66393..393c4a6a5b5f 100644 +index 03bb1071f60c..6e5808f68281 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() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 3f7a2c1ffa1f..042fc6088182 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 d89873bf7483..000000000000 --- third_party/libwebrtc/rtc_base/ifaddrs_android_gn/moz.build +++ /dev/null -@@ -1,99 +0,0 @@ +@@ -1,95 +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" +-FINAL_LIBRARY = "xul" - - -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 06009fc8668e..4f9eacbcf8a7 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 c2f9eb412bca..df8f9503cb8a 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" + FINAL_LIBRARY = "xul" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 2b47ed986c72..191af40a1a3f 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -44,185 +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 7a54f6369568..ae2eb48d37a1 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 06a17077bb82..21d3404240cd 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 ea25143a15aa..da34908795f0 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 967e6e28ba29..60644d006ab2 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 7c0cfcf806a7..2b89135329e6 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" + FINAL_LIBRARY = "xul" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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" +- ] ++ 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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-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("net_helpers_gn") +diff --git third_party/libwebrtc/rtc_base/network/ecn_marking_gn/moz.build third_party/libwebrtc/rtc_base/network/ecn_marking_gn/moz.build +index 9fb05f529e15..2c7aeb42782b 100644 +--- third_party/libwebrtc/rtc_base/network/ecn_marking_gn/moz.build ++++ third_party/libwebrtc/rtc_base/network/ecn_marking_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 = "xul" + +@@ -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 -- -- 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" - - Library("net_helpers_gn") +- + Library("ecn_marking_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 604cb9a5e8c8..63df6c684225 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" + FINAL_LIBRARY = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 eacf18519786..848db7fed53a 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 2ae8cf3c3837..c32e0473a011 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 da5eb5b49753..dd528ef3830e 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" + FINAL_LIBRARY = "xul" -@@ -43,187 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,186 +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 4de80444bef4..7d101ac9cbe4 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 8c259b6765c4..4632206d50e3 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 09d6147ce17d..7ed2f4dad2ac 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 c2b0d4ce2f3a..e926b3f5ca8f 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 1fef37a2babc..74fad97cb21c 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 6c9b369317a5..1046794552e2 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 586fc513dc7e..64b9286d41ca 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 76d4f9d980ae..64ffc5e8413b 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 c381e91cdc55..0a743006bcf0 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 4059c66e7135..ab2a71dd87dc 100644 --- third_party/libwebrtc/rtc_base/refcount_gn/moz.build +++ third_party/libwebrtc/rtc_base/refcount_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("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 ---- 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" + FINAL_LIBRARY = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 c8e14d5996e0..07964d2b4972 100644 +--- third_party/libwebrtc/rtc_base/rolling_accumulator_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rolling_accumulator_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 = "xul" -@@ -43,183 +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 -- -- 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": + +@@ -153,50 +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": -- -- 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("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 ---- 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() - DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" - DEFINES["RTC_DAV1D_IN_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" - -@@ -45,179 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: - if CONFIG["MOZ_DEBUG"] == "1": + DEFINES["USE_X11"] = "1" - DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" -- --if CONFIG["OS_TARGET"] == "Android": -- -- DEFINES["ANDROID"] = True -- 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"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "log" -- ] -- --if CONFIG["OS_TARGET"] == "Darwin": -- -- DEFINES["WEBRTC_MAC"] = True -- DEFINES["WEBRTC_POSIX"] = True -- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True -- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" -- DEFINES["__STDC_CONSTANT_MACROS"] = True -- DEFINES["__STDC_FORMAT_MACROS"] = True -- --if CONFIG["OS_TARGET"] == "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": -- -- CXXFLAGS += [ -- "-mfpu=neon" +- "unwind" - ] - -- DEFINES["WEBRTC_ARCH_ARM"] = True -- DEFINES["WEBRTC_ARCH_ARM_V7"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["MIPS32_LE"] = True - DEFINES["MIPS_FPU_LE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": - - 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("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 ---- 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() + 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 a1b2840da3ea..6279462eabf7 100644 +--- third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_event_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 = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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_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 ---- 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() + 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 6bcce7ecf591..0127c502b6f6 100644 +--- third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_numerics_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,178 +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": - -@@ -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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("rtc_numerics_gn") +diff --git third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build +index 1e381892f367..8fc4c2183d80 100644 +--- third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build ++++ third_party/libwebrtc/rtc_base/safe_compare_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 = "xul" -@@ -39,107 +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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": +@@ -149,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 f409a3834780..3ba803fa49d4 100644 +--- third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build ++++ third_party/libwebrtc/rtc_base/safe_conversions_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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() + 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 31299792ebeb..a03b4cdd095d 100644 +--- third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build ++++ third_party/libwebrtc/rtc_base/safe_minmax_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 = "xul" -@@ -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,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build -+++ third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() +- + 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 0657de77c15b..fc147e94f56f 100644 +--- third_party/libwebrtc/rtc_base/sample_counter_gn/moz.build ++++ third_party/libwebrtc/rtc_base/sample_counter_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 = "xul" -@@ -39,103 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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": -+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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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": -- -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("sample_counter_gn") +diff --git third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build +index dcdcffdd8ef4..fb6cf9adbb71 100644 +--- third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build ++++ third_party/libwebrtc/rtc_base/sanitizer_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 = "xul" -@@ -43,187 +52,32 @@ 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 - -- 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": -- -- 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 2e5c00378acd..78d31c99625b 100644 +--- third_party/libwebrtc/rtc_base/socket_address_gn/moz.build ++++ third_party/libwebrtc/rtc_base/socket_address_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 = "xul" -@@ -39,115 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,186 +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": - -@@ -157,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/rtc_base/socket_gn/moz.build -+++ third_party/libwebrtc/rtc_base/socket_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 572b2f62b08c..23ceff9330b2 100644 +--- third_party/libwebrtc/rtc_base/socket_factory_gn/moz.build ++++ third_party/libwebrtc/rtc_base/socket_factory_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 = "xul" -@@ -43,187 +52,32 @@ 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": -- -- 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": + +@@ -161,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + 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 4b08aeb0de91..d8dcd1ca715e 100644 +--- third_party/libwebrtc/rtc_base/socket_gn/moz.build ++++ third_party/libwebrtc/rtc_base/socket_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 = "xul" -@@ -39,115 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,186 +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": - -@@ -157,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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- third_party/libwebrtc/rtc_base/ssl_gn/moz.build -+++ third_party/libwebrtc/rtc_base/ssl_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() ++ 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("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 d4654af6fc1f..265a05693776 100644 +--- third_party/libwebrtc/rtc_base/socket_server_gn/moz.build ++++ third_party/libwebrtc/rtc_base/socket_server_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 = "xul" -@@ -39,103 +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": -@@ -145,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -161,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build -+++ third_party/libwebrtc/rtc_base/stringutils_gn/moz.build -@@ -12,11 +12,20 @@ AllowCompilerWarnings() + 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 599001039a48..a2cf5b7c9ecd 100644 +--- third_party/libwebrtc/rtc_base/ssl_gn/moz.build ++++ third_party/libwebrtc/rtc_base/ssl_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 = "xul" -@@ -47,179 +56,32 @@ 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 - -- OS_LIBS += [ -- "log" -- ] -- -if CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["WEBRTC_MAC"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True - DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_AURA"] = "1" - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_NSS_CERTS"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_LINUX"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["USE_GLIB"] = "1" - DEFINES["USE_OZONE"] = "1" - DEFINES["USE_X11"] = "1" - DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - DEFINES["WEBRTC_POSIX"] = True - DEFINES["_FILE_OFFSET_BITS"] = "64" - DEFINES["_LARGEFILE64_SOURCE"] = True - DEFINES["_LARGEFILE_SOURCE"] = True - DEFINES["__STDC_CONSTANT_MACROS"] = True - DEFINES["__STDC_FORMAT_MACROS"] = True - -if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True - DEFINES["NOMINMAX"] = True - DEFINES["NTDDI_VERSION"] = "0x0A000000" - DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True - DEFINES["UNICODE"] = True - DEFINES["USE_AURA"] = "1" - DEFINES["WEBRTC_WIN"] = True - DEFINES["WIN32"] = True - DEFINES["WIN32_LEAN_AND_MEAN"] = True - DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" - DEFINES["WINVER"] = "0x0A00" - DEFINES["_ATL_NO_OPENGL"] = True - DEFINES["_CRT_RAND_S"] = True - DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True - DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True - DEFINES["_HAS_EXCEPTIONS"] = "0" - DEFINES["_HAS_NODISCARD"] = True - 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": + +@@ -149,50 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - - 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": - +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- - 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 ---- 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() +- + Library("ssl_gn") +diff --git third_party/libwebrtc/rtc_base/stringutils_gn/moz.build third_party/libwebrtc/rtc_base/stringutils_gn/moz.build +index 5016b4fce059..44112c834b87 100644 +--- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build ++++ third_party/libwebrtc/rtc_base/stringutils_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 = "xul" -@@ -39,107 +48,17 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,178 +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": - -@@ -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": - -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ + "-msse2" + ] + +-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"] == "arm": - - 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": ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True + +- CXXFLAGS += [ +- "-msse2" +- ] ++if 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 ---- 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() ++ 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("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 b84cec9997f3..f4fe48e03291 100644 +--- third_party/libwebrtc/rtc_base/swap_queue_gn/moz.build ++++ third_party/libwebrtc/rtc_base/swap_queue_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 = "xul" -@@ -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,50 +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"] == "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("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 c1704d262949..be17c0f04367 100644 +--- third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build ++++ third_party/libwebrtc/rtc_base/synchronization/mutex_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 = "xul" + +@@ -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["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": + +@@ -153,50 +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["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["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 e4f72d363530..f26d786ad38b 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 98232a67bd39..7a6b0bb40432 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" + FINAL_LIBRARY = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 40dcd7ba2f70..678c14a8aa72 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 1d1555984fb0..4f8961109262 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 9ea729634114..000000000000 --- third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build +++ /dev/null @@ -1,80 +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" +-FINAL_LIBRARY = "xul" - - -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 36bdf13d4b68..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" +-FINAL_LIBRARY = "xul" - - -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 807f4726e102..81fb6a624984 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 21350fb07bfa..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" +-FINAL_LIBRARY = "xul" - - -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 7a5b33257453..e12ece6bf6df 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 7df25c5644f1..64d47571debc 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 17a93fe6bf50..658616cb1183 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 e0c1fd16dc3e..47d3317cfa4a 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 11c7d7e1a9c3..49b5c9ab23a6 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 72142098bf1c..851abb2f75d7 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 b6057410da79..05fcf9b60a33 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 cd7049d1e1ad..48679d72d348 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 b4ca57145cff..c1e70893bf9f 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" + FINAL_LIBRARY = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 53ae39a12405..28c418ee0db5 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" + FINAL_LIBRARY = "xul" -@@ -48,187 +57,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -46,202 +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" - ] - +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/rtc_base/physical_socket_server.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 - +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/rtc_base/physical_socket_server.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 - +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/rtc_base/physical_socket_server.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" - ] +- +- UNIFIED_SOURCES += [ +- "/third_party/libwebrtc/rtc_base/physical_socket_server.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["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "mips64": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + if CONFIG["TARGET_CPU"] == "x86": - DEFINES["WEBRTC_ENABLE_AVX2"] = True - --if CONFIG["CPU_ARCH"] == "x86_64": +-if CONFIG["TARGET_CPU"] == "x86_64": - - DEFINES["WEBRTC_ENABLE_AVX2"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": - CXXFLAGS += [ "-msse2" ] -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 55044da704f0..b3d3a631906d 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" + FINAL_LIBRARY = "xul" -@@ -45,183 +54,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -45,185 +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 6e5a6266c98d..f89c8dde62eb 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 144e5ff789f9..e0450e78ecd4 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 1a73da55be6d..fa188d4c8b2c 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 24bcc6accf79..c91a4d711206 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 89b4d408242e..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" +-FINAL_LIBRARY = "xul" - - -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 0f2ade5af2ea..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" +-FINAL_LIBRARY = "xul" - - -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 d6968eb597c9..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" +-FINAL_LIBRARY = "xul" - - -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 014d6aaf9a74..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" +-FINAL_LIBRARY = "xul" - - -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 9c7c5cec86d1..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" +-FINAL_LIBRARY = "xul" - - -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 3cb03f687969..4a1ec8b5bf42 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 baf20fbcbcb8..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" +-FINAL_LIBRARY = "xul" - - -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 b27bdaafb20a..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" +-FINAL_LIBRARY = "xul" - - -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 bd4d77a39536..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" +-FINAL_LIBRARY = "xul" - - -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 25e08e62fadc..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" +-FINAL_LIBRARY = "xul" - - -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 cd0bc1b144b8..9f955dcf32b3 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 30aa20ae3ede..c5bb79c454fc 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 2347fbcbacf5..31a75cc714e1 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" + FINAL_LIBRARY = "xul" -@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,178 +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 161fe336d913..ade9b1212194 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" + FINAL_LIBRARY = "xul" -@@ -47,200 +56,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -47,199 +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 25bb2ee0a16a..c15a9ae02722 100644 +index 5a0d4a3984ef..020143107080 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" + FINAL_LIBRARY = "xul" -@@ -39,118 +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": -@@ -160,57 +68,8 @@ if CONFIG["CPU_ARCH"] == "x86_64": +@@ -165,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 696c19c0a090..bdcf7cc0dc34 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 376a6873a7de..d8e126e98d22 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 1dbf8b303711..a5bb25ebbee5 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 c74d13c51a7f..fa3789dd2bec 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + +-if 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 += [ +- "unwind" +- ] +- +-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("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 5cd792ccd5d2..27118a5fb2d3 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 = "xul" + +@@ -32,117 +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["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-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("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 26296e769d53..f6d55cb2edf7 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 = "xul" + +@@ -32,117 +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["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 284ba1262009..89638dbef9e0 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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 -- - 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 ---- 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 ++ DEFINES["USE_X11"] = "1" + + Library("log_severity_gn") +diff --git third_party/libwebrtc/third_party/abseil-cpp/absl/base/nullability_gn/moz.build third_party/libwebrtc/third_party/abseil-cpp/absl/base/nullability_gn/moz.build +index f152e046ce64..990765b4dea1 100644 +--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/nullability_gn/moz.build ++++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/nullability_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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + Library("nullability_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 67100a47728f..843518325fec 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" + FINAL_LIBRARY = "xul" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- -- OS_LIBS += [ -- "android_support" -- ] +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True +- CXXFLAGS += [ +- "-msse2" +- ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["_GNU_SOURCE"] = 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("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 ---- 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 + 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 06b91ef80d22..e6011044ff71 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" + FINAL_LIBRARY = "xul" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- 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": - - CXXFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] +- DEFINES["_GNU_SOURCE"] = True +- +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64": +- +- 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 8ed66c3ce2c6..2f22adddfa94 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 = "xul" + +@@ -32,117 +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"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True -- DEFINES["_GNU_SOURCE"] = True +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": -- DEFINES["_GNU_SOURCE"] = True -+ DEFINES["USE_X11"] = "1" + 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 ---- 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 +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": +- +- OS_LIBS += [ +- "unwind" +- ] +- +-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("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 0f3944e348c4..8fd358c0b828 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" + FINAL_LIBRARY = "xul" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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"] == "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": -- -- 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": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - -- DEFINES["_GNU_SOURCE"] = 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("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 ---- 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": -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "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": +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - DEFINES["_DEBUG"] = True --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["_DEBUG"] = True -- --if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": -- -- DEFINES["_DEBUG"] = True -- -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 758e27e19bdf..6a45401b4ad4 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 0aeeb25380b2..1ec3c2b3ff22 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 3b6744eda733..7bbe29993c1b 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 63e6206cdfb4..31b936c12c59 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 c26f1ed6a481..fb0da281c4cc 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 398b663a3d1e..72b51836d300 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 6d2e55152f52..914e219e6503 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 765dc92eb6d3..fa04a621dfa2 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 ---- 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 + 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 0d1a183abaf9..294e64ffcb5e 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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" -- ] +- DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "x86" 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"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - 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 -- - 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 ---- 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 ++ DEFINES["USE_X11"] = "1" + + Library("int128_gn") +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 4002fa626303..2908acf7ba9f 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" + FINAL_LIBRARY = "xul" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- -- OS_LIBS += [ -- "android_support" -- ] +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True +- CXXFLAGS += [ +- "-msse2" +- ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["_GNU_SOURCE"] = 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("int128_gn") + 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 2a53b9e647f7..71fd3a4a576d 100644 +index 8105bb2f27d1..4cd3456a3ff3 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" + FINAL_LIBRARY = "xul" -@@ -40,138 +45,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -41,133 +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"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- -- OS_LIBS += [ -- "android_support" -- ] +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True +- CXXFLAGS += [ +- "-msse2" +- ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["_GNU_SOURCE"] = 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("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 +index 25164c3e5f91..4fe2271056dc 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" + FINAL_LIBRARY = "xul" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- -- OS_LIBS += [ -- "android_support" -- ] +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True +- CXXFLAGS += [ +- "-msse2" +- ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["_GNU_SOURCE"] = 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("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 +index 83007237aa43..7feffa5b7fa7 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" + FINAL_LIBRARY = "xul" -@@ -36,138 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -36,133 +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"] == "OpenBSD": +- + DEFINES["_DEBUG"] = True + -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -- -- CXXFLAGS += [ -- "-msse2" -- ] -- -- OS_LIBS += [ -- "android_support" -- ] +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": - -- DEFINES["_GNU_SOURCE"] = True +- CXXFLAGS += [ +- "-msse2" +- ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": - - CXXFLAGS += [ - "-msse2" - ] - - DEFINES["_GNU_SOURCE"] = 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("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 +index 890fa95dc850..9538221de171 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 31e83327e0d0..293b2b62e2e5 100644 +index 438c3e8f7ca6..a8f20aad44d7 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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("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 b548c0214b55..4a1c6b4239bb 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 c47e6649127c..05338e798930 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" + FINAL_LIBRARY = "xul" -@@ -32,124 +37,10 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -32,117 +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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - -- DEFINES["_DEBUG"] = True -- + DEFINES["_DEBUG"] = True + -if 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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 -deleted file mode 100644 -index 78ba6b526064..000000000000 +index 971e9b6a89f8..24d5305eaf44 100644 --- third_party/libwebrtc/third_party/drm/drm_gn/moz.build -+++ /dev/null -@@ -1,88 +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 ++++ third_party/libwebrtc/third_party/drm/drm_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_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" --DEFINES["USE_OZONE"] = "1" + DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True --DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" --DEFINES["WEBRTC_LIBRARY_IMPL"] = 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["WEBRTC_MOZILLA_BUILD"] = True + 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 --DEFINES["__STDC_FORMAT_MACROS"] = True -- --FINAL_LIBRARY = "webrtc" -- -- --LOCAL_INCLUDES += [ -- "!/ipc/ipdl/_ipdlheaders", -- "!/third_party/libwebrtc/gen", -- "/ipc/chromium/src", -- "/third_party/drm/drm/", -- "/third_party/drm/drm/include/", -- "/third_party/drm/drm/include/libdrm/", -- "/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["CPU_ARCH"] == "aarch64": -- -- DEFINES["WEBRTC_ARCH_ARM64"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- --if CONFIG["CPU_ARCH"] == "arm": + DEFINES["_LARGEFILE64_SOURCE"] = True + DEFINES["_LARGEFILE_SOURCE"] = True + DEFINES["__STDC_CONSTANT_MACROS"] = True +@@ -63,12 +59,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["CPU_ARCH"] == "mips32": -- -- DEFINES["MIPS32_LE"] = True -- DEFINES["MIPS_FPU_LE"] = True -- --if CONFIG["CPU_ARCH"] == "x86": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True +@@ -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": -- -- DEFINES["USE_X11"] = "1" -- --Library("drm_gn") ++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 -deleted file mode 100644 -index 173399cf13bd..000000000000 +index 9273b95ead40..0919eb0f43e8 100644 --- third_party/libwebrtc/third_party/gbm/gbm_gn/moz.build -+++ /dev/null -@@ -1,86 +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 ++++ third_party/libwebrtc/third_party/gbm/gbm_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_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" --DEFINES["USE_OZONE"] = "1" + DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True --DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" --DEFINES["WEBRTC_LIBRARY_IMPL"] = 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["WEBRTC_MOZILLA_BUILD"] = True + 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 --DEFINES["__STDC_FORMAT_MACROS"] = True -- --FINAL_LIBRARY = "webrtc" -- -- --LOCAL_INCLUDES += [ -- "!/ipc/ipdl/_ipdlheaders", -- "!/third_party/libwebrtc/gen", -- "/ipc/chromium/src", -- "/third_party/gbm/gbm/", -- "/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["CPU_ARCH"] == "aarch64": -- -- DEFINES["WEBRTC_ARCH_ARM64"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- --if CONFIG["CPU_ARCH"] == "arm": + DEFINES["_LARGEFILE64_SOURCE"] = True + DEFINES["_LARGEFILE_SOURCE"] = True + DEFINES["__STDC_CONSTANT_MACROS"] = True +@@ -61,12 +57,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["CPU_ARCH"] == "mips32": -- -- DEFINES["MIPS32_LE"] = True -- DEFINES["MIPS_FPU_LE"] = True -- --if CONFIG["CPU_ARCH"] == "x86": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["MIPS32_LE"] = True +@@ -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": -- -- DEFINES["USE_X11"] = "1" -- --Library("gbm_gn") ++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 -deleted file mode 100644 -index 646e12d72d60..000000000000 +index 35f0925d3bde..c63ac3dc1601 100644 --- third_party/libwebrtc/third_party/libepoxy/libepoxy_gn/moz.build -+++ /dev/null -@@ -1,87 +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 ++++ third_party/libwebrtc/third_party/libepoxy/libepoxy_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_GLIB"] = "1" -DEFINES["USE_NSS_CERTS"] = "1" --DEFINES["USE_OZONE"] = "1" + DEFINES["USE_OZONE"] = "1" -DEFINES["USE_UDEV"] = True --DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" --DEFINES["WEBRTC_LIBRARY_IMPL"] = 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["WEBRTC_MOZILLA_BUILD"] = True + 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 --DEFINES["__STDC_FORMAT_MACROS"] = True -- --FINAL_LIBRARY = "webrtc" -- -- --LOCAL_INCLUDES += [ -- "!/ipc/ipdl/_ipdlheaders", -- "!/third_party/libwebrtc/gen", -- "/gfx/angle/checkout/include/", -- "/ipc/chromium/src", -- "/third_party/libepoxy/libepoxy/include/", -- "/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["CPU_ARCH"] == "aarch64": -- -- DEFINES["WEBRTC_ARCH_ARM64"] = True -- DEFINES["WEBRTC_HAS_NEON"] = True -- --if CONFIG["CPU_ARCH"] == "arm": + 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["CPU_ARCH"] == "mips32": -- -- DEFINES["MIPS32_LE"] = True -- DEFINES["MIPS_FPU_LE"] = True -- --if CONFIG["CPU_ARCH"] == "x86": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = 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": -- -- DEFINES["USE_X11"] = "1" -- --Library("epoxy_gn") ++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 +index a3038e0c4a61..55e100bde724 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() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -41,103 +50,17 @@ 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["_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": +@@ -151,50 +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": +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 +index 836a04a7c723..4adcdaca807c 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,151 +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["CPU_ARCH"] == "arm": -- -- CFLAGS += [ -- "-mfpu=neon" -- ] -+ DEFINES["_DEBUG"] = True - - if CONFIG["CPU_ARCH"] == "mips32": - - DEFINES["PFFFT_SIMD_DISABLE"] = True -- DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "mips64": - - DEFINES["PFFFT_SIMD_DISABLE"] = True -- DEFINES["_GNU_SOURCE"] = True - - if CONFIG["CPU_ARCH"] == "ppc64": - - 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["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": -- -- OS_LIBS += [ -- "android_support", -- "unwind" -- ] -- --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": -+if CONFIG["CPU_ARCH"] == "x86": - - CFLAGS += [ - "-msse2" - ] - -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": - -- 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": -- -- CFLAGS += [ -- "-msse2" -- ] -- -- DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": -- -- 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 -deleted file mode 100644 -index 86a0daf8fa51..000000000000 ---- third_party/libwebrtc/third_party/pipewire/pipewire_gn/moz.build -+++ /dev/null -@@ -1,87 +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["USE_AURA"] = "1" --DEFINES["USE_GLIB"] = "1" --DEFINES["USE_NSS_CERTS"] = "1" --DEFINES["USE_OZONE"] = "1" --DEFINES["USE_UDEV"] = 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 --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/", -- "/third_party/pipewire/", -- "/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["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 -- --if CONFIG["CPU_ARCH"] == "x86": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["CPU_ARCH"] == "x86_64": -- -- DEFINES["WEBRTC_ENABLE_AVX2"] = True -- --if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": -- -- DEFINES["USE_X11"] = "1" -- --Library("pipewire_gn") -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 -@@ -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" + FINAL_LIBRARY = "xul" -@@ -33,144 +41,16 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -33,87 +41,15 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_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["CPU_ARCH"] == "arm": +-if CONFIG["TARGET_CPU"] == "arm": - -- CXXFLAGS += [ +- CFLAGS += [ - "-mfpu=neon" - ] -- --if CONFIG["CPU_ARCH"] == "mips32": -- ++ DEFINES["_DEBUG"] = True + + if CONFIG["TARGET_CPU"] == "mips32": + + DEFINES["PFFFT_SIMD_DISABLE"] = True - DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": -- + + if CONFIG["TARGET_CPU"] == "mips64": + + DEFINES["PFFFT_SIMD_DISABLE"] = True - DEFINES["_GNU_SOURCE"] = True -- + + if CONFIG["TARGET_CPU"] == "ppc64": + +@@ -123,60 +59,14 @@ 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 - +- DEFINES["_DEBUG"] = True +- -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": - - DEFINES["_DEBUG"] = True - -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" - -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - - DEFINES["USE_X11"] = "1" - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm": - - OS_LIBS += [ -- "android_support", - "unwind" - ] - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": ++if CONFIG["TARGET_CPU"] == "x86": + + CFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": ++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + +- DEFINES["_GNU_SOURCE"] = True - -- CXXFLAGS += [ +-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" - ] - -- OS_LIBS += [ -- "android_support" +- 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 af5c5520ca80..a6d3fb5993d4 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 b10b4c330ef8..3703f7ef3366 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 = "xul" + + +@@ -33,139 +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["TARGET_CPU"] == "arm": +- +- CXXFLAGS += [ +- "-mfpu=neon" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "mips32": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["TARGET_CPU"] == "mips64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": -+if CONFIG["CPU_ARCH"] == "x86": +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +- + DEFINES["_DEBUG"] = True + +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["_DEBUG"] = True +- +-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" 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"] == "aarch64": +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": +- 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": +- +- CXXFLAGS += [ +- "-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("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 e0f103cc6cbd..c019774c6343 100644 +index 4bbb3e4e624c..62040f7084c2 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" + FINAL_LIBRARY = "xul" -@@ -52,190 +61,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -52,190 +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 605a6b14f7f5..05a856fbe4af 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" + FINAL_LIBRARY = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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 3014de468204..57c6d4c2998b 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" + FINAL_LIBRARY = "xul" -@@ -44,191 +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 += [ - "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 c1ae808ab1bb..1c51f66173fe 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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("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 +index 6e073f2e20c8..d9e054785471 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() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 +index dfe1ecd08c0c..ddac47c4650d 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() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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_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 +index f1b85291c770..d4b8b9b731ba 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() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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_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 +index 001433ce9ffe..c57fc823f293 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() +@@ -12,11 +12,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,191 +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 - - 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") -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 ---- 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() +diff --git third_party/libwebrtc/video/frame_dumping_encoder_gn/moz.build third_party/libwebrtc/video/frame_dumping_encoder_gn/moz.build +index a3bf0c641a1d..262c5170e8bc 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" + FINAL_LIBRARY = "xul" -@@ -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 += [ +- "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("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 ---- 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() + 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 42488b31f3f8..88aaeeb2fa86 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,21 @@ AllowCompilerWarnings() DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True DEFINES["RTC_ENABLE_VP9"] = True +DEFINES["USE_GLIB"] = "1" +DEFINES["USE_OZONE"] = "1" +DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" DEFINES["WEBRTC_LIBRARY_IMPL"] = True DEFINES["WEBRTC_MOZILLA_BUILD"] = True DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" +DEFINES["WEBRTC_POSIX"] = True DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" +DEFINES["_FILE_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 = "xul" -@@ -43,183 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,185 +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" ] +-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("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 24bd462a0c8e..a4d64795d0c7 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,21 @@ AllowCompilerWarnings() + DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1" + DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True + DEFINES["RTC_ENABLE_VP9"] = True ++DEFINES["USE_GLIB"] = "1" ++DEFINES["USE_OZONE"] = "1" ++DEFINES["WEBRTC_BSD"] = True ++DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True + DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0" + DEFINES["WEBRTC_LIBRARY_IMPL"] = True + DEFINES["WEBRTC_MOZILLA_BUILD"] = True + DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0" ++DEFINES["WEBRTC_POSIX"] = True + DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0" ++DEFINES["_FILE_OFFSET_BITS"] = "64" ++DEFINES["_LARGEFILE64_SOURCE"] = True ++DEFINES["_LARGEFILE_SOURCE"] = True ++DEFINES["__STDC_CONSTANT_MACROS"] = True ++DEFINES["__STDC_FORMAT_MACROS"] = True + + FINAL_LIBRARY = "xul" + +@@ -43,185 +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 += [ -- "android_support" +- "log" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Darwin": +- +- DEFINES["WEBRTC_MAC"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True +- DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "Linux": +- +- DEFINES["USE_AURA"] = "1" +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_NSS_CERTS"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_UDEV"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_LINUX"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "OpenBSD": +- +- DEFINES["USE_GLIB"] = "1" +- DEFINES["USE_OZONE"] = "1" +- DEFINES["USE_X11"] = "1" +- DEFINES["WEBRTC_BSD"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True +- DEFINES["WEBRTC_POSIX"] = True +- DEFINES["_FILE_OFFSET_BITS"] = "64" +- DEFINES["_LARGEFILE64_SOURCE"] = True +- DEFINES["_LARGEFILE_SOURCE"] = True +- DEFINES["__STDC_CONSTANT_MACROS"] = True +- DEFINES["__STDC_FORMAT_MACROS"] = True +- +-if CONFIG["OS_TARGET"] == "WINNT": +- +- DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True +- DEFINES["NOMINMAX"] = True +- DEFINES["NTDDI_VERSION"] = "0x0A000000" +- DEFINES["PSAPI_VERSION"] = "2" +- DEFINES["RTC_ENABLE_WIN_WGC"] = True +- DEFINES["UNICODE"] = True +- DEFINES["USE_AURA"] = "1" +- DEFINES["WEBRTC_WIN"] = True +- DEFINES["WIN32"] = True +- DEFINES["WIN32_LEAN_AND_MEAN"] = True +- DEFINES["WINAPI_FAMILY"] = "WINAPI_FAMILY_DESKTOP_APP" +- DEFINES["WINVER"] = "0x0A00" +- DEFINES["_ATL_NO_OPENGL"] = True +- DEFINES["_CRT_RAND_S"] = True +- DEFINES["_CRT_SECURE_NO_DEPRECATE"] = True +- DEFINES["_ENABLE_EXTENDED_ALIGNED_STORAGE"] = True +- DEFINES["_HAS_EXCEPTIONS"] = "0" +- DEFINES["_HAS_NODISCARD"] = True +- 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 += [ +- "unwind" +- ] +- +-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86": +- + CXXFLAGS += [ + "-msse2" + ] + +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86": + DEFINES["WEBRTC_ENABLE_AVX2"] = True - CXXFLAGS += [ - "-msse2" - ] -+if CONFIG["CPU_ARCH"] == "x86_64": ++if CONFIG["TARGET_CPU"] == "x86_64": - DEFINES["_GNU_SOURCE"] = True + DEFINES["WEBRTC_ENABLE_AVX2"] = True --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and 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 d1ee8ffccb72..d483272d93cf 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 b0eb431cfba7..067e25f152bd 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" + FINAL_LIBRARY = "xul" -@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,174 +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 a0f2d5b6ef84..542c0c791108 100644 +index 09826d37f927..a92734005e3c 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" + FINAL_LIBRARY = "xul" -@@ -65,191 +74,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -62,190 +72,32 @@ if not CONFIG["MOZ_DEBUG"]: if CONFIG["MOZ_DEBUG"] == "1": DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1" - -if CONFIG["OS_TARGET"] == "Android": - - DEFINES["ANDROID"] = True - DEFINES["ANDROID_NDK_VERSION_ROLL"] = "r22_1" - DEFINES["HAVE_SYS_UIO_H"] = True - DEFINES["WEBRTC_ANDROID"] = True - DEFINES["WEBRTC_ANDROID_OPENSLES"] = True +- DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True - 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 d24bf03a5991..d5f4170c45d8 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" + FINAL_LIBRARY = "xul" -@@ -43,190 +52,32 @@ if not CONFIG["MOZ_DEBUG"]: +@@ -43,189 +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 b99c992d4953..b1f2505dadb4 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" + FINAL_LIBRARY = "xul" -@@ -43,191 +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 - - 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 a51248556ab1..23e6fa0a8b70 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" + FINAL_LIBRARY = "xul" -@@ -48,191 +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 += [ - "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 7eeb5d9f4203..18a6af8783cc 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" + FINAL_LIBRARY = "xul" -@@ -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,50 +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": -- -- OS_LIBS += [ -- "android_support" -- ] -- --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - - DEFINES["_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 d06327372572..de606adc2f95 100644 +index 0a5908916a50..535ef83511d1 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" + FINAL_LIBRARY = "xul" -@@ -39,141 +48,17 @@ 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 -- - if CONFIG["CPU_ARCH"] == "mips32": ++ LOCAL_INCLUDES += [ ++ "/third_party/pipewire/" ++ ] + + if CONFIG["TARGET_CPU"] == "mips32": DEFINES["MIPS32_LE"] = True DEFINES["MIPS_FPU_LE"] = True + DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True -- --if CONFIG["CPU_ARCH"] == "mips64": -- + + LOCAL_INCLUDES += [ + "/third_party/pipewire/" +@@ -184,7 +74,6 @@ if CONFIG["TARGET_CPU"] == "mips32": + if CONFIG["TARGET_CPU"] == "mips64": + + DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - if CONFIG["CPU_ARCH"] == "x86": + LOCAL_INCLUDES += [ + "/third_party/pipewire/" +@@ -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/" ++ ] -@@ -183,27 +68,7 @@ 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" -@@ -218,33 +83,4 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - "Xtst" +@@ -232,46 +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"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64": - -- OS_LIBS += [ -- "android_support" +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True +- DEFINES["_GNU_SOURCE"] = True +- +- LOCAL_INCLUDES += [ +- "/third_party/pipewire/" - ] - --if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": +-if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "arm": - +- DEFINES["WEBRTC_USE_PIPEWIRE"] = True - DEFINES["_GNU_SOURCE"] = True - --if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": -- -- 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 - --if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux": +- LOCAL_INCLUDES += [ +- "/third_party/pipewire/" +- ] +- +-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/firefox-esr/files/patch-llvm18 b/www/firefox-esr/files/patch-llvm18 deleted file mode 100644 index f88e1eb079a8..000000000000 --- a/www/firefox-esr/files/patch-llvm18 +++ /dev/null @@ -1,199 +0,0 @@ -From cd10f3ba0d83f34ca978cc4c7a552b72fdd068aa Mon Sep 17 00:00:00 2001 -From: David Tolnay -Date: Tue, 28 Nov 2023 11:18:39 -0800 -Subject: [PATCH 1/2] Flatten cursor.kind() matching in Item::parse down to one - match - ---- - bindgen/ir/item.rs | 84 ++++++++++++++++++++++------------------------ - 1 file changed, 41 insertions(+), 43 deletions(-) - -diff --git bindgen/ir/item.rs bindgen/ir/item.rs -index 0556452bfa..4f2d361e51 100644 ---- third_party/rust/bindgen/ir/item.rs -+++ third_party/rust/bindgen/ir/item.rs -@@ -1427,53 +1427,52 @@ - } - } - -- // Guess how does clang treat extern "C" blocks? -- if cursor.kind() == CXCursor_UnexposedDecl { -- Err(ParseError::Recurse) -- } else { -+ match cursor.kind() { -+ // Guess how does clang treat extern "C" blocks? -+ CXCursor_UnexposedDecl => Err(ParseError::Recurse), -+ - // We allowlist cursors here known to be unhandled, to prevent being - // too noisy about this. -- match cursor.kind() { -- CXCursor_MacroDefinition | -- CXCursor_MacroExpansion | -- CXCursor_UsingDeclaration | -- CXCursor_UsingDirective | -- CXCursor_StaticAssert | -- CXCursor_FunctionTemplate => { -- debug!( -- "Unhandled cursor kind {:?}: {:?}", -- cursor.kind(), -- cursor -- ); -- } -- CXCursor_InclusionDirective => { -- let file = cursor.get_included_file_name(); -- match file { -- None => { -- warn!( -- "Inclusion of a nameless file in {:?}", -- cursor -- ); -- } -- Some(filename) => { -- ctx.include_file(filename); -- } -- } -- } -- _ => { -- // ignore toplevel operator overloads -- let spelling = cursor.spelling(); -- if !spelling.starts_with("operator") { -+ CXCursor_MacroDefinition | -+ CXCursor_MacroExpansion | -+ CXCursor_UsingDeclaration | -+ CXCursor_UsingDirective | -+ CXCursor_StaticAssert | -+ CXCursor_FunctionTemplate => { -+ debug!( -+ "Unhandled cursor kind {:?}: {:?}", -+ cursor.kind(), -+ cursor -+ ); -+ Err(ParseError::Continue) -+ } -+ CXCursor_InclusionDirective => { -+ let file = cursor.get_included_file_name(); -+ match file { -+ None => { - warn!( -- "Unhandled cursor kind {:?}: {:?}", -- cursor.kind(), -+ "Inclusion of a nameless file in {:?}", - cursor - ); - } -+ Some(filename) => { -+ ctx.include_file(filename); -+ } - } -+ Err(ParseError::Continue) -+ } -+ _ => { -+ // ignore toplevel operator overloads -+ let spelling = cursor.spelling(); -+ if !spelling.starts_with("operator") { -+ warn!( -+ "Unhandled cursor kind {:?}: {:?}", -+ cursor.kind(), -+ cursor -+ ); -+ } -+ Err(ParseError::Continue) - } -- -- Err(ParseError::Continue) - } - } - - -From 2997017b5a3065b83e9d76f0080d6cb99c94c0c1 Mon Sep 17 00:00:00 2001 -From: David Tolnay -Date: Tue, 28 Nov 2023 11:21:18 -0800 -Subject: [PATCH 2/2] Handle CXCursor_LinkageSpec in Clang 18+ - ---- - bindgen/ir/item.rs | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git bindgen/ir/item.rs bindgen/ir/item.rs -index 4f2d361e51..dd587b088b 100644 ---- third_party/rust/bindgen/ir/item.rs -+++ third_party/rust/bindgen/ir/item.rs -@@ -1433,8 +1433,11 @@ impl Item { - } - - match cursor.kind() { -- // Guess how does clang treat extern "C" blocks? -- CXCursor_UnexposedDecl => Err(ParseError::Recurse), -+ // On Clang 18+, extern "C" is reported accurately as a LinkageSpec. -+ // Older LLVM treat it as UnexposedDecl. -+ CXCursor_LinkageSpec | CXCursor_UnexposedDecl => { -+ Err(ParseError::Recurse) -+ } - - // We allowlist cursors here known to be unhandled, to prevent being - // too noisy about this. -diff --git dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp ---- dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp -+++ dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp -@@ -97,11 +97,11 @@ - uint32_t width_; - uint32_t height_; - uint8_t y_; - uint8_t u_; - uint8_t v_; -- uint32_t timestamp_; -+ uint64_t timestamp_; - } idr_nalu; - }; - #pragma pack(pop) - - #define ENCODED_FRAME_MAGIC 0x004000b8 -diff --git dom/media/gtest/TestGMPRemoveAndDelete.cpp dom/media/gtest/TestGMPRemoveAndDelete.cpp ---- dom/media/gtest/TestGMPRemoveAndDelete.cpp -+++ dom/media/gtest/TestGMPRemoveAndDelete.cpp -@@ -359,11 +359,11 @@ - uint32_t width_; - uint32_t height_; - uint8_t y_; - uint8_t u_; - uint8_t v_; -- uint32_t timestamp_; -+ uint64_t timestamp_; - } idr_nalu; - }; - #pragma pack(pop) - - GMPVideoFrame* absFrame; -diff --git dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h ---- dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h -+++ dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h -@@ -300,11 +300,11 @@ - - struct InputImageData { - int64_t timestamp_us; - }; - // Map rtp time -> input image data -- DataMutex> mInputImageMap; -+ DataMutex> mInputImageMap; - - MediaEventProducer mInitPluginEvent; - MediaEventProducer mReleasePluginEvent; - }; - -diff --git dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp ---- dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp -+++ dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp -@@ -538,11 +538,11 @@ - return; - } - - webrtc::VideoFrameType ft; - GmpFrameTypeToWebrtcFrameType(aEncodedFrame->FrameType(), &ft); -- uint32_t timestamp = (aEncodedFrame->TimeStamp() * 90ll + 999) / 1000; -+ uint64_t timestamp = (aEncodedFrame->TimeStamp() * 90ll + 999) / 1000; - - GMP_LOG_DEBUG("GMP Encoded: %" PRIu64 ", type %d, len %d", - aEncodedFrame->TimeStamp(), aEncodedFrame->BufferType(), - aEncodedFrame->Size()); - - diff --git a/www/firefox-esr/files/patch-mozglue_misc_SSE.h b/www/firefox-esr/files/patch-mozglue_misc_SSE.h new file mode 100644 index 000000000000..d60e1a0c9659 --- /dev/null +++ b/www/firefox-esr/files/patch-mozglue_misc_SSE.h @@ -0,0 +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['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/firefox-esr/files/patch-pipewire_init b/www/firefox-esr/files/patch-pipewire_init index 04cd4c495cc3..0af5db362656 100644 --- a/www/firefox-esr/files/patch-pipewire_init +++ b/www/firefox-esr/files/patch-pipewire_init @@ -1,105 +1,118 @@ Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819 diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index 49b64845100b..283c387db770 100644 +index 1872a8684132..7e519f9e9cbb 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -402,7 +402,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( +@@ -417,7 +417,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream( pw_stream_node_id_ = stream_node_id; - pw_init(/*argc=*/nullptr, /*argc=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr); pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc -index 3b829959aca8..9bdcdf1ffd51 100644 +index ffba13775363..da6a828a21ee 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/test/test_screencast_stream_provider.cc @@ -36,7 +36,7 @@ TestScreenCastStreamProvider::TestScreenCastStreamProvider(Observer* observer, return; } - pw_init(/*argc=*/nullptr, /*argc=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argc=*/nullptr); pw_main_loop_ = pw_thread_loop_new("pipewire-test-main-loop", nullptr); diff --git third_party/libwebrtc/modules/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs -index 139a8c37a551..9fe131d8daa6 100644 +index c3abf05b386f..a994c218f5a5 100644 --- third_party/libwebrtc/modules/portal/pipewire.sigs +++ third_party/libwebrtc/modules/portal/pipewire.sigs @@ -15,7 +15,7 @@ pw_loop * pw_loop_new(const spa_dict *props); // pipewire.h -void pw_init(int *argc, char **argv[]); +void pipewire_init(int *argc, char **argv[]); const char* pw_get_library_version(); // properties.h +diff --git third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index f2680b28162c..03476a5fffd0 100644 +--- third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc ++++ third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +@@ -252,7 +252,7 @@ void PipeWireSession::InitPipeWire(int fd) { + } + + bool PipeWireSession::StartPipeWire(int fd) { +- pw_init(/*argc=*/nullptr, /*argv=*/nullptr); ++ pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr); + + pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr); + diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp -index fbeeb8e5a760..46f768790946 100644 +index b8068296745e..7e8be3dc764f 100644 --- third_party/pipewire/libpipewire/mozpipewire.cpp +++ third_party/pipewire/libpipewire/mozpipewire.cpp @@ -58,7 +58,7 @@ struct pw_context * (*pw_context_new_fn)(struct pw_loop *main_loop, struct pw_properties *props, size_t user_data_size); static int (*pw_core_disconnect_fn)(struct pw_core *core); -static void (*pw_init_fn)(int *argc, char **argv[]); +static void (*pipewire_init_fn)(int *argc, char **argv[]); + static void (*pw_proxy_destroy_fn)(struct pw_proxy *proxy); static void (*pw_stream_add_listener_fn)(struct pw_stream *stream, struct spa_hook *listener, - const struct pw_stream_events *events, -@@ -101,7 +101,7 @@ bool IsPwLibraryLoaded() { +@@ -103,7 +103,7 @@ bool IsPwLibraryLoaded() { IS_FUNC_LOADED(pw_context_destroy_fn) && IS_FUNC_LOADED(pw_context_new_fn) && IS_FUNC_LOADED(pw_core_disconnect_fn) && - IS_FUNC_LOADED(pw_init_fn) && + IS_FUNC_LOADED(pipewire_init_fn) && + IS_FUNC_LOADED(pw_proxy_destroy_fn) && IS_FUNC_LOADED(pw_stream_add_listener_fn) && IS_FUNC_LOADED(pw_stream_connect_fn) && - IS_FUNC_LOADED(pw_stream_disconnect_fn) && -@@ -142,7 +142,7 @@ bool LoadPWLibrary() { +@@ -146,7 +146,7 @@ bool LoadPWLibrary() { GET_FUNC(pw_context_destroy, pwLib); GET_FUNC(pw_context_new, pwLib); GET_FUNC(pw_core_disconnect, pwLib); - GET_FUNC(pw_init, pwLib); + GET_FUNC(pipewire_init, pwLib); GET_FUNC(pw_stream_add_listener, pwLib); GET_FUNC(pw_stream_connect, pwLib); GET_FUNC(pw_stream_disconnect, pwLib); -@@ -220,12 +220,12 @@ pw_core_disconnect(struct pw_core *core) +@@ -226,12 +226,12 @@ pw_core_disconnect(struct pw_core *core) } void -pw_init(int *argc, char **argv[]) +pipewire_init(int *argc, char **argv[]) { if (!LoadPWLibrary()) { return; } - return pw_init_fn(argc, argv); + return pipewire_init_fn(argc, argv); } void diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h index b932103f46e6..2c88e28421ec 100644 --- third_party/pipewire/pipewire/pipewire.h +++ third_party/pipewire/pipewire/pipewire.h @@ -69,9 +69,9 @@ extern "C" { * \{ */ void -pw_init(int *argc, char **argv[]); +pipewire_init(int *argc, char **argv[]); -void pw_deinit(void); +void pipewire_deinit(void); bool pw_debug_is_category_enabled(const char *name); diff --git a/www/firefox-esr/files/patch-python_mozbuild_mozbuild_gn__processor.py b/www/firefox-esr/files/patch-python_mozbuild_mozbuild_gn__processor.py index 3d887a12c66f..94584d8b160b 100644 --- a/www/firefox-esr/files/patch-python_mozbuild_mozbuild_gn__processor.py +++ b/www/firefox-esr/files/patch-python_mozbuild_mozbuild_gn__processor.py @@ -1,48 +1,49 @@ -commit 0c96c599752d8d8f68b5ed8a6344888d1b505773 +commit 6bfdff4afcc9e3843b9c3a5d7e884e281a305398 Author: Christoph Moench-Tegeder - fixup gn_processor.py for FreeBSD + chase gn_processor.py changes diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py -index b6c51ee010a8..15b4bda9df6e 100644 +index a77b6c7759f1..e5498ac5e9df 100644 --- python/mozbuild/mozbuild/gn_processor.py +++ python/mozbuild/mozbuild/gn_processor.py @@ -185,6 +185,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target): } oses = { "android": "Android", + "freebsd": "FreeBSD", "linux": "Linux", "mac": "Darwin", "openbsd": "OpenBSD", -@@ -735,16 +736,16 @@ def main(): +@@ -742,17 +743,17 @@ def main(): vars_set = [] for is_debug in (True, False): - for target_os in ("android", "linux", "mac", "openbsd", "win"): + for target_os in ("freebsd",): target_cpus = ["x64"] - if target_os in ("android", "linux", "mac", "win", "openbsd"): + if target_os in ("android", "freebsd", "linux", "mac", "win", "openbsd"): target_cpus.append("arm64") if target_os in ("android", "linux"): target_cpus.append("arm") - if target_os in ("android", "linux", "win"): + if target_os in ("android", "freebsd", "linux", "win"): target_cpus.append("x86") +- if target_os in ("linux", "openbsd"): ++ if target_os in ("freebsd", "linux", "openbsd"): + target_cpus.append("riscv64") - if target_os == "linux": -- target_cpus.extend(["ppc64", "riscv64", "mipsel", "mips64el"]) + if target_os in ("freebsd", "linux"): -+ target_cpus.extend(["ppc64", "mipsel", "mips64el"]) + target_cpus.extend(["ppc64", "mipsel", "mips64el"]) for target_cpu in target_cpus: vars = { - "host_cpu": "x64", -@@ -752,7 +753,7 @@ def main(): +@@ -761,7 +762,7 @@ def main(): "target_cpu": target_cpu, "target_os": target_os, } - if target_os == "linux": + if target_os in ("freebsd", "linux"): for use_x11 in (True, False): vars["use_x11"] = use_x11 vars_set.append(vars.copy()) diff --git a/www/firefox-esr/files/patch-rust-1.78.0 b/www/firefox-esr/files/patch-rust-1.78.0 deleted file mode 100644 index 7e6685d5e8e7..000000000000 --- a/www/firefox-esr/files/patch-rust-1.78.0 +++ /dev/null @@ -1,3582 +0,0 @@ -Adapted from https://hg.mozilla.org/mozilla-central/rev/1db2ef126a6a --- - -# HG changeset patch -# User Henri Sivonen -# Date 1714462184 0 -# Node ID 1db2ef126a6a8555dbf50345e16492c977b42e92 -# Parent a545e84b3674c4878f2e618b7bce23058f2ac690 -Bug 1882209 - Update encoding_rs to 0.8.34 to deal with rustc changes. r=glandium,supply-chain-reviewers - -Differential Revision: https://phabricator.services.mozilla.com/D207167 - -diff --git a/.cargo/config.in b/.cargo/config.in ---- .cargo/config.in -+++ .cargo/config.in -@@ -35,31 +35,31 @@ git = "https://github.com/gfx-rs/wgpu" - rev = "f71a1bc736fde37509262ca03e91d8f56a13aeb5" - replace-with = "vendored-sources" - - [source."git+https://github.com/glandium/warp?rev=4af45fae95bc98b0eba1ef0db17e1dac471bb23d"] - git = "https://github.com/glandium/warp" - rev = "4af45fae95bc98b0eba1ef0db17e1dac471bb23d" - replace-with = "vendored-sources" - -+[source."git+https://github.com/hsivonen/any_all_workaround?rev=7fb1b7034c9f172aade21ee1c8554e8d8a48af80"] -+git = "https://github.com/hsivonen/any_all_workaround" -+rev = "7fb1b7034c9f172aade21ee1c8554e8d8a48af80" -+replace-with = "vendored-sources" -+ - [source."git+https://github.com/hsivonen/chardetng?rev=3484d3e3ebdc8931493aa5df4d7ee9360a90e76b"] - git = "https://github.com/hsivonen/chardetng" - rev = "3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" - replace-with = "vendored-sources" - - [source."git+https://github.com/hsivonen/chardetng_c?rev=ed8a4c6f900a90d4dbc1d64b856e61490a1c3570"] - git = "https://github.com/hsivonen/chardetng_c" - rev = "ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" - replace-with = "vendored-sources" - --[source."git+https://github.com/hsivonen/packed_simd?rev=e588ceb568878e1a3156ea9ce551d5b63ef0cdc4"] --git = "https://github.com/hsivonen/packed_simd" --rev = "e588ceb568878e1a3156ea9ce551d5b63ef0cdc4" --replace-with = "vendored-sources" -- - [source."git+https://github.com/jfkthame/mapped_hyph.git?rev=c7651a0cffff41996ad13c44f689bd9cd2192c01"] - git = "https://github.com/jfkthame/mapped_hyph.git" - rev = "c7651a0cffff41996ad13c44f689bd9cd2192c01" - replace-with = "vendored-sources" - - [source."git+https://github.com/mozilla-spidermonkey/jsparagus?rev=64ba08e24749616de2344112f226d1ef4ba893ae"] - git = "https://github.com/mozilla-spidermonkey/jsparagus" - rev = "64ba08e24749616de2344112f226d1ef4ba893ae" -diff --git a/Cargo.lock b/Cargo.lock ---- Cargo.lock -+++ Cargo.lock -@@ -80,16 +80,25 @@ dependencies = [ - name = "android_system_properties" - version = "0.1.5" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" - dependencies = [ - "libc", - ] - -+[[package]] -+name = "any_all_workaround" -+version = "0.1.0" -+source = "git+https://github.com/hsivonen/any_all_workaround?rev=7fb1b7034c9f172aade21ee1c8554e8d8a48af80#7fb1b7034c9f172aade21ee1c8554e8d8a48af80" -+dependencies = [ -+ "cfg-if 1.0.0", -+ "version_check", -+] -+ - [[package]] - name = "anyhow" - version = "1.0.69" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" - - [[package]] - name = "app_services_logger" -@@ -1431,22 +1440,22 @@ dependencies = [ - "encoding_rs", - "nserror", - "nsstring", - "xmldecl", - ] - - [[package]] - name = "encoding_rs" --version = "0.8.33" -+version = "0.8.34" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -+checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" - dependencies = [ -+ "any_all_workaround", - "cfg-if 1.0.0", -- "packed_simd", - ] - - [[package]] - name = "enum-primitive-derive" - version = "0.2.2" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "c375b9c5eadb68d0a6efee2999fef292f45854c3444c86f09d8ab086ba942b0e" - dependencies = [ -@@ -3901,25 +3910,16 @@ checksum = "8d91edf4fbb970279443471345a4e8c491bf05bb283b3e6c88e4e606fd8c181b" - [[package]] - name = "oxilangtag-ffi" - version = "0.1.0" - dependencies = [ - "nsstring", - "oxilangtag", - ] - --[[package]] --name = "packed_simd" --version = "0.3.9" --source = "git+https://github.com/hsivonen/packed_simd?rev=e588ceb568878e1a3156ea9ce551d5b63ef0cdc4#e588ceb568878e1a3156ea9ce551d5b63ef0cdc4" --dependencies = [ -- "cfg-if 1.0.0", -- "num-traits", --] -- - [[package]] - name = "parking_lot" - version = "0.11.2" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" - dependencies = [ - "instant", - "lock_api", -diff --git a/Cargo.toml b/Cargo.toml ---- Cargo.toml -+++ Cargo.toml -@@ -154,22 +154,22 @@ rure = { path = "third_party/rust/rure" } - - # 0.31.1 but without rust-cssparser#342. - # TODO: Remove these, and just use v0.31.1 once bug 1836219 lands - # (which will get syn 2 into the tree). - cssparser = { path = "third_party/rust/cssparser" } - cssparser-macros = { path = "third_party/rust/cssparser-macros" } - - # Other overrides -+any_all_workaround = { git = "https://github.com/hsivonen/any_all_workaround", rev = "7fb1b7034c9f172aade21ee1c8554e8d8a48af80" } - chardetng = { git = "https://github.com/hsivonen/chardetng", rev="3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" } - chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" } - coremidi = { git = "https://github.com/chris-zen/coremidi.git", rev="fc68464b5445caf111e41f643a2e69ccce0b4f83" } - firefox-on-glean = { path = "toolkit/components/glean/api" } - libudev-sys = { path = "dom/webauthn/libudev-sys" } --packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev = "e588ceb568878e1a3156ea9ce551d5b63ef0cdc4" } - midir = { git = "https://github.com/mozilla/midir.git", rev = "519e651241e867af3391db08f9ae6400bc023e18" } - # warp 0.3.3 + https://github.com/seanmonstar/warp/pull/1007 - warp = { git = "https://github.com/glandium/warp", rev = "4af45fae95bc98b0eba1ef0db17e1dac471bb23d" } - - # application-services overrides to make updating them all simpler. - interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" } - sql-support = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" } - sync15 = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" } -diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk ---- config/makefiles/rust.mk -+++ config/makefiles/rust.mk -@@ -260,17 +260,17 @@ export COREAUDIO_SDK_PATH=$(IPHONEOS_SDK - export IPHONEOS_SDK_DIR - PATH := $(topsrcdir)/build/macosx:$(PATH) - endif - endif - - ifndef RUSTC_BOOTSTRAP - RUSTC_BOOTSTRAP := mozglue_static,qcms - ifdef MOZ_RUST_SIMD --RUSTC_BOOTSTRAP := $(RUSTC_BOOTSTRAP),encoding_rs,packed_simd -+RUSTC_BOOTSTRAP := $(RUSTC_BOOTSTRAP),encoding_rs,any_all_workaround - endif - export RUSTC_BOOTSTRAP - endif - - target_rust_ltoable := force-cargo-library-build $(ADD_RUST_LTOABLE) - target_rust_nonltoable := force-cargo-test-run force-cargo-program-build - - ifdef MOZ_PGO_RUST -diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml ---- supply-chain/audits.toml -+++ supply-chain/audits.toml -@@ -596,16 +596,29 @@ who = "Mike Hommey "] -+description = "Workaround for bad LLVM codegen for boolean reductions on 32-bit ARM" -+homepage = "https://docs.rs/any_all_workaround/" -+documentation = "https://docs.rs/any_all_workaround/" -+readme = "README.md" -+license = "MIT OR Apache-2.0" -+repository = "https://github.com/hsivonen/any_all_workaround" -+ -+[dependencies] -+cfg-if = "1.0" -+ -+[build-dependencies] -+version_check = "0.9" -diff --git a/third_party/rust/packed_simd/LICENSE-APACHE b/third_party/rust/any_all_workaround/LICENSE-APACHE -rename from third_party/rust/packed_simd/LICENSE-APACHE -rename to third_party/rust/any_all_workaround/LICENSE-APACHE -diff --git a/third_party/rust/packed_simd/LICENSE-MIT b/third_party/rust/any_all_workaround/LICENSE-MIT -rename from third_party/rust/packed_simd/LICENSE-MIT -rename to third_party/rust/any_all_workaround/LICENSE-MIT -diff --git a/third_party/rust/any_all_workaround/LICENSE-MIT-QCMS b/third_party/rust/any_all_workaround/LICENSE-MIT-QCMS -new file mode 100644 ---- /dev/null -+++ third_party/rust/any_all_workaround/LICENSE-MIT-QCMS -@@ -0,0 +1,21 @@ -+qcms -+Copyright (C) 2009-2024 Mozilla Corporation -+Copyright (C) 1998-2007 Marti Maria -+ -+Permission is hereby granted, free of charge, to any person obtaining -+a copy of this software and associated documentation files (the "Software"), -+to deal in the Software without restriction, including without limitation -+the rights to use, copy, modify, merge, publish, distribute, sublicense, -+and/or sell copies of the Software, and to permit persons to whom the Software -+is furnished to do so, subject to the following conditions: -+ -+The above copyright notice and this permission notice shall be included in -+all copies or substantial portions of the Software. -+ -+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -+THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -diff --git a/third_party/rust/any_all_workaround/README.md b/third_party/rust/any_all_workaround/README.md -new file mode 100644 ---- /dev/null -+++ third_party/rust/any_all_workaround/README.md -@@ -0,0 +1,13 @@ -+# any_all_workaround -+ -+This is a workaround for bad codegen ([Rust bug](https://github.com/rust-lang/portable-simd/issues/146), [LLVM bug](https://github.com/llvm/llvm-project/issues/50466)) for the `any()` and `all()` reductions for NEON-backed SIMD vectors on 32-bit ARM. On other platforms these delegate to `any()` and `all()` in `core::simd`. -+ -+The plan is to abandon this crate once the LLVM bug is fixed or `core::simd` works around the LLVM bug. -+ -+The code is forked from the [`packed_simd` crate](https://raw.githubusercontent.com/hsivonen/packed_simd/d938e39bee9bc5c222f5f2f2a0df9e53b5ce36ae/src/codegen/reductions/mask/arm.rs). -+ -+This crate requires Nightly Rust as it depends on the `portable_simd` feature. -+ -+# License -+ -+`MIT OR Apache-2.0`, since that's how `packed_simd` is licensed. (The ARM intrinsics Rust version workaround is from qcms, see LICENSE-MIT-QCMS.) -diff --git a/third_party/rust/any_all_workaround/build.rs b/third_party/rust/any_all_workaround/build.rs -new file mode 100644 ---- /dev/null -+++ third_party/rust/any_all_workaround/build.rs -@@ -0,0 +1,7 @@ -+extern crate version_check as rustc; -+ -+fn main() { -+ if rustc::is_min_version("1.78.0").unwrap_or(false) { -+ println!("cargo:rustc-cfg=stdsimd_split"); -+ } -+} -diff --git a/third_party/rust/any_all_workaround/src/lib.rs b/third_party/rust/any_all_workaround/src/lib.rs -new file mode 100644 ---- /dev/null -+++ third_party/rust/any_all_workaround/src/lib.rs -@@ -0,0 +1,110 @@ -+// This code began as a fork of -+// https://raw.githubusercontent.com/rust-lang/packed_simd/d938e39bee9bc5c222f5f2f2a0df9e53b5ce36ae/src/codegen/reductions/mask/arm.rs -+// which didn't have a license header on the file, but Cargo.toml said "MIT OR Apache-2.0". -+// See LICENSE-MIT and LICENSE-APACHE. -+ -+#![no_std] -+#![feature(portable_simd)] -+#![cfg_attr( -+ all( -+ stdsimd_split, -+ target_arch = "arm", -+ target_endian = "little", -+ target_feature = "neon", -+ target_feature = "v7" -+ ), -+ feature(stdarch_arm_neon_intrinsics) -+)] -+#![cfg_attr( -+ all( -+ not(stdsimd_split), -+ target_arch = "arm", -+ target_endian = "little", -+ target_feature = "neon", -+ target_feature = "v7" -+ ), -+ feature(stdsimd) -+)] -+ -+use cfg_if::cfg_if; -+use core::simd::mask16x8; -+use core::simd::mask32x4; -+use core::simd::mask8x16; -+ -+cfg_if! { -+ if #[cfg(all(target_arch = "arm", target_endian = "little", target_feature = "neon", target_feature = "v7"))] { -+ use core::simd::mask8x8; -+ use core::simd::mask16x4; -+ use core::simd::mask32x2; -+ macro_rules! arm_128_v7_neon_impl { -+ ($all:ident, $any:ident, $id:ident, $half:ident, $vpmin:ident, $vpmax:ident) => { -+ #[inline] -+ pub fn $all(s: $id) -> bool { -+ use core::arch::arm::$vpmin; -+ use core::mem::transmute; -+ unsafe { -+ union U { -+ halves: ($half, $half), -+ vec: $id, -+ } -+ let halves = U { vec: s }.halves; -+ let h: $half = transmute($vpmin(transmute(halves.0), transmute(halves.1))); -+ h.all() -+ } -+ } -+ #[inline] -+ pub fn $any(s: $id) -> bool { -+ use core::arch::arm::$vpmax; -+ use core::mem::transmute; -+ unsafe { -+ union U { -+ halves: ($half, $half), -+ vec: $id, -+ } -+ let halves = U { vec: s }.halves; -+ let h: $half = transmute($vpmax(transmute(halves.0), transmute(halves.1))); -+ h.any() -+ } -+ } -+ } -+ } -+ } else { -+ macro_rules! arm_128_v7_neon_impl { -+ ($all:ident, $any:ident, $id:ident, $half:ident, $vpmin:ident, $vpmax:ident) => { -+ #[inline(always)] -+ pub fn $all(s: $id) -> bool { -+ s.all() -+ } -+ #[inline(always)] -+ pub fn $any(s: $id) -> bool { -+ s.any() -+ } -+ } -+ } -+ } -+} -+ -+arm_128_v7_neon_impl!( -+ all_mask8x16, -+ any_mask8x16, -+ mask8x16, -+ mask8x8, -+ vpmin_u8, -+ vpmax_u8 -+); -+arm_128_v7_neon_impl!( -+ all_mask16x8, -+ any_mask16x8, -+ mask16x8, -+ mask16x4, -+ vpmin_u16, -+ vpmax_u16 -+); -+arm_128_v7_neon_impl!( -+ all_mask32x4, -+ any_mask32x4, -+ mask32x4, -+ mask32x2, -+ vpmin_u32, -+ vpmax_u32 -+); -diff --git a/third_party/rust/encoding_rs/Cargo.toml b/third_party/rust/encoding_rs/Cargo.toml ---- third_party/rust/encoding_rs/Cargo.toml -+++ third_party/rust/encoding_rs/Cargo.toml -@@ -6,18 +6,19 @@ - # to registry (e.g., crates.io) dependencies. - # - # If you are reading this file be aware that the original Cargo.toml - # will likely look very different (and much more reasonable). - # See Cargo.toml.orig for the original contents. - - [package] - edition = "2018" -+rust-version = "1.36" - name = "encoding_rs" --version = "0.8.33" -+version = "0.8.34" - authors = ["Henri Sivonen "] - description = "A Gecko-oriented implementation of the Encoding Standard" - homepage = "https://docs.rs/encoding_rs/" - documentation = "https://docs.rs/encoding_rs/" - readme = "README.md" - keywords = [ - "encoding", - "web", -@@ -31,23 +32,23 @@ categories = [ - "internationalization", - ] - license = "(Apache-2.0 OR MIT) AND BSD-3-Clause" - repository = "https://github.com/hsivonen/encoding_rs" - - [profile.release] - lto = true - -+[dependencies.any_all_workaround] -+version = "0.1.0" -+optional = true -+ - [dependencies.cfg-if] - version = "1.0" - --[dependencies.packed_simd] --version = "0.3.9" --optional = true -- - [dependencies.serde] - version = "1.0" - optional = true - - [dev-dependencies.bincode] - version = "1.0" - - [dev-dependencies.serde_derive] -@@ -69,15 +70,9 @@ fast-legacy-encode = [ - "fast-hanja-encode", - "fast-kanji-encode", - "fast-gb-hanzi-encode", - "fast-big5-hanzi-encode", - ] - less-slow-big5-hanzi-encode = [] - less-slow-gb-hanzi-encode = [] - less-slow-kanji-encode = [] --simd-accel = [ -- "packed_simd", -- "packed_simd/into_bits", --] -- --[badges.travis-ci] --repository = "hsivonen/encoding_rs" -+simd-accel = ["any_all_workaround"] -diff --git a/third_party/rust/encoding_rs/README.md b/third_party/rust/encoding_rs/README.md ---- third_party/rust/encoding_rs/README.md -+++ third_party/rust/encoding_rs/README.md -@@ -162,50 +162,36 @@ wrappers. - * [C++](https://github.com/hsivonen/recode_cpp) - - ## Optional features - - There are currently these optional cargo features: - - ### `simd-accel` - --Enables SIMD acceleration using the nightly-dependent `packed_simd` crate. -+Enables SIMD acceleration using the nightly-dependent `portable_simd` standard -+library feature. - - This is an opt-in feature, because enabling this feature _opts out_ of Rust's - guarantees of future compilers compiling old code (aka. "stability story"). - - Currently, this has not been tested to be an improvement except for these --targets: -+targets and enabling the `simd-accel` feature is expected to break the build -+on other targets: - - * x86_64 - * i686 - * aarch64 - * thumbv7neon - - If you use nightly Rust, you use targets whose first component is one of the - above, and you are prepared _to have to revise your configuration when updating - Rust_, you should enable this feature. Otherwise, please _do not_ enable this - feature. - --_Note!_ If you are compiling for a target that does not have 128-bit SIMD --enabled as part of the target definition and you are enabling 128-bit SIMD --using `-C target_feature`, you need to enable the `core_arch` Cargo feature --for `packed_simd` to compile a crates.io snapshot of `core_arch` instead of --using the standard-library copy of `core::arch`, because the `core::arch` --module of the pre-compiled standard library has been compiled with the --assumption that the CPU doesn't have 128-bit SIMD. At present this applies --mainly to 32-bit ARM targets whose first component does not include the --substring `neon`. -- --The encoding_rs side of things has not been properly set up for POWER, --PowerPC, MIPS, etc., SIMD at this time, so even if you were to follow --the advice from the previous paragraph, you probably shouldn't use --the `simd-accel` option on the less mainstream architectures at this --time. -- - Used by Firefox. - - ### `serde` - - Enables support for serializing and deserializing `&'static Encoding`-typed - struct fields using [Serde][1]. - - [1]: https://serde.rs/ -@@ -376,18 +362,19 @@ It is a goal to support the latest stabl - the version of Rust that's used for Firefox Nightly. - - At this time, there is no firm commitment to support a version older than - what's required by Firefox, and there is no commitment to treat MSRV changes - as semver-breaking, because this crate depends on `cfg-if`, which doesn't - appear to treat MSRV changes as semver-breaking, so it would be useless for - this crate to treat MSRV changes as semver-breaking. - --As of 2021-02-04, MSRV appears to be Rust 1.36.0 for using the crate and -+As of 2024-04-04, MSRV appears to be Rust 1.36.0 for using the crate and - 1.42.0 for doc tests to pass without errors about the global allocator. -+With the `simd-accel` feature, the MSRV is even higher. - - ## Compatibility with rust-encoding - - A compatibility layer that implements the rust-encoding API on top of - encoding_rs is - [provided as a separate crate](https://github.com/hsivonen/encoding_rs_compat) - (cannot be uploaded to crates.io). The compatibility layer was originally - written with the assuption that Firefox would need it, but it is not currently -@@ -441,20 +428,27 @@ To regenerate the generated code: - - [x] Implement the rust-encoding API in terms of encoding_rs. - - [x] Add SIMD acceleration for Aarch64. - - [x] Investigate the use of NEON on 32-bit ARM. - - [ ] ~Investigate Björn Höhrmann's lookup table acceleration for UTF-8 as - adapted to Rust in rust-encoding.~ - - [x] Add actually fast CJK encode options. - - [ ] ~Investigate [Bob Steagall's lookup table acceleration for UTF-8](https://github.com/BobSteagall/CppNow2018/blob/master/FastConversionFromUTF-8/Fast%20Conversion%20From%20UTF-8%20with%20C%2B%2B%2C%20DFAs%2C%20and%20SSE%20Intrinsics%20-%20Bob%20Steagall%20-%20C%2B%2BNow%202018.pdf).~ - - [x] Provide a build mode that works without `alloc` (with lesser API surface). --- [ ] Migrate to `std::simd` once it is stable and declare 1.0. -+- [x] Migrate to `std::simd` ~once it is stable and declare 1.0.~ -+- [ ] Migrate `unsafe` slice access by larger types than `u8`/`u16` to `align_to`. - - ## Release Notes - -+### 0.8.34 -+ -+* Use the `portable_simd` nightly feature of the standard library instead of the `packed_simd` crate. Only affects the `simd-accel` optional nightly feature. -+* Internal documentation improvements and minor code improvements around `unsafe`. -+* Added `rust-version` to `Cargo.toml`. -+ - ### 0.8.33 - - * Use `packed_simd` instead of `packed_simd_2` again now that updates are back under the `packed_simd` name. Only affects the `simd-accel` optional nightly feature. - - ### 0.8.32 - - * Removed `build.rs`. (This removal should resolve false positives reported by some antivirus products. This may break some build configurations that have opted out of Rust's guarantees against future build breakage.) - * Internal change to what API is used for reinterpreting the lane configuration of SIMD vectors. -diff --git a/third_party/rust/encoding_rs/src/ascii.rs b/third_party/rust/encoding_rs/src/ascii.rs ---- third_party/rust/encoding_rs/src/ascii.rs -+++ third_party/rust/encoding_rs/src/ascii.rs -@@ -46,71 +46,87 @@ cfg_if! { - #[allow(dead_code)] - #[inline(always)] - fn likely(b: bool) -> bool { - b - } - } - } - -+// Safety invariants for masks: data & mask = 0 for valid ASCII or basic latin utf-16 -+ - // `as` truncates, so works on 32-bit, too. - #[allow(dead_code)] - pub const ASCII_MASK: usize = 0x8080_8080_8080_8080u64 as usize; - - // `as` truncates, so works on 32-bit, too. - #[allow(dead_code)] - pub const BASIC_LATIN_MASK: usize = 0xFF80_FF80_FF80_FF80u64 as usize; - - #[allow(unused_macros)] - macro_rules! ascii_naive { - ($name:ident, $src_unit:ty, $dst_unit:ty) => { -+ /// Safety: src and dst must have len_unit elements and be aligned -+ /// Safety-usable invariant: will return Some() when it fails -+ /// to convert. The first value will be a u8 that is > 127. - #[inline(always)] - pub unsafe fn $name( - src: *const $src_unit, - dst: *mut $dst_unit, - len: usize, - ) -> Option<($src_unit, usize)> { - // Yes, manually omitting the bound check here matters - // a lot for perf. - for i in 0..len { -+ // Safety: len invariant used here - let code_unit = *(src.add(i)); -+ // Safety: Upholds safety-usable invariant here - if code_unit > 127 { - return Some((code_unit, i)); - } -+ // Safety: len invariant used here - *(dst.add(i)) = code_unit as $dst_unit; - } - return None; - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_alu { - ($name:ident, -+ // safety invariant: src/dst MUST be u8 - $src_unit:ty, - $dst_unit:ty, -+ // Safety invariant: stride_fn must consume and produce two usizes, and return the index of the first non-ascii when it fails - $stride_fn:ident) => { -+ /// Safety: src and dst must have len elements, src is valid for read, dst is valid for -+ /// write -+ /// Safety-usable invariant: will return Some() when it fails -+ /// to convert. The first value will be a u8 that is > 127. - #[cfg_attr(feature = "cargo-clippy", allow(never_loop, cast_ptr_alignment))] - #[inline(always)] - pub unsafe fn $name( - src: *const $src_unit, - dst: *mut $dst_unit, - len: usize, - ) -> Option<($src_unit, usize)> { - let mut offset = 0usize; - // This loop is only broken out of as a `goto` forward - loop { -+ // Safety: until_alignment becomes the number of bytes we need to munch until we are aligned to usize - let mut until_alignment = { - // Check if the other unit aligns if we move the narrower unit - // to alignment. - // if ::core::mem::size_of::<$src_unit>() == ::core::mem::size_of::<$dst_unit>() { - // ascii_to_ascii - let src_alignment = (src as usize) & ALU_ALIGNMENT_MASK; - let dst_alignment = (dst as usize) & ALU_ALIGNMENT_MASK; - if src_alignment != dst_alignment { -+ // Safety: bails early and ends up in the naïve branch where usize-alignment doesn't matter - break; - } - (ALU_ALIGNMENT - src_alignment) & ALU_ALIGNMENT_MASK - // } else if ::core::mem::size_of::<$src_unit>() < ::core::mem::size_of::<$dst_unit>() { - // ascii_to_basic_latin - // let src_until_alignment = (ALIGNMENT - ((src as usize) & ALIGNMENT_MASK)) & ALIGNMENT_MASK; - // if (dst.add(src_until_alignment) as usize) & ALIGNMENT_MASK != 0 { - // break; -@@ -129,74 +145,104 @@ macro_rules! ascii_alu { - // Moving pointers to alignment seems to be a pessimization on - // x86_64 for operations that have UTF-16 as the internal - // Unicode representation. However, since it seems to be a win - // on ARM (tested ARMv7 code running on ARMv8 [rpi3]), except - // mixed results when encoding from UTF-16 and since x86 and - // x86_64 should be using SSE2 in due course, keeping the move - // to alignment here. It would be good to test on more ARM CPUs - // and on real MIPS and POWER hardware. -+ // -+ // Safety: This is the naïve code once again, for `until_alignment` bytes - while until_alignment != 0 { - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety: Upholds safety-usable invariant here - return Some((code_unit, offset)); - } - *(dst.add(offset)) = code_unit as $dst_unit; -+ // Safety: offset is the number of bytes copied so far - offset += 1; - until_alignment -= 1; - } - let len_minus_stride = len - ALU_STRIDE_SIZE; - loop { -+ // Safety: num_ascii is known to be a byte index of a non-ascii byte due to stride_fn's invariant - if let Some(num_ascii) = $stride_fn( -+ // Safety: These are known to be valid and aligned since we have at -+ // least ALU_STRIDE_SIZE data in these buffers, and offset is the -+ // number of elements copied so far, which according to the -+ // until_alignment calculation above will cause both src and dst to be -+ // aligned to usize after this add - src.add(offset) as *const usize, - dst.add(offset) as *mut usize, - ) { - offset += num_ascii; -+ // Safety: Upholds safety-usable invariant here by indexing into non-ascii byte - return Some((*(src.add(offset)), offset)); - } -+ // Safety: offset continues to be the number of bytes copied so far, and -+ // maintains usize alignment for the next loop iteration - offset += ALU_STRIDE_SIZE; -+ // Safety: This is `offset > len - stride. This loop will continue as long as -+ // `offset <= len - stride`, which means there are `stride` bytes to still be read. - if offset > len_minus_stride { - break; - } - } - } - break; - } -+ -+ // Safety: This is the naïve code, same as ascii_naive, and has no requirements -+ // other than src/dst being valid for the the right lens - while offset < len { -+ // Safety: len invariant used here - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety: Upholds safety-usable invariant here - return Some((code_unit, offset)); - } -+ // Safety: len invariant used here - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! basic_latin_alu { - ($name:ident, -+ // safety invariant: use u8 for src/dest for ascii, and u16 for basic_latin - $src_unit:ty, - $dst_unit:ty, -+ // safety invariant: stride function must munch ALU_STRIDE_SIZE*size(src_unit) bytes off of src and -+ // write ALU_STRIDE_SIZE*size(dst_unit) bytes to dst - $stride_fn:ident) => { -+ /// Safety: src and dst must have len elements, src is valid for read, dst is valid for -+ /// write -+ /// Safety-usable invariant: will return Some() when it fails -+ /// to convert. The first value will be a u8 that is > 127. - #[cfg_attr( - feature = "cargo-clippy", - allow(never_loop, cast_ptr_alignment, cast_lossless) - )] - #[inline(always)] - pub unsafe fn $name( - src: *const $src_unit, - dst: *mut $dst_unit, - len: usize, - ) -> Option<($src_unit, usize)> { - let mut offset = 0usize; - // This loop is only broken out of as a `goto` forward - loop { -+ // Safety: until_alignment becomes the number of bytes we need to munch from src/dest until we are aligned to usize -+ // We ensure basic-latin has the same alignment as ascii, starting with ascii since it is smaller. - let mut until_alignment = { - // Check if the other unit aligns if we move the narrower unit - // to alignment. - // if ::core::mem::size_of::<$src_unit>() == ::core::mem::size_of::<$dst_unit>() { - // ascii_to_ascii - // let src_alignment = (src as usize) & ALIGNMENT_MASK; - // let dst_alignment = (dst as usize) & ALIGNMENT_MASK; - // if src_alignment != dst_alignment { -@@ -232,66 +278,89 @@ macro_rules! basic_latin_alu { - // Moving pointers to alignment seems to be a pessimization on - // x86_64 for operations that have UTF-16 as the internal - // Unicode representation. However, since it seems to be a win - // on ARM (tested ARMv7 code running on ARMv8 [rpi3]), except - // mixed results when encoding from UTF-16 and since x86 and - // x86_64 should be using SSE2 in due course, keeping the move - // to alignment here. It would be good to test on more ARM CPUs - // and on real MIPS and POWER hardware. -+ // -+ // Safety: This is the naïve code once again, for `until_alignment` bytes - while until_alignment != 0 { - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety: Upholds safety-usable invariant here - return Some((code_unit, offset)); - } - *(dst.add(offset)) = code_unit as $dst_unit; -+ // Safety: offset is the number of bytes copied so far - offset += 1; - until_alignment -= 1; - } - let len_minus_stride = len - ALU_STRIDE_SIZE; - loop { - if !$stride_fn( -+ // Safety: These are known to be valid and aligned since we have at -+ // least ALU_STRIDE_SIZE data in these buffers, and offset is the -+ // number of elements copied so far, which according to the -+ // until_alignment calculation above will cause both src and dst to be -+ // aligned to usize after this add - src.add(offset) as *const usize, - dst.add(offset) as *mut usize, - ) { - break; - } -+ // Safety: offset continues to be the number of bytes copied so far, and -+ // maintains usize alignment for the next loop iteration - offset += ALU_STRIDE_SIZE; -+ // Safety: This is `offset > len - stride. This loop will continue as long as -+ // `offset <= len - stride`, which means there are `stride` bytes to still be read. - if offset > len_minus_stride { - break; - } - } - } - break; - } -+ // Safety: This is the naïve code once again, for leftover bytes - while offset < len { -+ // Safety: len invariant used here - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety: Upholds safety-usable invariant here - return Some((code_unit, offset)); - } -+ // Safety: len invariant used here - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! latin1_alu { -+ // safety invariant: stride function must munch ALU_STRIDE_SIZE*size(src_unit) bytes off of src and -+ // write ALU_STRIDE_SIZE*size(dst_unit) bytes to dst - ($name:ident, $src_unit:ty, $dst_unit:ty, $stride_fn:ident) => { -+ /// Safety: src and dst must have len elements, src is valid for read, dst is valid for -+ /// write - #[cfg_attr( - feature = "cargo-clippy", - allow(never_loop, cast_ptr_alignment, cast_lossless) - )] - #[inline(always)] - pub unsafe fn $name(src: *const $src_unit, dst: *mut $dst_unit, len: usize) { - let mut offset = 0usize; - // This loop is only broken out of as a `goto` forward - loop { -+ // Safety: until_alignment becomes the number of bytes we need to munch from src/dest until we are aligned to usize -+ // We ensure the UTF-16 side has the same alignment as the Latin-1 side, starting with Latin-1 since it is smaller. - let mut until_alignment = { - if ::core::mem::size_of::<$src_unit>() < ::core::mem::size_of::<$dst_unit>() { - // unpack - let src_until_alignment = (ALU_ALIGNMENT - - ((src as usize) & ALU_ALIGNMENT_MASK)) - & ALU_ALIGNMENT_MASK; - if (dst.wrapping_add(src_until_alignment) as usize) & ALU_ALIGNMENT_MASK - != 0 -@@ -308,373 +377,485 @@ macro_rules! latin1_alu { - != 0 - { - break; - } - dst_until_alignment - } - }; - if until_alignment + ALU_STRIDE_SIZE <= len { -+ // Safety: This is the naïve code once again, for `until_alignment` bytes - while until_alignment != 0 { - let code_unit = *(src.add(offset)); - *(dst.add(offset)) = code_unit as $dst_unit; -+ // Safety: offset is the number of bytes copied so far - offset += 1; - until_alignment -= 1; - } - let len_minus_stride = len - ALU_STRIDE_SIZE; - loop { - $stride_fn( -+ // Safety: These are known to be valid and aligned since we have at -+ // least ALU_STRIDE_SIZE data in these buffers, and offset is the -+ // number of elements copied so far, which according to the -+ // until_alignment calculation above will cause both src and dst to be -+ // aligned to usize after this add - src.add(offset) as *const usize, - dst.add(offset) as *mut usize, - ); -+ // Safety: offset continues to be the number of bytes copied so far, and -+ // maintains usize alignment for the next loop iteration - offset += ALU_STRIDE_SIZE; -+ // Safety: This is `offset > len - stride. This loop will continue as long as -+ // `offset <= len - stride`, which means there are `stride` bytes to still be read. - if offset > len_minus_stride { - break; - } - } - } - break; - } -+ // Safety: This is the naïve code once again, for leftover bytes - while offset < len { -+ // Safety: len invariant used here - let code_unit = *(src.add(offset)); - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_simd_check_align { - ( - $name:ident, - $src_unit:ty, - $dst_unit:ty, -+ // Safety: This function must require aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_both_aligned:ident, -+ // Safety: This function must require aligned/unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_src_aligned:ident, -+ // Safety: This function must require unaligned/aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_dst_aligned:ident, -+ // Safety: This function must require unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_neither_aligned:ident - ) => { -+ /// Safety: src/dst must be valid for reads/writes of `len` elements of their units. -+ /// -+ /// Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being -+ /// guaranteed to be non-ASCII (> 127), and the second being the offset where it is found - #[inline(always)] - pub unsafe fn $name( - src: *const $src_unit, - dst: *mut $dst_unit, - len: usize, - ) -> Option<($src_unit, usize)> { - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading/writing at least `SIMD_STRIDE_SIZE` elements. - if SIMD_STRIDE_SIZE <= len { - let len_minus_stride = len - SIMD_STRIDE_SIZE; - // XXX Should we first process one stride unconditionally as unaligned to - // avoid the cost of the branchiness below if the first stride fails anyway? - // XXX Should we just use unaligned SSE2 access unconditionally? It seems that - // on Haswell, it would make sense to just use unaligned and not bother - // checking. Need to benchmark older architectures before deciding. - let dst_masked = (dst as usize) & SIMD_ALIGNMENT_MASK; -+ // Safety: checking whether src is aligned - if ((src as usize) & SIMD_ALIGNMENT_MASK) == 0 { -+ // Safety: Checking whether dst is aligned - if dst_masked == 0 { - loop { -+ // Safety: We're valid to read/write SIMD_STRIDE_SIZE elements and have the appropriate alignments - if !$stride_both_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE` which means we always have at least `SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } else { - loop { -+ // Safety: We're valid to read/write SIMD_STRIDE_SIZE elements and have the appropriate alignments - if !$stride_src_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE` which means we always have at least `SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } - } else { - if dst_masked == 0 { - loop { -+ // Safety: We're valid to read/write SIMD_STRIDE_SIZE elements and have the appropriate alignments - if !$stride_dst_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE` which means we always have at least `SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } else { - loop { -+ // Safety: We're valid to read/write SIMD_STRIDE_SIZE elements and have the appropriate alignments - if !$stride_neither_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE` which means we always have at least `SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } - } - } - while offset < len { -+ // Safety: uses len invariant here and below - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety: upholds safety-usable invariant - return Some((code_unit, offset)); - } - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_simd_check_align_unrolled { - ( - $name:ident, - $src_unit:ty, - $dst_unit:ty, -+ // Safety: This function must require aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_both_aligned:ident, -+ // Safety: This function must require aligned/unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_src_aligned:ident, -+ // Safety: This function must require unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_neither_aligned:ident, -+ // Safety: This function must require aligned src/dest that are valid for reading/writing 2*SIMD_STRIDE_SIZE src_unit/dst_unit - $double_stride_both_aligned:ident, -+ // Safety: This function must require aligned/unaligned src/dest that are valid for reading/writing 2*SIMD_STRIDE_SIZE src_unit/dst_unit - $double_stride_src_aligned:ident - ) => { -- #[inline(always)] -+ /// Safety: src/dst must be valid for reads/writes of `len` elements of their units. -+ /// -+ /// Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being -+ /// guaranteed to be non-ASCII (> 127), and the second being the offset where it is found #[inline(always)] - pub unsafe fn $name( - src: *const $src_unit, - dst: *mut $dst_unit, - len: usize, - ) -> Option<($src_unit, usize)> { - let unit_size = ::core::mem::size_of::<$src_unit>(); - let mut offset = 0usize; - // This loop is only broken out of as a goto forward without - // actually looping - 'outer: loop { -+ // Safety: if this check succeeds we're valid for reading/writing at least `SIMD_STRIDE_SIZE` elements. - if SIMD_STRIDE_SIZE <= len { - // First, process one unaligned -+ // Safety: this is safe to call since we're valid for this read/write - if !$stride_neither_aligned(src, dst) { - break 'outer; - } - offset = SIMD_STRIDE_SIZE; - - // We have now seen 16 ASCII bytes. Let's guess that - // there will be enough more to justify more expense - // in the case of non-ASCII. - // Use aligned reads for the sake of old microachitectures. -+ // -+ // Safety: this correctly calculates the number of src_units that need to be read before the remaining list is aligned. -+ // This is less that SIMD_ALIGNMENT, which is also SIMD_STRIDE_SIZE (as documented) - let until_alignment = ((SIMD_ALIGNMENT - - ((src.add(offset) as usize) & SIMD_ALIGNMENT_MASK)) - & SIMD_ALIGNMENT_MASK) - / unit_size; -- // This addition won't overflow, because even in the 32-bit PAE case the -+ // Safety: This addition won't overflow, because even in the 32-bit PAE case the - // address space holds enough code that the slice length can't be that - // close to address space size. - // offset now equals SIMD_STRIDE_SIZE, hence times 3 below. -+ // -+ // Safety: if this check succeeds we're valid for reading/writing at least `2 * SIMD_STRIDE_SIZE` elements plus `until_alignment`. -+ // The extra SIMD_STRIDE_SIZE in the condition is because `offset` is already `SIMD_STRIDE_SIZE`. - if until_alignment + (SIMD_STRIDE_SIZE * 3) <= len { - if until_alignment != 0 { -+ // Safety: this is safe to call since we're valid for this read/write (and more), and don't care about alignment -+ // This will copy over bytes that get decoded twice since it's not incrementing `offset` by SIMD_STRIDE_SIZE. This is fine. - if !$stride_neither_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += until_alignment; - } -+ // Safety: At this point we're valid for reading/writing 2*SIMD_STRIDE_SIZE elements -+ // Safety: Now `offset` is aligned for `src` - let len_minus_stride_times_two = len - (SIMD_STRIDE_SIZE * 2); -+ // Safety: This is whether dst is aligned - let dst_masked = (dst.add(offset) as usize) & SIMD_ALIGNMENT_MASK; - if dst_masked == 0 { - loop { -+ // Safety: both are aligned, we can call the aligned function. We're valid for reading/writing double stride from the initial condition -+ // and the loop break condition below - if let Some(advance) = - $double_stride_both_aligned(src.add(offset), dst.add(offset)) - { - offset += advance; - let code_unit = *(src.add(offset)); -+ // Safety: uses safety-usable invariant on ascii_to_ascii_simd_double_stride to return -+ // guaranteed non-ascii - return Some((code_unit, offset)); - } - offset += SIMD_STRIDE_SIZE * 2; -+ // Safety: This is `offset > len - 2 * SIMD_STRIDE_SIZE` which means we always have at least `2 * SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride_times_two { - break; - } - } -+ // Safety: We're valid for reading/writing one more, and can still assume alignment - if offset + SIMD_STRIDE_SIZE <= len { - if !$stride_both_aligned(src.add(offset), dst.add(offset)) { - break 'outer; - } - offset += SIMD_STRIDE_SIZE; - } - } else { - loop { -+ // Safety: only src is aligned here. We're valid for reading/writing double stride from the initial condition -+ // and the loop break condition below - if let Some(advance) = - $double_stride_src_aligned(src.add(offset), dst.add(offset)) - { - offset += advance; - let code_unit = *(src.add(offset)); -+ // Safety: uses safety-usable invariant on ascii_to_ascii_simd_double_stride to return -+ // guaranteed non-ascii - return Some((code_unit, offset)); - } - offset += SIMD_STRIDE_SIZE * 2; -+ // Safety: This is `offset > len - 2 * SIMD_STRIDE_SIZE` which means we always have at least `2 * SIMD_STRIDE_SIZE` elements to munch next time. -+ - if offset > len_minus_stride_times_two { - break; - } - } -+ // Safety: We're valid for reading/writing one more, and can still assume alignment - if offset + SIMD_STRIDE_SIZE <= len { - if !$stride_src_aligned(src.add(offset), dst.add(offset)) { - break 'outer; - } - offset += SIMD_STRIDE_SIZE; - } - } - } else { - // At most two iterations, so unroll - if offset + SIMD_STRIDE_SIZE <= len { -+ // Safety: The check above ensures we're allowed to read/write this, and we don't use alignment - if !$stride_neither_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; - if offset + SIMD_STRIDE_SIZE <= len { -+ // Safety: The check above ensures we're allowed to read/write this, and we don't use alignment - if !$stride_neither_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; - } - } - } - } - break 'outer; - } - while offset < len { -+ // Safety: relies straightforwardly on the `len` invariant - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety-usable invariant upheld here - return Some((code_unit, offset)); - } - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! latin1_simd_check_align { - ( - $name:ident, - $src_unit:ty, - $dst_unit:ty, -+ // Safety: This function must require aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_both_aligned:ident, -+ // Safety: This function must require aligned/unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_src_aligned:ident, -+ // Safety: This function must require unaligned/aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_dst_aligned:ident, -+ // Safety: This function must require unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_neither_aligned:ident -+ - ) => { -+ /// Safety: src/dst must be valid for reads/writes of `len` elements of their units. - #[inline(always)] - pub unsafe fn $name(src: *const $src_unit, dst: *mut $dst_unit, len: usize) { - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading/writing at least `SIMD_STRIDE_SIZE` elements. - if SIMD_STRIDE_SIZE <= len { - let len_minus_stride = len - SIMD_STRIDE_SIZE; -+ // Whether dst is aligned - let dst_masked = (dst as usize) & SIMD_ALIGNMENT_MASK; -+ // Whether src is aligned - if ((src as usize) & SIMD_ALIGNMENT_MASK) == 0 { - if dst_masked == 0 { - loop { -+ // Safety: Both were aligned, we can use the aligned function - $stride_both_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE`, which means in the next iteration we're valid for -+ // reading/writing at least SIMD_STRIDE_SIZE elements. - if offset > len_minus_stride { - break; - } - } - } else { - loop { -+ // Safety: src was aligned, dst was not - $stride_src_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE`, which means in the next iteration we're valid for -+ // reading/writing at least SIMD_STRIDE_SIZE elements. - if offset > len_minus_stride { - break; - } - } - } - } else { - if dst_masked == 0 { - loop { -+ // Safety: src was aligned, dst was not - $stride_dst_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE`, which means in the next iteration we're valid for -+ // reading/writing at least SIMD_STRIDE_SIZE elements. - if offset > len_minus_stride { - break; - } - } - } else { - loop { -+ // Safety: Neither were aligned - $stride_neither_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE`, which means in the next iteration we're valid for -+ // reading/writing at least SIMD_STRIDE_SIZE elements. - if offset > len_minus_stride { - break; - } - } - } - } - } - while offset < len { -+ // Safety: relies straightforwardly on the `len` invariant - let code_unit = *(src.add(offset)); - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - } - }; - } - - #[allow(unused_macros)] - macro_rules! latin1_simd_check_align_unrolled { - ( - $name:ident, - $src_unit:ty, - $dst_unit:ty, -+ // Safety: This function must require aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_both_aligned:ident, -+ // Safety: This function must require aligned/unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_src_aligned:ident, -+ // Safety: This function must require unaligned/aligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_dst_aligned:ident, -+ // Safety: This function must require unaligned src/dest that are valid for reading/writing SIMD_STRIDE_SIZE src_unit/dst_unit - $stride_neither_aligned:ident - ) => { -+ /// Safety: src/dst must be valid for reads/writes of `len` elements of their units. - #[inline(always)] - pub unsafe fn $name(src: *const $src_unit, dst: *mut $dst_unit, len: usize) { - let unit_size = ::core::mem::size_of::<$src_unit>(); - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading/writing at least `SIMD_STRIDE_SIZE` elements. - if SIMD_STRIDE_SIZE <= len { -+ // Safety: this correctly calculates the number of src_units that need to be read before the remaining list is aligned. -+ // This is by definition less than SIMD_STRIDE_SIZE. - let mut until_alignment = ((SIMD_STRIDE_SIZE - - ((src as usize) & SIMD_ALIGNMENT_MASK)) - & SIMD_ALIGNMENT_MASK) - / unit_size; - while until_alignment != 0 { -+ // Safety: This is a straightforward copy, since until_alignment is < SIMD_STRIDE_SIZE < len, this is in-bounds - *(dst.add(offset)) = *(src.add(offset)) as $dst_unit; - offset += 1; - until_alignment -= 1; - } -+ // Safety: here offset will be `until_alignment`, i.e. enough to align `src`. - let len_minus_stride = len - SIMD_STRIDE_SIZE; -+ // Safety: if this check succeeds we're valid for reading/writing at least `2 * SIMD_STRIDE_SIZE` elements. - if offset + SIMD_STRIDE_SIZE * 2 <= len { - let len_minus_stride_times_two = len_minus_stride - SIMD_STRIDE_SIZE; -+ // Safety: at this point src is known to be aligned at offset, dst is not. - if (dst.add(offset) as usize) & SIMD_ALIGNMENT_MASK == 0 { - loop { -+ // Safety: We checked alignment of dst above, we can use the alignment functions. We're allowed to read/write 2*SIMD_STRIDE_SIZE elements, which we do. - $stride_both_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; - $stride_both_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - 2 * SIMD_STRIDE_SIZE` which means we always have at least `2 * SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride_times_two { - break; - } - } - } else { - loop { -+ // Safety: we ensured alignment of src already. - $stride_src_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; - $stride_src_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - 2 * SIMD_STRIDE_SIZE` which means we always have at least `2 * SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride_times_two { - break; - } - } - } - } -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE` which means we are valid to munch SIMD_STRIDE_SIZE more elements, which we do - if offset < len_minus_stride { - $stride_src_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; - } - } - while offset < len { -+ // Safety: uses len invariant here and below - let code_unit = *(src.add(offset)); - // On x86_64, this loop autovectorizes but in the pack - // case there are instructions whose purpose is to make sure - // each u16 in the vector is truncated before packing. However, - // since we don't care about saturating behavior of SSE2 packing - // when the input isn't Latin1, those instructions are useless. - // Unfortunately, using the `assume` intrinsic to lie to the - // optimizer doesn't make LLVM omit the trunctation that we -@@ -688,138 +869,180 @@ macro_rules! latin1_simd_check_align_unr - offset += 1; - } - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_simd_unalign { -+ // Safety: stride_neither_aligned must be a function that requires src/dest be valid for unaligned reads/writes for SIMD_STRIDE_SIZE elements of type src_unit/dest_unit - ($name:ident, $src_unit:ty, $dst_unit:ty, $stride_neither_aligned:ident) => { -+ /// Safety: src and dst must be valid for reads/writes of len elements of type src_unit/dst_unit -+ /// -+ /// Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being -+ /// guaranteed to be non-ASCII (> 127), and the second being the offset where it is found - #[inline(always)] - pub unsafe fn $name( - src: *const $src_unit, - dst: *mut $dst_unit, - len: usize, - ) -> Option<($src_unit, usize)> { - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading/writing at least `stride` elements. - if SIMD_STRIDE_SIZE <= len { - let len_minus_stride = len - SIMD_STRIDE_SIZE; - loop { -+ // Safety: We know we're valid for `stride` reads/writes, so we can call this function. We don't need alignment. - if !$stride_neither_aligned(src.add(offset), dst.add(offset)) { - break; - } - offset += SIMD_STRIDE_SIZE; -+ // This is `offset > len - stride` which means we always have at least `stride` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } - while offset < len { -+ // Safety: Uses len invariant here and below - let code_unit = *(src.add(offset)); - if code_unit > 127 { -+ // Safety-usable invariant upheld here - return Some((code_unit, offset)); - } - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! latin1_simd_unalign { -+ // Safety: stride_neither_aligned must be a function that requires src/dest be valid for unaligned reads/writes for SIMD_STRIDE_SIZE elements of type src_unit/dest_unit - ($name:ident, $src_unit:ty, $dst_unit:ty, $stride_neither_aligned:ident) => { -+ /// Safety: src and dst must be valid for unaligned reads/writes of len elements of type src_unit/dst_unit - #[inline(always)] - pub unsafe fn $name(src: *const $src_unit, dst: *mut $dst_unit, len: usize) { - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading/writing at least `stride` elements. - if SIMD_STRIDE_SIZE <= len { - let len_minus_stride = len - SIMD_STRIDE_SIZE; - loop { -+ // Safety: We know we're valid for `stride` reads/writes, so we can call this function. We don't need alignment. - $stride_neither_aligned(src.add(offset), dst.add(offset)); - offset += SIMD_STRIDE_SIZE; -+ // This is `offset > len - stride` which means we always have at least `stride` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } - while offset < len { -+ // Safety: Uses len invariant here - let code_unit = *(src.add(offset)); - *(dst.add(offset)) = code_unit as $dst_unit; - offset += 1; - } - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_to_ascii_simd_stride { -+ // Safety: load/store must be valid for 16 bytes of read/write, which may be unaligned. (candidates: `(load|store)(16|8)_(unaligned|aligned)` functions) - ($name:ident, $load:ident, $store:ident) => { -+ /// Safety: src and dst must be valid for 16 bytes of read/write according to -+ /// the $load/$store fn, which may allow for unaligned reads/writes or require -+ /// alignment to either 16x8 or u8x16. - #[inline(always)] - pub unsafe fn $name(src: *const u8, dst: *mut u8) -> bool { - let simd = $load(src); - if !simd_is_ascii(simd) { - return false; - } - $store(dst, simd); - true - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_to_ascii_simd_double_stride { -+ // Safety: store must be valid for 32 bytes of write, which may be unaligned (candidates: `store(8|16)_(aligned|unaligned)`) - ($name:ident, $store:ident) => { -+ /// Safety: src must be valid for 32 bytes of aligned u8x16 read -+ /// dst must be valid for 32 bytes of unaligned write according to -+ /// the $store fn, which may allow for unaligned writes or require -+ /// alignment to either 16x8 or u8x16. -+ /// -+ /// Safety-usable invariant: Returns Some(index) if the element at `index` is invalid ASCII - #[inline(always)] - pub unsafe fn $name(src: *const u8, dst: *mut u8) -> Option { - let first = load16_aligned(src); - let second = load16_aligned(src.add(SIMD_STRIDE_SIZE)); - $store(dst, first); - if unlikely(!simd_is_ascii(first | second)) { -+ // Safety: mask_ascii produces a mask of all the high bits. - let mask_first = mask_ascii(first); - if mask_first != 0 { -+ // Safety: on little endian systems this will be the number of ascii bytes -+ // before the first non-ascii, i.e. valid for indexing src -+ // TODO SAFETY: What about big-endian systems? - return Some(mask_first.trailing_zeros() as usize); - } - $store(dst.add(SIMD_STRIDE_SIZE), second); - let mask_second = mask_ascii(second); -+ // Safety: on little endian systems this will be the number of ascii bytes -+ // before the first non-ascii, i.e. valid for indexing src - return Some(SIMD_STRIDE_SIZE + mask_second.trailing_zeros() as usize); - } - $store(dst.add(SIMD_STRIDE_SIZE), second); - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_to_basic_latin_simd_stride { -+ // Safety: load/store must be valid for 16 bytes of read/write, which may be unaligned. (candidates: `(load|store)(16|8)_(unaligned|aligned)` functions) - ($name:ident, $load:ident, $store:ident) => { -+ /// Safety: src and dst must be valid for 16/32 bytes of read/write according to -+ /// the $load/$store fn, which may allow for unaligned reads/writes or require -+ /// alignment to either 16x8 or u8x16. - #[inline(always)] - pub unsafe fn $name(src: *const u8, dst: *mut u16) -> bool { - let simd = $load(src); - if !simd_is_ascii(simd) { - return false; - } - let (first, second) = simd_unpack(simd); - $store(dst, first); - $store(dst.add(8), second); - true - } - }; - } - - #[allow(unused_macros)] - macro_rules! ascii_to_basic_latin_simd_double_stride { -+ // Safety: store must be valid for 16 bytes of write, which may be unaligned - ($name:ident, $store:ident) => { -+ /// Safety: src must be valid for 2*SIMD_STRIDE_SIZE bytes of aligned reads, -+ /// aligned to either 16x8 or u8x16. -+ /// dst must be valid for 2*SIMD_STRIDE_SIZE bytes of aligned or unaligned reads - #[inline(always)] - pub unsafe fn $name(src: *const u8, dst: *mut u16) -> Option { - let first = load16_aligned(src); - let second = load16_aligned(src.add(SIMD_STRIDE_SIZE)); - let (a, b) = simd_unpack(first); - $store(dst, a); -+ // Safety: divide by 2 since it's a u16 pointer - $store(dst.add(SIMD_STRIDE_SIZE / 2), b); - if unlikely(!simd_is_ascii(first | second)) { - let mask_first = mask_ascii(first); - if mask_first != 0 { - return Some(mask_first.trailing_zeros() as usize); - } - let (c, d) = simd_unpack(second); - $store(dst.add(SIMD_STRIDE_SIZE), c); -@@ -832,47 +1055,59 @@ macro_rules! ascii_to_basic_latin_simd_d - $store(dst.add(SIMD_STRIDE_SIZE + (SIMD_STRIDE_SIZE / 2)), d); - None - } - }; - } - - #[allow(unused_macros)] - macro_rules! unpack_simd_stride { -+ // Safety: load/store must be valid for 16 bytes of read/write, which may be unaligned. (candidates: `(load|store)(16|8)_(unaligned|aligned)` functions) - ($name:ident, $load:ident, $store:ident) => { -+ /// Safety: src and dst must be valid for 16 bytes of read/write according to -+ /// the $load/$store fn, which may allow for unaligned reads/writes or require -+ /// alignment to either 16x8 or u8x16. - #[inline(always)] - pub unsafe fn $name(src: *const u8, dst: *mut u16) { - let simd = $load(src); - let (first, second) = simd_unpack(simd); - $store(dst, first); - $store(dst.add(8), second); - } - }; - } - - #[allow(unused_macros)] - macro_rules! basic_latin_to_ascii_simd_stride { -+ // Safety: load/store must be valid for 16 bytes of read/write, which may be unaligned. (candidates: `(load|store)(16|8)_(unaligned|aligned)` functions) - ($name:ident, $load:ident, $store:ident) => { -+ /// Safety: src and dst must be valid for 32/16 bytes of read/write according to -+ /// the $load/$store fn, which may allow for unaligned reads/writes or require -+ /// alignment to either 16x8 or u8x16. - #[inline(always)] - pub unsafe fn $name(src: *const u16, dst: *mut u8) -> bool { - let first = $load(src); - let second = $load(src.add(8)); - if simd_is_basic_latin(first | second) { - $store(dst, simd_pack(first, second)); - true - } else { - false - } - } - }; - } - - #[allow(unused_macros)] - macro_rules! pack_simd_stride { -+ // Safety: load/store must be valid for 16 bytes of read/write, which may be unaligned. (candidates: `(load|store)(16|8)_(unaligned|aligned)` functions) - ($name:ident, $load:ident, $store:ident) => { -+ /// Safety: src and dst must be valid for 32/16 bytes of read/write according to -+ /// the $load/$store fn, which may allow for unaligned reads/writes or require -+ /// alignment to either 16x8 or u8x16. - #[inline(always)] - pub unsafe fn $name(src: *const u16, dst: *mut u8) { - let first = $load(src); - let second = $load(src.add(8)); - $store(dst, simd_pack(first, second)); - } - }; - } -@@ -888,24 +1123,28 @@ cfg_if! { - // pub const ALIGNMENT: usize = 8; - - pub const ALU_STRIDE_SIZE: usize = 16; - - pub const ALU_ALIGNMENT: usize = 8; - - pub const ALU_ALIGNMENT_MASK: usize = 7; - -+ // Safety for stride macros: We stick to the load8_aligned/etc family of functions. We consistently produce -+ // neither_unaligned variants using only unaligned inputs. - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_neither_aligned, load16_unaligned, store16_unaligned); - - ascii_to_basic_latin_simd_stride!(ascii_to_basic_latin_stride_neither_aligned, load16_unaligned, store8_unaligned); - unpack_simd_stride!(unpack_stride_neither_aligned, load16_unaligned, store8_unaligned); - - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_neither_aligned, load8_unaligned, store16_unaligned); - pack_simd_stride!(pack_stride_neither_aligned, load8_unaligned, store16_unaligned); - -+ // Safety for conversion macros: We use the unalign macro with unalign functions above. All stride functions were produced -+ // by stride macros that universally munch a single SIMD_STRIDE_SIZE worth of elements. - ascii_simd_unalign!(ascii_to_ascii, u8, u8, ascii_to_ascii_stride_neither_aligned); - ascii_simd_unalign!(ascii_to_basic_latin, u8, u16, ascii_to_basic_latin_stride_neither_aligned); - ascii_simd_unalign!(basic_latin_to_ascii, u16, u8, basic_latin_to_ascii_stride_neither_aligned); - latin1_simd_unalign!(unpack_latin1, u8, u16, unpack_stride_neither_aligned); - latin1_simd_unalign!(pack_latin1, u16, u8, pack_stride_neither_aligned); - } else if #[cfg(all(feature = "simd-accel", target_endian = "little", target_feature = "neon"))] { - // SIMD with different instructions for aligned and unaligned loads and stores. - // -@@ -914,16 +1153,19 @@ cfg_if! { - // but the benchmark results I see don't agree. - - pub const SIMD_STRIDE_SIZE: usize = 16; - - pub const MAX_STRIDE_SIZE: usize = 16; - - pub const SIMD_ALIGNMENT_MASK: usize = 15; - -+ // Safety for stride macros: We stick to the load8_aligned/etc family of functions. We consistently name -+ // aligned/unaligned functions according to src/dst being aligned/unaligned -+ - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_both_aligned, load16_aligned, store16_aligned); - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_src_aligned, load16_aligned, store16_unaligned); - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_dst_aligned, load16_unaligned, store16_aligned); - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_neither_aligned, load16_unaligned, store16_unaligned); - - ascii_to_basic_latin_simd_stride!(ascii_to_basic_latin_stride_both_aligned, load16_aligned, store8_aligned); - ascii_to_basic_latin_simd_stride!(ascii_to_basic_latin_stride_src_aligned, load16_aligned, store8_unaligned); - ascii_to_basic_latin_simd_stride!(ascii_to_basic_latin_stride_dst_aligned, load16_unaligned, store8_aligned); -@@ -939,36 +1181,43 @@ cfg_if! { - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_dst_aligned, load8_unaligned, store16_aligned); - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_neither_aligned, load8_unaligned, store16_unaligned); - - pack_simd_stride!(pack_stride_both_aligned, load8_aligned, store16_aligned); - pack_simd_stride!(pack_stride_src_aligned, load8_aligned, store16_unaligned); - pack_simd_stride!(pack_stride_dst_aligned, load8_unaligned, store16_aligned); - pack_simd_stride!(pack_stride_neither_aligned, load8_unaligned, store16_unaligned); - -+ // Safety for conversion macros: We use the correct pattern of both/src/dst/neither here. All stride functions were produced -+ // by stride macros that universally munch a single SIMD_STRIDE_SIZE worth of elements. -+ - ascii_simd_check_align!(ascii_to_ascii, u8, u8, ascii_to_ascii_stride_both_aligned, ascii_to_ascii_stride_src_aligned, ascii_to_ascii_stride_dst_aligned, ascii_to_ascii_stride_neither_aligned); - ascii_simd_check_align!(ascii_to_basic_latin, u8, u16, ascii_to_basic_latin_stride_both_aligned, ascii_to_basic_latin_stride_src_aligned, ascii_to_basic_latin_stride_dst_aligned, ascii_to_basic_latin_stride_neither_aligned); - ascii_simd_check_align!(basic_latin_to_ascii, u16, u8, basic_latin_to_ascii_stride_both_aligned, basic_latin_to_ascii_stride_src_aligned, basic_latin_to_ascii_stride_dst_aligned, basic_latin_to_ascii_stride_neither_aligned); - latin1_simd_check_align!(unpack_latin1, u8, u16, unpack_stride_both_aligned, unpack_stride_src_aligned, unpack_stride_dst_aligned, unpack_stride_neither_aligned); - latin1_simd_check_align!(pack_latin1, u16, u8, pack_stride_both_aligned, pack_stride_src_aligned, pack_stride_dst_aligned, pack_stride_neither_aligned); - } else if #[cfg(all(feature = "simd-accel", target_feature = "sse2"))] { - // SIMD with different instructions for aligned and unaligned loads and stores. - // - // Newer microarchitectures are not supposed to have a performance difference between - // aligned and unaligned SSE2 loads and stores when the address is actually aligned, - // but the benchmark results I see don't agree. - - pub const SIMD_STRIDE_SIZE: usize = 16; - -+ /// Safety-usable invariant: This should be identical to SIMD_STRIDE_SIZE (used by ascii_simd_check_align_unrolled) - pub const SIMD_ALIGNMENT: usize = 16; - - pub const MAX_STRIDE_SIZE: usize = 16; - - pub const SIMD_ALIGNMENT_MASK: usize = 15; - -+ // Safety for stride macros: We stick to the load8_aligned/etc family of functions. We consistently name -+ // aligned/unaligned functions according to src/dst being aligned/unaligned -+ - ascii_to_ascii_simd_double_stride!(ascii_to_ascii_simd_double_stride_both_aligned, store16_aligned); - ascii_to_ascii_simd_double_stride!(ascii_to_ascii_simd_double_stride_src_aligned, store16_unaligned); - - ascii_to_basic_latin_simd_double_stride!(ascii_to_basic_latin_simd_double_stride_both_aligned, store8_aligned); - ascii_to_basic_latin_simd_double_stride!(ascii_to_basic_latin_simd_double_stride_src_aligned, store8_unaligned); - - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_both_aligned, load16_aligned, store16_aligned); - ascii_to_ascii_simd_stride!(ascii_to_ascii_stride_src_aligned, load16_aligned, store16_unaligned); -@@ -984,33 +1233,43 @@ cfg_if! { - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_both_aligned, load8_aligned, store16_aligned); - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_src_aligned, load8_aligned, store16_unaligned); - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_dst_aligned, load8_unaligned, store16_aligned); - basic_latin_to_ascii_simd_stride!(basic_latin_to_ascii_stride_neither_aligned, load8_unaligned, store16_unaligned); - - pack_simd_stride!(pack_stride_both_aligned, load8_aligned, store16_aligned); - pack_simd_stride!(pack_stride_src_aligned, load8_aligned, store16_unaligned); - -+ // Safety for conversion macros: We use the correct pattern of both/src/dst/neither/double_both/double_src here. All stride functions were produced -+ // by stride macros that universally munch a single SIMD_STRIDE_SIZE worth of elements. -+ - ascii_simd_check_align_unrolled!(ascii_to_ascii, u8, u8, ascii_to_ascii_stride_both_aligned, ascii_to_ascii_stride_src_aligned, ascii_to_ascii_stride_neither_aligned, ascii_to_ascii_simd_double_stride_both_aligned, ascii_to_ascii_simd_double_stride_src_aligned); - ascii_simd_check_align_unrolled!(ascii_to_basic_latin, u8, u16, ascii_to_basic_latin_stride_both_aligned, ascii_to_basic_latin_stride_src_aligned, ascii_to_basic_latin_stride_neither_aligned, ascii_to_basic_latin_simd_double_stride_both_aligned, ascii_to_basic_latin_simd_double_stride_src_aligned); - - ascii_simd_check_align!(basic_latin_to_ascii, u16, u8, basic_latin_to_ascii_stride_both_aligned, basic_latin_to_ascii_stride_src_aligned, basic_latin_to_ascii_stride_dst_aligned, basic_latin_to_ascii_stride_neither_aligned); - latin1_simd_check_align_unrolled!(unpack_latin1, u8, u16, unpack_stride_both_aligned, unpack_stride_src_aligned, unpack_stride_dst_aligned, unpack_stride_neither_aligned); - latin1_simd_check_align_unrolled!(pack_latin1, u16, u8, pack_stride_both_aligned, pack_stride_src_aligned, pack_stride_dst_aligned, pack_stride_neither_aligned); - } else if #[cfg(all(target_endian = "little", target_pointer_width = "64"))] { - // Aligned ALU word, little-endian, 64-bit - -+ /// Safety invariant: this is the amount of bytes consumed by -+ /// unpack_alu. This will be twice the pointer width, as it consumes two usizes. -+ /// This is also the number of bytes produced by pack_alu. -+ /// This is also the number of u16 code units produced/consumed by unpack_alu/pack_alu respectively. - pub const ALU_STRIDE_SIZE: usize = 16; - - pub const MAX_STRIDE_SIZE: usize = 16; - -+ // Safety invariant: this is the pointer width in bytes - pub const ALU_ALIGNMENT: usize = 8; - -+ // Safety invariant: this is a mask for getting the bits of a pointer not aligned to ALU_ALIGNMENT - pub const ALU_ALIGNMENT_MASK: usize = 7; - -+ /// Safety: dst must point to valid space for writing four `usize`s - #[inline(always)] - unsafe fn unpack_alu(word: usize, second_word: usize, dst: *mut usize) { - let first = ((0x0000_0000_FF00_0000usize & word) << 24) | - ((0x0000_0000_00FF_0000usize & word) << 16) | - ((0x0000_0000_0000_FF00usize & word) << 8) | - (0x0000_0000_0000_00FFusize & word); - let second = ((0xFF00_0000_0000_0000usize & word) >> 8) | - ((0x00FF_0000_0000_0000usize & word) >> 16) | -@@ -1019,22 +1278,24 @@ cfg_if! { - let third = ((0x0000_0000_FF00_0000usize & second_word) << 24) | - ((0x0000_0000_00FF_0000usize & second_word) << 16) | - ((0x0000_0000_0000_FF00usize & second_word) << 8) | - (0x0000_0000_0000_00FFusize & second_word); - let fourth = ((0xFF00_0000_0000_0000usize & second_word) >> 8) | - ((0x00FF_0000_0000_0000usize & second_word) >> 16) | - ((0x0000_FF00_0000_0000usize & second_word) >> 24) | - ((0x0000_00FF_0000_0000usize & second_word) >> 32); -+ // Safety: fn invariant used here - *dst = first; - *(dst.add(1)) = second; - *(dst.add(2)) = third; - *(dst.add(3)) = fourth; - } - -+ /// Safety: dst must point to valid space for writing two `usize`s - #[inline(always)] - unsafe fn pack_alu(first: usize, second: usize, third: usize, fourth: usize, dst: *mut usize) { - let word = ((0x00FF_0000_0000_0000usize & second) << 8) | - ((0x0000_00FF_0000_0000usize & second) << 16) | - ((0x0000_0000_00FF_0000usize & second) << 24) | - ((0x0000_0000_0000_00FFusize & second) << 32) | - ((0x00FF_0000_0000_0000usize & first) >> 24) | - ((0x0000_00FF_0000_0000usize & first) >> 16) | -@@ -1043,70 +1304,88 @@ cfg_if! { - let second_word = ((0x00FF_0000_0000_0000usize & fourth) << 8) | - ((0x0000_00FF_0000_0000usize & fourth) << 16) | - ((0x0000_0000_00FF_0000usize & fourth) << 24) | - ((0x0000_0000_0000_00FFusize & fourth) << 32) | - ((0x00FF_0000_0000_0000usize & third) >> 24) | - ((0x0000_00FF_0000_0000usize & third) >> 16) | - ((0x0000_0000_00FF_0000usize & third) >> 8) | - (0x0000_0000_0000_00FFusize & third); -+ // Safety: fn invariant used here - *dst = word; - *(dst.add(1)) = second_word; - } - } else if #[cfg(all(target_endian = "little", target_pointer_width = "32"))] { - // Aligned ALU word, little-endian, 32-bit - -+ /// Safety invariant: this is the amount of bytes consumed by -+ /// unpack_alu. This will be twice the pointer width, as it consumes two usizes. -+ /// This is also the number of bytes produced by pack_alu. -+ /// This is also the number of u16 code units produced/consumed by unpack_alu/pack_alu respectively. - pub const ALU_STRIDE_SIZE: usize = 8; - - pub const MAX_STRIDE_SIZE: usize = 8; - -+ // Safety invariant: this is the pointer width in bytes - pub const ALU_ALIGNMENT: usize = 4; - -+ // Safety invariant: this is a mask for getting the bits of a pointer not aligned to ALU_ALIGNMENT - pub const ALU_ALIGNMENT_MASK: usize = 3; - -+ /// Safety: dst must point to valid space for writing four `usize`s - #[inline(always)] - unsafe fn unpack_alu(word: usize, second_word: usize, dst: *mut usize) { - let first = ((0x0000_FF00usize & word) << 8) | - (0x0000_00FFusize & word); - let second = ((0xFF00_0000usize & word) >> 8) | - ((0x00FF_0000usize & word) >> 16); - let third = ((0x0000_FF00usize & second_word) << 8) | - (0x0000_00FFusize & second_word); - let fourth = ((0xFF00_0000usize & second_word) >> 8) | - ((0x00FF_0000usize & second_word) >> 16); -+ // Safety: fn invariant used here - *dst = first; - *(dst.add(1)) = second; - *(dst.add(2)) = third; - *(dst.add(3)) = fourth; - } - -+ /// Safety: dst must point to valid space for writing two `usize`s - #[inline(always)] - unsafe fn pack_alu(first: usize, second: usize, third: usize, fourth: usize, dst: *mut usize) { - let word = ((0x00FF_0000usize & second) << 8) | - ((0x0000_00FFusize & second) << 16) | - ((0x00FF_0000usize & first) >> 8) | - (0x0000_00FFusize & first); - let second_word = ((0x00FF_0000usize & fourth) << 8) | - ((0x0000_00FFusize & fourth) << 16) | - ((0x00FF_0000usize & third) >> 8) | - (0x0000_00FFusize & third); -+ // Safety: fn invariant used here - *dst = word; - *(dst.add(1)) = second_word; - } - } else if #[cfg(all(target_endian = "big", target_pointer_width = "64"))] { - // Aligned ALU word, big-endian, 64-bit - -+ /// Safety invariant: this is the amount of bytes consumed by -+ /// unpack_alu. This will be twice the pointer width, as it consumes two usizes. -+ /// This is also the number of bytes produced by pack_alu. -+ /// This is also the number of u16 code units produced/consumed by unpack_alu/pack_alu respectively. - pub const ALU_STRIDE_SIZE: usize = 16; - - pub const MAX_STRIDE_SIZE: usize = 16; - -+ // Safety invariant: this is the pointer width in bytes - pub const ALU_ALIGNMENT: usize = 8; - -+ // Safety invariant: this is a mask for getting the bits of a pointer not aligned to ALU_ALIGNMENT - pub const ALU_ALIGNMENT_MASK: usize = 7; - -+ /// Safety: dst must point to valid space for writing four `usize`s - #[inline(always)] - unsafe fn unpack_alu(word: usize, second_word: usize, dst: *mut usize) { - let first = ((0xFF00_0000_0000_0000usize & word) >> 8) | - ((0x00FF_0000_0000_0000usize & word) >> 16) | - ((0x0000_FF00_0000_0000usize & word) >> 24) | - ((0x0000_00FF_0000_0000usize & word) >> 32); - let second = ((0x0000_0000_FF00_0000usize & word) << 24) | - ((0x0000_0000_00FF_0000usize & word) << 16) | -@@ -1115,22 +1394,24 @@ cfg_if! { - let third = ((0xFF00_0000_0000_0000usize & second_word) >> 8) | - ((0x00FF_0000_0000_0000usize & second_word) >> 16) | - ((0x0000_FF00_0000_0000usize & second_word) >> 24) | - ((0x0000_00FF_0000_0000usize & second_word) >> 32); - let fourth = ((0x0000_0000_FF00_0000usize & second_word) << 24) | - ((0x0000_0000_00FF_0000usize & second_word) << 16) | - ((0x0000_0000_0000_FF00usize & second_word) << 8) | - (0x0000_0000_0000_00FFusize & second_word); -+ // Safety: fn invariant used here - *dst = first; - *(dst.add(1)) = second; - *(dst.add(2)) = third; - *(dst.add(3)) = fourth; - } - -+ /// Safety: dst must point to valid space for writing two `usize`s - #[inline(always)] - unsafe fn pack_alu(first: usize, second: usize, third: usize, fourth: usize, dst: *mut usize) { - let word = ((0x00FF0000_00000000usize & first) << 8) | - ((0x000000FF_00000000usize & first) << 16) | - ((0x00000000_00FF0000usize & first) << 24) | - ((0x00000000_000000FFusize & first) << 32) | - ((0x00FF0000_00000000usize & second) >> 24) | - ((0x000000FF_00000000usize & second) >> 16) | -@@ -1139,67 +1420,80 @@ cfg_if! { - let second_word = ((0x00FF0000_00000000usize & third) << 8) | - ((0x000000FF_00000000usize & third) << 16) | - ((0x00000000_00FF0000usize & third) << 24) | - ((0x00000000_000000FFusize & third) << 32) | - ((0x00FF0000_00000000usize & fourth) >> 24) | - ((0x000000FF_00000000usize & fourth) >> 16) | - ((0x00000000_00FF0000usize & fourth) >> 8) | - (0x00000000_000000FFusize & fourth); -+ // Safety: fn invariant used here - *dst = word; - *(dst.add(1)) = second_word; - } - } else if #[cfg(all(target_endian = "big", target_pointer_width = "32"))] { - // Aligned ALU word, big-endian, 32-bit - -+ /// Safety invariant: this is the amount of bytes consumed by -+ /// unpack_alu. This will be twice the pointer width, as it consumes two usizes. -+ /// This is also the number of bytes produced by pack_alu. -+ /// This is also the number of u16 code units produced/consumed by unpack_alu/pack_alu respectively. - pub const ALU_STRIDE_SIZE: usize = 8; - - pub const MAX_STRIDE_SIZE: usize = 8; - -+ // Safety invariant: this is the pointer width in bytes - pub const ALU_ALIGNMENT: usize = 4; - -+ // Safety invariant: this is a mask for getting the bits of a pointer not aligned to ALU_ALIGNMENT - pub const ALU_ALIGNMENT_MASK: usize = 3; - -+ /// Safety: dst must point to valid space for writing four `usize`s - #[inline(always)] - unsafe fn unpack_alu(word: usize, second_word: usize, dst: *mut usize) { - let first = ((0xFF00_0000usize & word) >> 8) | - ((0x00FF_0000usize & word) >> 16); - let second = ((0x0000_FF00usize & word) << 8) | - (0x0000_00FFusize & word); - let third = ((0xFF00_0000usize & second_word) >> 8) | - ((0x00FF_0000usize & second_word) >> 16); - let fourth = ((0x0000_FF00usize & second_word) << 8) | - (0x0000_00FFusize & second_word); -+ // Safety: fn invariant used here - *dst = first; - *(dst.add(1)) = second; - *(dst.add(2)) = third; - *(dst.add(3)) = fourth; - } - -+ /// Safety: dst must point to valid space for writing two `usize`s - #[inline(always)] - unsafe fn pack_alu(first: usize, second: usize, third: usize, fourth: usize, dst: *mut usize) { - let word = ((0x00FF_0000usize & first) << 8) | - ((0x0000_00FFusize & first) << 16) | - ((0x00FF_0000usize & second) >> 8) | - (0x0000_00FFusize & second); - let second_word = ((0x00FF_0000usize & third) << 8) | - ((0x0000_00FFusize & third) << 16) | - ((0x00FF_0000usize & fourth) >> 8) | - (0x0000_00FFusize & fourth); -+ // Safety: fn invariant used here - *dst = word; - *(dst.add(1)) = second_word; - } - } else { - ascii_naive!(ascii_to_ascii, u8, u8); - ascii_naive!(ascii_to_basic_latin, u8, u16); - ascii_naive!(basic_latin_to_ascii, u16, u8); - } - } - - cfg_if! { -+ // Safety-usable invariant: this counts the zeroes from the "first byte" of utf-8 data packed into a usize -+ // with the target endianness - if #[cfg(target_endian = "little")] { - #[allow(dead_code)] - #[inline(always)] - fn count_zeros(word: usize) -> u32 { - word.trailing_zeros() - } - } else { - #[allow(dead_code)] -@@ -1207,208 +1501,272 @@ cfg_if! { - fn count_zeros(word: usize) -> u32 { - word.leading_zeros() - } - } - } - - cfg_if! { - if #[cfg(all(feature = "simd-accel", target_endian = "little", target_arch = "disabled"))] { -+ /// Safety-usable invariant: Will return the value and position of the first non-ASCII byte in the slice in a Some if found. -+ /// In other words, the first element of the Some is always `> 127` - #[inline(always)] - pub fn validate_ascii(slice: &[u8]) -> Option<(u8, usize)> { - let src = slice.as_ptr(); - let len = slice.len(); - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading/writing at least `stride` elements. - if SIMD_STRIDE_SIZE <= len { - let len_minus_stride = len - SIMD_STRIDE_SIZE; - loop { -+ // Safety: src at offset is valid for a `SIMD_STRIDE_SIZE` read - let simd = unsafe { load16_unaligned(src.add(offset)) }; - if !simd_is_ascii(simd) { - break; - } - offset += SIMD_STRIDE_SIZE; -+ // This is `offset > len - SIMD_STRIDE_SIZE` which means we always have at least `SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } - while offset < len { - let code_unit = slice[offset]; - if code_unit > 127 { -+ // Safety: Safety-usable invariant upheld here - return Some((code_unit, offset)); - } - offset += 1; - } - None - } - } else if #[cfg(all(feature = "simd-accel", target_feature = "sse2"))] { -+ /// Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being -+ /// guaranteed to be non-ASCII (> 127), and the second being the offset where it is found - #[inline(always)] - pub fn validate_ascii(slice: &[u8]) -> Option<(u8, usize)> { - let src = slice.as_ptr(); - let len = slice.len(); - let mut offset = 0usize; -+ // Safety: if this check succeeds we're valid for reading at least `stride` elements. - if SIMD_STRIDE_SIZE <= len { - // First, process one unaligned vector -+ // Safety: src is valid for a `SIMD_STRIDE_SIZE` read - let simd = unsafe { load16_unaligned(src) }; - let mask = mask_ascii(simd); - if mask != 0 { - offset = mask.trailing_zeros() as usize; - let non_ascii = unsafe { *src.add(offset) }; - return Some((non_ascii, offset)); - } - offset = SIMD_STRIDE_SIZE; -+ // Safety: Now that offset has changed we don't yet know how much it is valid for - - // We have now seen 16 ASCII bytes. Let's guess that - // there will be enough more to justify more expense - // in the case of non-ASCII. - // Use aligned reads for the sake of old microachitectures. -+ // Safety: this correctly calculates the number of src_units that need to be read before the remaining list is aligned. -+ // This is by definition less than SIMD_ALIGNMENT, which is defined to be equal to SIMD_STRIDE_SIZE. - let until_alignment = unsafe { (SIMD_ALIGNMENT - ((src.add(offset) as usize) & SIMD_ALIGNMENT_MASK)) & SIMD_ALIGNMENT_MASK }; - // This addition won't overflow, because even in the 32-bit PAE case the - // address space holds enough code that the slice length can't be that - // close to address space size. - // offset now equals SIMD_STRIDE_SIZE, hence times 3 below. -+ // -+ // Safety: if this check succeeds we're valid for reading at least `2 * SIMD_STRIDE_SIZE` elements plus `until_alignment`. -+ // The extra SIMD_STRIDE_SIZE in the condition is because `offset` is already `SIMD_STRIDE_SIZE`. - if until_alignment + (SIMD_STRIDE_SIZE * 3) <= len { - if until_alignment != 0 { -+ // Safety: this is safe to call since we're valid for this read (and more), and don't care about alignment -+ // This will copy over bytes that get decoded twice since it's not incrementing `offset` by SIMD_STRIDE_SIZE. This is fine. - let simd = unsafe { load16_unaligned(src.add(offset)) }; - let mask = mask_ascii(simd); - if mask != 0 { - offset += mask.trailing_zeros() as usize; - let non_ascii = unsafe { *src.add(offset) }; - return Some((non_ascii, offset)); - } - offset += until_alignment; - } -+ // Safety: At this point we're valid for reading 2*SIMD_STRIDE_SIZE elements -+ // Safety: Now `offset` is aligned for `src` - let len_minus_stride_times_two = len - (SIMD_STRIDE_SIZE * 2); - loop { -+ // Safety: We were valid for this read, and were aligned. - let first = unsafe { load16_aligned(src.add(offset)) }; - let second = unsafe { load16_aligned(src.add(offset + SIMD_STRIDE_SIZE)) }; - if !simd_is_ascii(first | second) { -+ // Safety: mask_ascii produces a mask of all the high bits. - let mask_first = mask_ascii(first); - if mask_first != 0 { -+ // Safety: on little endian systems this will be the number of ascii bytes -+ // before the first non-ascii, i.e. valid for indexing src -+ // TODO SAFETY: What about big-endian systems? - offset += mask_first.trailing_zeros() as usize; - } else { - let mask_second = mask_ascii(second); -+ // Safety: on little endian systems this will be the number of ascii bytes -+ // before the first non-ascii, i.e. valid for indexing src - offset += SIMD_STRIDE_SIZE + mask_second.trailing_zeros() as usize; - } -+ // Safety: We know this is non-ASCII, and can uphold the safety-usable invariant here - let non_ascii = unsafe { *src.add(offset) }; -+ - return Some((non_ascii, offset)); - } - offset += SIMD_STRIDE_SIZE * 2; -+ // Safety: This is `offset > len - 2 * SIMD_STRIDE_SIZE` which means we always have at least `2 * SIMD_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride_times_two { - break; - } - } -+ // Safety: if this check succeeds we're valid for reading at least `SIMD_STRIDE_SIZE` - if offset + SIMD_STRIDE_SIZE <= len { -- let simd = unsafe { load16_aligned(src.add(offset)) }; -- let mask = mask_ascii(simd); -+ // Safety: We were valid for this read, and were aligned. -+ let simd = unsafe { load16_aligned(src.add(offset)) }; -+ // Safety: mask_ascii produces a mask of all the high bits. -+ let mask = mask_ascii(simd); - if mask != 0 { -+ // Safety: on little endian systems this will be the number of ascii bytes -+ // before the first non-ascii, i.e. valid for indexing src - offset += mask.trailing_zeros() as usize; - let non_ascii = unsafe { *src.add(offset) }; -+ // Safety: We know this is non-ASCII, and can uphold the safety-usable invariant here - return Some((non_ascii, offset)); - } - offset += SIMD_STRIDE_SIZE; - } - } else { -+ // Safety: this is the unaligned branch - // At most two iterations, so unroll -+ // Safety: if this check succeeds we're valid for reading at least `SIMD_STRIDE_SIZE` - if offset + SIMD_STRIDE_SIZE <= len { -+ // Safety: We're valid for this read but must use an unaligned read - let simd = unsafe { load16_unaligned(src.add(offset)) }; - let mask = mask_ascii(simd); - if mask != 0 { - offset += mask.trailing_zeros() as usize; - let non_ascii = unsafe { *src.add(offset) }; -+ // Safety-usable invariant upheld here (same as above) - return Some((non_ascii, offset)); - } - offset += SIMD_STRIDE_SIZE; -+ // Safety: if this check succeeds we're valid for reading at least `SIMD_STRIDE_SIZE` - if offset + SIMD_STRIDE_SIZE <= len { -+ // Safety: We're valid for this read but must use an unaligned read - let simd = unsafe { load16_unaligned(src.add(offset)) }; - let mask = mask_ascii(simd); - if mask != 0 { - offset += mask.trailing_zeros() as usize; - let non_ascii = unsafe { *src.add(offset) }; -+ // Safety-usable invariant upheld here (same as above) - return Some((non_ascii, offset)); - } - offset += SIMD_STRIDE_SIZE; - } - } - } - } - while offset < len { -+ // Safety: relies straightforwardly on the `len` invariant - let code_unit = unsafe { *(src.add(offset)) }; - if code_unit > 127 { -+ // Safety-usable invariant upheld here - return Some((code_unit, offset)); - } - offset += 1; - } - None - } - } else { -+ // Safety-usable invariant: returns byte index of first non-ascii byte - #[inline(always)] - fn find_non_ascii(word: usize, second_word: usize) -> Option { - let word_masked = word & ASCII_MASK; - let second_masked = second_word & ASCII_MASK; - if (word_masked | second_masked) == 0 { -+ // Both are ascii, invariant upheld - return None; - } - if word_masked != 0 { - let zeros = count_zeros(word_masked); -- // `zeros` now contains 7 (for the seven bits of non-ASCII) -+ // `zeros` now contains 0 to 7 (for the seven bits of masked ASCII in little endian, -+ // or up to 7 bits of non-ASCII in big endian if the first byte is non-ASCII) - // plus 8 times the number of ASCII in text order before the - // non-ASCII byte in the little-endian case or 8 times the number of ASCII in - // text order before the non-ASCII byte in the big-endian case. - let num_ascii = (zeros >> 3) as usize; -+ // Safety-usable invariant upheld here - return Some(num_ascii); - } - let zeros = count_zeros(second_masked); -- // `zeros` now contains 7 (for the seven bits of non-ASCII) -+ // `zeros` now contains 0 to 7 (for the seven bits of masked ASCII in little endian, -+ // or up to 7 bits of non-ASCII in big endian if the first byte is non-ASCII) - // plus 8 times the number of ASCII in text order before the - // non-ASCII byte in the little-endian case or 8 times the number of ASCII in - // text order before the non-ASCII byte in the big-endian case. - let num_ascii = (zeros >> 3) as usize; -+ // Safety-usable invariant upheld here - Some(ALU_ALIGNMENT + num_ascii) - } - -+ /// Safety: `src` must be valid for the reads of two `usize`s -+ /// -+ /// Safety-usable invariant: will return byte index of first non-ascii byte - #[inline(always)] - unsafe fn validate_ascii_stride(src: *const usize) -> Option { - let word = *src; - let second_word = *(src.add(1)); - find_non_ascii(word, second_word) - } - -+ /// Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being -+ /// guaranteed to be non-ASCII (> 127), and the second being the offset where it is found - #[cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))] - #[inline(always)] - pub fn validate_ascii(slice: &[u8]) -> Option<(u8, usize)> { - let src = slice.as_ptr(); - let len = slice.len(); - let mut offset = 0usize; - let mut until_alignment = (ALU_ALIGNMENT - ((src as usize) & ALU_ALIGNMENT_MASK)) & ALU_ALIGNMENT_MASK; -+ // Safety: If this check fails we're valid to read `until_alignment + ALU_STRIDE_SIZE` elements - if until_alignment + ALU_STRIDE_SIZE <= len { - while until_alignment != 0 { - let code_unit = slice[offset]; - if code_unit > 127 { -+ // Safety-usable invairant upheld here - return Some((code_unit, offset)); - } - offset += 1; - until_alignment -= 1; - } -+ // Safety: At this point we have read until_alignment elements and -+ // are valid for `ALU_STRIDE_SIZE` more. - let len_minus_stride = len - ALU_STRIDE_SIZE; - loop { -+ // Safety: we were valid for this read - let ptr = unsafe { src.add(offset) as *const usize }; - if let Some(num_ascii) = unsafe { validate_ascii_stride(ptr) } { - offset += num_ascii; -+ // Safety-usable invairant upheld here using the invariant from validate_ascii_stride() - return Some((unsafe { *(src.add(offset)) }, offset)); - } - offset += ALU_STRIDE_SIZE; -+ // Safety: This is `offset > ALU_STRIDE_SIZE` which means we always have at least `2 * ALU_STRIDE_SIZE` elements to munch next time. - if offset > len_minus_stride { - break; - } - } - } - while offset < len { - let code_unit = slice[offset]; - if code_unit > 127 { -+ // Safety-usable invairant upheld here - return Some((code_unit, offset)); - } - offset += 1; - } - None - } - - } -@@ -1423,70 +1781,88 @@ cfg_if! { - // vector reads without vector writes. - - pub const ALU_STRIDE_SIZE: usize = 8; - - pub const ALU_ALIGNMENT: usize = 4; - - pub const ALU_ALIGNMENT_MASK: usize = 3; - } else { -+ // Safety: src points to two valid `usize`s, dst points to four valid `usize`s - #[inline(always)] - unsafe fn unpack_latin1_stride_alu(src: *const usize, dst: *mut usize) { -+ // Safety: src safety invariant used here - let word = *src; - let second_word = *(src.add(1)); -+ // Safety: dst safety invariant passed down - unpack_alu(word, second_word, dst); - } - -+ // Safety: src points to four valid `usize`s, dst points to two valid `usize`s - #[inline(always)] - unsafe fn pack_latin1_stride_alu(src: *const usize, dst: *mut usize) { -+ // Safety: src safety invariant used here - let first = *src; - let second = *(src.add(1)); - let third = *(src.add(2)); - let fourth = *(src.add(3)); -+ // Safety: dst safety invariant passed down - pack_alu(first, second, third, fourth, dst); - } - -+ // Safety: src points to two valid `usize`s, dst points to four valid `usize`s - #[inline(always)] - unsafe fn ascii_to_basic_latin_stride_alu(src: *const usize, dst: *mut usize) -> bool { -+ // Safety: src safety invariant used here - let word = *src; - let second_word = *(src.add(1)); - // Check if the words contains non-ASCII - if (word & ASCII_MASK) | (second_word & ASCII_MASK) != 0 { - return false; - } -+ // Safety: dst safety invariant passed down - unpack_alu(word, second_word, dst); - true - } - -+ // Safety: src points four valid `usize`s, dst points to two valid `usize`s - #[inline(always)] - unsafe fn basic_latin_to_ascii_stride_alu(src: *const usize, dst: *mut usize) -> bool { -+ // Safety: src safety invariant used here - let first = *src; - let second = *(src.add(1)); - let third = *(src.add(2)); - let fourth = *(src.add(3)); - if (first & BASIC_LATIN_MASK) | (second & BASIC_LATIN_MASK) | (third & BASIC_LATIN_MASK) | (fourth & BASIC_LATIN_MASK) != 0 { - return false; - } -+ // Safety: dst safety invariant passed down - pack_alu(first, second, third, fourth, dst); - true - } - -+ // Safety: src, dst both point to two valid `usize`s each -+ // Safety-usable invariant: Will return byte index of first non-ascii byte. - #[inline(always)] - unsafe fn ascii_to_ascii_stride(src: *const usize, dst: *mut usize) -> Option { -+ // Safety: src safety invariant used here - let word = *src; - let second_word = *(src.add(1)); -+ // Safety: src safety invariant used here - *dst = word; - *(dst.add(1)) = second_word; -+ // Relies on safety-usable invariant here - find_non_ascii(word, second_word) - } - - basic_latin_alu!(ascii_to_basic_latin, u8, u16, ascii_to_basic_latin_stride_alu); - basic_latin_alu!(basic_latin_to_ascii, u16, u8, basic_latin_to_ascii_stride_alu); - latin1_alu!(unpack_latin1, u8, u16, unpack_latin1_stride_alu); - latin1_alu!(pack_latin1, u16, u8, pack_latin1_stride_alu); -+ // Safety invariant upheld: ascii_to_ascii_stride will return byte index of first non-ascii if found - ascii_alu!(ascii_to_ascii, u8, u8, ascii_to_ascii_stride); - } - } - - pub fn ascii_valid_up_to(bytes: &[u8]) -> usize { - match validate_ascii(bytes) { - None => bytes.len(), - Some((_, num_valid)) => num_valid, -diff --git a/third_party/rust/encoding_rs/src/handles.rs b/third_party/rust/encoding_rs/src/handles.rs ---- third_party/rust/encoding_rs/src/handles.rs -+++ third_party/rust/encoding_rs/src/handles.rs -@@ -29,17 +29,17 @@ use crate::simd_funcs::*; - #[cfg(all( - feature = "simd-accel", - any( - target_feature = "sse2", - all(target_endian = "little", target_arch = "aarch64"), - all(target_endian = "little", target_feature = "neon") - ) - ))] --use packed_simd::u16x8; -+use core::simd::u16x8; - - use super::DecoderResult; - use super::EncoderResult; - use crate::ascii::*; - use crate::utf_8::convert_utf8_to_utf16_up_to_invalid; - use crate::utf_8::utf8_valid_up_to; - - pub enum Space { -@@ -85,84 +85,100 @@ impl Endian for LittleEndian { - const OPPOSITE_ENDIAN: bool = false; - - #[cfg(target_endian = "big")] - const OPPOSITE_ENDIAN: bool = true; - } - - #[derive(Debug, Copy, Clone)] - struct UnalignedU16Slice { -+ // Safety invariant: ptr must be valid for reading 2*len bytes - ptr: *const u8, - len: usize, - } - - impl UnalignedU16Slice { -+ /// Safety: ptr must be valid for reading 2*len bytes - #[inline(always)] - pub unsafe fn new(ptr: *const u8, len: usize) -> UnalignedU16Slice { -+ // Safety: field invariant passed up to caller here - UnalignedU16Slice { ptr, len } - } - - #[inline(always)] - pub fn trim_last(&mut self) { - assert!(self.len > 0); -+ // Safety: invariant upheld here: a slice is still valid with a shorter len - self.len -= 1; - } - - #[inline(always)] - pub fn at(&self, i: usize) -> u16 { - use core::mem::MaybeUninit; - - assert!(i < self.len); - unsafe { - let mut u: MaybeUninit = MaybeUninit::uninit(); -+ // Safety: i is at most len - 1, which works here - ::core::ptr::copy_nonoverlapping(self.ptr.add(i * 2), u.as_mut_ptr() as *mut u8, 2); -+ // Safety: valid read above lets us do this - u.assume_init() - } - } - - #[cfg(feature = "simd-accel")] - #[inline(always)] - pub fn simd_at(&self, i: usize) -> u16x8 { -+ // Safety: i/len are on the scale of u16s, each one corresponds to 2 u8s - assert!(i + SIMD_STRIDE_SIZE / 2 <= self.len); - let byte_index = i * 2; -+ // Safety: load16_unaligned needs SIMD_STRIDE_SIZE=16 u8 elements to read, -+ // or 16/2 = 8 u16 elements to read. -+ // We have checked that we have at least that many above. -+ - unsafe { to_u16_lanes(load16_unaligned(self.ptr.add(byte_index))) } - } - - #[inline(always)] - pub fn len(&self) -> usize { - self.len - } - - #[inline(always)] - pub fn tail(&self, from: usize) -> UnalignedU16Slice { - // XXX the return value should be restricted not to - // outlive self. - assert!(from <= self.len); -+ // Safety: This upholds the same invariant: `from` is in bounds and we're returning a shorter slice - unsafe { UnalignedU16Slice::new(self.ptr.add(from * 2), self.len - from) } - } - - #[cfg(feature = "simd-accel")] - #[inline(always)] - pub fn copy_bmp_to(&self, other: &mut [u16]) -> Option<(u16, usize)> { - assert!(self.len <= other.len()); - let mut offset = 0; -+ // Safety: SIMD_STRIDE_SIZE is measured in bytes, whereas len is in u16s. We check we can -+ // munch SIMD_STRIDE_SIZE / 2 u16s which means we can write SIMD_STRIDE_SIZE u8s - if SIMD_STRIDE_SIZE / 2 <= self.len { - let len_minus_stride = self.len - SIMD_STRIDE_SIZE / 2; - loop { - let mut simd = self.simd_at(offset); - if E::OPPOSITE_ENDIAN { - simd = simd_byte_swap(simd); - } -+ // Safety: we have enough space on the other side to write this - unsafe { - store8_unaligned(other.as_mut_ptr().add(offset), simd); - } - if contains_surrogates(simd) { - break; - } - offset += SIMD_STRIDE_SIZE / 2; -+ // Safety: This ensures we still have space for writing SIMD_STRIDE_SIZE u8s - if offset > len_minus_stride { - break; - } - } - } - while offset < self.len { - let unit = swap_if_opposite_endian::(self.at(offset)); - other[offset] = unit; -@@ -231,33 +247,37 @@ fn copy_unaligned_basic_latin_to_ascii( - src: UnalignedU16Slice, - dst: &mut [u8], - ) -> CopyAsciiResult { - let len = ::core::cmp::min(src.len(), dst.len()); - let mut offset = 0; -+ // Safety: This check ensures we are able to read/write at least SIMD_STRIDE_SIZE elements - if SIMD_STRIDE_SIZE <= len { - let len_minus_stride = len - SIMD_STRIDE_SIZE; - loop { - let mut first = src.simd_at(offset); - let mut second = src.simd_at(offset + (SIMD_STRIDE_SIZE / 2)); - if E::OPPOSITE_ENDIAN { - first = simd_byte_swap(first); - second = simd_byte_swap(second); - } - if !simd_is_basic_latin(first | second) { - break; - } - let packed = simd_pack(first, second); -+ // Safety: We are able to write SIMD_STRIDE_SIZE elements in this iteration - unsafe { - store16_unaligned(dst.as_mut_ptr().add(offset), packed); - } - offset += SIMD_STRIDE_SIZE; -+ // Safety: This is `offset > len - SIMD_STRIDE_SIZE`, which ensures that we can write at least SIMD_STRIDE_SIZE elements -+ // in the next iteration - if offset > len_minus_stride { - break; - } - } - } - copy_unaligned_basic_latin_to_ascii_alu::(src.tail(offset), &mut dst[offset..], offset) - } - -@@ -632,94 +652,106 @@ impl<'a> Utf16Destination<'a> { - #[inline(always)] - fn write_astral(&mut self, astral: u32) { - debug_assert!(astral > 0xFFFF); - debug_assert!(astral <= 0x10_FFFF); - self.write_code_unit((0xD7C0 + (astral >> 10)) as u16); - self.write_code_unit((0xDC00 + (astral & 0x3FF)) as u16); - } - #[inline(always)] -- pub fn write_surrogate_pair(&mut self, high: u16, low: u16) { -+ fn write_surrogate_pair(&mut self, high: u16, low: u16) { - self.write_code_unit(high); - self.write_code_unit(low); - } - #[inline(always)] - fn write_big5_combination(&mut self, combined: u16, combining: u16) { - self.write_bmp_excl_ascii(combined); - self.write_bmp_excl_ascii(combining); - } -+ // Safety-usable invariant: CopyAsciiResult::GoOn will only contain bytes >=0x80 - #[inline(always)] - pub fn copy_ascii_from_check_space_bmp<'b>( - &'b mut self, - source: &mut ByteSource, - ) -> CopyAsciiResult<(DecoderResult, usize, usize), (u8, Utf16BmpHandle<'b, 'a>)> { - let non_ascii_ret = { - let src_remaining = &source.slice[source.pos..]; - let dst_remaining = &mut self.slice[self.pos..]; - let (pending, length) = if dst_remaining.len() < src_remaining.len() { - (DecoderResult::OutputFull, dst_remaining.len()) - } else { - (DecoderResult::InputEmpty, src_remaining.len()) - }; -+ // Safety: This function is documented as needing valid pointers for src/dest and len, which -+ // is true since we've passed the minumum length of the two - match unsafe { - ascii_to_basic_latin(src_remaining.as_ptr(), dst_remaining.as_mut_ptr(), length) - } { - None => { - source.pos += length; - self.pos += length; - return CopyAsciiResult::Stop((pending, source.pos, self.pos)); - } -+ // Safety: the function is documented as returning bytes >=0x80 in the Some - Some((non_ascii, consumed)) => { - source.pos += consumed; - self.pos += consumed; - source.pos += 1; // +1 for non_ascii -+ // Safety: non-ascii bubbled out here - non_ascii - } - } - }; -+ // Safety: non-ascii returned here - CopyAsciiResult::GoOn((non_ascii_ret, Utf16BmpHandle::new(self))) - } -+ // Safety-usable invariant: CopyAsciiResult::GoOn will only contain bytes >=0x80 - #[inline(always)] - pub fn copy_ascii_from_check_space_astral<'b>( - &'b mut self, - source: &mut ByteSource, - ) -> CopyAsciiResult<(DecoderResult, usize, usize), (u8, Utf16AstralHandle<'b, 'a>)> { - let non_ascii_ret = { - let dst_len = self.slice.len(); - let src_remaining = &source.slice[source.pos..]; - let dst_remaining = &mut self.slice[self.pos..]; - let (pending, length) = if dst_remaining.len() < src_remaining.len() { - (DecoderResult::OutputFull, dst_remaining.len()) - } else { - (DecoderResult::InputEmpty, src_remaining.len()) - }; -+ // Safety: This function is documented as needing valid pointers for src/dest and len, which -+ // is true since we've passed the minumum length of the two - match unsafe { - ascii_to_basic_latin(src_remaining.as_ptr(), dst_remaining.as_mut_ptr(), length) - } { - None => { - source.pos += length; - self.pos += length; - return CopyAsciiResult::Stop((pending, source.pos, self.pos)); - } -+ // Safety: the function is documented as returning bytes >=0x80 in the Some - Some((non_ascii, consumed)) => { - source.pos += consumed; - self.pos += consumed; - if self.pos + 1 < dst_len { - source.pos += 1; // +1 for non_ascii -+ // Safety: non-ascii bubbled out here - non_ascii - } else { - return CopyAsciiResult::Stop(( - DecoderResult::OutputFull, - source.pos, - self.pos, - )); - } - } - } - }; -+ // Safety: non-ascii returned here - CopyAsciiResult::GoOn((non_ascii_ret, Utf16AstralHandle::new(self))) - } - #[inline(always)] - pub fn copy_utf8_up_to_invalid_from(&mut self, source: &mut ByteSource) { - let src_remaining = &source.slice[source.pos..]; - let dst_remaining = &mut self.slice[self.pos..]; - let (read, written) = convert_utf8_to_utf16_up_to_invalid(src_remaining, dst_remaining); - source.pos += read; -diff --git a/third_party/rust/encoding_rs/src/lib.rs b/third_party/rust/encoding_rs/src/lib.rs ---- third_party/rust/encoding_rs/src/lib.rs -+++ third_party/rust/encoding_rs/src/lib.rs -@@ -684,37 +684,26 @@ - //! TIS-620windows-874 - //! - //! - //! - //! See the section [_UTF-16LE, UTF-16BE and Unicode Encoding Schemes_](#utf-16le-utf-16be-and-unicode-encoding-schemes) - //! for discussion about the UTF-16 family. - - #![no_std] --#![cfg_attr(feature = "simd-accel", feature(core_intrinsics))] -+#![cfg_attr(feature = "simd-accel", feature(core_intrinsics, portable_simd))] - - #[cfg(feature = "alloc")] - #[cfg_attr(test, macro_use)] - extern crate alloc; - - extern crate core; - #[macro_use] - extern crate cfg_if; - --#[cfg(all( -- feature = "simd-accel", -- any( -- target_feature = "sse2", -- all(target_endian = "little", target_arch = "aarch64"), -- all(target_endian = "little", target_feature = "neon") -- ) --))] --#[macro_use(shuffle)] --extern crate packed_simd; -- - #[cfg(feature = "serde")] - extern crate serde; - - #[cfg(all(test, feature = "serde"))] - extern crate bincode; - #[cfg(all(test, feature = "serde"))] - #[macro_use] - extern crate serde_derive; -diff --git a/third_party/rust/encoding_rs/src/mem.rs b/third_party/rust/encoding_rs/src/mem.rs ---- third_party/rust/encoding_rs/src/mem.rs -+++ third_party/rust/encoding_rs/src/mem.rs -@@ -111,16 +111,21 @@ macro_rules! by_unit_check_alu { - until_alignment -= 1; - } - if accu >= $bound { - return false; - } - } - let len_minus_stride = len - ALU_ALIGNMENT / unit_size; - if offset + (4 * (ALU_ALIGNMENT / unit_size)) <= len { -+ // Safety: the above check lets us perform 4 consecutive reads of -+ // length ALU_ALIGNMENT / unit_size. ALU_ALIGNMENT is the size of usize, and unit_size -+ // is the size of the `src` pointer, so this is equal to performing four usize reads. -+ // -+ // This invariant is upheld on all loop iterations - let len_minus_unroll = len - (4 * (ALU_ALIGNMENT / unit_size)); - loop { - let unroll_accu = unsafe { *(src.add(offset) as *const usize) } - | unsafe { - *(src.add(offset + (ALU_ALIGNMENT / unit_size)) as *const usize) - } - | unsafe { - *(src.add(offset + (2 * (ALU_ALIGNMENT / unit_size))) -@@ -129,22 +134,24 @@ macro_rules! by_unit_check_alu { - | unsafe { - *(src.add(offset + (3 * (ALU_ALIGNMENT / unit_size))) - as *const usize) - }; - if unroll_accu & $mask != 0 { - return false; - } - offset += 4 * (ALU_ALIGNMENT / unit_size); -+ // Safety: this check lets us continue to perform the 4 reads earlier - if offset > len_minus_unroll { - break; - } - } - } - while offset <= len_minus_stride { -+ // Safety: the above check lets us perform one usize read. - accu |= unsafe { *(src.add(offset) as *const usize) }; - offset += ALU_ALIGNMENT / unit_size; - } - } - } - for &unit in &buffer[offset..] { - accu |= unit as usize; - } -@@ -184,16 +191,21 @@ macro_rules! by_unit_check_simd { - until_alignment -= 1; - } - if accu >= $bound { - return false; - } - } - let len_minus_stride = len - SIMD_STRIDE_SIZE / unit_size; - if offset + (4 * (SIMD_STRIDE_SIZE / unit_size)) <= len { -+ // Safety: the above check lets us perform 4 consecutive reads of -+ // length SIMD_STRIDE_SIZE / unit_size. SIMD_STRIDE_SIZE is the size of $simd_ty, and unit_size -+ // is the size of the `src` pointer, so this is equal to performing four $simd_ty reads. -+ // -+ // This invariant is upheld on all loop iterations - let len_minus_unroll = len - (4 * (SIMD_STRIDE_SIZE / unit_size)); - loop { - let unroll_accu = unsafe { *(src.add(offset) as *const $simd_ty) } - | unsafe { - *(src.add(offset + (SIMD_STRIDE_SIZE / unit_size)) - as *const $simd_ty) - } - | unsafe { -@@ -203,23 +215,25 @@ macro_rules! by_unit_check_simd { - | unsafe { - *(src.add(offset + (3 * (SIMD_STRIDE_SIZE / unit_size))) - as *const $simd_ty) - }; - if !$func(unroll_accu) { - return false; - } - offset += 4 * (SIMD_STRIDE_SIZE / unit_size); -+ // Safety: this check lets us continue to perform the 4 reads earlier - if offset > len_minus_unroll { - break; - } - } - } - let mut simd_accu = $splat; - while offset <= len_minus_stride { -+ // Safety: the above check lets us perform one $simd_ty read. - simd_accu = simd_accu | unsafe { *(src.add(offset) as *const $simd_ty) }; - offset += SIMD_STRIDE_SIZE / unit_size; - } - if !$func(simd_accu) { - return false; - } - } - } -@@ -229,18 +243,18 @@ macro_rules! by_unit_check_simd { - accu < $bound - } - }; - } - - cfg_if! { - if #[cfg(all(feature = "simd-accel", any(target_feature = "sse2", all(target_endian = "little", target_arch = "aarch64"), all(target_endian = "little", target_feature = "neon"))))] { - use crate::simd_funcs::*; -- use packed_simd::u8x16; -- use packed_simd::u16x8; -+ use core::simd::u8x16; -+ use core::simd::u16x8; - - const SIMD_ALIGNMENT: usize = 16; - - const SIMD_ALIGNMENT_MASK: usize = 15; - - by_unit_check_simd!(is_ascii_impl, u8, u8x16::splat(0), u8x16, 0x80, simd_is_ascii); - by_unit_check_simd!(is_basic_latin_impl, u16, u16x8::splat(0), u16x8, 0x80, simd_is_basic_latin); - by_unit_check_simd!(is_utf16_latin1_impl, u16, u16x8::splat(0), u16x8, 0x100, simd_is_latin1); -diff --git a/third_party/rust/encoding_rs/src/simd_funcs.rs b/third_party/rust/encoding_rs/src/simd_funcs.rs ---- third_party/rust/encoding_rs/src/simd_funcs.rs -+++ third_party/rust/encoding_rs/src/simd_funcs.rs -@@ -2,65 +2,84 @@ - // file at the top-level directory of this distribution. - // - // Licensed under the Apache License, Version 2.0 or the MIT license - // , at your - // option. This file may not be copied, modified, or distributed - // except according to those terms. - --use packed_simd::u16x8; --use packed_simd::u8x16; --use packed_simd::IntoBits; -+use any_all_workaround::all_mask16x8; -+use any_all_workaround::all_mask8x16; -+use any_all_workaround::any_mask16x8; -+use any_all_workaround::any_mask8x16; -+use core::simd::cmp::SimdPartialEq; -+use core::simd::cmp::SimdPartialOrd; -+use core::simd::mask16x8; -+use core::simd::mask8x16; -+use core::simd::simd_swizzle; -+use core::simd::u16x8; -+use core::simd::u8x16; -+use core::simd::ToBytes; - - // TODO: Migrate unaligned access to stdlib code if/when the RFC - // https://github.com/rust-lang/rfcs/pull/1725 is implemented. - -+/// Safety invariant: ptr must be valid for an unaligned read of 16 bytes - #[inline(always)] - pub unsafe fn load16_unaligned(ptr: *const u8) -> u8x16 { -- let mut simd = ::core::mem::uninitialized(); -- ::core::ptr::copy_nonoverlapping(ptr, &mut simd as *mut u8x16 as *mut u8, 16); -- simd -+ let mut simd = ::core::mem::MaybeUninit::::uninit(); -+ ::core::ptr::copy_nonoverlapping(ptr, simd.as_mut_ptr() as *mut u8, 16); -+ // Safety: copied 16 bytes of initialized memory into this, it is now initialized -+ simd.assume_init() - } - -+/// Safety invariant: ptr must be valid for an aligned-for-u8x16 read of 16 bytes - #[allow(dead_code)] - #[inline(always)] - pub unsafe fn load16_aligned(ptr: *const u8) -> u8x16 { - *(ptr as *const u8x16) - } - -+/// Safety invariant: ptr must be valid for an unaligned store of 16 bytes - #[inline(always)] - pub unsafe fn store16_unaligned(ptr: *mut u8, s: u8x16) { - ::core::ptr::copy_nonoverlapping(&s as *const u8x16 as *const u8, ptr, 16); - } - -+/// Safety invariant: ptr must be valid for an aligned-for-u8x16 store of 16 bytes - #[allow(dead_code)] - #[inline(always)] - pub unsafe fn store16_aligned(ptr: *mut u8, s: u8x16) { - *(ptr as *mut u8x16) = s; - } - -+/// Safety invariant: ptr must be valid for an unaligned read of 16 bytes - #[inline(always)] - pub unsafe fn load8_unaligned(ptr: *const u16) -> u16x8 { -- let mut simd = ::core::mem::uninitialized(); -- ::core::ptr::copy_nonoverlapping(ptr as *const u8, &mut simd as *mut u16x8 as *mut u8, 16); -- simd -+ let mut simd = ::core::mem::MaybeUninit::::uninit(); -+ ::core::ptr::copy_nonoverlapping(ptr as *const u8, simd.as_mut_ptr() as *mut u8, 16); -+ // Safety: copied 16 bytes of initialized memory into this, it is now initialized -+ simd.assume_init() - } - -+/// Safety invariant: ptr must be valid for an aligned-for-u16x8 read of 16 bytes - #[allow(dead_code)] - #[inline(always)] - pub unsafe fn load8_aligned(ptr: *const u16) -> u16x8 { - *(ptr as *const u16x8) - } - -+/// Safety invariant: ptr must be valid for an unaligned store of 16 bytes - #[inline(always)] - pub unsafe fn store8_unaligned(ptr: *mut u16, s: u16x8) { - ::core::ptr::copy_nonoverlapping(&s as *const u16x8 as *const u8, ptr as *mut u8, 16); - } - -+/// Safety invariant: ptr must be valid for an aligned-for-u16x8 store of 16 bytes - #[allow(dead_code)] - #[inline(always)] - pub unsafe fn store8_aligned(ptr: *mut u16, s: u16x8) { - *(ptr as *mut u16x8) = s; - } - - cfg_if! { - if #[cfg(all(target_feature = "sse2", target_arch = "x86_64"))] { -@@ -95,234 +114,241 @@ cfg_if! { - pub fn simd_byte_swap(s: u16x8) -> u16x8 { - let left = s << 8; - let right = s >> 8; - left | right - } - - #[inline(always)] - pub fn to_u16_lanes(s: u8x16) -> u16x8 { -- s.into_bits() -+ u16x8::from_ne_bytes(s) - } - - cfg_if! { - if #[cfg(target_feature = "sse2")] { - - // Expose low-level mask instead of higher-level conclusion, - // because the non-ASCII case would perform less well otherwise. -+ // Safety-usable invariant: This returned value is whether each high bit is set - #[inline(always)] - pub fn mask_ascii(s: u8x16) -> i32 { - unsafe { -- _mm_movemask_epi8(s.into_bits()) -+ _mm_movemask_epi8(s.into()) - } - } - - } else { - - } - } - - cfg_if! { - if #[cfg(target_feature = "sse2")] { - #[inline(always)] - pub fn simd_is_ascii(s: u8x16) -> bool { - unsafe { -- _mm_movemask_epi8(s.into_bits()) == 0 -+ // Safety: We have cfg()d the correct platform -+ _mm_movemask_epi8(s.into()) == 0 - } - } - } else if #[cfg(target_arch = "aarch64")]{ - #[inline(always)] - pub fn simd_is_ascii(s: u8x16) -> bool { - unsafe { -- vmaxvq_u8(s.into_bits()) < 0x80 -+ // Safety: We have cfg()d the correct platform -+ vmaxvq_u8(s.into()) < 0x80 - } - } - } else { - #[inline(always)] - pub fn simd_is_ascii(s: u8x16) -> bool { - // This optimizes better on ARM than - // the lt formulation. - let highest_ascii = u8x16::splat(0x7F); -- !s.gt(highest_ascii).any() -+ !any_mask8x16(s.simd_gt(highest_ascii)) - } - } - } - - cfg_if! { - if #[cfg(target_feature = "sse2")] { - #[inline(always)] - pub fn simd_is_str_latin1(s: u8x16) -> bool { - if simd_is_ascii(s) { - return true; - } - let above_str_latin1 = u8x16::splat(0xC4); -- s.lt(above_str_latin1).all() -+ s.simd_lt(above_str_latin1).all() - } - } else if #[cfg(target_arch = "aarch64")]{ - #[inline(always)] - pub fn simd_is_str_latin1(s: u8x16) -> bool { - unsafe { -- vmaxvq_u8(s.into_bits()) < 0xC4 -+ // Safety: We have cfg()d the correct platform -+ vmaxvq_u8(s.into()) < 0xC4 - } - } - } else { - #[inline(always)] - pub fn simd_is_str_latin1(s: u8x16) -> bool { - let above_str_latin1 = u8x16::splat(0xC4); -- s.lt(above_str_latin1).all() -+ all_mask8x16(s.simd_lt(above_str_latin1)) - } - } - } - - cfg_if! { - if #[cfg(target_arch = "aarch64")]{ - #[inline(always)] - pub fn simd_is_basic_latin(s: u16x8) -> bool { - unsafe { -- vmaxvq_u16(s.into_bits()) < 0x80 -+ // Safety: We have cfg()d the correct platform -+ vmaxvq_u16(s.into()) < 0x80 - } - } - - #[inline(always)] - pub fn simd_is_latin1(s: u16x8) -> bool { - unsafe { -- vmaxvq_u16(s.into_bits()) < 0x100 -+ // Safety: We have cfg()d the correct platform -+ vmaxvq_u16(s.into()) < 0x100 - } - } - } else { - #[inline(always)] - pub fn simd_is_basic_latin(s: u16x8) -> bool { - let above_ascii = u16x8::splat(0x80); -- s.lt(above_ascii).all() -+ all_mask16x8(s.simd_lt(above_ascii)) - } - - #[inline(always)] - pub fn simd_is_latin1(s: u16x8) -> bool { - // For some reason, on SSE2 this formulation - // seems faster in this case while the above - // function is better the other way round... - let highest_latin1 = u16x8::splat(0xFF); -- !s.gt(highest_latin1).any() -+ !any_mask16x8(s.simd_gt(highest_latin1)) - } - } - } - - #[inline(always)] - pub fn contains_surrogates(s: u16x8) -> bool { - let mask = u16x8::splat(0xF800); - let surrogate_bits = u16x8::splat(0xD800); -- (s & mask).eq(surrogate_bits).any() -+ any_mask16x8((s & mask).simd_eq(surrogate_bits)) - } - - cfg_if! { - if #[cfg(target_arch = "aarch64")]{ - macro_rules! aarch64_return_false_if_below_hebrew { - ($s:ident) => ({ - unsafe { -- if vmaxvq_u16($s.into_bits()) < 0x0590 { -+ // Safety: We have cfg()d the correct platform -+ if vmaxvq_u16($s.into()) < 0x0590 { - return false; - } - } - }) - } - - macro_rules! non_aarch64_return_false_if_all { - ($s:ident) => () - } - } else { - macro_rules! aarch64_return_false_if_below_hebrew { - ($s:ident) => () - } - - macro_rules! non_aarch64_return_false_if_all { - ($s:ident) => ({ -- if $s.all() { -+ if all_mask16x8($s) { - return false; - } - }) - } - } - } - - macro_rules! in_range16x8 { - ($s:ident, $start:expr, $end:expr) => {{ - // SIMD sub is wrapping -- ($s - u16x8::splat($start)).lt(u16x8::splat($end - $start)) -+ ($s - u16x8::splat($start)).simd_lt(u16x8::splat($end - $start)) - }}; - } - - #[inline(always)] - pub fn is_u16x8_bidi(s: u16x8) -> bool { - // We try to first quickly refute the RTLness of the vector. If that - // fails, we do the real RTL check, so in that case we end up wasting - // the work for the up-front quick checks. Even the quick-check is - // two-fold in order to return `false` ASAP if everything is below - // Hebrew. - - aarch64_return_false_if_below_hebrew!(s); - -- let below_hebrew = s.lt(u16x8::splat(0x0590)); -+ let below_hebrew = s.simd_lt(u16x8::splat(0x0590)); - - non_aarch64_return_false_if_all!(below_hebrew); - -- if (below_hebrew | in_range16x8!(s, 0x0900, 0x200F) | in_range16x8!(s, 0x2068, 0xD802)).all() { -+ if all_mask16x8( -+ below_hebrew | in_range16x8!(s, 0x0900, 0x200F) | in_range16x8!(s, 0x2068, 0xD802), -+ ) { - return false; - } - - // Quick refutation failed. Let's do the full check. - -- (in_range16x8!(s, 0x0590, 0x0900) -- | in_range16x8!(s, 0xFB1D, 0xFE00) -- | in_range16x8!(s, 0xFE70, 0xFEFF) -- | in_range16x8!(s, 0xD802, 0xD804) -- | in_range16x8!(s, 0xD83A, 0xD83C) -- | s.eq(u16x8::splat(0x200F)) -- | s.eq(u16x8::splat(0x202B)) -- | s.eq(u16x8::splat(0x202E)) -- | s.eq(u16x8::splat(0x2067))) -- .any() -+ any_mask16x8( -+ (in_range16x8!(s, 0x0590, 0x0900) -+ | in_range16x8!(s, 0xFB1D, 0xFE00) -+ | in_range16x8!(s, 0xFE70, 0xFEFF) -+ | in_range16x8!(s, 0xD802, 0xD804) -+ | in_range16x8!(s, 0xD83A, 0xD83C) -+ | s.simd_eq(u16x8::splat(0x200F)) -+ | s.simd_eq(u16x8::splat(0x202B)) -+ | s.simd_eq(u16x8::splat(0x202E)) -+ | s.simd_eq(u16x8::splat(0x2067))), -+ ) - } - - #[inline(always)] - pub fn simd_unpack(s: u8x16) -> (u16x8, u16x8) { -- unsafe { -- let first: u8x16 = shuffle!( -- s, -- u8x16::splat(0), -- [0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23] -- ); -- let second: u8x16 = shuffle!( -- s, -- u8x16::splat(0), -- [8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31] -- ); -- (first.into_bits(), second.into_bits()) -- } -+ let first: u8x16 = simd_swizzle!( -+ s, -+ u8x16::splat(0), -+ [0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23] -+ ); -+ let second: u8x16 = simd_swizzle!( -+ s, -+ u8x16::splat(0), -+ [8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31] -+ ); -+ (u16x8::from_ne_bytes(first), u16x8::from_ne_bytes(second)) - } - - cfg_if! { - if #[cfg(target_feature = "sse2")] { - #[inline(always)] - pub fn simd_pack(a: u16x8, b: u16x8) -> u8x16 { - unsafe { -- _mm_packus_epi16(a.into_bits(), b.into_bits()).into_bits() -+ // Safety: We have cfg()d the correct platform -+ _mm_packus_epi16(a.into(), b.into()).into() - } - } - } else { - #[inline(always)] - pub fn simd_pack(a: u16x8, b: u16x8) -> u8x16 { -- unsafe { -- let first: u8x16 = a.into_bits(); -- let second: u8x16 = b.into_bits(); -- shuffle!( -- first, -- second, -- [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30] -- ) -- } -+ let first: u8x16 = a.to_ne_bytes(); -+ let second: u8x16 = b.to_ne_bytes(); -+ simd_swizzle!( -+ first, -+ second, -+ [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30] -+ ) - } - } - } - - #[cfg(test)] - mod tests { - use super::*; - use alloc::vec::Vec; -diff --git a/third_party/rust/encoding_rs/src/single_byte.rs b/third_party/rust/encoding_rs/src/single_byte.rs ---- third_party/rust/encoding_rs/src/single_byte.rs -+++ third_party/rust/encoding_rs/src/single_byte.rs -@@ -48,16 +48,19 @@ impl SingleByteDecoder { - CopyAsciiResult::GoOn((mut non_ascii, mut handle)) => 'middle: loop { - // Start non-boilerplate - // - // Since the non-ASCIIness of `non_ascii` is hidden from - // the optimizer, it can't figure out that it's OK to - // statically omit the bound check when accessing - // `[u16; 128]` with an index - // `non_ascii as usize - 0x80usize`. -+ // -+ // Safety: `non_ascii` is a u8 byte >=0x80, from the invariants -+ // on Utf8Destination::copy_ascii_from_check_space_bmp() - let mapped = - unsafe { *(self.table.get_unchecked(non_ascii as usize - 0x80usize)) }; - // let mapped = self.table[non_ascii as usize - 0x80usize]; - if mapped == 0u16 { - return ( - DecoderResult::Malformed(1, 0), - source.consumed(), - handle.written(), -@@ -146,82 +149,103 @@ impl SingleByteDecoder { - dst: &mut [u16], - _last: bool, - ) -> (DecoderResult, usize, usize) { - let (pending, length) = if dst.len() < src.len() { - (DecoderResult::OutputFull, dst.len()) - } else { - (DecoderResult::InputEmpty, src.len()) - }; -+ // Safety invariant: converted <= length. Quite often we have `converted < length` -+ // which will be separately marked. - let mut converted = 0usize; - 'outermost: loop { - match unsafe { -+ // Safety: length is the minimum length, `src/dst + x` will always be valid for reads/writes of `len - x` - ascii_to_basic_latin( - src.as_ptr().add(converted), - dst.as_mut_ptr().add(converted), - length - converted, - ) - } { - None => { - return (pending, length, length); - } - Some((mut non_ascii, consumed)) => { -+ // Safety invariant: `converted <= length` upheld, since this can only consume -+ // up to `length - converted` bytes. -+ // -+ // Furthermore, in this context, -+ // we can assume `converted < length` since this branch is only ever hit when -+ // ascii_to_basic_latin fails to consume the entire slice - converted += consumed; - 'middle: loop { - // `converted` doesn't count the reading of `non_ascii` yet. - // Since the non-ASCIIness of `non_ascii` is hidden from - // the optimizer, it can't figure out that it's OK to - // statically omit the bound check when accessing - // `[u16; 128]` with an index - // `non_ascii as usize - 0x80usize`. -+ // -+ // Safety: We can rely on `non_ascii` being between `0x80` and `0xFF` due to -+ // the invariants of `ascii_to_basic_latin()`, and our table has enough space for that. - let mapped = - unsafe { *(self.table.get_unchecked(non_ascii as usize - 0x80usize)) }; - // let mapped = self.table[non_ascii as usize - 0x80usize]; - if mapped == 0u16 { - return ( - DecoderResult::Malformed(1, 0), - converted + 1, // +1 `for non_ascii` - converted, - ); - } - unsafe { -- // The bound check has already been performed -+ // Safety: As mentioned above, `converted < length` - *(dst.get_unchecked_mut(converted)) = mapped; - } -+ // Safety: `converted <= length` upheld, since `converted < length` before this - converted += 1; - // Next, handle ASCII punctuation and non-ASCII without - // going back to ASCII acceleration. Non-ASCII scripts - // use ASCII punctuation, so this avoid going to - // acceleration just for punctuation/space and then - // failing. This is a significant boost to non-ASCII - // scripts. - // TODO: Split out Latin converters without this part - // this stuff makes Latin script-conversion slower. - if converted == length { - return (pending, length, length); - } -+ // Safety: We are back to `converted < length` because of the == above -+ // and can perform this check. - let mut b = unsafe { *(src.get_unchecked(converted)) }; -+ // Safety: `converted < length` is upheld for this loop - 'innermost: loop { - if b > 127 { - non_ascii = b; - continue 'middle; - } - // Testing on Haswell says that we should write the - // byte unconditionally instead of trying to unread it - // to make it part of the next SIMD stride. - unsafe { -+ // Safety: `converted < length` is true for this loop - *(dst.get_unchecked_mut(converted)) = u16::from(b); - } -+ // Safety: We are now at `converted <= length`. We should *not* `continue` -+ // the loop without reverifying - converted += 1; - if b < 60 { - // We've got punctuation - if converted == length { - return (pending, length, length); - } -+ // Safety: we're back to `converted <= length` because of the == above - b = unsafe { *(src.get_unchecked(converted)) }; -+ // Safety: The loop continues as `converted < length` - continue 'innermost; - } - // We've got markup or ASCII text - continue 'outermost; - } - } - } - } -@@ -229,16 +253,18 @@ impl SingleByteDecoder { - } - - pub fn latin1_byte_compatible_up_to(&self, buffer: &[u8]) -> usize { - let mut bytes = buffer; - let mut total = 0; - loop { - if let Some((non_ascii, offset)) = validate_ascii(bytes) { - total += offset; -+ // Safety: We can rely on `non_ascii` being between `0x80` and `0xFF` due to -+ // the invariants of `ascii_to_basic_latin()`, and our table has enough space for that. - let mapped = unsafe { *(self.table.get_unchecked(non_ascii as usize - 0x80usize)) }; - if mapped != u16::from(non_ascii) { - return total; - } - total += 1; - bytes = &bytes[offset + 1..]; - } else { - return total; -@@ -379,64 +405,89 @@ impl SingleByteEncoder { - dst: &mut [u8], - _last: bool, - ) -> (EncoderResult, usize, usize) { - let (pending, length) = if dst.len() < src.len() { - (EncoderResult::OutputFull, dst.len()) - } else { - (EncoderResult::InputEmpty, src.len()) - }; -+ // Safety invariant: converted <= length. Quite often we have `converted < length` -+ // which will be separately marked. - let mut converted = 0usize; - 'outermost: loop { - match unsafe { -+ // Safety: length is the minimum length, `src/dst + x` will always be valid for reads/writes of `len - x` - basic_latin_to_ascii( - src.as_ptr().add(converted), - dst.as_mut_ptr().add(converted), - length - converted, - ) - } { - None => { - return (pending, length, length); - } - Some((mut non_ascii, consumed)) => { -+ // Safety invariant: `converted <= length` upheld, since this can only consume -+ // up to `length - converted` bytes. -+ // -+ // Furthermore, in this context, -+ // we can assume `converted < length` since this branch is only ever hit when -+ // ascii_to_basic_latin fails to consume the entire slice - converted += consumed; - 'middle: loop { - // `converted` doesn't count the reading of `non_ascii` yet. - match self.encode_u16(non_ascii) { - Some(byte) => { - unsafe { -+ // Safety: we're allowed this access since `converted < length` - *(dst.get_unchecked_mut(converted)) = byte; - } - converted += 1; -+ // `converted <= length` now - } - None => { - // At this point, we need to know if we - // have a surrogate. - let high_bits = non_ascii & 0xFC00u16; - if high_bits == 0xD800u16 { - // high surrogate - if converted + 1 == length { - // End of buffer. This surrogate is unpaired. - return ( - EncoderResult::Unmappable('\u{FFFD}'), - converted + 1, // +1 `for non_ascii` - converted, - ); - } -+ // Safety: convered < length from outside the match, and `converted + 1 != length`, -+ // So `converted + 1 < length` as well. We're in bounds - let second = - u32::from(unsafe { *src.get_unchecked(converted + 1) }); - if second & 0xFC00u32 != 0xDC00u32 { - return ( - EncoderResult::Unmappable('\u{FFFD}'), - converted + 1, // +1 `for non_ascii` - converted, - ); - } - // The next code unit is a low surrogate. - let astral: char = unsafe { -+ // Safety: We can rely on non_ascii being 0xD800-0xDBFF since the high bits are 0xD800 -+ // Then, (non_ascii << 10 - 0xD800 << 10) becomes between (0 to 0x3FF) << 10, which is between -+ // 0x400 to 0xffc00. Adding the 0x10000 gives a range of 0x10400 to 0x10fc00. Subtracting the 0xDC00 -+ // gives 0x2800 to 0x102000 -+ // The second term is between 0xDC00 and 0xDFFF from the check above. This gives a maximum -+ // possible range of (0x10400 + 0xDC00) to (0x102000 + 0xDFFF) which is 0x1E000 to 0x10ffff. -+ // This is in range. -+ // -+ // From a Unicode principles perspective this can also be verified as we have checked that `non_ascii` is a high surrogate -+ // (0xD800..=0xDBFF), and that `second` is a low surrogate (`0xDC00..=0xDFFF`), and we are applying reverse of the UTC16 transformation -+ // algorithm , by applying the high surrogate - 0xD800 to the -+ // high ten bits, and the low surrogate - 0xDc00 to the low ten bits, and then adding 0x10000 - ::core::char::from_u32_unchecked( - (u32::from(non_ascii) << 10) + second - - (((0xD800u32 << 10) - 0x1_0000u32) + 0xDC00u32), - ) - }; - return ( - EncoderResult::Unmappable(astral), - converted + 2, // +2 `for non_ascii` and `second` -@@ -451,52 +502,63 @@ impl SingleByteEncoder { - converted, - ); - } - return ( - EncoderResult::unmappable_from_bmp(non_ascii), - converted + 1, // +1 `for non_ascii` - converted, - ); -+ // Safety: This branch diverges, so no need to uphold invariants on `converted` - } - } - // Next, handle ASCII punctuation and non-ASCII without - // going back to ASCII acceleration. Non-ASCII scripts - // use ASCII punctuation, so this avoid going to - // acceleration just for punctuation/space and then - // failing. This is a significant boost to non-ASCII - // scripts. - // TODO: Split out Latin converters without this part - // this stuff makes Latin script-conversion slower. - if converted == length { - return (pending, length, length); - } -+ // Safety: we're back to `converted < length` due to the == above and can perform -+ // the unchecked read - let mut unit = unsafe { *(src.get_unchecked(converted)) }; - 'innermost: loop { -+ // Safety: This loop always begins with `converted < length`, see -+ // the invariant outside and the comment on the continue below - if unit > 127 { - non_ascii = unit; - continue 'middle; - } - // Testing on Haswell says that we should write the - // byte unconditionally instead of trying to unread it - // to make it part of the next SIMD stride. - unsafe { -+ // Safety: Can rely on converted < length - *(dst.get_unchecked_mut(converted)) = unit as u8; - } - converted += 1; -+ // `converted <= length` here - if unit < 60 { - // We've got punctuation - if converted == length { - return (pending, length, length); - } -+ // Safety: `converted < length` due to the == above. The read is safe. - unit = unsafe { *(src.get_unchecked(converted)) }; -+ // Safety: This only happens if `converted < length`, maintaining it - continue 'innermost; - } - // We've got markup or ASCII text - continue 'outermost; -+ // Safety: All other routes to here diverge so the continue is the only -+ // way to run the innermost loop. - } - } - } - } - } - } - } - -diff --git a/third_party/rust/encoding_rs/src/x_user_defined.rs b/third_party/rust/encoding_rs/src/x_user_defined.rs ---- third_party/rust/encoding_rs/src/x_user_defined.rs -+++ third_party/rust/encoding_rs/src/x_user_defined.rs -@@ -9,22 +9,23 @@ - - use super::*; - use crate::handles::*; - use crate::variant::*; - - cfg_if! { - if #[cfg(feature = "simd-accel")] { - use simd_funcs::*; -- use packed_simd::u16x8; -+ use core::simd::u16x8; -+ use core::simd::cmp::SimdPartialOrd; - - #[inline(always)] - fn shift_upper(unpacked: u16x8) -> u16x8 { - let highest_ascii = u16x8::splat(0x7F); -- unpacked + unpacked.gt(highest_ascii).select(u16x8::splat(0xF700), u16x8::splat(0)) } -+ unpacked + unpacked.simd_gt(highest_ascii).select(u16x8::splat(0xF700), u16x8::splat(0)) } - } else { - } - } - - pub struct UserDefinedDecoder; - - impl UserDefinedDecoder { - pub fn new() -> VariantDecoder { -@@ -111,20 +112,25 @@ impl UserDefinedDecoder { - } else { - (DecoderResult::InputEmpty, src.len()) - }; - // Not bothering with alignment - let tail_start = length & !0xF; - let simd_iterations = length >> 4; - let src_ptr = src.as_ptr(); - let dst_ptr = dst.as_mut_ptr(); -+ // Safety: This is `for i in 0..length / 16` - for i in 0..simd_iterations { -+ // Safety: This is in bounds: length is the minumum valid length for both src/dst -+ // and i ranges to length/16, so multiplying by 16 will always be `< length` and can do -+ // a 16 byte read - let input = unsafe { load16_unaligned(src_ptr.add(i * 16)) }; - let (first, second) = simd_unpack(input); - unsafe { -+ // Safety: same as above, but this is two consecutive 8-byte reads - store8_unaligned(dst_ptr.add(i * 16), shift_upper(first)); - store8_unaligned(dst_ptr.add((i * 16) + 8), shift_upper(second)); - } - } - let src_tail = &src[tail_start..length]; - let dst_tail = &mut dst[tail_start..length]; - src_tail - .iter() - -diff --git a/third_party/rust/encoding_rs/.cargo-checksum.json b/third_party/rust/encoding_rs/.cargo-checksum.json ---- third_party/rust/encoding_rs/.cargo-checksum.json -+++ third_party/rust/encoding_rs/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"CONTRIBUTING.md":"ca1901f3e8532fb4cec894fd3664f0eaa898c0c4b961d1b992d1ed54eacf362a","COPYRIGHT":"11789f45bb180841cd362a5eee6789c68ddb573a11105e30768c308a6add0190","Cargo.toml":"42fa83322aa9fd6723b77d35d0cacb92cbb6e7f573ce11c55f5225292866f8f4","Ideas.md":"b7452893f500163868d8de52c09addaf91e1632454ed02e892c467ed7ec39dbd","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"3fa4ca83dcc9237839b1bdeb2e6d16bdfb5ec0c5ce42b24694d8bbf0dcbef72c","LICENSE-WHATWG":"838118388fe5c2e7f1dbbaeed13e1c7f3ebf88be91319c7c1d77c18e987d1a50","README.md":"d938e8ab0b9ab67e74a1a4f48f23fdce956d0ad3a3f6147ae7612a92763c88d5","ci/miri.sh":"43cb8d82f49e3bfe2d2274b6ccd6f0714a4188ccef0cecc040829883cfdbee25","doc/Big5.txt":"f73a2edc5cb6c2d140ba6e07f4542e1c4a234950378acde1df93480f0ca0be0b","doc/EUC-JP.txt":"ee2818b907d0137f40a9ab9fd525fc700a44dbdddb6cf0c157a656566bae4bf1","doc/EUC-KR.txt":"71d9e2ccf3b124e8bdfb433c8cf2773fd878077038d0cec3c7237a50f4a78a30","doc/GBK.txt":"c1b522b5a799884e5001da661f42c5a8f4d0acb9ef1d74b206f22b5f65365606","doc/IBM866.txt":"a5a433e804d0f83af785015179fbc1d9b0eaf1f7960efcd04093e136b51fbd0e","doc/ISO-2022-JP.txt":"af86684f5a8f0e2868d7b2c292860140c3d2e5527530ca091f1b28198e8e2fe6","doc/ISO-8859-10.txt":"6d3949ad7c81ca176895101ed81a1db7df1060d64e262880b94bd31bb344ab4d","doc/ISO-8859-13.txt":"3951dd89cf93f7729148091683cf8511f4529388b7dc8dcd0d62eaed55be93fa","doc/ISO-8859-14.txt":"3d330784a0374fd255a38b47949675cc7168c800530534b0a01cac6edc623adc","doc/ISO-8859-15.txt":"24b1084aab5127a85aab99153f86e24694d0a3615f53b5ce23683f97cf66c47a","doc/ISO-8859-16.txt":"ce0272559b92ba76d7a7e476f6424ae4a5cc72e75b183611b08392e44add4d25","doc/ISO-8859-2.txt":"18ceff88c13d1b5ba455a3919b1e3de489045c4c3d2dd7e8527c125c75d54aad","doc/ISO-8859-3.txt":"21798404c68f4f5db59223362f24999da96968c0628427321fccce7d2849a130","doc/ISO-8859-4.txt":"d27f6520c6c5bfbcc19176b71d081cdb3bccde1622bb3e420d5680e812632d53","doc/ISO-8859-5.txt":"a10ec8d6ea7a78ad15da7275f6cb1a3365118527e28f9af6d0d5830501303f3a","doc/ISO-8859-6.txt":"ccda8a2efc96115336bdd77776637b9712425e44fbcf745353b9057fbef144e7","doc/ISO-8859-7.txt":"17900fa1f27a445958f0a77d7d9056be375a6bd7ee4492aa680c7c1500bab85e","doc/ISO-8859-8-I.txt":"8357555646d54265a9b9ffa3e68b08d132312f1561c60108ff9b8b1167b6ecf2","doc/ISO-8859-8.txt":"72cd6f3afb7b4a9c16a66a362473315770b7755d72c86c870e52fc3eba86c8af","doc/KOI8-R.txt":"839cf19a38da994488004ed7814b1f6151640156a9a2af02bf2efca745fb5966","doc/KOI8-U.txt":"0cc76624ed1f024183e2298b7e019957da2c70c8ca06e0fc4e6f353f50a5054f","doc/Shift_JIS.txt":"34c49141818cb9ddbcf59cc858f78a79be8ad148d563f26415108ae1f148443f","doc/UTF-16BE.txt":"e2e280d8acbaa6d2a6b3569d60e17500a285f2baa0df3363dd85537cd5a1ef8f","doc/UTF-16LE.txt":"70bdc170e3fc5298ba68f10125fb5eeb8b077036cc96bb4416c4de396f6d76c1","doc/UTF-8.txt":"ea7bae742e613010ced002cf4b601a737d2203fad65e115611451bc4428f548a","doc/gb18030.txt":"dc71378a8f07a2d8659f69ee81fb8791fef56ba86f124b429978285237bb4a7b","doc/macintosh.txt":"57491e53866711b4672d9b9ff35380b9dac9e0d8e3d6c20bdd6140603687c023","doc/replacement.txt":"4b6c3bbd7999d9d4108a281594bd02d13607e334a95465afff8c2c08d395f0e4","doc/windows-1250.txt":"61296bb6a21cdab602300d32ecfba434cb82de5ac3bc88d58710d2f125e28d39","doc/windows-1251.txt":"7deea1c61dea1485c8ff02db2c7d578db7a9aab63ab1cfd02ec04b515864689e","doc/windows-1252.txt":"933ef3bdddfce5ee132b9f1a1aa8b47423d2587bbe475b19028d0a6d38e180b6","doc/windows-1253.txt":"1a38748b88e99071a5c7b3d5456ead4caedeabab50d50d658be105bc113714de","doc/windows-1254.txt":"f8372f86c6f8d642563cd6ddc025260553292a39423df1683a98670bd7bf2b47","doc/windows-1255.txt":"4e5852494730054e2da258a74e1b9d780abbcdd8ce22ebc218ca2efe9e90493d","doc/windows-1256.txt":"c0879c5172abedead302a406e8f60d9cd9598694a0ffa4fd288ffe4fef7b8ea1","doc/windows-1257.txt":"c28a0c9f964fcb2b46d21f537c402446501a2800670481d6abf9fd9e9018d523","doc/windows-1258.txt":"5019ae4d61805c79aacbf17c93793342dbb098d65a1837783bc3e2c6d6a23602","doc/windows-874.txt":"4ef0e4501c5feba8b17aee1818602ed44b36ca8475db771ce2fc16d392cabecc","doc/x-mac-cyrillic.txt":"58be154d8a888ca3d484b83b44f749823ef339ab27f14d90ca9a856f5050a8bd","doc/x-user-defined.txt":"f9cd07c4321bf5cfb0be4bdddd251072999b04a6cf7a6f5bc63709a84e2c1ffc","generate-encoding-data.py":"be989dd25c6b946e3e8745fdc8e8a80fcf24b3be99ad0b4b78153ba3f6ab6310","rustfmt.toml":"85c1a3b4382fd89e991cbb81b70fb52780472edc064c963943cdaaa56e0a2030","src/ascii.rs":"c44c002641adb5ebc4368707a8cc0a076d2f33e6a5c27b1b69988eb515f5653d","src/big5.rs":"ec6e2913011a38e9a3e825a1731f139a7ca1d5b264fefae51a3cc1a68a57cef9","src/data.rs":"8a617cc57032092d65850eb27e00de687c80aea3299e839a1f58b42d0b35abf3","src/euc_jp.rs":"32047f5b540188c4cb19c07165f846b9786a09f18e315ed3e9bda1293dae52aa","src/euc_kr.rs":"9b25afc72d9378700eecfac58d55ad1c5946d6cd0ccde2c29c08200ef2de6bb9","src/gb18030.rs":"808587168d73f0c80f8520f0ca9b161866ed2efeb17a05e85fdf3b8efe7ba28a","src/handles.rs":"cc83dc0754751d67f5688a65c5e0191cba02f6bacce81a0813a243cba55eef7a","src/iso_2022_jp.rs":"9bb485e82574f4b7d4b2364f0ff276acb6a0bc111758420a3b0ec5e04c196652","src/lib.rs":"1dc07b818e45846b16ddcaf0de46c8862dd7df8099123ec38b95c3f8ad9c91ec","src/macros.rs":"200997f8870de8bfd8cdc475e92115df42108c0df661e49d3d1cbc32056e1d99","src/mem.rs":"0bf34103e0ad1b842a13a082dee2b920b05cf4fb0f145c9ee7f608f4cb4a544f","src/replacement.rs":"7660b34a53f8c1ca2bdfa0e51e843ec28326950952ad8bc96569feb93ac62308","src/shift_jis.rs":"6951ae67e36b1a12fa3a30734957f444d8b1b4ae0e2bde52060b29bd0f16d9d9","src/simd_funcs.rs":"2612aba86e1d201096d7e47a859bc3444f85934cc82d8adc6d39a4304d9eecfc","src/single_byte.rs":"3c9e9c1f946ae622c725ba9421240c1faa9a05e95fa10dd4642a25cb276a1edc","src/test_data/big5_in.txt":"4c5a8691f8dc717311889c63894026d2fb62725a86c4208ca274a9cc8d42a503","src/test_data/big5_in_ref.txt":"99d399e17750cf9c7cf30bb253dbfe35b81c4fcbdead93cfa48b1429213473c7","src/test_data/big5_out.txt":"6193ca97c297aa20e09396038d18e938bb7ea331c26f0f2454097296723a0b13","src/test_data/big5_out_ref.txt":"36567691f557df144f6cc520015a87038dfa156f296fcf103b56ae9a718be1fc","src/test_data/euc_kr_in.txt":"c86a7224f3215fa0d04e685622a752fdc72763e8ae076230c7fd62de57ec4074","src/test_data/euc_kr_in_ref.txt":"1f419f4ca47d708b54c73c461545a022ae2e20498fdbf8005a483d752a204883","src/test_data/euc_kr_out.txt":"e7f32e026f70be1e1b58e0047baf7d3d2c520269c4f9b9992e158b4decb0a1a3","src/test_data/euc_kr_out_ref.txt":"c9907857980b20b8e9e3b584482ed6567a2be6185d72237b6322f0404944924e","src/test_data/gb18030_in.txt":"ab7231b2d3e9afacdbd7d7f3b9e5361a7ff9f7e1cfdb4f3bd905b9362b309e53","src/test_data/gb18030_in_ref.txt":"dc5069421adca2043c55f5012b55a76fdff651d22e6e699fd0978f8d5706815c","src/test_data/gb18030_out.txt":"f0208d527f5ca63de7d9a0323be8d5cf12d8a104b2943d92c2701f0c3364dac1","src/test_data/gb18030_out_ref.txt":"6819fe47627e4ea01027003fc514b9f21a1322e732d7f1fb92cc6c5455bc6c07","src/test_data/iso_2022_jp_in.txt":"cd24bbdcb1834e25db54646fbf4c41560a13dc7540f6be3dba4f5d97d44513af","src/test_data/iso_2022_jp_in_ref.txt":"3dc4e6a5e06471942d086b16c9440945e78415f6f3f47e43717e4bc2eac2cdf5","src/test_data/iso_2022_jp_out.txt":"9b6f015329dda6c3f9ee5ce6dbd6fa9c89acc21283e886836c78b8d833480c21","src/test_data/iso_2022_jp_out_ref.txt":"78cb260093a20116ad9a42f43b05d1848c5ab100b6b9a850749809e943884b35","src/test_data/jis0208_in.txt":"6df3030553ffb0a6615bb33dc8ea9dca6d9623a9028e2ffec754ce3c3da824cc","src/test_data/jis0208_in_ref.txt":"3dc4e6a5e06471942d086b16c9440945e78415f6f3f47e43717e4bc2eac2cdf5","src/test_data/jis0208_out.txt":"4ec24477e1675ce750733bdc3c5add1cd27b6bd4ce1f09289564646e9654e857","src/test_data/jis0208_out_ref.txt":"c3e1cef5032b2b1d93a406f31ff940c4e2dfe8859b8b17ca2761fee7a75a0e48","src/test_data/jis0212_in.txt":"c011f0dd72bd7c8cd922df9374ef8d2769a77190514c77f6c62b415852eeb9fe","src/test_data/jis0212_in_ref.txt":"7d9458b3d2f73e7092a7f505c08ce1d233dde18aa679fbcf9889256239cc9e06","src/test_data/shift_jis_in.txt":"02e389ccef0dd2122e63f503899402cb7f797912c2444cc80ab93131116c5524","src/test_data/shift_jis_in_ref.txt":"512f985950ca902e643c88682dba9708b7c38d3c5ec2925168ab00ac94ab19f9","src/test_data/shift_jis_out.txt":"5fbc44da7bf639bf6cfe0fa1fd3eba7102b88f81919c9ea991302712f69426fb","src/test_data/shift_jis_out_ref.txt":"466322c6fed8286c64582731755290c2296508efdd258826e6279686649b481f","src/test_labels_names.rs":"23a2e11b02b3b8d15fb5613a625e3edb2c61e70e3c581abfd638719a4088200d","src/testing.rs":"f59e671e95a98a56f6b573e8c6be4d71e670bf52f7e20eb1605d990aafa1894e","src/utf_16.rs":"c071a147fad38d750c2c247e141b76b929a48007b99f26b2922b9caecdaf2f25","src/utf_8.rs":"7b7d887b347f1aefa03246b028a36a72758a4ce76c28f3b45c19467851aa7839","src/variant.rs":"1fab5363588a1554a7169de8731ea9cded7ac63ea35caabdd1c27a8dde68c27b","src/x_user_defined.rs":"c9c010730dfb9f141d4fed19350c08a21af240913a54bb64f5ca89ff93b6b7d1"},"package":"7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"} -\ No newline at end of file -+{"files":{"CONTRIBUTING.md":"ca1901f3e8532fb4cec894fd3664f0eaa898c0c4b961d1b992d1ed54eacf362a","COPYRIGHT":"11789f45bb180841cd362a5eee6789c68ddb573a11105e30768c308a6add0190","Cargo.toml":"22a4d210c92dae9f32c6944ef340ee8fdd027f99c081577e8907123e2a93383e","Ideas.md":"b7452893f500163868d8de52c09addaf91e1632454ed02e892c467ed7ec39dbd","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"3fa4ca83dcc9237839b1bdeb2e6d16bdfb5ec0c5ce42b24694d8bbf0dcbef72c","LICENSE-WHATWG":"838118388fe5c2e7f1dbbaeed13e1c7f3ebf88be91319c7c1d77c18e987d1a50","README.md":"1d08aefcb92afa81b18154049c9abbcad4540a23f7172e9f9bbed5af33f1a087","ci/miri.sh":"43cb8d82f49e3bfe2d2274b6ccd6f0714a4188ccef0cecc040829883cfdbee25","doc/Big5.txt":"f73a2edc5cb6c2d140ba6e07f4542e1c4a234950378acde1df93480f0ca0be0b","doc/EUC-JP.txt":"ee2818b907d0137f40a9ab9fd525fc700a44dbdddb6cf0c157a656566bae4bf1","doc/EUC-KR.txt":"71d9e2ccf3b124e8bdfb433c8cf2773fd878077038d0cec3c7237a50f4a78a30","doc/GBK.txt":"c1b522b5a799884e5001da661f42c5a8f4d0acb9ef1d74b206f22b5f65365606","doc/IBM866.txt":"a5a433e804d0f83af785015179fbc1d9b0eaf1f7960efcd04093e136b51fbd0e","doc/ISO-2022-JP.txt":"af86684f5a8f0e2868d7b2c292860140c3d2e5527530ca091f1b28198e8e2fe6","doc/ISO-8859-10.txt":"6d3949ad7c81ca176895101ed81a1db7df1060d64e262880b94bd31bb344ab4d","doc/ISO-8859-13.txt":"3951dd89cf93f7729148091683cf8511f4529388b7dc8dcd0d62eaed55be93fa","doc/ISO-8859-14.txt":"3d330784a0374fd255a38b47949675cc7168c800530534b0a01cac6edc623adc","doc/ISO-8859-15.txt":"24b1084aab5127a85aab99153f86e24694d0a3615f53b5ce23683f97cf66c47a","doc/ISO-8859-16.txt":"ce0272559b92ba76d7a7e476f6424ae4a5cc72e75b183611b08392e44add4d25","doc/ISO-8859-2.txt":"18ceff88c13d1b5ba455a3919b1e3de489045c4c3d2dd7e8527c125c75d54aad","doc/ISO-8859-3.txt":"21798404c68f4f5db59223362f24999da96968c0628427321fccce7d2849a130","doc/ISO-8859-4.txt":"d27f6520c6c5bfbcc19176b71d081cdb3bccde1622bb3e420d5680e812632d53","doc/ISO-8859-5.txt":"a10ec8d6ea7a78ad15da7275f6cb1a3365118527e28f9af6d0d5830501303f3a","doc/ISO-8859-6.txt":"ccda8a2efc96115336bdd77776637b9712425e44fbcf745353b9057fbef144e7","doc/ISO-8859-7.txt":"17900fa1f27a445958f0a77d7d9056be375a6bd7ee4492aa680c7c1500bab85e","doc/ISO-8859-8-I.txt":"8357555646d54265a9b9ffa3e68b08d132312f1561c60108ff9b8b1167b6ecf2","doc/ISO-8859-8.txt":"72cd6f3afb7b4a9c16a66a362473315770b7755d72c86c870e52fc3eba86c8af","doc/KOI8-R.txt":"839cf19a38da994488004ed7814b1f6151640156a9a2af02bf2efca745fb5966","doc/KOI8-U.txt":"0cc76624ed1f024183e2298b7e019957da2c70c8ca06e0fc4e6f353f50a5054f","doc/Shift_JIS.txt":"34c49141818cb9ddbcf59cc858f78a79be8ad148d563f26415108ae1f148443f","doc/UTF-16BE.txt":"e2e280d8acbaa6d2a6b3569d60e17500a285f2baa0df3363dd85537cd5a1ef8f","doc/UTF-16LE.txt":"70bdc170e3fc5298ba68f10125fb5eeb8b077036cc96bb4416c4de396f6d76c1","doc/UTF-8.txt":"ea7bae742e613010ced002cf4b601a737d2203fad65e115611451bc4428f548a","doc/gb18030.txt":"dc71378a8f07a2d8659f69ee81fb8791fef56ba86f124b429978285237bb4a7b","doc/macintosh.txt":"57491e53866711b4672d9b9ff35380b9dac9e0d8e3d6c20bdd6140603687c023","doc/replacement.txt":"4b6c3bbd7999d9d4108a281594bd02d13607e334a95465afff8c2c08d395f0e4","doc/windows-1250.txt":"61296bb6a21cdab602300d32ecfba434cb82de5ac3bc88d58710d2f125e28d39","doc/windows-1251.txt":"7deea1c61dea1485c8ff02db2c7d578db7a9aab63ab1cfd02ec04b515864689e","doc/windows-1252.txt":"933ef3bdddfce5ee132b9f1a1aa8b47423d2587bbe475b19028d0a6d38e180b6","doc/windows-1253.txt":"1a38748b88e99071a5c7b3d5456ead4caedeabab50d50d658be105bc113714de","doc/windows-1254.txt":"f8372f86c6f8d642563cd6ddc025260553292a39423df1683a98670bd7bf2b47","doc/windows-1255.txt":"4e5852494730054e2da258a74e1b9d780abbcdd8ce22ebc218ca2efe9e90493d","doc/windows-1256.txt":"c0879c5172abedead302a406e8f60d9cd9598694a0ffa4fd288ffe4fef7b8ea1","doc/windows-1257.txt":"c28a0c9f964fcb2b46d21f537c402446501a2800670481d6abf9fd9e9018d523","doc/windows-1258.txt":"5019ae4d61805c79aacbf17c93793342dbb098d65a1837783bc3e2c6d6a23602","doc/windows-874.txt":"4ef0e4501c5feba8b17aee1818602ed44b36ca8475db771ce2fc16d392cabecc","doc/x-mac-cyrillic.txt":"58be154d8a888ca3d484b83b44f749823ef339ab27f14d90ca9a856f5050a8bd","doc/x-user-defined.txt":"f9cd07c4321bf5cfb0be4bdddd251072999b04a6cf7a6f5bc63709a84e2c1ffc","generate-encoding-data.py":"be989dd25c6b946e3e8745fdc8e8a80fcf24b3be99ad0b4b78153ba3f6ab6310","rustfmt.toml":"85c1a3b4382fd89e991cbb81b70fb52780472edc064c963943cdaaa56e0a2030","src/ascii.rs":"588e38b01e666d5e7462617ea7e90a108d608dec9e016f3d273ac0744af2e05d","src/big5.rs":"ec6e2913011a38e9a3e825a1731f139a7ca1d5b264fefae51a3cc1a68a57cef9","src/data.rs":"8a617cc57032092d65850eb27e00de687c80aea3299e839a1f58b42d0b35abf3","src/euc_jp.rs":"32047f5b540188c4cb19c07165f846b9786a09f18e315ed3e9bda1293dae52aa","src/euc_kr.rs":"9b25afc72d9378700eecfac58d55ad1c5946d6cd0ccde2c29c08200ef2de6bb9","src/gb18030.rs":"808587168d73f0c80f8520f0ca9b161866ed2efeb17a05e85fdf3b8efe7ba28a","src/handles.rs":"b08cef1f5785bb6a4822f2e844c6df1b046b737b7a075e4593eaa8c4208e9fe2","src/iso_2022_jp.rs":"9bb485e82574f4b7d4b2364f0ff276acb6a0bc111758420a3b0ec5e04c196652","src/lib.rs":"834f44b670ec48ee82c0e12223d1567313fdd9f88bca5f4b117c82c1828f559f","src/macros.rs":"200997f8870de8bfd8cdc475e92115df42108c0df661e49d3d1cbc32056e1d99","src/mem.rs":"948571137d3b151df8db4fb2c733e74ae595d055cdf0ad83abcab9341d6adabe","src/replacement.rs":"7660b34a53f8c1ca2bdfa0e51e843ec28326950952ad8bc96569feb93ac62308","src/shift_jis.rs":"6951ae67e36b1a12fa3a30734957f444d8b1b4ae0e2bde52060b29bd0f16d9d9","src/simd_funcs.rs":"05c6e77af74bfe73cd39a752067c11425d6b46e5da419910f54bf75a5c02a984","src/single_byte.rs":"3ad87116fb339434a4b58e8f2b15485f2b66b9f7814d708f16194ed08f6d6ccf","src/test_data/big5_in.txt":"4c5a8691f8dc717311889c63894026d2fb62725a86c4208ca274a9cc8d42a503","src/test_data/big5_in_ref.txt":"99d399e17750cf9c7cf30bb253dbfe35b81c4fcbdead93cfa48b1429213473c7","src/test_data/big5_out.txt":"6193ca97c297aa20e09396038d18e938bb7ea331c26f0f2454097296723a0b13","src/test_data/big5_out_ref.txt":"36567691f557df144f6cc520015a87038dfa156f296fcf103b56ae9a718be1fc","src/test_data/euc_kr_in.txt":"c86a7224f3215fa0d04e685622a752fdc72763e8ae076230c7fd62de57ec4074","src/test_data/euc_kr_in_ref.txt":"1f419f4ca47d708b54c73c461545a022ae2e20498fdbf8005a483d752a204883","src/test_data/euc_kr_out.txt":"e7f32e026f70be1e1b58e0047baf7d3d2c520269c4f9b9992e158b4decb0a1a3","src/test_data/euc_kr_out_ref.txt":"c9907857980b20b8e9e3b584482ed6567a2be6185d72237b6322f0404944924e","src/test_data/gb18030_in.txt":"ab7231b2d3e9afacdbd7d7f3b9e5361a7ff9f7e1cfdb4f3bd905b9362b309e53","src/test_data/gb18030_in_ref.txt":"dc5069421adca2043c55f5012b55a76fdff651d22e6e699fd0978f8d5706815c","src/test_data/gb18030_out.txt":"f0208d527f5ca63de7d9a0323be8d5cf12d8a104b2943d92c2701f0c3364dac1","src/test_data/gb18030_out_ref.txt":"6819fe47627e4ea01027003fc514b9f21a1322e732d7f1fb92cc6c5455bc6c07","src/test_data/iso_2022_jp_in.txt":"cd24bbdcb1834e25db54646fbf4c41560a13dc7540f6be3dba4f5d97d44513af","src/test_data/iso_2022_jp_in_ref.txt":"3dc4e6a5e06471942d086b16c9440945e78415f6f3f47e43717e4bc2eac2cdf5","src/test_data/iso_2022_jp_out.txt":"9b6f015329dda6c3f9ee5ce6dbd6fa9c89acc21283e886836c78b8d833480c21","src/test_data/iso_2022_jp_out_ref.txt":"78cb260093a20116ad9a42f43b05d1848c5ab100b6b9a850749809e943884b35","src/test_data/jis0208_in.txt":"6df3030553ffb0a6615bb33dc8ea9dca6d9623a9028e2ffec754ce3c3da824cc","src/test_data/jis0208_in_ref.txt":"3dc4e6a5e06471942d086b16c9440945e78415f6f3f47e43717e4bc2eac2cdf5","src/test_data/jis0208_out.txt":"4ec24477e1675ce750733bdc3c5add1cd27b6bd4ce1f09289564646e9654e857","src/test_data/jis0208_out_ref.txt":"c3e1cef5032b2b1d93a406f31ff940c4e2dfe8859b8b17ca2761fee7a75a0e48","src/test_data/jis0212_in.txt":"c011f0dd72bd7c8cd922df9374ef8d2769a77190514c77f6c62b415852eeb9fe","src/test_data/jis0212_in_ref.txt":"7d9458b3d2f73e7092a7f505c08ce1d233dde18aa679fbcf9889256239cc9e06","src/test_data/shift_jis_in.txt":"02e389ccef0dd2122e63f503899402cb7f797912c2444cc80ab93131116c5524","src/test_data/shift_jis_in_ref.txt":"512f985950ca902e643c88682dba9708b7c38d3c5ec2925168ab00ac94ab19f9","src/test_data/shift_jis_out.txt":"5fbc44da7bf639bf6cfe0fa1fd3eba7102b88f81919c9ea991302712f69426fb","src/test_data/shift_jis_out_ref.txt":"466322c6fed8286c64582731755290c2296508efdd258826e6279686649b481f","src/test_labels_names.rs":"23a2e11b02b3b8d15fb5613a625e3edb2c61e70e3c581abfd638719a4088200d","src/testing.rs":"f59e671e95a98a56f6b573e8c6be4d71e670bf52f7e20eb1605d990aafa1894e","src/utf_16.rs":"c071a147fad38d750c2c247e141b76b929a48007b99f26b2922b9caecdaf2f25","src/utf_8.rs":"7b7d887b347f1aefa03246b028a36a72758a4ce76c28f3b45c19467851aa7839","src/variant.rs":"1fab5363588a1554a7169de8731ea9cded7ac63ea35caabdd1c27a8dde68c27b","src/x_user_defined.rs":"9456ca46168ef86c98399a2536f577ef7be3cdde90c0c51392d8ac48519d3fae"},"package":"b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"} diff --git a/www/firefox-esr/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn b/www/firefox-esr/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn index c865374a24e2..331a94015301 100644 --- a/www/firefox-esr/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn +++ b/www/firefox-esr/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn @@ -1,37 +1,141 @@ ---- third_party/libwebrtc/build/config/BUILDCONFIG.gn.orig 2022-10-09 20:42:58.113963000 +0200 -+++ third_party/libwebrtc/build/config/BUILDCONFIG.gn 2022-10-09 20:46:16.128220000 +0200 -@@ -132,6 +132,7 @@ +commit 93615ae859d1d819b33bbe0e32c5260a467b3625 +Author: Christoph Moench-Tegeder + + enable pipewire on bsd + +diff --git third_party/libwebrtc/BUILD.gn third_party/libwebrtc/BUILD.gn +index 6eb14773b0a7..d63fd1d5529f 100644 +--- third_party/libwebrtc/BUILD.gn ++++ third_party/libwebrtc/BUILD.gn +@@ -106,7 +106,7 @@ if (!build_with_chromium && !build_with_mozilla) { + "tools_webrtc/perf:webrtc_dashboard_upload", + ] + } +- if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + deps += [ "modules/desktop_capture:shared_screencast_stream_test" ] + } + if (is_fuchsia) { +diff --git third_party/libwebrtc/build/config/BUILDCONFIG.gn third_party/libwebrtc/build/config/BUILDCONFIG.gn +index 571ae5f0d60d..863d428fc676 100644 +--- third_party/libwebrtc/build/config/BUILDCONFIG.gn ++++ third_party/libwebrtc/build/config/BUILDCONFIG.gn +@@ -132,6 +132,7 @@ declare_args() { # Set to true when compiling with the Clang compiler. is_clang = current_os != "linux" || current_os == "openbsd" || + current_os == "freebsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64" && -@@ -184,7 +185,7 @@ +@@ -184,7 +185,7 @@ if (host_toolchain == "") { # TODO(dpranke): Add some sort of assert here that verifies that # no toolchain omitted host_toolchain from its toolchain_args(). - if (host_os == "linux" || host_os == "openbsd") { + if (host_os == "linux" || host_os == "openbsd" || host_os == "freebsd") { if (target_os != "linux") { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" } else if (is_clang) { -@@ -222,7 +223,7 @@ +@@ -222,7 +223,7 @@ if (target_os == "android") { assert(host_os == "linux" || host_os == "mac", "Android builds are only supported on Linux and Mac hosts.") _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" -} else if (target_os == "chromeos" || target_os == "linux" || target_os == "openbsd") { +} else if (target_os == "chromeos" || target_os == "linux" || target_os == "openbsd" || target_os == "freebsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" -@@ -288,7 +289,7 @@ +@@ -288,7 +289,7 @@ is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" is_linux = current_os == "linux" -is_bsd = current_os == "openbsd" +is_bsd = current_os == "openbsd" || current_os == "freebsd" is_mac = current_os == "mac" is_nacl = current_os == "nacl" is_win = current_os == "win" || current_os == "winuwp" +diff --git third_party/libwebrtc/modules/desktop_capture/BUILD.gn third_party/libwebrtc/modules/desktop_capture/BUILD.gn +index c184e2fbbcac..e1af29734d8b 100644 +--- third_party/libwebrtc/modules/desktop_capture/BUILD.gn ++++ third_party/libwebrtc/modules/desktop_capture/BUILD.gn +@@ -75,7 +75,7 @@ if (rtc_include_tests) { + "window_finder_unittest.cc", + ] + +- if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + configs += [ "../portal:gio" ] + } + +@@ -87,7 +87,7 @@ if (rtc_include_tests) { + } + } + +- if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + rtc_test("shared_screencast_stream_test") { + testonly = true + +@@ -146,7 +146,7 @@ if (rtc_include_tests) { + "test_utils_unittest.cc", + ] + +- if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + configs += [ "../portal:gio" ] + } + +@@ -255,7 +255,7 @@ if (rtc_include_tests) { + "mock_desktop_capturer_callback.h", + ] + +- if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++ if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + configs += [ "../portal:gio" ] + } + +@@ -268,7 +268,7 @@ if (rtc_include_tests) { + } + + # TODO(bugs.webrtc.org/14187): remove when all users are gone +-if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + config("pipewire_config") { + configs = [ "../portal:pipewire_config" ] + } +@@ -326,7 +326,7 @@ rtc_library("desktop_capture") { + "window_finder.cc", + "window_finder.h", + ] +- if (is_linux && !is_castos && rtc_use_pipewire) { ++ if ((is_linux || is_bsd) && !is_castos && rtc_use_pipewire) { + sources += [ "desktop_capture_metadata.h" ] + } + if (is_mac) { +diff --git third_party/libwebrtc/modules/portal/BUILD.gn third_party/libwebrtc/modules/portal/BUILD.gn +index d7768b2323c9..3593a6959277 100644 +--- third_party/libwebrtc/modules/portal/BUILD.gn ++++ third_party/libwebrtc/modules/portal/BUILD.gn +@@ -10,7 +10,7 @@ import("//build/config/linux/pkg_config.gni") + import("//tools/generate_stubs/rules.gni") + import("../../webrtc.gni") + +-if ((is_linux || is_chromeos) && rtc_use_pipewire) { ++if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { + if (!build_with_mozilla) { + pkg_config("gio") { + packages = [ +diff --git third_party/libwebrtc/webrtc.gni third_party/libwebrtc/webrtc.gni +index b1db8ff88415..64e0cb8f7c79 100644 +--- third_party/libwebrtc/webrtc.gni ++++ third_party/libwebrtc/webrtc.gni +@@ -153,7 +153,7 @@ declare_args() { + # By default it's only enabled on desktop Linux (excludes ChromeOS) and + # only when using the sysroot as PipeWire is not available in older and + # supported Ubuntu and Debian distributions. +- rtc_use_pipewire = is_linux && use_sysroot ++ rtc_use_pipewire = (is_linux || is_bsd) && use_sysroot + + # Set this to link PipeWire and required libraries directly instead of using the dlopen. + rtc_link_pipewire = false diff --git a/www/firefox-esr/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc b/www/firefox-esr/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc new file mode 100644 index 000000000000..e83c56760a7c --- /dev/null +++ b/www/firefox-esr/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc @@ -0,0 +1,26 @@ +commit 3524023ca1d2184ab9a5a7cc61695923e6834cc1 +Author: Christoph Moench-Tegeder + + avoid linux-only includes + +diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +index 6a019c64b4b3..18bb43d797dd 100644 +--- third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc ++++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +@@ -10,12 +10,16 @@ + + #include "modules/desktop_capture/linux/wayland/egl_dmabuf.h" + ++#if !defined(__FreeBSD__) + #include ++#endif + #include + #include + #include + #include ++#if !defined(__FreeBSD__) + #include ++#endif + #include + #include + #include diff --git a/www/firefox-esr/files/patch-toolkit_xre_glxtest.cpp b/www/firefox-esr/files/patch-toolkit_xre_glxtest.cpp deleted file mode 100644 index a054f2032cd2..000000000000 --- a/www/firefox-esr/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/firefox-esr/files/patch-tools_profiler_core_patform.cpp b/www/firefox-esr/files/patch-tools_profiler_core_patform.cpp deleted file mode 100644 index 905e6d7bbe49..000000000000 --- a/www/firefox-esr/files/patch-tools_profiler_core_patform.cpp +++ /dev/null @@ -1,51 +0,0 @@ -commit 45a7951cb6a9b1735b9b6cec89db69b5933715c7 -Author: Christoph Moench-Tegeder -Date: Mon Mar 28 21:54:35 2022 +0200 - - FreeBSD can use sched_getcpu() from 1400046/1300524 on - -diff --git tools/profiler/core/platform.cpp tools/profiler/core/platform.cpp -index 92bcc1100687..2f17a88942a8 100644 ---- tools/profiler/core/platform.cpp -+++ tools/profiler/core/platform.cpp -@@ -111,6 +111,20 @@ - # include - #endif - -+#if defined(GP_OS_freebsd) -+#include -+// "after making CPU_SET macros compatible with glibc" -+# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000) -+# include -+# else -+# if __x86_64__ || __i386__ -+// similar cpuid_count() trick as on Darwin, using LLVM -+// but not for all CPUs -+# include -+# endif -+# endif -+#endif -+ - #if defined(GP_OS_windows) - # include - -@@ -6368,6 +6382,19 @@ void profiler_mark_thread_awake() { - cpuId = ebx >> 24; - } - # endif -+#elif defined(GP_OS_freebsd) -+# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000) -+ cpuId = sched_getcpu(); -+# elif defined(__amd64__) -+ unsigned int eax, ebx, ecx, edx; -+ __cpuid_count(1, 0, eax, ebx, ecx, edx); -+ // Check if we have an APIC. -+ if ((edx & (1 << 9))) { -+ // APIC ID is bits 24-31 of EBX -+ cpuId = ebx >> 24; -+ } -+# endif -+// the fallthrough is cpuID = 0 - #else - cpuId = sched_getcpu(); - #endif