git: c1247004ce35 - 2025Q1 - www/firefox: update to 135.0 (rc1)

From: Christoph Moench-Tegeder <cmt_at_FreeBSD.org>
Date: Tue, 28 Jan 2025 18:06:19 UTC
The branch 2025Q1 has been updated by cmt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c1247004ce35027f1644dfa158f3f53437125d0a

commit c1247004ce35027f1644dfa158f3f53437125d0a
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2025-01-28 18:05:16 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2025-01-28 18:06:07 +0000

    www/firefox: update to 135.0 (rc1)
    
    Release Notes (soon):
      https://www.mozilla.org/en-US/firefox/135.0/releasenotes/
    
    (cherry picked from commit ca17226d49043b1e13d9c1e177f90ed6aedae39f)
---
 www/firefox/Makefile                               |     4 +-
 www/firefox/distinfo                               |     6 +-
 .../patch-ipc_glue_SharedMemoryPlatform__posix.cpp |    21 +
 www/firefox/files/patch-libwebrtc-generated        | 31435 +++++++++++--------
 ...toolkit_components_processtools_procinfo__bsd.c |    34 +-
 5 files changed, 18496 insertions(+), 13004 deletions(-)

diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 4106b230affe..aebd68be0c33 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	firefox
-DISTVERSION=	134.0.2
+DISTVERSION=	135.0
 PORTEPOCH=	2
 CATEGORIES=	www wayland
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \
@@ -18,7 +18,7 @@ BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
 		graphite2>=1.3.14:graphics/graphite2 \
 		png>=1.6.44:graphics/png \
 		dav1d>=1.0.0:multimedia/dav1d \
-		libvpx>=1.14.1:multimedia/libvpx \
+		libvpx>=1.15.0:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
 		autoconf2.13:devel/autoconf2.13 \
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 6bcbacf2bba1..772729bd3b44 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1737390512
-SHA256 (firefox-134.0.2.source.tar.xz) = 6c6eb7ff13fa689c5cace23a28533361d1ca29158329b6f1c2f2d1c91c53dd27
-SIZE (firefox-134.0.2.source.tar.xz) = 589962348
+TIMESTAMP = 1738025117
+SHA256 (firefox-135.0.source.tar.xz) = 161f4b3b1f58966399fe57522d7e67e9d266bc070a521cd508ffe3856dc4bd05
+SIZE (firefox-135.0.source.tar.xz) = 611625312
diff --git a/www/firefox/files/patch-ipc_glue_SharedMemoryPlatform__posix.cpp b/www/firefox/files/patch-ipc_glue_SharedMemoryPlatform__posix.cpp
new file mode 100644
index 000000000000..2b16220e87ad
--- /dev/null
+++ b/www/firefox/files/patch-ipc_glue_SharedMemoryPlatform__posix.cpp
@@ -0,0 +1,21 @@
+commit 30b15661a86e10fef4854dcb22e1d6dd6456e680
+Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
+
+    FreeBSD does not have MAP_NORESERVE
+
+diff --git ipc/glue/SharedMemoryPlatform_posix.cpp ipc/glue/SharedMemoryPlatform_posix.cpp
+index 017a7d29c9a3..2e88eeb11c5c 100644
+--- ipc/glue/SharedMemoryPlatform_posix.cpp
++++ ipc/glue/SharedMemoryPlatform_posix.cpp
+@@ -448,7 +448,11 @@ bool Platform::Protect(char* aAddr, size_t aSize, Access aAccess) {
+ 
+ void* Platform::FindFreeAddressSpace(size_t aSize) {
+   void* memory = mmap(nullptr, aSize, PROT_NONE,
++#ifdef __FreeBSD__
++                      MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
++#else
+                       MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
++#endif
+   if (memory == MAP_FAILED) {
+     return nullptr;
+   }
diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated
index 23899a159fbf..3c977e38f457 100644
--- a/www/firefox/files/patch-libwebrtc-generated
+++ b/www/firefox/files/patch-libwebrtc-generated
@@ -1,7 +1,7 @@
-commit b465d5265f37456a03dcdee83b470a896c8e6b99
+commit 1a5ba8d67318c2e5dd83348bfc9d1d35db8421b9
 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
 
-    regenerate FreeBSD libwebrtc patch for Firefox 134
+    regenerate FreeBSD libwebrtc patch for Firefox 135
 
 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 a80e5f32ade2..d5a2be24fcbe 100644
@@ -10727,6 +10727,228 @@ index 10d65f922ebe..d27ef50a9725 100644
 +    DEFINES["USE_X11"] = "1"
  
  Library("default_neteq_controller_factory_gn")
+diff --git third_party/libwebrtc/api/neteq/default_neteq_factory_gn/moz.build third_party/libwebrtc/api/neteq/default_neteq_factory_gn/moz.build
+index a7d5369ee523..b4b5d4cc0b4f 100644
+--- third_party/libwebrtc/api/neteq/default_neteq_factory_gn/moz.build
++++ third_party/libwebrtc/api/neteq/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 = "xul"
+ 
+@@ -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["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("default_neteq_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 a4512f3c1f31..1adeffe9858a 100644
 --- third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build
@@ -22561,10 +22783,10 @@ index 30278b672f20..57f08bd2aed8 100644
 -    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 723ee880f3c1..33bec021ef3c 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
+diff --git third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build
+index 4334202f11b5..70504aa2ddcb 100644
+--- third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build
++++ third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build
 @@ -12,11 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -22587,7 +22809,7 @@ index 723ee880f3c1..33bec021ef3c 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,190 +54,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"
@@ -22783,11 +23005,11 @@ index 723ee880f3c1..33bec021ef3c 100644
 -    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 aca8affe6867..f16f4f72c69f 100644
---- third_party/libwebrtc/api/video_codecs/scalability_mode_gn/moz.build
-+++ third_party/libwebrtc/api/video_codecs/scalability_mode_gn/moz.build
+ Library("builtin_video_decoder_factory_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 723ee880f3c1..33bec021ef3c 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
@@ -22810,7 +23032,7 @@ index aca8affe6867..f16f4f72c69f 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,178 +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"
@@ -22830,6 +23052,7 @@ index aca8affe6867..f16f4f72c69f 100644
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
 -    OS_LIBS += [
+-        "GLESv2",
 -        "log"
 -    ]
 -
@@ -22858,6 +23081,10 @@ index aca8affe6867..f16f4f72c69f 100644
 -    DEFINES["__STDC_CONSTANT_MACROS"] = True
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
+-    OS_LIBS += [
+-        "rt"
+-    ]
+-
 -if CONFIG["OS_TARGET"] == "OpenBSD":
 -
 -    DEFINES["USE_GLIB"] = "1"
@@ -22898,6 +23125,13 @@ index aca8affe6867..f16f4f72c69f 100644
 -    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":
@@ -22994,11 +23228,11 @@ index aca8affe6867..f16f4f72c69f 100644
 -    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 df8d151dd497..4134dfb41549 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
+ 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 aca8affe6867..f16f4f72c69f 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
@@ -23021,7 +23255,7 @@ index df8d151dd497..4134dfb41549 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -53,185 +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"
@@ -23109,13 +23343,6 @@ index df8d151dd497..4134dfb41549 100644
 -    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":
@@ -23212,11 +23439,11 @@ index df8d151dd497..4134dfb41549 100644
 -    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 a197fc9fdcc5..92b38446400e 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
+ 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 df8d151dd497..4134dfb41549 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
@@ -23239,7 +23466,7 @@ index a197fc9fdcc5..92b38446400e 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -53,185 +63,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -23259,7 +23486,6 @@ index a197fc9fdcc5..92b38446400e 100644
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
 -    OS_LIBS += [
--        "GLESv2",
 -        "log"
 -    ]
 -
@@ -23288,10 +23514,6 @@ index a197fc9fdcc5..92b38446400e 100644
 -    DEFINES["__STDC_CONSTANT_MACROS"] = True
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
--    OS_LIBS += [
--        "rt"
--    ]
--
 -if CONFIG["OS_TARGET"] == "OpenBSD":
 -
 -    DEFINES["USE_GLIB"] = "1"
@@ -23435,11 +23657,11 @@ index a197fc9fdcc5..92b38446400e 100644
 -    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 f6456b10c949..3ebe854e0841 100644
---- third_party/libwebrtc/api/video_track_source_constraints_gn/moz.build
-+++ third_party/libwebrtc/api/video_track_source_constraints_gn/moz.build
+ Library("video_codecs_api_gn")
+diff --git third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_gn/moz.build third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_gn/moz.build
+index 2a469a56b0b1..fae685811732 100644
+--- third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_gn/moz.build
++++ third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_gn/moz.build
 @@ -12,11 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -23462,7 +23684,7 @@ index f6456b10c949..3ebe854e0841 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,107 +49,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"
@@ -23481,6 +23703,10 @@ index f6456b10c949..3ebe854e0841 100644
 -    DEFINES["__STDC_CONSTANT_MACROS"] = True
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
+-    OS_LIBS += [
+-        "log"
+-    ]
+-
 -if CONFIG["OS_TARGET"] == "Darwin":
 -
 -    DEFINES["WEBRTC_MAC"] = True
@@ -23546,6 +23772,13 @@ index f6456b10c949..3ebe854e0841 100644
 -    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":
@@ -23571,7 +23804,7 @@ index f6456b10c949..3ebe854e0841 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -149,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -160,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -23622,11 +23855,11 @@ index f6456b10c949..3ebe854e0841 100644
 -
 -    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 7e907152932a..26e74709eca4 100644
---- third_party/libwebrtc/audio/audio_gn/moz.build
-+++ third_party/libwebrtc/audio/audio_gn/moz.build
+ Library("video_encoder_factory_template_gn")
+diff --git third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libaom_av1_adapter_gn/moz.build third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libaom_av1_adapter_gn/moz.build
+index 1fbefd3e1b1b..28873cb4a203 100644
+--- third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libaom_av1_adapter_gn/moz.build
++++ third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libaom_av1_adapter_gn/moz.build
 @@ -12,11 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -23649,7 +23882,7 @@ index 7e907152932a..26e74709eca4 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -55,190 +65,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"
@@ -23669,7 +23902,6 @@ index 7e907152932a..26e74709eca4 100644
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
 -    OS_LIBS += [
--        "GLESv2",
 -        "log"
 -    ]
 -
@@ -23758,10 +23990,6 @@ index 7e907152932a..26e74709eca4 100644
  
 -if CONFIG["TARGET_CPU"] == "arm":
 -
--    CXXFLAGS += [
--        "-mfpu=neon"
--    ]
--
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
@@ -23778,12 +24006,213 @@ index 7e907152932a..26e74709eca4 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+@@ -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":
 -
--if CONFIG["TARGET_CPU"] == "x86_64":
+-    DEFINES["_DEBUG"] = True
 -
--    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["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_encoder_factory_template_libaom_av1_adapter_gn")
+diff --git third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter_gn/moz.build third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter_gn/moz.build
+index f285414fc561..d483e4f3cf9c 100644
+--- third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter_gn/moz.build
++++ third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp8_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 = "xul"
+ 
+@@ -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["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":
+ 
+@@ -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
@@ -23805,21 +24234,16 @@ index 7e907152932a..26e74709eca4 100644
 -    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
 -
 -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
--
--    DEFINES["USE_X11"] = "1"
--
++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"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
--
-     CXXFLAGS += [
-         "-msse2"
-     ]
- 
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
 -
 -    DEFINES["_GNU_SOURCE"] = True
@@ -23829,27 +24253,18 @@ index 7e907152932a..26e74709eca4 100644
 -    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("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 513ee2df29a4..6e04ad3c6c6c 100644
---- third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build
-+++ third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build
+-
+ Library("video_encoder_factory_template_libvpx_vp8_adapter_gn")
+diff --git third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter_gn/moz.build third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter_gn/moz.build
+index a618ccac0a1e..94c966467e42 100644
+--- third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter_gn/moz.build
++++ third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter_gn/moz.build
 @@ -12,11 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -23872,7 +24287,7 @@ index 513ee2df29a4..6e04ad3c6c6c 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -45,189 +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"
@@ -23892,6 +24307,7 @@ index 513ee2df29a4..6e04ad3c6c6c 100644
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
 -    OS_LIBS += [
+-        "GLESv2",
 -        "log"
 -    ]
 -
@@ -23980,10 +24396,6 @@ index 513ee2df29a4..6e04ad3c6c6c 100644
  
 -if CONFIG["TARGET_CPU"] == "arm":
 -
--    CXXFLAGS += [
--        "-mfpu=neon"
--    ]
--
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
@@ -24000,12 +24412,10 @@ index 513ee2df29a4..6e04ad3c6c6c 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
--
--if CONFIG["TARGET_CPU"] == "x86_64":
--
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
--
+@@ -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
@@ -24027,21 +24437,16 @@ index 513ee2df29a4..6e04ad3c6c6c 100644
 -    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
 -
 -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
--
--    DEFINES["USE_X11"] = "1"
--
++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"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
--
-     CXXFLAGS += [
-         "-msse2"
-     ]
- 
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
 -
 -    DEFINES["_GNU_SOURCE"] = True
@@ -24051,27 +24456,18 @@ index 513ee2df29a4..6e04ad3c6c6c 100644
 -    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("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 9731da555bb5..4ddc49602b5a 100644
---- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
-+++ third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
+-
+ Library("video_encoder_factory_template_libvpx_vp9_adapter_gn")
+diff --git third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_open_h264_adapter_gn/moz.build third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_open_h264_adapter_gn/moz.build
+index 846208e9f33b..b83e5b1af1fb 100644
+--- third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_open_h264_adapter_gn/moz.build
++++ third_party/libwebrtc/api/video_codecs/video_encoder_factory_template_open_h264_adapter_gn/moz.build
 @@ -12,11 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
*** 43983 LINES SKIPPED ***