aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Moench-Tegeder <cmt@FreeBSD.org>2022-07-14 18:38:39 +0000
committerChristoph Moench-Tegeder <cmt@FreeBSD.org>2022-07-14 18:38:39 +0000
commit5db62413655cd5f25756b23012d0e8390f0917c5 (patch)
tree31c8b055290e673977438886ec909412dc22d3d0
parentfe1442386028d94ca07e1a633db209dce459f498 (diff)
downloadports-5db62413655cd5f25756b23012d0e8390f0917c5.tar.gz
ports-5db62413655cd5f25756b23012d0e8390f0917c5.zip
www/firefox: regenerate libwebrtc build files
this seems to fix the build on i386. PR: 264857
-rw-r--r--www/firefox/files/patch-libwebrtc-generated7013
1 files changed, 3678 insertions, 3335 deletions
diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated
index c1052ad4cca1..90d481d0446f 100644
--- a/www/firefox/files/patch-libwebrtc-generated
+++ b/www/firefox/files/patch-libwebrtc-generated
@@ -1,14 +1,15 @@
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 3dffbc4abb..aac5d092ef 100644
+index 989f348be6cc..db0bcfcded11 100644
--- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
+++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -20,7 +21,7 @@ index 3dffbc4abb..aac5d092ef 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -31,7 +32,7 @@ index 3dffbc4abb..aac5d092ef 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -42,30 +43,31 @@ index 3dffbc4abb..aac5d092ef 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build
-index aca9f59966..1ea31b6a5e 100644
+index b9e9f3dd7ff9..9df1a7163a5a 100644
--- third_party/libwebrtc/api/array_view_gn/moz.build
+++ third_party/libwebrtc/api/array_view_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -77,7 +79,7 @@ index aca9f59966..1ea31b6a5e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -88,7 +90,7 @@ index aca9f59966..1ea31b6a5e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -100,16 +102,17 @@ index aca9f59966..1ea31b6a5e 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
-index 861233bfeb..c2f87155bb 100644
+index fa1cc1f3a3ab..da73ac5884e9 100644
--- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
+++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -121,7 +124,7 @@ index 861233bfeb..c2f87155bb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -132,7 +135,7 @@ index 861233bfeb..c2f87155bb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -143,30 +146,31 @@ index 861233bfeb..c2f87155bb 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-index 2421e514b6..6a6fc577a5 100644
+index 7b2186be89a1..15ac3dd39810 100644
--- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
+++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -178,7 +182,7 @@ index 2421e514b6..6a6fc577a5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -189,7 +193,7 @@ index 2421e514b6..6a6fc577a5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -200,30 +204,31 @@ index 2421e514b6..6a6fc577a5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 48abf7cd40..26317d4cf5 100644
+index 4c8a3b864fc7..f185a8a24120 100644
--- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
+++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -235,7 +240,7 @@ index 48abf7cd40..26317d4cf5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -246,7 +251,7 @@ index 48abf7cd40..26317d4cf5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -257,30 +262,31 @@ index 48abf7cd40..26317d4cf5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 41222e1e06..5a75494c05 100644
+index da4393f09178..f2381443da31 100644
--- third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
+++ third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -292,7 +298,7 @@ index 41222e1e06..5a75494c05 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -303,7 +309,7 @@ index 41222e1e06..5a75494c05 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -315,16 +321,17 @@ index 41222e1e06..5a75494c05 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-index 132b296b25..df28661dfb 100644
+index d6076e7ff3b3..67851ac54434 100644
--- third_party/libwebrtc/api/audio/echo_control_gn/moz.build
+++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -336,7 +343,7 @@ index 132b296b25..df28661dfb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -347,7 +354,7 @@ index 132b296b25..df28661dfb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -359,16 +366,17 @@ index 132b296b25..df28661dfb 100644
DEFINES["_DEBUG"] = True
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 8499f556e3..92d90abb2d 100644
+index 9663c227a5b4..b3eef064971d 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -380,7 +388,7 @@ index 8499f556e3..92d90abb2d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -391,7 +399,7 @@ index 8499f556e3..92d90abb2d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -402,30 +410,31 @@ index 8499f556e3..92d90abb2d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a5f3673082..58e96dbb98 100644
+index 22fa55066eae..0640946b26c1 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -437,7 +446,7 @@ index a5f3673082..58e96dbb98 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -448,7 +457,7 @@ index a5f3673082..58e96dbb98 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -459,30 +468,31 @@ index a5f3673082..58e96dbb98 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 f7bf17624e..1f8a4a7497 100644
+index 1106e1abb32b..8e79889aa0dc 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
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -494,7 +504,7 @@ index f7bf17624e..1f8a4a7497 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -156,6 +167,10 @@
+@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -505,7 +515,7 @@ index f7bf17624e..1f8a4a7497 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -172,6 +187,10 @@
+@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -516,30 +526,31 @@ index f7bf17624e..1f8a4a7497 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -196,6 +215,12 @@
-
- OS_LIBS += [
+@@ -198,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b52257b6b6..402d787b35 100644
+index e1282ef7fc03..69ba1f8a4679 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
-@@ -71,6 +71,19 @@
+@@ -71,6 +71,20 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
@@ -553,7 +564,7 @@ index b52257b6b6..402d787b35 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -173,6 +186,10 @@
+@@ -173,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -564,7 +575,7 @@ index b52257b6b6..402d787b35 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -189,6 +206,10 @@
+@@ -189,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -575,30 +586,31 @@ index b52257b6b6..402d787b35 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -227,6 +248,12 @@
-
+@@ -228,6 +250,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
-+
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
-
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+ CXXFLAGS += [
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 d84e1656f6..afddfe8bac 100644
+index 059520e68160..5090e540bb39 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
-@@ -71,6 +71,19 @@
+@@ -71,6 +71,20 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
@@ -612,7 +624,7 @@ index d84e1656f6..afddfe8bac 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -173,6 +186,10 @@
+@@ -173,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -623,7 +635,7 @@ index d84e1656f6..afddfe8bac 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -189,6 +206,10 @@
+@@ -189,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -634,30 +646,31 @@ index d84e1656f6..afddfe8bac 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -227,6 +248,12 @@
-
+@@ -228,6 +250,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
-+
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
-
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+ CXXFLAGS += [
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 e39db35128..ec6254de74 100644
+index 7d0a0897c3cf..5ad975a4f42c 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -669,7 +682,7 @@ index e39db35128..ec6254de74 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -680,7 +693,7 @@ index e39db35128..ec6254de74 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -691,30 +704,31 @@ index e39db35128..ec6254de74 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6a431c8970..413d83e455 100644
+index a32cecf159b3..84f15b829971 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -726,7 +740,7 @@ index 6a431c8970..413d83e455 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -737,7 +751,7 @@ index 6a431c8970..413d83e455 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -748,30 +762,31 @@ index 6a431c8970..413d83e455 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 57f9cbdb1a..f1b7612533 100644
+index 843e12faccf6..585faa5e4226 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -783,7 +798,7 @@ index 57f9cbdb1a..f1b7612533 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -794,7 +809,7 @@ index 57f9cbdb1a..f1b7612533 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -805,30 +820,31 @@ index 57f9cbdb1a..f1b7612533 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6b2c8222cf..17d26b56bb 100644
+index da03926a4f06..b8be9937e4e9 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
-@@ -67,6 +67,17 @@
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -840,7 +856,7 @@ index 6b2c8222cf..17d26b56bb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -851,7 +867,7 @@ index 6b2c8222cf..17d26b56bb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -862,30 +878,18 @@ index 6b2c8222cf..17d26b56bb 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
- "android_support"
-+ ]
-+
-+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
-+
-+ CXXFLAGS += [
-+ "-msse2"
- ]
-
- if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
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 bc3dac1e0e..e6d120ffff 100644
+index 58da84e1ffc5..778ad73df1a1 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -897,7 +901,7 @@ index bc3dac1e0e..e6d120ffff 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -908,7 +912,7 @@ index bc3dac1e0e..e6d120ffff 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -919,30 +923,31 @@ index bc3dac1e0e..e6d120ffff 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 ca0df168ef..db603b008d 100644
+index 23249247d88a..4767502bc819 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -954,7 +959,7 @@ index ca0df168ef..db603b008d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -965,7 +970,7 @@ index ca0df168ef..db603b008d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -976,30 +981,31 @@ index ca0df168ef..db603b008d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 4b3a5922de..9410478923 100644
+index 38aaaf79ce6e..9572dd3569e9 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
-@@ -67,6 +67,17 @@
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1011,7 +1017,7 @@ index 4b3a5922de..9410478923 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1022,7 +1028,7 @@ index 4b3a5922de..9410478923 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1033,30 +1039,18 @@ index 4b3a5922de..9410478923 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
- "android_support"
-+ ]
-+
-+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
-+
-+ CXXFLAGS += [
-+ "-msse2"
- ]
-
- if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
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 0fd8a2cd93..3595936b6e 100644
+index 2671d74f6f20..dc1e7eff53a5 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1068,7 +1062,7 @@ index 0fd8a2cd93..3595936b6e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1079,7 +1073,7 @@ index 0fd8a2cd93..3595936b6e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1090,30 +1084,31 @@ index 0fd8a2cd93..3595936b6e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build
-index ea25619a8f..a5418dc87c 100644
+index 7bb2a25e1bff..21895ff9b0d8 100644
--- third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build
+++ third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1125,7 +1120,7 @@ index ea25619a8f..a5418dc87c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -146,6 +157,10 @@
+@@ -146,6 +158,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1136,7 +1131,7 @@ index ea25619a8f..a5418dc87c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -162,6 +177,10 @@
+@@ -162,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1147,30 +1142,31 @@ index ea25619a8f..a5418dc87c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -186,6 +205,12 @@
-
- OS_LIBS += [
+@@ -188,6 +208,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build
-index 63a9de405e..0e8086206d 100644
+index 136d51a9d11f..0caeed45672d 100644
--- third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build
+++ third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build
-@@ -65,6 +65,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -65,6 +65,20 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
@@ -1184,7 +1180,7 @@ index 63a9de405e..0e8086206d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -163,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1195,7 +1191,7 @@ index 63a9de405e..0e8086206d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -179,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1207,16 +1203,17 @@ index 63a9de405e..0e8086206d 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build
-index 80d57e950c..54f305e11b 100644
+index e5e0c94c85ac..41285aea32b7 100644
--- third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build
+++ third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1228,7 +1225,7 @@ index 80d57e950c..54f305e11b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -146,6 +157,10 @@
+@@ -146,6 +158,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1239,7 +1236,7 @@ index 80d57e950c..54f305e11b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -162,6 +177,10 @@
+@@ -162,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1250,30 +1247,31 @@ index 80d57e950c..54f305e11b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -186,6 +205,12 @@
-
- OS_LIBS += [
+@@ -188,6 +208,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build
-index ad8509420e..185c938438 100644
+index 2c253858c30b..59173044b1aa 100644
--- third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build
+++ third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build
-@@ -65,6 +65,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -65,6 +65,20 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
@@ -1287,7 +1285,7 @@ index ad8509420e..185c938438 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -163,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1298,7 +1296,7 @@ index ad8509420e..185c938438 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -179,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1310,16 +1308,17 @@ index ad8509420e..185c938438 100644
DEFINES["_DEBUG"] = True
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 1aac13195a..a7d5573ec5 100644
+index 7d8e698644aa..1f877dcae301 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1331,7 +1330,7 @@ index 1aac13195a..a7d5573ec5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1342,7 +1341,7 @@ index 1aac13195a..a7d5573ec5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1353,30 +1352,31 @@ index 1aac13195a..a7d5573ec5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,12 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 3c14d0afe9..e3e40b8b5b 100644
+index 76634d990fa1..ff84b06f133b 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1388,7 +1388,7 @@ index 3c14d0afe9..e3e40b8b5b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1399,7 +1399,7 @@ index 3c14d0afe9..e3e40b8b5b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1411,16 +1411,17 @@ index 3c14d0afe9..e3e40b8b5b 100644
DEFINES["_DEBUG"] = True
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 18314dfa72..c8c06081f4 100644
+index 08df23072e09..b3f02657530b 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1432,7 +1433,7 @@ index 18314dfa72..c8c06081f4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1443,7 +1444,7 @@ index 18314dfa72..c8c06081f4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1454,30 +1455,31 @@ index 18314dfa72..c8c06081f4 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 58f0062b01..7b9e11054b 100644
+index 087956f82c62..59ae25890c20 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1489,7 +1491,7 @@ index 58f0062b01..7b9e11054b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1500,7 +1502,7 @@ index 58f0062b01..7b9e11054b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1511,36 +1513,31 @@ index 58f0062b01..7b9e11054b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,18 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
+
-+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
-+
-+ CXXFLAGS += [
-+ "-msse2"
- ]
-
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a8f5c61509..5d088626da 100644
+index ca4e861e1294..827b44d5f368 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
-@@ -72,6 +72,17 @@
+@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1552,7 +1549,7 @@ index a8f5c61509..5d088626da 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -158,6 +169,10 @@
+@@ -158,6 +170,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1563,7 +1560,7 @@ index a8f5c61509..5d088626da 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -174,6 +189,10 @@
+@@ -174,6 +190,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1574,30 +1571,31 @@ index a8f5c61509..5d088626da 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -198,6 +217,12 @@
-
- OS_LIBS += [
+@@ -200,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 2afcfb0571..e7d4692406 100644
+index 356c9242cced..c849cfe1932c 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1609,7 +1607,7 @@ index 2afcfb0571..e7d4692406 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1620,7 +1618,7 @@ index 2afcfb0571..e7d4692406 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1631,30 +1629,31 @@ index 2afcfb0571..e7d4692406 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/audio_options_api_gn/moz.build third_party/libwebrtc/api/audio_options_api_gn/moz.build
-index a9ca2f37f6..10636508a1 100644
+index a6d04ed27e88..754589b0ced3 100644
--- third_party/libwebrtc/api/audio_options_api_gn/moz.build
+++ third_party/libwebrtc/api/audio_options_api_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1666,7 +1665,7 @@ index a9ca2f37f6..10636508a1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1677,7 +1676,7 @@ index a9ca2f37f6..10636508a1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1688,30 +1687,31 @@ index a9ca2f37f6..10636508a1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/bitrate_allocation_gn/moz.build third_party/libwebrtc/api/bitrate_allocation_gn/moz.build
-index 2cc056678b..d7121e8987 100644
+index c7e126b5e8d8..bf5958772f47 100644
--- third_party/libwebrtc/api/bitrate_allocation_gn/moz.build
+++ third_party/libwebrtc/api/bitrate_allocation_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1723,7 +1723,7 @@ index 2cc056678b..d7121e8987 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1734,7 +1734,7 @@ index 2cc056678b..d7121e8987 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1746,16 +1746,17 @@ index 2cc056678b..d7121e8987 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/call_api_gn/moz.build third_party/libwebrtc/api/call_api_gn/moz.build
-index c6b01250ea..6fd6f7a615 100644
+index 32af3dea769b..0cf4abbbdbdf 100644
--- third_party/libwebrtc/api/call_api_gn/moz.build
+++ third_party/libwebrtc/api/call_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1767,7 +1768,7 @@ index c6b01250ea..6fd6f7a615 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1778,7 +1779,7 @@ index c6b01250ea..6fd6f7a615 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1790,16 +1791,17 @@ index c6b01250ea..6fd6f7a615 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/callfactory_api_gn/moz.build third_party/libwebrtc/api/callfactory_api_gn/moz.build
-index bb55b07e9f..751c37e99d 100644
+index 9e9118429fb7..fd312666bf00 100644
--- third_party/libwebrtc/api/callfactory_api_gn/moz.build
+++ third_party/libwebrtc/api/callfactory_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1811,7 +1813,7 @@ index bb55b07e9f..751c37e99d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1822,7 +1824,7 @@ index bb55b07e9f..751c37e99d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1834,16 +1836,17 @@ index bb55b07e9f..751c37e99d 100644
DEFINES["_DEBUG"] = True
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 fe4a347c04..b7e372112d 100644
+index 3ed2d8c9bb19..892e1be621f0 100644
--- third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build
+++ third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1855,7 +1858,7 @@ index fe4a347c04..b7e372112d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1866,7 +1869,7 @@ index fe4a347c04..b7e372112d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1878,16 +1881,17 @@ index fe4a347c04..b7e372112d 100644
DEFINES["_DEBUG"] = True
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 aaaaeac661..64ae65e0dc 100644
+index 3340f15d9f18..bd768a3cde6e 100644
--- third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build
+++ third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1899,7 +1903,7 @@ index aaaaeac661..64ae65e0dc 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1910,7 +1914,7 @@ index aaaaeac661..64ae65e0dc 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1922,16 +1926,17 @@ index aaaaeac661..64ae65e0dc 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/crypto/options_gn/moz.build third_party/libwebrtc/api/crypto/options_gn/moz.build
-index 1849070995..f31d4e2240 100644
+index dd951595090e..c36fa96c5e19 100644
--- third_party/libwebrtc/api/crypto/options_gn/moz.build
+++ third_party/libwebrtc/api/crypto/options_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1943,7 +1948,7 @@ index 1849070995..f31d4e2240 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -1954,7 +1959,7 @@ index 1849070995..f31d4e2240 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -1965,30 +1970,31 @@ index 1849070995..f31d4e2240 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/fec_controller_api_gn/moz.build third_party/libwebrtc/api/fec_controller_api_gn/moz.build
-index 4b623b0034..d882c1ebe0 100644
+index 6b4009ab3454..cb0e3addc77e 100644
--- third_party/libwebrtc/api/fec_controller_api_gn/moz.build
+++ third_party/libwebrtc/api/fec_controller_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2000,7 +2006,7 @@ index 4b623b0034..d882c1ebe0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2011,7 +2017,7 @@ index 4b623b0034..d882c1ebe0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2023,16 +2029,17 @@ index 4b623b0034..d882c1ebe0 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build
-index 39a5a04f5a..d202431e5a 100644
+index bf251352f7b9..68f9d900ebc4 100644
--- third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build
+++ third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build
-@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -64,6 +64,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2044,7 +2051,7 @@ index 39a5a04f5a..d202431e5a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2055,7 +2062,7 @@ index 39a5a04f5a..d202431e5a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2067,16 +2074,17 @@ index 39a5a04f5a..d202431e5a 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/function_view_gn/moz.build third_party/libwebrtc/api/function_view_gn/moz.build
-index 67fc4e25a2..ff4bc2082b 100644
+index e7d52742a1ba..f90840b4abb8 100644
--- third_party/libwebrtc/api/function_view_gn/moz.build
+++ third_party/libwebrtc/api/function_view_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2088,7 +2096,7 @@ index 67fc4e25a2..ff4bc2082b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2099,7 +2107,7 @@ index 67fc4e25a2..ff4bc2082b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2111,16 +2119,17 @@ index 67fc4e25a2..ff4bc2082b 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build
-index e2eb369f3e..22954f6943 100644
+index ad7ce43b2fae..60a6a9ed07a7 100644
--- third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build
+++ third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2132,7 +2141,7 @@ index e2eb369f3e..22954f6943 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2143,7 +2152,7 @@ index e2eb369f3e..22954f6943 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2155,16 +2164,17 @@ index e2eb369f3e..22954f6943 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/media_stream_interface_gn/moz.build third_party/libwebrtc/api/media_stream_interface_gn/moz.build
-index 90856a4e62..b709d70d24 100644
+index a3a735b26fe7..fc0752bbc3b2 100644
--- third_party/libwebrtc/api/media_stream_interface_gn/moz.build
+++ third_party/libwebrtc/api/media_stream_interface_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2176,7 +2186,7 @@ index 90856a4e62..b709d70d24 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2187,7 +2197,7 @@ index 90856a4e62..b709d70d24 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2198,30 +2208,31 @@ index 90856a4e62..b709d70d24 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 0b2386cefd..73d24403a1 100644
+index 70143324c945..8d4b164a8743 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2233,7 +2244,7 @@ index 0b2386cefd..73d24403a1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2244,7 +2255,7 @@ index 0b2386cefd..73d24403a1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2255,30 +2266,31 @@ index 0b2386cefd..73d24403a1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build
-index b1fa978fd0..18e69e0265 100644
+index 382532804568..132559343498 100644
--- third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build
+++ third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2290,7 +2302,7 @@ index b1fa978fd0..18e69e0265 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2301,7 +2313,7 @@ index b1fa978fd0..18e69e0265 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2312,30 +2324,31 @@ index b1fa978fd0..18e69e0265 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a250cf1b72..1bcbb5ffa8 100644
+index e74c5784e4a3..4e30b4cfc59e 100644
--- third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build
+++ third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2347,7 +2360,7 @@ index a250cf1b72..1bcbb5ffa8 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -152,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2358,7 +2371,7 @@ index a250cf1b72..1bcbb5ffa8 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -168,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2370,16 +2383,17 @@ index a250cf1b72..1bcbb5ffa8 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build
-index 179458a984..d77bb4cb7a 100644
+index a34927641e4a..5a9e0e130e5d 100644
--- third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build
+++ third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2391,7 +2405,7 @@ index 179458a984..d77bb4cb7a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2402,7 +2416,7 @@ index 179458a984..d77bb4cb7a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2413,30 +2427,31 @@ index 179458a984..d77bb4cb7a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 1a5b0bf109..fa02a56f8e 100644
+index 9591324717bb..4c614859a6ec 100644
--- third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build
+++ third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2448,7 +2463,7 @@ index 1a5b0bf109..fa02a56f8e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2459,7 +2474,7 @@ index 1a5b0bf109..fa02a56f8e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2471,16 +2486,17 @@ index 1a5b0bf109..fa02a56f8e 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/numerics/numerics_gn/moz.build third_party/libwebrtc/api/numerics/numerics_gn/moz.build
-index fa11b290a9..6152ef8e59 100644
+index 6350054658c6..244392f15b3a 100644
--- third_party/libwebrtc/api/numerics/numerics_gn/moz.build
+++ third_party/libwebrtc/api/numerics/numerics_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2492,7 +2508,7 @@ index fa11b290a9..6152ef8e59 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2503,7 +2519,7 @@ index fa11b290a9..6152ef8e59 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2514,30 +2530,31 @@ index fa11b290a9..6152ef8e59 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/priority_gn/moz.build third_party/libwebrtc/api/priority_gn/moz.build
-index dbe91f7048..ac0e0c377e 100644
+index a96dbd49bad9..1c84e7289f07 100644
--- third_party/libwebrtc/api/priority_gn/moz.build
+++ third_party/libwebrtc/api/priority_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2549,7 +2566,7 @@ index dbe91f7048..ac0e0c377e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2560,7 +2577,7 @@ index dbe91f7048..ac0e0c377e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2572,16 +2589,17 @@ index dbe91f7048..ac0e0c377e 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/refcountedbase_gn/moz.build third_party/libwebrtc/api/refcountedbase_gn/moz.build
-index 1511ac2e44..2e08c63cda 100644
+index 54ae16a52c06..a0c74d2fb530 100644
--- third_party/libwebrtc/api/refcountedbase_gn/moz.build
+++ third_party/libwebrtc/api/refcountedbase_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2593,7 +2611,7 @@ index 1511ac2e44..2e08c63cda 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2604,7 +2622,7 @@ index 1511ac2e44..2e08c63cda 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2616,16 +2634,17 @@ index 1511ac2e44..2e08c63cda 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/rtc_error_gn/moz.build third_party/libwebrtc/api/rtc_error_gn/moz.build
-index 01b92cee7a..41bbb8718c 100644
+index 105bd8cffac0..620e0feef095 100644
--- third_party/libwebrtc/api/rtc_error_gn/moz.build
+++ third_party/libwebrtc/api/rtc_error_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2637,7 +2656,7 @@ index 01b92cee7a..41bbb8718c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2648,7 +2667,7 @@ index 01b92cee7a..41bbb8718c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2659,30 +2678,31 @@ index 01b92cee7a..41bbb8718c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 62dec010ac..db7abcf561 100644
+index ac97ca6790f5..472c4d71ce69 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2694,7 +2714,7 @@ index 62dec010ac..db7abcf561 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2705,7 +2725,7 @@ index 62dec010ac..db7abcf561 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2716,30 +2736,31 @@ index 62dec010ac..db7abcf561 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,12 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/rtp_headers_gn/moz.build third_party/libwebrtc/api/rtp_headers_gn/moz.build
-index 2a67aeb66e..b65a55e453 100644
+index 05720fb8745e..89d898986a5d 100644
--- third_party/libwebrtc/api/rtp_headers_gn/moz.build
+++ third_party/libwebrtc/api/rtp_headers_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2751,7 +2772,7 @@ index 2a67aeb66e..b65a55e453 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2762,7 +2783,7 @@ index 2a67aeb66e..b65a55e453 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2773,30 +2794,31 @@ index 2a67aeb66e..b65a55e453 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/rtp_packet_info_gn/moz.build third_party/libwebrtc/api/rtp_packet_info_gn/moz.build
-index 8918746b08..f75e6c9c00 100644
+index 3c48e6cb77cc..ef77d957cf7a 100644
--- third_party/libwebrtc/api/rtp_packet_info_gn/moz.build
+++ third_party/libwebrtc/api/rtp_packet_info_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2808,7 +2830,7 @@ index 8918746b08..f75e6c9c00 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2819,7 +2841,7 @@ index 8918746b08..f75e6c9c00 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2830,30 +2852,31 @@ index 8918746b08..f75e6c9c00 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/rtp_parameters_gn/moz.build third_party/libwebrtc/api/rtp_parameters_gn/moz.build
-index 23d200f8b0..8c778c8cb2 100644
+index 52f1bd3a5fc2..ca10524d1995 100644
--- third_party/libwebrtc/api/rtp_parameters_gn/moz.build
+++ third_party/libwebrtc/api/rtp_parameters_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2865,7 +2888,7 @@ index 23d200f8b0..8c778c8cb2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -150,6 +161,10 @@
+@@ -150,6 +162,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2876,7 +2899,7 @@ index 23d200f8b0..8c778c8cb2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -166,6 +181,10 @@
+@@ -166,6 +182,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2887,30 +2910,31 @@ index 23d200f8b0..8c778c8cb2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -190,6 +209,12 @@
-
- OS_LIBS += [
+@@ -192,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build
-index 6b31767ec8..49ce8708a6 100644
+index 0b14ca8f7a76..2484ef9b2dfb 100644
--- third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build
+++ third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2922,7 +2946,7 @@ index 6b31767ec8..49ce8708a6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2933,7 +2957,7 @@ index 6b31767ec8..49ce8708a6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2945,16 +2969,17 @@ index 6b31767ec8..49ce8708a6 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/scoped_refptr_gn/moz.build third_party/libwebrtc/api/scoped_refptr_gn/moz.build
-index 97b07c9010..0c9bc9ef6a 100644
+index 8640dd39c05b..c0296981b176 100644
--- third_party/libwebrtc/api/scoped_refptr_gn/moz.build
+++ third_party/libwebrtc/api/scoped_refptr_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2966,7 +2991,7 @@ index 97b07c9010..0c9bc9ef6a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -2977,7 +3002,7 @@ index 97b07c9010..0c9bc9ef6a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -2989,16 +3014,17 @@ index 97b07c9010..0c9bc9ef6a 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/simulated_network_api_gn/moz.build third_party/libwebrtc/api/simulated_network_api_gn/moz.build
-index 17cbb28903..e75d9233e6 100644
+index ad8d869dbe62..aa5f011a90ef 100644
--- third_party/libwebrtc/api/simulated_network_api_gn/moz.build
+++ third_party/libwebrtc/api/simulated_network_api_gn/moz.build
-@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -64,6 +64,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3010,7 +3036,7 @@ index 17cbb28903..e75d9233e6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3021,7 +3047,7 @@ index 17cbb28903..e75d9233e6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3033,16 +3059,17 @@ index 17cbb28903..e75d9233e6 100644
DEFINES["_DEBUG"] = True
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 691d7edc2d..8614057ddc 100644
+index 1206c9bf7dcf..b08905fadb5e 100644
--- third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build
+++ third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3054,7 +3081,7 @@ index 691d7edc2d..8614057ddc 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3065,7 +3092,7 @@ index 691d7edc2d..8614057ddc 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3076,30 +3103,31 @@ index 691d7edc2d..8614057ddc 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build
-index 3513f9c224..9e1a49e8e4 100644
+index 8336ce4b69da..196e0210cb77 100644
--- third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build
+++ third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3111,7 +3139,7 @@ index 3513f9c224..9e1a49e8e4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3122,7 +3150,7 @@ index 3513f9c224..9e1a49e8e4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3133,30 +3161,31 @@ index 3513f9c224..9e1a49e8e4 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 04aaa9aa2b..ed67e61812 100644
+index b11890444367..e0c4fb09aa6b 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3168,7 +3197,7 @@ index 04aaa9aa2b..ed67e61812 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3179,7 +3208,7 @@ index 04aaa9aa2b..ed67e61812 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3190,30 +3219,31 @@ index 04aaa9aa2b..ed67e61812 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/transport/goog_cc_gn/moz.build third_party/libwebrtc/api/transport/goog_cc_gn/moz.build
-index 409c7dde4b..a05eff6f59 100644
+index bbd03670d815..0dfc3c63820f 100644
--- third_party/libwebrtc/api/transport/goog_cc_gn/moz.build
+++ third_party/libwebrtc/api/transport/goog_cc_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3225,7 +3255,7 @@ index 409c7dde4b..a05eff6f59 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3236,7 +3266,7 @@ index 409c7dde4b..a05eff6f59 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3247,30 +3277,31 @@ index 409c7dde4b..a05eff6f59 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/transport/network_control_gn/moz.build third_party/libwebrtc/api/transport/network_control_gn/moz.build
-index 09e38326bd..80fa181ab9 100644
+index f774b4004613..03f4d1d4ff9c 100644
--- third_party/libwebrtc/api/transport/network_control_gn/moz.build
+++ third_party/libwebrtc/api/transport/network_control_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3282,7 +3313,7 @@ index 09e38326bd..80fa181ab9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3293,7 +3324,7 @@ index 09e38326bd..80fa181ab9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3304,30 +3335,31 @@ index 09e38326bd..80fa181ab9 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 735d60d2d2..e21c0aa575 100644
+index b613d11065bc..7e8b700236ff 100644
--- third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build
+++ third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3339,7 +3371,7 @@ index 735d60d2d2..e21c0aa575 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3350,7 +3382,7 @@ index 735d60d2d2..e21c0aa575 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3361,30 +3393,31 @@ index 735d60d2d2..e21c0aa575 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 efeffbc658..29eb538b64 100644
+index 0548649d964a..b9e1bd959f42 100644
--- third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build
+++ third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3396,7 +3429,7 @@ index efeffbc658..29eb538b64 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3407,7 +3440,7 @@ index efeffbc658..29eb538b64 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3419,16 +3452,17 @@ index efeffbc658..29eb538b64 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build
-index f3132f72ab..2fb0df1299 100644
+index 543aa18e866b..ad999a5ec9b6 100644
--- third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build
+++ third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3440,7 +3474,7 @@ index f3132f72ab..2fb0df1299 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3451,7 +3485,7 @@ index f3132f72ab..2fb0df1299 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3463,16 +3497,17 @@ index f3132f72ab..2fb0df1299 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/transport_api_gn/moz.build third_party/libwebrtc/api/transport_api_gn/moz.build
-index 41b32d6762..59e6e8ce4a 100644
+index 74dc8edde6e4..3140f58e48ec 100644
--- third_party/libwebrtc/api/transport_api_gn/moz.build
+++ third_party/libwebrtc/api/transport_api_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3484,7 +3519,7 @@ index 41b32d6762..59e6e8ce4a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3495,7 +3530,7 @@ index 41b32d6762..59e6e8ce4a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3506,30 +3541,31 @@ index 41b32d6762..59e6e8ce4a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/units/data_rate_gn/moz.build third_party/libwebrtc/api/units/data_rate_gn/moz.build
-index 6708de4bb0..3b2fc8ba9c 100644
+index 73fe3b80455f..08930114b536 100644
--- third_party/libwebrtc/api/units/data_rate_gn/moz.build
+++ third_party/libwebrtc/api/units/data_rate_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3541,7 +3577,7 @@ index 6708de4bb0..3b2fc8ba9c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3552,7 +3588,7 @@ index 6708de4bb0..3b2fc8ba9c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3563,30 +3599,31 @@ index 6708de4bb0..3b2fc8ba9c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/units/data_size_gn/moz.build third_party/libwebrtc/api/units/data_size_gn/moz.build
-index 14b9742573..54ecb92e08 100644
+index 3c32376248b7..79006bb7f52c 100644
--- third_party/libwebrtc/api/units/data_size_gn/moz.build
+++ third_party/libwebrtc/api/units/data_size_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3598,7 +3635,7 @@ index 14b9742573..54ecb92e08 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3609,7 +3646,7 @@ index 14b9742573..54ecb92e08 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3620,30 +3657,31 @@ index 14b9742573..54ecb92e08 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/units/frequency_gn/moz.build third_party/libwebrtc/api/units/frequency_gn/moz.build
-index 79fcff48ef..6790d9ceaa 100644
+index 4ad0edd064ad..839ab64d4ca7 100644
--- third_party/libwebrtc/api/units/frequency_gn/moz.build
+++ third_party/libwebrtc/api/units/frequency_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3655,7 +3693,7 @@ index 79fcff48ef..6790d9ceaa 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3666,7 +3704,7 @@ index 79fcff48ef..6790d9ceaa 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3677,30 +3715,31 @@ index 79fcff48ef..6790d9ceaa 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/units/time_delta_gn/moz.build third_party/libwebrtc/api/units/time_delta_gn/moz.build
-index 9cd9ff24f3..c32d6624b5 100644
+index 51ee435db07a..d460dccfa8b4 100644
--- third_party/libwebrtc/api/units/time_delta_gn/moz.build
+++ third_party/libwebrtc/api/units/time_delta_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3712,7 +3751,7 @@ index 9cd9ff24f3..c32d6624b5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3723,7 +3762,7 @@ index 9cd9ff24f3..c32d6624b5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3734,30 +3773,31 @@ index 9cd9ff24f3..c32d6624b5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/units/timestamp_gn/moz.build third_party/libwebrtc/api/units/timestamp_gn/moz.build
-index 23aa0ba2c5..72d6220c6b 100644
+index 1e3e67cc2649..e6be5c6789b8 100644
--- third_party/libwebrtc/api/units/timestamp_gn/moz.build
+++ third_party/libwebrtc/api/units/timestamp_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3769,7 +3809,7 @@ index 23aa0ba2c5..72d6220c6b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3780,7 +3820,7 @@ index 23aa0ba2c5..72d6220c6b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3791,30 +3831,31 @@ index 23aa0ba2c5..72d6220c6b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 0ecc793d69..ea20a3d5b5 100644
+index 21f2ba78118c..642ee08e3eee 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3826,7 +3867,7 @@ index 0ecc793d69..ea20a3d5b5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3837,7 +3878,7 @@ index 0ecc793d69..ea20a3d5b5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3848,30 +3889,31 @@ index 0ecc793d69..ea20a3d5b5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/video/encoded_frame_gn/moz.build third_party/libwebrtc/api/video/encoded_frame_gn/moz.build
-index 456c8a541d..3b556fdd3c 100644
+index 2771b5652041..0438b03d472a 100644
--- third_party/libwebrtc/api/video/encoded_frame_gn/moz.build
+++ third_party/libwebrtc/api/video/encoded_frame_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3883,7 +3925,7 @@ index 456c8a541d..3b556fdd3c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3894,7 +3936,7 @@ index 456c8a541d..3b556fdd3c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3905,30 +3947,31 @@ index 456c8a541d..3b556fdd3c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/video/encoded_image_gn/moz.build third_party/libwebrtc/api/video/encoded_image_gn/moz.build
-index d109bfa1a0..225b559521 100644
+index cc30477c7365..39f142dd7e7e 100644
--- third_party/libwebrtc/api/video/encoded_image_gn/moz.build
+++ third_party/libwebrtc/api/video/encoded_image_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3940,7 +3983,7 @@ index d109bfa1a0..225b559521 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -3951,7 +3994,7 @@ index d109bfa1a0..225b559521 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -3962,30 +4005,31 @@ index d109bfa1a0..225b559521 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 df2bcac4b7..ad955dc4a0 100644
+index 456914a5644f..02cb3197b175 100644
--- third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build
+++ third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -3997,7 +4041,7 @@ index df2bcac4b7..ad955dc4a0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4008,7 +4052,7 @@ index df2bcac4b7..ad955dc4a0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4020,16 +4064,17 @@ index df2bcac4b7..ad955dc4a0 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/video/video_adaptation_gn/moz.build third_party/libwebrtc/api/video/video_adaptation_gn/moz.build
-index 539cc93e02..3f6fd22ca3 100644
+index 8fbf277c02a2..a3d1c7eef0d4 100644
--- third_party/libwebrtc/api/video/video_adaptation_gn/moz.build
+++ third_party/libwebrtc/api/video/video_adaptation_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4041,7 +4086,7 @@ index 539cc93e02..3f6fd22ca3 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4052,7 +4097,7 @@ index 539cc93e02..3f6fd22ca3 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4063,30 +4108,31 @@ index 539cc93e02..3f6fd22ca3 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 427be85229..39df8789f7 100644
+index 367da43db90e..290c5a565fdb 100644
--- third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build
+++ third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4098,7 +4144,7 @@ index 427be85229..39df8789f7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4109,7 +4155,7 @@ index 427be85229..39df8789f7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4120,30 +4166,31 @@ index 427be85229..39df8789f7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 07db1b3b38..27fad85dc4 100644
+index be33b13bdab4..144252aec9f8 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4155,7 +4202,7 @@ index 07db1b3b38..27fad85dc4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4166,7 +4213,7 @@ index 07db1b3b38..27fad85dc4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4178,16 +4225,17 @@ index 07db1b3b38..27fad85dc4 100644
DEFINES["_DEBUG"] = True
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 8726c6c5a5..891f5b2ac1 100644
+index 2bb0247e206b..81b553bf2b7d 100644
--- third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build
+++ third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4199,7 +4247,7 @@ index 8726c6c5a5..891f5b2ac1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4210,7 +4258,7 @@ index 8726c6c5a5..891f5b2ac1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4221,30 +4269,31 @@ index 8726c6c5a5..891f5b2ac1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 9f6daffa4a..39371a1714 100644
+index 3e0241b67848..e13964cfe918 100644
--- third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build
+++ third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4256,7 +4305,7 @@ index 9f6daffa4a..39371a1714 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4267,7 +4316,7 @@ index 9f6daffa4a..39371a1714 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4279,16 +4328,17 @@ index 9f6daffa4a..39371a1714 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/api/video/video_frame_gn/moz.build third_party/libwebrtc/api/video/video_frame_gn/moz.build
-index cec245170a..646e570081 100644
+index fefb29304e7d..02f30af107f1 100644
--- third_party/libwebrtc/api/video/video_frame_gn/moz.build
+++ third_party/libwebrtc/api/video/video_frame_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4300,7 +4350,7 @@ index cec245170a..646e570081 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -155,6 +166,10 @@
+@@ -155,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4311,7 +4361,7 @@ index cec245170a..646e570081 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -171,6 +186,10 @@
+@@ -171,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4322,30 +4372,31 @@ index cec245170a..646e570081 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -195,6 +214,12 @@
-
- OS_LIBS += [
+@@ -197,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 fa9d71395c..927c06c940 100644
+index f7264918a028..21ea9e0de046 100644
--- third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build
+++ third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4357,7 +4408,7 @@ index fa9d71395c..927c06c940 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4368,7 +4419,7 @@ index fa9d71395c..927c06c940 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4379,30 +4430,31 @@ index fa9d71395c..927c06c940 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build
-index 3d4c1bd899..2f0e6fdd07 100644
+index 558a17591823..9fba38bf343a 100644
--- third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build
+++ third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4414,7 +4466,7 @@ index 3d4c1bd899..2f0e6fdd07 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4425,7 +4477,7 @@ index 3d4c1bd899..2f0e6fdd07 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4436,30 +4488,31 @@ index 3d4c1bd899..2f0e6fdd07 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 c817dc4982..0283c8356c 100644
+index 0b5b69888b77..d5e1da5e0324 100644
--- third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build
+++ third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4471,7 +4524,7 @@ index c817dc4982..0283c8356c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4482,7 +4535,7 @@ index c817dc4982..0283c8356c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4493,30 +4546,31 @@ index c817dc4982..0283c8356c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build
-index 63ee6f9099..2c64a6dc79 100644
+index 23d76d2fd9ea..24a1fce042a4 100644
--- third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build
+++ third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4528,7 +4582,7 @@ index 63ee6f9099..2c64a6dc79 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4539,7 +4593,7 @@ index 63ee6f9099..2c64a6dc79 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4550,30 +4604,31 @@ index 63ee6f9099..2c64a6dc79 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 57cfaf7c23..07f1dd75ba 100644
+index 6d47e636a0ce..4895a3314e7b 100644
--- third_party/libwebrtc/api/video/video_frame_type_gn/moz.build
+++ third_party/libwebrtc/api/video/video_frame_type_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4585,7 +4640,7 @@ index 57cfaf7c23..07f1dd75ba 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4596,7 +4651,7 @@ index 57cfaf7c23..07f1dd75ba 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4608,16 +4663,17 @@ index 57cfaf7c23..07f1dd75ba 100644
DEFINES["_DEBUG"] = True
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 54cdbd8c57..1ec0d71ab4 100644
+index b39549cb1ec8..e63adda322be 100644
--- third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build
+++ third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4629,7 +4685,7 @@ index 54cdbd8c57..1ec0d71ab4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -156,6 +167,10 @@
+@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4640,7 +4696,7 @@ index 54cdbd8c57..1ec0d71ab4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -172,6 +187,10 @@
+@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4651,30 +4707,31 @@ index 54cdbd8c57..1ec0d71ab4 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -196,6 +215,12 @@
-
- OS_LIBS += [
+@@ -198,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build
-index 57a39cfe40..1d7a2ba9b8 100644
+index 38c0bae20ba0..a8089fb8ccd0 100644
--- third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build
+++ third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4686,7 +4743,7 @@ index 57a39cfe40..1d7a2ba9b8 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4697,7 +4754,7 @@ index 57a39cfe40..1d7a2ba9b8 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4708,30 +4765,31 @@ index 57a39cfe40..1d7a2ba9b8 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e5e9a7c055..057b4db9ea 100644
+index 1674dd1c95e0..9481b03dd87d 100644
--- third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build
+++ third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4743,7 +4801,7 @@ index e5e9a7c055..057b4db9ea 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4754,7 +4812,7 @@ index e5e9a7c055..057b4db9ea 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4766,16 +4824,17 @@ index e5e9a7c055..057b4db9ea 100644
DEFINES["_DEBUG"] = True
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 2666e25ab7..1514db3a49 100644
+index 34681377d4fa..aad4dc3fc0b2 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4787,7 +4846,7 @@ index 2666e25ab7..1514db3a49 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4798,7 +4857,7 @@ index 2666e25ab7..1514db3a49 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4810,16 +4869,17 @@ index 2666e25ab7..1514db3a49 100644
DEFINES["_DEBUG"] = True
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 1d21c1fa81..8c122cbd13 100644
+index cebf465e089f..e0fb338e5e68 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4831,7 +4891,7 @@ index 1d21c1fa81..8c122cbd13 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4842,7 +4902,7 @@ index 1d21c1fa81..8c122cbd13 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4853,30 +4913,31 @@ index 1d21c1fa81..8c122cbd13 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build
-index bd29841460..ea3e4aab9b 100644
+index 78835081db92..94afae46d05f 100644
--- third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build
+++ third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4888,7 +4949,7 @@ index bd29841460..ea3e4aab9b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4899,7 +4960,7 @@ index bd29841460..ea3e4aab9b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4910,30 +4971,31 @@ index bd29841460..ea3e4aab9b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 90afc61ce7..2dad21ab8e 100644
+index dd3b4e323acc..6c992c640e2d 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -4945,7 +5007,7 @@ index 90afc61ce7..2dad21ab8e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -4956,7 +5018,7 @@ index 90afc61ce7..2dad21ab8e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -4967,30 +5029,31 @@ index 90afc61ce7..2dad21ab8e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 acf0202689..c80bfb5b66 100644
+index 0bedb0c19938..abc2c989937a 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
-@@ -75,6 +75,17 @@
+@@ -75,6 +75,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5002,7 +5065,7 @@ index acf0202689..c80bfb5b66 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5013,7 +5076,7 @@ index acf0202689..c80bfb5b66 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5024,30 +5087,31 @@ index acf0202689..c80bfb5b66 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e0bcb09d59..4bf73c444c 100644
+index 954a2332e694..f0a885fdd8c4 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5059,7 +5123,7 @@ index e0bcb09d59..4bf73c444c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5070,7 +5134,7 @@ index e0bcb09d59..4bf73c444c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5081,30 +5145,31 @@ index e0bcb09d59..4bf73c444c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/audio/audio_gn/moz.build third_party/libwebrtc/audio/audio_gn/moz.build
-index 48c74e8063..78ccf8d0e2 100644
+index b02936781baa..e6fcc6742d49 100644
--- third_party/libwebrtc/audio/audio_gn/moz.build
+++ third_party/libwebrtc/audio/audio_gn/moz.build
-@@ -81,6 +81,17 @@
+@@ -81,6 +81,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5116,7 +5181,7 @@ index 48c74e8063..78ccf8d0e2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -175,6 +186,10 @@
+@@ -175,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5127,7 +5192,7 @@ index 48c74e8063..78ccf8d0e2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -191,6 +206,10 @@
+@@ -191,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5138,30 +5203,31 @@ index 48c74e8063..78ccf8d0e2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -215,6 +234,12 @@
-
- OS_LIBS += [
+@@ -217,6 +237,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 f3708d6b8e..a7fa266d64 100644
+index e3d24b550252..f1f1897c0e7a 100644
--- third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build
+++ third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5173,7 +5239,7 @@ index f3708d6b8e..a7fa266d64 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5184,7 +5250,7 @@ index f3708d6b8e..a7fa266d64 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5195,30 +5261,31 @@ index f3708d6b8e..a7fa266d64 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
-index 0c08bff6a3..2a6e85ac47 100644
+index c94b5724c5e1..e155a01c8a4d 100644
--- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
+++ third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
-@@ -77,6 +77,17 @@
+@@ -77,6 +77,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5230,7 +5297,7 @@ index 0c08bff6a3..2a6e85ac47 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -171,6 +182,10 @@
+@@ -171,6 +183,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5241,7 +5308,7 @@ index 0c08bff6a3..2a6e85ac47 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -187,6 +202,10 @@
+@@ -187,6 +203,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5252,30 +5319,31 @@ index 0c08bff6a3..2a6e85ac47 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -211,6 +230,12 @@
-
- OS_LIBS += [
+@@ -213,6 +233,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/audio_sender_interface_gn/moz.build third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
-index a746c88078..cb4ace74be 100644
+index 7fe9922b83e1..bcfc532dffe8 100644
--- third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
+++ third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5287,7 +5355,7 @@ index a746c88078..cb4ace74be 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5298,7 +5366,7 @@ index a746c88078..cb4ace74be 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5310,16 +5378,17 @@ index a746c88078..cb4ace74be 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/call/bitrate_allocator_gn/moz.build third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
-index 8d140ba125..5ee40a51d4 100644
+index 1c9a1bed8de2..b7da274647fb 100644
--- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
+++ third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5331,7 +5400,7 @@ index 8d140ba125..5ee40a51d4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5342,7 +5411,7 @@ index 8d140ba125..5ee40a51d4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5353,30 +5422,31 @@ index 8d140ba125..5ee40a51d4 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/bitrate_configurator_gn/moz.build third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
-index 2dba19a53a..290ee2e201 100644
+index 93cdc9bd58bc..6febae04853a 100644
--- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
+++ third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5388,7 +5458,7 @@ index 2dba19a53a..290ee2e201 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5399,7 +5469,7 @@ index 2dba19a53a..290ee2e201 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5410,30 +5480,31 @@ index 2dba19a53a..290ee2e201 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/call_gn/moz.build third_party/libwebrtc/call/call_gn/moz.build
-index 8cb24f9748..7f3d3e0f33 100644
+index 4e34237e5d85..08e6d0eb5455 100644
--- third_party/libwebrtc/call/call_gn/moz.build
+++ third_party/libwebrtc/call/call_gn/moz.build
-@@ -72,6 +72,17 @@
+@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5445,7 +5516,7 @@ index 8cb24f9748..7f3d3e0f33 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -166,6 +177,10 @@
+@@ -166,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5456,7 +5527,7 @@ index 8cb24f9748..7f3d3e0f33 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -182,6 +197,10 @@
+@@ -182,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5467,30 +5538,31 @@ index 8cb24f9748..7f3d3e0f33 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -206,6 +225,12 @@
-
- OS_LIBS += [
+@@ -208,6 +228,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/call_interfaces_gn/moz.build third_party/libwebrtc/call/call_interfaces_gn/moz.build
-index 4f07c8b731..8ef60e959c 100644
+index ba457828691a..8b046cab01b4 100644
--- third_party/libwebrtc/call/call_interfaces_gn/moz.build
+++ third_party/libwebrtc/call/call_interfaces_gn/moz.build
-@@ -73,6 +73,17 @@
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5502,7 +5574,7 @@ index 4f07c8b731..8ef60e959c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5513,7 +5585,7 @@ index 4f07c8b731..8ef60e959c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5524,30 +5596,31 @@ index 4f07c8b731..8ef60e959c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/fake_network_gn/moz.build third_party/libwebrtc/call/fake_network_gn/moz.build
-index 54b8d2df6b..2d2ebb2e84 100644
+index 1cd65eb3ba63..781d6b8d9b08 100644
--- third_party/libwebrtc/call/fake_network_gn/moz.build
+++ third_party/libwebrtc/call/fake_network_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5559,7 +5632,7 @@ index 54b8d2df6b..2d2ebb2e84 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5570,7 +5643,7 @@ index 54b8d2df6b..2d2ebb2e84 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5581,30 +5654,31 @@ index 54b8d2df6b..2d2ebb2e84 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/rtp_interfaces_gn/moz.build third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
-index 040939df59..814d9c1d92 100644
+index bc5238d99caf..cac5ebc08953 100644
--- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
+++ third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5616,7 +5690,7 @@ index 040939df59..814d9c1d92 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5627,7 +5701,7 @@ index 040939df59..814d9c1d92 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5638,30 +5712,31 @@ index 040939df59..814d9c1d92 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/rtp_receiver_gn/moz.build third_party/libwebrtc/call/rtp_receiver_gn/moz.build
-index 5c1f19a9da..f31fa589f9 100644
+index 6dcc8d7b007d..3b3b87e81c0f 100644
--- third_party/libwebrtc/call/rtp_receiver_gn/moz.build
+++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5673,7 +5748,7 @@ index 5c1f19a9da..f31fa589f9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5684,7 +5759,7 @@ index 5c1f19a9da..f31fa589f9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5695,30 +5770,31 @@ index 5c1f19a9da..f31fa589f9 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build
-index 1d14b03100..337dcfd1ce 100644
+index 0b865232b83e..33517edd5e5c 100644
--- third_party/libwebrtc/call/rtp_sender_gn/moz.build
+++ third_party/libwebrtc/call/rtp_sender_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5730,7 +5806,7 @@ index 1d14b03100..337dcfd1ce 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5741,7 +5817,7 @@ index 1d14b03100..337dcfd1ce 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5752,30 +5828,31 @@ index 1d14b03100..337dcfd1ce 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/simulated_network_gn/moz.build third_party/libwebrtc/call/simulated_network_gn/moz.build
-index 62ff82980c..6abb9718b7 100644
+index 0000a7122ef4..7fa437dcf78c 100644
--- third_party/libwebrtc/call/simulated_network_gn/moz.build
+++ third_party/libwebrtc/call/simulated_network_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5787,7 +5864,7 @@ index 62ff82980c..6abb9718b7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5798,7 +5875,7 @@ index 62ff82980c..6abb9718b7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5809,30 +5886,31 @@ index 62ff82980c..6abb9718b7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build
-index e51a1dce73..0961e95dbb 100644
+index 621724b064d7..29af8c97b1de 100644
--- third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build
+++ third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build
-@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -64,6 +64,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5844,7 +5922,7 @@ index e51a1dce73..0961e95dbb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5855,7 +5933,7 @@ index e51a1dce73..0961e95dbb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5867,16 +5945,17 @@ index e51a1dce73..0961e95dbb 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/call/video_stream_api_gn/moz.build third_party/libwebrtc/call/video_stream_api_gn/moz.build
-index 926361a8fa..bf3117cf96 100644
+index 57e0c821b48e..ae2fce579526 100644
--- third_party/libwebrtc/call/video_stream_api_gn/moz.build
+++ third_party/libwebrtc/call/video_stream_api_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5888,7 +5967,7 @@ index 926361a8fa..bf3117cf96 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5899,7 +5978,7 @@ index 926361a8fa..bf3117cf96 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5910,30 +5989,31 @@ index 926361a8fa..bf3117cf96 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 386e90330f..e8a0c2625a 100644
+index 581e409b3a81..a25253b2fb81 100644
--- third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build
+++ third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build
-@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -5945,7 +6025,7 @@ index 386e90330f..e8a0c2625a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -146,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -146,6 +158,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -5956,7 +6036,7 @@ index 386e90330f..e8a0c2625a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -162,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -162,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -5967,7 +6047,7 @@ index 386e90330f..e8a0c2625a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -184,6 +203,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
+@@ -188,6 +208,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
]
@@ -5981,16 +6061,17 @@ index 386e90330f..e8a0c2625a 100644
CXXFLAGS += [
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 7adcbbf362..3beca43fd4 100644
+index d5ffe3c10c68..6be4b3826f9d 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6002,7 +6083,7 @@ index 7adcbbf362..3beca43fd4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -142,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -142,6 +154,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6013,7 +6094,7 @@ index 7adcbbf362..3beca43fd4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -158,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -158,6 +174,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6025,16 +6106,17 @@ index 7adcbbf362..3beca43fd4 100644
DEFINES["_DEBUG"] = True
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 8e471b3278..cf7c67d7f1 100644
+index 60480a62ae7f..1266bed4bf30 100644
--- third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build
+++ third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build
-@@ -110,6 +110,22 @@
+@@ -110,6 +110,23 @@ if CONFIG["OS_TARGET"] == "Darwin":
"/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
]
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6051,7 +6133,7 @@ index 8e471b3278..cf7c67d7f1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -218,6 +234,10 @@
+@@ -218,6 +235,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6062,7 +6144,7 @@ index 8e471b3278..cf7c67d7f1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -234,6 +254,10 @@
+@@ -234,6 +255,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6073,30 +6155,31 @@ index 8e471b3278..cf7c67d7f1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -277,6 +301,12 @@
- UNIFIED_SOURCES += [
- "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c",
+@@ -279,6 +304,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
"/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
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 5475e35ad6..1aa0a02b27 100644
+index 9bd3921b44f8..1177a8b55ffc 100644
--- third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build
+++ third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6108,7 +6191,7 @@ index 5475e35ad6..1aa0a02b27 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6119,7 +6202,7 @@ index 5475e35ad6..1aa0a02b27 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6130,30 +6213,31 @@ index 5475e35ad6..1aa0a02b27 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/common_audio/common_audio_gn/moz.build third_party/libwebrtc/common_audio/common_audio_gn/moz.build
-index e499c12bf0..6d5c275806 100644
+index f4c5fe9bfd9d..14ff95d26532 100644
--- third_party/libwebrtc/common_audio/common_audio_gn/moz.build
+++ third_party/libwebrtc/common_audio/common_audio_gn/moz.build
-@@ -80,6 +80,17 @@
+@@ -80,6 +80,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6165,7 +6249,7 @@ index e499c12bf0..6d5c275806 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -173,6 +184,10 @@
+@@ -173,6 +185,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6176,7 +6260,7 @@ index e499c12bf0..6d5c275806 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -189,6 +204,10 @@
+@@ -189,6 +205,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6187,30 +6271,31 @@ index e499c12bf0..6d5c275806 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -213,6 +232,12 @@
-
- OS_LIBS += [
+@@ -215,6 +235,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 36ffd6add1..a16a1a6b1b 100644
+index 4cb5fcf91dfe..75927b793917 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
-@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -71,6 +71,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
@@ -6222,8 +6307,8 @@ index 36ffd6add1..a16a1a6b1b 100644
+
if CONFIG["OS_TARGET"] == "Linux":
- DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6"
-@@ -150,6 +162,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+ DEFINES["USE_AURA"] = "1"
+@@ -148,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6234,7 +6319,7 @@ index 36ffd6add1..a16a1a6b1b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -162,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -160,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6246,16 +6331,17 @@ index 36ffd6add1..a16a1a6b1b 100644
DEFINES["_DEBUG"] = True
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 ba1537f7dd..c409afbddb 100644
+index 023ff03ebb67..06e5b01be8ce 100644
--- third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build
+++ third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build
-@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -70,6 +70,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
@@ -6267,8 +6353,8 @@ index ba1537f7dd..c409afbddb 100644
+
if CONFIG["OS_TARGET"] == "Linux":
- DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6"
-@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+ DEFINES["USE_AURA"] = "1"
+@@ -147,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6279,7 +6365,7 @@ index ba1537f7dd..c409afbddb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -159,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6291,16 +6377,17 @@ index ba1537f7dd..c409afbddb 100644
DEFINES["_DEBUG"] = True
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 c516a1769e..a207526986 100644
+index dbbcc3470228..2a2e5527e728 100644
--- third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build
+++ third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build
-@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6312,7 +6399,7 @@ index c516a1769e..a207526986 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6323,7 +6410,7 @@ index c516a1769e..a207526986 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6334,7 +6421,7 @@ index c516a1769e..a207526986 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
+@@ -198,6 +218,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
"-msse2"
]
@@ -6355,16 +6442,17 @@ index c516a1769e..a207526986 100644
CXXFLAGS += [
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 e93b927f63..c3847e1200 100644
+index bd66e2d8072e..61e6383cd070 100644
--- third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build
+++ third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6376,7 +6464,7 @@ index e93b927f63..c3847e1200 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6387,7 +6475,7 @@ index e93b927f63..c3847e1200 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6398,30 +6486,31 @@ index e93b927f63..c3847e1200 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/common_audio/fir_filter_gn/moz.build third_party/libwebrtc/common_audio/fir_filter_gn/moz.build
-index 1bb7ad1e4b..ea708477d7 100644
+index b6a04a3781dd..34a999099b1b 100644
--- third_party/libwebrtc/common_audio/fir_filter_gn/moz.build
+++ third_party/libwebrtc/common_audio/fir_filter_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6433,7 +6522,7 @@ index 1bb7ad1e4b..ea708477d7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6444,7 +6533,7 @@ index 1bb7ad1e4b..ea708477d7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6456,16 +6545,17 @@ index 1bb7ad1e4b..ea708477d7 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build
-index e285755822..394b2e43a7 100644
+index b71e2b34a717..851d45d784ba 100644
--- third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build
+++ third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6477,7 +6567,7 @@ index e285755822..394b2e43a7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -152,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6488,7 +6578,7 @@ index e285755822..394b2e43a7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -168,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6500,16 +6590,17 @@ index e285755822..394b2e43a7 100644
DEFINES["_DEBUG"] = True
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 49d8183bb8..de0e1795f9 100644
+index cc014380746d..3c9dea1d1f04 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6521,7 +6612,7 @@ index 49d8183bb8..de0e1795f9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -182,6 +193,10 @@
+@@ -182,6 +194,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6532,7 +6623,7 @@ index 49d8183bb8..de0e1795f9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -198,6 +213,10 @@
+@@ -198,6 +214,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6543,41 +6634,42 @@ index 49d8183bb8..de0e1795f9 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -236,6 +255,23 @@
+@@ -245,6 +265,23 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin":
+ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc"
]
- if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin":
++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
++ "-msse2",
+ "-msse2"
+ ]
+
-+ UNIFIED_SOURCES += [
-+ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc"
-+ ]
-+
-+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
-+ "-msse2",
+ "-msse2"
+ ]
+
-+if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD":
++ UNIFIED_SOURCES += [
++ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc"
++ ]
++
+ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
CXXFLAGS += [
- "-msse2"
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 b3213bf070..51951092da 100644
+index e20d6047c767..a46f9bdb878e 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
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6589,7 +6681,7 @@ index b3213bf070..51951092da 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6600,7 +6692,7 @@ index b3213bf070..51951092da 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6611,30 +6703,31 @@ index b3213bf070..51951092da 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6d03704624..d96b6f3a71 100644
+index 1777faaf534c..a52eb83bda14 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
-@@ -63,6 +63,21 @@
+@@ -63,6 +63,22 @@ if CONFIG["OS_TARGET"] == "Darwin":
"/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
]
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6650,7 +6743,7 @@ index 6d03704624..d96b6f3a71 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -157,6 +172,10 @@
+@@ -157,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6661,7 +6754,7 @@ index 6d03704624..d96b6f3a71 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -173,6 +192,10 @@
+@@ -173,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6672,30 +6765,31 @@ index 6d03704624..d96b6f3a71 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -213,6 +236,12 @@
-
- UNIFIED_SOURCES += [
+@@ -215,6 +239,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
"/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/common_video/common_video_gn/moz.build third_party/libwebrtc/common_video/common_video_gn/moz.build
-index 5d6a4adcb3..26138f5af1 100644
+index 0479e8eaa193..69f34c421106 100644
--- third_party/libwebrtc/common_video/common_video_gn/moz.build
+++ third_party/libwebrtc/common_video/common_video_gn/moz.build
-@@ -81,6 +81,17 @@
+@@ -81,6 +81,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6707,7 +6801,7 @@ index 5d6a4adcb3..26138f5af1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -175,6 +186,10 @@
+@@ -175,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6718,7 +6812,7 @@ index 5d6a4adcb3..26138f5af1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -191,6 +206,10 @@
+@@ -191,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6729,30 +6823,31 @@ index 5d6a4adcb3..26138f5af1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -215,6 +234,12 @@
-
- OS_LIBS += [
+@@ -217,6 +237,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/common_video/frame_counts_gn/moz.build third_party/libwebrtc/common_video/frame_counts_gn/moz.build
-index c33906773b..eecfd4dd84 100644
+index 17012861fcef..118250d7013f 100644
--- third_party/libwebrtc/common_video/frame_counts_gn/moz.build
+++ third_party/libwebrtc/common_video/frame_counts_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6764,7 +6859,7 @@ index c33906773b..eecfd4dd84 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6775,7 +6870,7 @@ index c33906773b..eecfd4dd84 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6787,16 +6882,17 @@ index c33906773b..eecfd4dd84 100644
DEFINES["_DEBUG"] = True
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 04b49591a7..81d951ca17 100644
+index ddd457fb8415..fc6ad4d52de2 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6808,7 +6904,7 @@ index 04b49591a7..81d951ca17 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6819,7 +6915,7 @@ index 04b49591a7..81d951ca17 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6830,30 +6926,31 @@ index 04b49591a7..81d951ca17 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build
-index 7cd0d06686..63a1163ec2 100644
+index 9a225715a87c..18aa11848953 100644
--- third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build
+++ third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6865,7 +6962,7 @@ index 7cd0d06686..63a1163ec2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -156,6 +167,10 @@
+@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6876,7 +6973,7 @@ index 7cd0d06686..63a1163ec2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -172,6 +187,10 @@
+@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6887,30 +6984,31 @@ index 7cd0d06686..63a1163ec2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -196,6 +215,12 @@
-
- OS_LIBS += [
+@@ -198,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build
-index 7902cecfcf..678eb54e71 100644
+index 07af234d639b..081ad4e58662 100644
--- third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build
+++ third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build
-@@ -73,6 +73,17 @@
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6922,7 +7020,7 @@ index 7902cecfcf..678eb54e71 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6933,7 +7031,7 @@ index 7902cecfcf..678eb54e71 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -6944,30 +7042,31 @@ index 7902cecfcf..678eb54e71 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build
-index 5ce1736a8a..2c2277cfda 100644
+index b962c2be4a51..fe5742af06ac 100644
--- third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build
+++ third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -6979,7 +7078,7 @@ index 5ce1736a8a..2c2277cfda 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -6990,7 +7089,7 @@ index 5ce1736a8a..2c2277cfda 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7001,30 +7100,31 @@ index 5ce1736a8a..2c2277cfda 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 87fa2c1dac..59b5df3381 100644
+index 55893f3ff588..84af0e8e2c26 100644
--- third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build
+++ third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7036,7 +7136,7 @@ index 87fa2c1dac..59b5df3381 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -165,6 +176,10 @@
+@@ -165,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7047,7 +7147,7 @@ index 87fa2c1dac..59b5df3381 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -181,6 +196,10 @@
+@@ -181,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7058,30 +7158,31 @@ index 87fa2c1dac..59b5df3381 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -205,6 +224,12 @@
-
- OS_LIBS += [
+@@ -207,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/logging/rtc_event_video_gn/moz.build third_party/libwebrtc/logging/rtc_event_video_gn/moz.build
-index 35bbf759ab..740650442b 100644
+index ab117be3edf3..5799bcb5d771 100644
--- third_party/libwebrtc/logging/rtc_event_video_gn/moz.build
+++ third_party/libwebrtc/logging/rtc_event_video_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7093,7 +7194,7 @@ index 35bbf759ab..740650442b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7104,7 +7205,7 @@ index 35bbf759ab..740650442b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7115,30 +7216,31 @@ index 35bbf759ab..740650442b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,12 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build
-index 6b35e5a077..b1fe6b3bb3 100644
+index 6bc8696aca6e..d970f9b9b398 100644
--- third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build
+++ third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7150,7 +7252,7 @@ index 6b35e5a077..b1fe6b3bb3 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7161,7 +7263,7 @@ index 6b35e5a077..b1fe6b3bb3 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7172,30 +7274,31 @@ index 6b35e5a077..b1fe6b3bb3 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/media/rtc_constants_gn/moz.build third_party/libwebrtc/media/rtc_constants_gn/moz.build
-index 78cddb03a1..1e857b78e7 100644
+index 70155e01728c..8ce40712d15d 100644
--- third_party/libwebrtc/media/rtc_constants_gn/moz.build
+++ third_party/libwebrtc/media/rtc_constants_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7207,7 +7310,7 @@ index 78cddb03a1..1e857b78e7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7218,7 +7321,7 @@ index 78cddb03a1..1e857b78e7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7229,30 +7332,31 @@ index 78cddb03a1..1e857b78e7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 4f84ca1381..cdc80664ad 100644
+index 4df284311700..fae8e356b01f 100644
--- third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build
+++ third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7264,7 +7368,7 @@ index 4f84ca1381..cdc80664ad 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7275,7 +7379,7 @@ index 4f84ca1381..cdc80664ad 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7286,30 +7390,31 @@ index 4f84ca1381..cdc80664ad 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build
-index 46b6a25fea..b02ad9dae0 100644
+index 702a53893e7a..203569bd363e 100644
--- third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build
+++ third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7321,7 +7426,7 @@ index 46b6a25fea..b02ad9dae0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7332,7 +7437,7 @@ index 46b6a25fea..b02ad9dae0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7343,30 +7448,31 @@ index 46b6a25fea..b02ad9dae0 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build
-index aff43704f4..3e09a88cb7 100644
+index 24c16b1ee8ef..921e3e678e81 100644
--- third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build
+++ third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7378,7 +7484,7 @@ index aff43704f4..3e09a88cb7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7389,7 +7495,7 @@ index aff43704f4..3e09a88cb7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7400,30 +7506,31 @@ index aff43704f4..3e09a88cb7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/media/rtc_media_base_gn/moz.build third_party/libwebrtc/media/rtc_media_base_gn/moz.build
-index 7b0ac45394..e1e6b7c15e 100644
+index f2ee9ad8bf3b..1d1c00d9400d 100644
--- third_party/libwebrtc/media/rtc_media_base_gn/moz.build
+++ third_party/libwebrtc/media/rtc_media_base_gn/moz.build
-@@ -73,6 +73,17 @@
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7435,7 +7542,7 @@ index 7b0ac45394..e1e6b7c15e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7446,7 +7553,7 @@ index 7b0ac45394..e1e6b7c15e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7457,30 +7564,31 @@ index 7b0ac45394..e1e6b7c15e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/media/rtc_media_config_gn/moz.build third_party/libwebrtc/media/rtc_media_config_gn/moz.build
-index e559dfd675..d24a1900d9 100644
+index 6f7141a69d8c..5a4b3c4c27eb 100644
--- third_party/libwebrtc/media/rtc_media_config_gn/moz.build
+++ third_party/libwebrtc/media/rtc_media_config_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7492,7 +7600,7 @@ index e559dfd675..d24a1900d9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7503,7 +7611,7 @@ index e559dfd675..d24a1900d9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7515,16 +7623,17 @@ index e559dfd675..d24a1900d9 100644
DEFINES["_DEBUG"] = True
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 266b11ad8e..d7c74367e9 100644
+index 66faeda499af..440df7c10648 100644
--- third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build
+++ third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7536,7 +7645,7 @@ index 266b11ad8e..d7c74367e9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7547,7 +7656,7 @@ index 266b11ad8e..d7c74367e9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7558,30 +7667,31 @@ index 266b11ad8e..d7c74367e9 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build
-index 52456dd65b..ce3a4ea0f0 100644
+index 51079d89b996..ad8236bc4664 100644
--- third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build
+++ third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7593,7 +7703,7 @@ index 52456dd65b..ce3a4ea0f0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7604,7 +7714,7 @@ index 52456dd65b..ce3a4ea0f0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7615,30 +7725,31 @@ index 52456dd65b..ce3a4ea0f0 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 1f968a13a1..94ecdd7dfa 100644
+index 2445b95f0595..18fb79d38147 100644
--- third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7650,7 +7761,7 @@ index 1f968a13a1..94ecdd7dfa 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7661,7 +7772,7 @@ index 1f968a13a1..94ecdd7dfa 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7672,30 +7783,31 @@ index 1f968a13a1..94ecdd7dfa 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 1c313a5b00..08d3e88c98 100644
+index 98116af0486f..4c1e6f7269e9 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7707,7 +7819,7 @@ index 1c313a5b00..08d3e88c98 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7718,7 +7830,7 @@ index 1c313a5b00..08d3e88c98 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7730,16 +7842,17 @@ index 1c313a5b00..08d3e88c98 100644
DEFINES["_DEBUG"] = True
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 bd7056caf3..a8a0801d58 100644
+index 9919b488aefd..9755e0c44db9 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7751,7 +7864,7 @@ index bd7056caf3..a8a0801d58 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7762,7 +7875,7 @@ index bd7056caf3..a8a0801d58 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7773,30 +7886,31 @@ index bd7056caf3..a8a0801d58 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6fa0115864..a0ffc9ad0f 100644
+index 17bcc21766cd..92a1ad7792c5 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7808,7 +7922,7 @@ index 6fa0115864..a0ffc9ad0f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7819,7 +7933,7 @@ index 6fa0115864..a0ffc9ad0f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7830,30 +7944,31 @@ index 6fa0115864..a0ffc9ad0f 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b537062aef..560f57dc55 100644
+index fce5ef96958b..b9fbbc0fc4e8 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
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7865,7 +7980,7 @@ index b537062aef..560f57dc55 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7876,7 +7991,7 @@ index b537062aef..560f57dc55 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7887,30 +8002,31 @@ index b537062aef..560f57dc55 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b38993845c..4660cc9b91 100644
+index d8f0a9f0a79b..d82cf4afb270 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
-@@ -77,6 +77,17 @@
+@@ -77,6 +77,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7922,7 +8038,7 @@ index b38993845c..4660cc9b91 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -170,6 +181,10 @@
+@@ -170,6 +182,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7933,7 +8049,7 @@ index b38993845c..4660cc9b91 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -186,6 +201,10 @@
+@@ -186,6 +202,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -7944,30 +8060,31 @@ index b38993845c..4660cc9b91 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -210,6 +229,12 @@
-
- OS_LIBS += [
+@@ -212,6 +232,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 df061c6618..c2bbb84fd5 100644
+index ea8b966375da..78044a9a108c 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -7979,7 +8096,7 @@ index df061c6618..c2bbb84fd5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -7990,7 +8107,7 @@ index df061c6618..c2bbb84fd5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8001,30 +8118,31 @@ index df061c6618..c2bbb84fd5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e0f07f2351..d333d25384 100644
+index e5b7ceb5ddc4..508e73299845 100644
--- third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8036,7 +8154,7 @@ index e0f07f2351..d333d25384 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8047,7 +8165,7 @@ index e0f07f2351..d333d25384 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8058,30 +8176,31 @@ index e0f07f2351..d333d25384 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build
-index 3716ec4cbe..850c1de44e 100644
+index d7e0bf8ab271..746e16cfe0e7 100644
--- third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8093,7 +8212,7 @@ index 3716ec4cbe..850c1de44e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8104,7 +8223,7 @@ index 3716ec4cbe..850c1de44e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8115,30 +8234,31 @@ index 3716ec4cbe..850c1de44e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,12 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 8910ce7cf4..0a1a559212 100644
+index dd562565b805..62028b9a00c2 100644
--- third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8150,7 +8270,7 @@ index 8910ce7cf4..0a1a559212 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8161,7 +8281,7 @@ index 8910ce7cf4..0a1a559212 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8172,30 +8292,31 @@ index 8910ce7cf4..0a1a559212 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build
-index 71d1053761..81dae2b987 100644
+index bfe44840d3d4..38990e0334d5 100644
--- third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8207,7 +8328,7 @@ index 71d1053761..81dae2b987 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8218,7 +8339,7 @@ index 71d1053761..81dae2b987 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8229,30 +8350,31 @@ index 71d1053761..81dae2b987 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -194,6 +213,12 @@
-
- OS_LIBS += [
+@@ -196,6 +216,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 165ab4b8ac..1588baf881 100644
+index 0b18a615b4ec..73c163b91b10 100644
--- third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build
-@@ -135,6 +135,17 @@
+@@ -135,6 +135,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8264,7 +8386,7 @@ index 165ab4b8ac..1588baf881 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -228,6 +239,10 @@
+@@ -228,6 +240,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8275,7 +8397,7 @@ index 165ab4b8ac..1588baf881 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -244,6 +259,10 @@
+@@ -244,6 +260,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8286,30 +8408,31 @@ index 165ab4b8ac..1588baf881 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -268,6 +287,12 @@
-
- OS_LIBS += [
+@@ -270,6 +290,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build
-index e46ee8458f..d4a96cbb19 100644
+index fa5e569665cf..409287ef6630 100644
--- third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8321,7 +8444,7 @@ index e46ee8458f..d4a96cbb19 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8332,7 +8455,7 @@ index e46ee8458f..d4a96cbb19 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8343,30 +8466,31 @@ index e46ee8458f..d4a96cbb19 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 538b0d271d..cbcab8c2f3 100644
+index b0d168c1691a..835262ba489b 100644
--- third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8378,7 +8502,7 @@ index 538b0d271d..cbcab8c2f3 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8389,7 +8513,7 @@ index 538b0d271d..cbcab8c2f3 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8401,16 +8525,17 @@ index 538b0d271d..cbcab8c2f3 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build
-index 43fb6469dd..b49f126bad 100644
+index f5594d5dd76d..3ba45953f202 100644
--- third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build
-@@ -89,6 +89,17 @@
+@@ -89,6 +89,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8422,7 +8547,7 @@ index 43fb6469dd..b49f126bad 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -168,6 +179,10 @@
+@@ -168,6 +180,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8433,7 +8558,7 @@ index 43fb6469dd..b49f126bad 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -184,6 +199,10 @@
+@@ -184,6 +200,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8444,30 +8569,31 @@ index 43fb6469dd..b49f126bad 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -208,6 +227,12 @@
-
- OS_LIBS += [
+@@ -210,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build
-index b4ed48e62b..9656a8e979 100644
+index 79902fe4481d..53c5d4a867af 100644
--- third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8479,7 +8605,7 @@ index b4ed48e62b..9656a8e979 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8490,7 +8616,7 @@ index b4ed48e62b..9656a8e979 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8502,16 +8628,17 @@ index b4ed48e62b..9656a8e979 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build
-index 67f836250c..64781830bc 100644
+index 1c32c20085ac..5c91f569f099 100644
--- third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8523,7 +8650,7 @@ index 67f836250c..64781830bc 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -147,6 +158,10 @@
+@@ -147,6 +159,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8534,7 +8661,7 @@ index 67f836250c..64781830bc 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -163,6 +178,10 @@
+@@ -163,6 +179,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8545,30 +8672,31 @@ index 67f836250c..64781830bc 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -187,6 +206,12 @@
-
- OS_LIBS += [
+@@ -189,6 +209,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b7c99fdd71..0a445df1f7 100644
+index a1a6d15ac826..5cee9c981540 100644
--- third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build
-@@ -66,6 +66,17 @@
+@@ -66,6 +66,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8580,7 +8708,7 @@ index b7c99fdd71..0a445df1f7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -148,6 +159,10 @@
+@@ -148,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8591,7 +8719,7 @@ index b7c99fdd71..0a445df1f7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -164,6 +179,10 @@
+@@ -164,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8602,30 +8730,31 @@ index b7c99fdd71..0a445df1f7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -188,6 +207,12 @@
-
- OS_LIBS += [
+@@ -190,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
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 16e35fafbb..a8ca6dc587 100644
+index a9e8e18768c9..21ed6a850ddc 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8637,7 +8766,7 @@ index 16e35fafbb..a8ca6dc587 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8648,7 +8777,7 @@ index 16e35fafbb..a8ca6dc587 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8659,30 +8788,31 @@ index 16e35fafbb..a8ca6dc587 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build
-index fb0747b69c..46a84e8c38 100644
+index 063bca6ce97c..e2dd6c9a4eba 100644
--- third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build
-@@ -99,6 +99,17 @@
+@@ -99,6 +99,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8694,7 +8824,7 @@ index fb0747b69c..46a84e8c38 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -192,6 +203,10 @@
+@@ -192,6 +204,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8705,7 +8835,7 @@ index fb0747b69c..46a84e8c38 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -208,6 +223,10 @@
+@@ -208,6 +224,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8716,30 +8846,31 @@ index fb0747b69c..46a84e8c38 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -232,6 +251,12 @@
-
- OS_LIBS += [
+@@ -234,6 +254,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 24cda76b67..99e02a289f 100644
+index 1b4ac252e184..061f5e1fc705 100644
--- third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8751,7 +8882,7 @@ index 24cda76b67..99e02a289f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8762,7 +8893,7 @@ index 24cda76b67..99e02a289f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8773,30 +8904,31 @@ index 24cda76b67..99e02a289f 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build
-index 621edd1f38..09f6cceb97 100644
+index bf63d4640191..f89e77b94c8a 100644
--- third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8808,7 +8940,7 @@ index 621edd1f38..09f6cceb97 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -155,6 +166,10 @@
+@@ -155,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8819,7 +8951,7 @@ index 621edd1f38..09f6cceb97 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -171,6 +186,10 @@
+@@ -171,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8830,30 +8962,31 @@ index 621edd1f38..09f6cceb97 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -195,6 +214,12 @@
-
- OS_LIBS += [
+@@ -197,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_coding/red_gn/moz.build third_party/libwebrtc/modules/audio_coding/red_gn/moz.build
-index ff0cdea507..770c012bff 100644
+index f0b4a4acd7e7..afd7975d6821 100644
--- third_party/libwebrtc/modules/audio_coding/red_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/red_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8865,7 +8998,7 @@ index ff0cdea507..770c012bff 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8876,7 +9009,7 @@ index ff0cdea507..770c012bff 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8887,30 +9020,31 @@ index ff0cdea507..770c012bff 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 8a5e2d696b..8937898ffb 100644
+index fc3a9aab2030..f056f13b834b 100644
--- third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -8922,7 +9056,7 @@ index 8a5e2d696b..8937898ffb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8933,7 +9067,7 @@ index 8a5e2d696b..8937898ffb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -8944,30 +9078,31 @@ index 8a5e2d696b..8937898ffb 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 543f023f8f..3e52c8782e 100644
+index 24a2a598bd5a..05606be49632 100644
--- third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build
-@@ -73,6 +73,18 @@
+@@ -73,6 +73,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_CODEC_ISAC"] = True
+ DEFINES["WEBRTC_POSIX"] = True
@@ -8980,7 +9115,7 @@ index 543f023f8f..3e52c8782e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +175,10 @@
+@@ -163,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -8991,7 +9126,7 @@ index 543f023f8f..3e52c8782e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +195,10 @@
+@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9002,30 +9137,31 @@ index 543f023f8f..3e52c8782e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -214,6 +234,12 @@
- if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
+@@ -215,6 +236,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
DEFINES["WEBRTC_CODEC_ISAC"] = True
-+
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
-
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+ CXXFLAGS += [
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 e831769c57..e2d3a94841 100644
+index 11f36734a170..a1095cd56e6e 100644
--- third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build
+++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build
-@@ -73,6 +73,18 @@
+@@ -73,6 +73,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_CODEC_ISAC"] = True
+ DEFINES["WEBRTC_POSIX"] = True
@@ -9038,7 +9174,7 @@ index e831769c57..e2d3a94841 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -170,6 +182,10 @@
+@@ -170,6 +183,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9049,7 +9185,7 @@ index e831769c57..e2d3a94841 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -186,6 +202,10 @@
+@@ -186,6 +203,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9060,30 +9196,31 @@ index e831769c57..e2d3a94841 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -221,6 +241,12 @@
- if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
+@@ -222,6 +243,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
DEFINES["WEBRTC_CODEC_ISAC"] = True
-+
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
-
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+ CXXFLAGS += [
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 fa94ad5248..7f242d4ccd 100644
+index 98971e19c0a3..de4b7d8d3d4f 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
-@@ -72,6 +72,18 @@
+@@ -72,6 +72,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_CODEC_ISAC"] = True
+ DEFINES["WEBRTC_POSIX"] = True
@@ -9096,7 +9233,7 @@ index fa94ad5248..7f242d4ccd 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +174,10 @@
+@@ -162,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9107,7 +9244,7 @@ index fa94ad5248..7f242d4ccd 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +194,10 @@
+@@ -178,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9118,30 +9255,31 @@ index fa94ad5248..7f242d4ccd 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -213,6 +233,12 @@
- if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
+@@ -214,6 +235,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
DEFINES["WEBRTC_CODEC_ISAC"] = True
-+
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
-
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build
-index 0680df2546..9eb57026b1 100644
+index 6a63947c76b2..441d7df748a2 100644
--- third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build
+++ third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9153,7 +9291,7 @@ index 0680df2546..9eb57026b1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9164,7 +9302,7 @@ index 0680df2546..9eb57026b1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9176,16 +9314,17 @@ index 0680df2546..9eb57026b1 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build
-index 8e1e8c6eea..99aed058a2 100644
+index 8186c3d5f287..ec578a48d222 100644
--- third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build
+++ third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9197,7 +9336,7 @@ index 8e1e8c6eea..99aed058a2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9208,7 +9347,7 @@ index 8e1e8c6eea..99aed058a2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9219,30 +9358,31 @@ index 8e1e8c6eea..99aed058a2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build
-index a079f00e51..b73f2f5bf0 100644
+index 3ee7d2fbde98..62d1a12fa5c7 100644
--- third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build
+++ third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9254,7 +9394,7 @@ index a079f00e51..b73f2f5bf0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9265,7 +9405,7 @@ index a079f00e51..b73f2f5bf0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9277,16 +9417,17 @@ index a079f00e51..b73f2f5bf0 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build
-index ff6ced9576..ab33cf8f57 100644
+index 23b6d1e299db..2f7155057e1f 100644
--- third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build
+++ third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9298,7 +9439,7 @@ index ff6ced9576..ab33cf8f57 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9309,7 +9450,7 @@ index ff6ced9576..ab33cf8f57 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9320,30 +9461,31 @@ index ff6ced9576..ab33cf8f57 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 f57f39f961..a49062054a 100644
+index 879d7128f7d7..9e85448e63eb 100644
--- third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build
+++ third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build
-@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -64,6 +64,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9355,7 +9497,7 @@ index f57f39f961..a49062054a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -154,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9366,7 +9508,7 @@ index f57f39f961..a49062054a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -170,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9378,16 +9520,17 @@ index f57f39f961..a49062054a 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build
-index c67982918f..296eea9c6d 100644
+index 6e0d09b3de67..c785d268d1b3 100644
--- third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build
+++ third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9399,7 +9542,7 @@ index c67982918f..296eea9c6d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -165,6 +176,10 @@
+@@ -165,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9410,7 +9553,7 @@ index c67982918f..296eea9c6d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -181,6 +196,10 @@
+@@ -181,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9421,30 +9564,31 @@ index c67982918f..296eea9c6d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -205,6 +224,12 @@
-
- OS_LIBS += [
+@@ -207,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6ef7c5724e..fc01f3952e 100644
+index 7dfd0eb082b4..5da8d85e662c 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9456,7 +9600,7 @@ index 6ef7c5724e..fc01f3952e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9467,7 +9611,7 @@ index 6ef7c5724e..fc01f3952e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9478,30 +9622,31 @@ index 6ef7c5724e..fc01f3952e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 cf7151974d..95d9fb125a 100644
+index 405c6767000e..e5ba10a2bacc 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
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9513,7 +9658,7 @@ index cf7151974d..95d9fb125a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9524,7 +9669,7 @@ index cf7151974d..95d9fb125a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9535,30 +9680,31 @@ index cf7151974d..95d9fb125a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b1898d53ae..04f8b9d9e5 100644
+index 3f4d47fd247b..1f3dde135024 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9570,7 +9716,7 @@ index b1898d53ae..04f8b9d9e5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9581,7 +9727,7 @@ index b1898d53ae..04f8b9d9e5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9593,16 +9739,17 @@ index b1898d53ae..04f8b9d9e5 100644
DEFINES["_DEBUG"] = True
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 249c41bf52..447e48922b 100644
+index 8e9ba114b04a..8c0ee0129508 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9614,7 +9761,7 @@ index 249c41bf52..447e48922b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -152,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9625,7 +9772,7 @@ index 249c41bf52..447e48922b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -168,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9637,16 +9784,17 @@ index 249c41bf52..447e48922b 100644
DEFINES["_DEBUG"] = True
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 81618e8ebb..dd8080b826 100644
+index dd09dca2f8f2..8b9401dfdddf 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
-@@ -77,6 +77,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -77,6 +77,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9658,7 +9806,7 @@ index 81618e8ebb..dd8080b826 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -150,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -150,6 +162,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9669,7 +9817,7 @@ index 81618e8ebb..dd8080b826 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -166,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -166,6 +182,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9680,7 +9828,7 @@ index 81618e8ebb..dd8080b826 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -188,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
+@@ -192,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
]
@@ -9694,16 +9842,17 @@ index 81618e8ebb..dd8080b826 100644
CXXFLAGS += [
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 f4efbb9a68..0906a1fb69 100644
+index 169edba30a48..dc43bc1ef82d 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9715,7 +9864,7 @@ index f4efbb9a68..0906a1fb69 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9726,7 +9875,7 @@ index f4efbb9a68..0906a1fb69 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9738,16 +9887,17 @@ index f4efbb9a68..0906a1fb69 100644
DEFINES["_DEBUG"] = True
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 5ccd7db91d..82d11ecf9e 100644
+index 0cf4b9a27473..158bddee5cc3 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9759,7 +9909,7 @@ index 5ccd7db91d..82d11ecf9e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -152,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9770,7 +9920,7 @@ index 5ccd7db91d..82d11ecf9e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -168,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9782,16 +9932,17 @@ index 5ccd7db91d..82d11ecf9e 100644
DEFINES["_DEBUG"] = True
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 a1dbc7c8d7..6f82564ed9 100644
+index 6f8dc432f810..ce7f6081f31b 100644
--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build
-@@ -121,6 +121,17 @@
+@@ -121,6 +121,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9803,7 +9954,7 @@ index a1dbc7c8d7..6f82564ed9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -214,6 +225,10 @@
+@@ -214,6 +226,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9814,7 +9965,7 @@ index a1dbc7c8d7..6f82564ed9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -230,6 +245,10 @@
+@@ -230,6 +246,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9825,30 +9976,31 @@ index a1dbc7c8d7..6f82564ed9 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -254,6 +273,12 @@
-
- OS_LIBS += [
+@@ -256,6 +276,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 d55b326e7c..f3c8f121e9 100644
+index 2c224c5bc66e..9579f747d48a 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9860,7 +10012,7 @@ index d55b326e7c..f3c8f121e9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9871,7 +10023,7 @@ index d55b326e7c..f3c8f121e9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9883,16 +10035,17 @@ index d55b326e7c..f3c8f121e9 100644
DEFINES["_DEBUG"] = True
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 33c5ef238f..feca639586 100644
+index cfebcec74d3f..803c19d4dae8 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9904,7 +10057,7 @@ index 33c5ef238f..feca639586 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9915,7 +10068,7 @@ index 33c5ef238f..feca639586 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9927,16 +10080,17 @@ index 33c5ef238f..feca639586 100644
DEFINES["_DEBUG"] = True
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 a2685d2689..0fb811dd64 100644
+index 1adddab80679..0fcca4aeca74 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9948,7 +10102,7 @@ index a2685d2689..0fb811dd64 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -9959,7 +10113,7 @@ index a2685d2689..0fb811dd64 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -9971,16 +10125,17 @@ index a2685d2689..0fb811dd64 100644
DEFINES["_DEBUG"] = True
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 9e65da3503..eaa756eab9 100644
+index 24ed7e7e6c2e..886d234ce80a 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -9992,7 +10147,7 @@ index 9e65da3503..eaa756eab9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10003,7 +10158,7 @@ index 9e65da3503..eaa756eab9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10015,16 +10170,17 @@ index 9e65da3503..eaa756eab9 100644
DEFINES["_DEBUG"] = True
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 452ea8eb6f..61d3197165 100644
+index f68dd8556d5e..b608a2e3cf67 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10036,7 +10192,7 @@ index 452ea8eb6f..61d3197165 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10047,7 +10203,7 @@ index 452ea8eb6f..61d3197165 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10059,16 +10215,17 @@ index 452ea8eb6f..61d3197165 100644
DEFINES["_DEBUG"] = True
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 35e3329585..834afb7998 100644
+index d6d02f7fb818..225a7088aa7d 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10080,7 +10237,7 @@ index 35e3329585..834afb7998 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10091,7 +10248,7 @@ index 35e3329585..834afb7998 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10102,30 +10259,31 @@ index 35e3329585..834afb7998 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 efc4513c9e..392e0f4ffa 100644
+index efdba70e735b..e4bd7d72d20c 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10137,7 +10295,7 @@ index efc4513c9e..392e0f4ffa 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10148,7 +10306,7 @@ index efc4513c9e..392e0f4ffa 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10159,30 +10317,31 @@ index efc4513c9e..392e0f4ffa 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 3efc2af585..afdd337a76 100644
+index d01a01958539..8ff70ac3b7d1 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10194,7 +10353,7 @@ index 3efc2af585..afdd337a76 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -170,6 +181,10 @@
+@@ -170,6 +182,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10205,7 +10364,7 @@ index 3efc2af585..afdd337a76 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -186,6 +201,10 @@
+@@ -186,6 +202,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10216,30 +10375,31 @@ index 3efc2af585..afdd337a76 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -210,6 +229,12 @@
-
- OS_LIBS += [
+@@ -212,6 +232,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 cb7f900073..455a94feb0 100644
+index b47b5e255eae..0bf147893e67 100644
--- third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10251,7 +10411,7 @@ index cb7f900073..455a94feb0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10262,7 +10422,7 @@ index cb7f900073..455a94feb0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10273,30 +10433,31 @@ index cb7f900073..455a94feb0 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 2a0e9bc2c3..f14b4ffa4b 100644
+index a44e6cb51717..9ea735980f11 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10308,7 +10469,7 @@ index 2a0e9bc2c3..f14b4ffa4b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10319,7 +10480,7 @@ index 2a0e9bc2c3..f14b4ffa4b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10331,16 +10492,17 @@ index 2a0e9bc2c3..f14b4ffa4b 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build
-index 68843197cf..b7fc2b9b27 100644
+index 9efe4caacc58..9177c057bedf 100644
--- third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10352,7 +10514,7 @@ index 68843197cf..b7fc2b9b27 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10363,7 +10525,7 @@ index 68843197cf..b7fc2b9b27 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10375,16 +10537,17 @@ index 68843197cf..b7fc2b9b27 100644
DEFINES["_DEBUG"] = True
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 9cdc513dff..b73ca0a1f5 100644
+index 95223fd4dd2b..2549a49c4b90 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10396,7 +10559,7 @@ index 9cdc513dff..b73ca0a1f5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10407,7 +10570,7 @@ index 9cdc513dff..b73ca0a1f5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10418,30 +10581,31 @@ index 9cdc513dff..b73ca0a1f5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 c4ba6d6103..8c968bec46 100644
+index cbd43b384337..bf7af8d47d20 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10453,7 +10617,7 @@ index c4ba6d6103..8c968bec46 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10464,7 +10628,7 @@ index c4ba6d6103..8c968bec46 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10475,30 +10639,31 @@ index c4ba6d6103..8c968bec46 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build
-index 873fc73ed2..7c30c4307e 100644
+index 938a22e55ef5..a748524a893a 100644
--- third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10510,7 +10675,7 @@ index 873fc73ed2..7c30c4307e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10521,7 +10686,7 @@ index 873fc73ed2..7c30c4307e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10532,30 +10697,31 @@ index 873fc73ed2..7c30c4307e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 c082e8be20..9b5c4a102a 100644
+index f8eaa2c972f0..63f91ec0f999 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10567,7 +10733,7 @@ index c082e8be20..9b5c4a102a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10578,7 +10744,7 @@ index c082e8be20..9b5c4a102a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10589,30 +10755,31 @@ index c082e8be20..9b5c4a102a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 bb2364621f..9cc868d42e 100644
+index 6b01fe7a3cf2..7990cefe3666 100644
--- third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10624,7 +10791,7 @@ index bb2364621f..9cc868d42e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10635,7 +10802,7 @@ index bb2364621f..9cc868d42e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10646,30 +10813,31 @@ index bb2364621f..9cc868d42e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 c2278b5584..dceb5a5f40 100644
+index e5a18a7ffd7e..d625aef85e0d 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
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10681,7 +10849,7 @@ index c2278b5584..dceb5a5f40 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10692,7 +10860,7 @@ index c2278b5584..dceb5a5f40 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10703,30 +10871,31 @@ index c2278b5584..dceb5a5f40 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 7cbfedef3a..aca6db5084 100644
+index 2eef15c4abf3..632577db20b9 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10738,7 +10907,7 @@ index 7cbfedef3a..aca6db5084 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10749,7 +10918,7 @@ index 7cbfedef3a..aca6db5084 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10760,30 +10929,31 @@ index 7cbfedef3a..aca6db5084 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build
-index 6a681f6d5e..ca8d980f38 100644
+index 69205a23fd8b..3c4075a0702a 100644
--- third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10795,7 +10965,7 @@ index 6a681f6d5e..ca8d980f38 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10806,7 +10976,7 @@ index 6a681f6d5e..ca8d980f38 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10817,30 +10987,31 @@ index 6a681f6d5e..ca8d980f38 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 af09244a52..a57f14ba6a 100644
+index 795eb0e43801..bb307f7bd518 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
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10852,7 +11023,7 @@ index af09244a52..a57f14ba6a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10863,7 +11034,7 @@ index af09244a52..a57f14ba6a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10874,30 +11045,31 @@ index af09244a52..a57f14ba6a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b6cae79851..2a219468af 100644
+index 157295dcf0b3..34a5e5553eea 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
-@@ -75,6 +75,17 @@
+@@ -75,6 +75,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10909,7 +11081,7 @@ index b6cae79851..2a219468af 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -168,6 +179,10 @@
+@@ -168,6 +180,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10920,7 +11092,7 @@ index b6cae79851..2a219468af 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -184,6 +199,10 @@
+@@ -184,6 +200,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10931,30 +11103,31 @@ index b6cae79851..2a219468af 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -208,6 +227,12 @@
-
- OS_LIBS += [
+@@ -210,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build
-index d1b3bee93f..54fd581f80 100644
+index 0a0c9c1c3727..3aaf4b95292f 100644
--- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -10966,7 +11139,7 @@ index d1b3bee93f..54fd581f80 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -10977,7 +11150,7 @@ index d1b3bee93f..54fd581f80 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -10988,30 +11161,31 @@ index d1b3bee93f..54fd581f80 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_processing/api_gn/moz.build third_party/libwebrtc/modules/audio_processing/api_gn/moz.build
-index dfab8ef20b..35d7628efa 100644
+index b05acf3b57d9..2e43186fbb14 100644
--- third_party/libwebrtc/modules/audio_processing/api_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/api_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11023,7 +11197,7 @@ index dfab8ef20b..35d7628efa 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11034,7 +11208,7 @@ index dfab8ef20b..35d7628efa 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11045,30 +11219,31 @@ index dfab8ef20b..35d7628efa 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 833f44927f..95ff1333b5 100644
+index f0cdd4bb49b1..2f17d946eb65 100644
--- third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11080,7 +11255,7 @@ index 833f44927f..95ff1333b5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11091,7 +11266,7 @@ index 833f44927f..95ff1333b5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11102,30 +11277,31 @@ index 833f44927f..95ff1333b5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 ef50066aa0..f35e2bb673 100644
+index ecdebe1342fd..48eea1da0519 100644
--- third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11137,7 +11313,7 @@ index ef50066aa0..f35e2bb673 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11148,7 +11324,7 @@ index ef50066aa0..f35e2bb673 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11159,30 +11335,31 @@ index ef50066aa0..f35e2bb673 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 aa637aa2ca..3ece88a35d 100644
+index 252ddd57846a..fedaf0da29d6 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11194,7 +11371,7 @@ index aa637aa2ca..3ece88a35d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11205,7 +11382,7 @@ index aa637aa2ca..3ece88a35d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11216,30 +11393,31 @@ index aa637aa2ca..3ece88a35d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 4aface66d6..d93c4f540e 100644
+index 9e9fdc40f318..12881979cdc9 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11251,7 +11429,7 @@ index 4aface66d6..d93c4f540e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11262,7 +11440,7 @@ index 4aface66d6..d93c4f540e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11274,16 +11452,17 @@ index 4aface66d6..d93c4f540e 100644
DEFINES["_DEBUG"] = True
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 f20b13bd0a..06d3996410 100644
+index 9ed0923d04b9..7208f9db8481 100644
--- third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build
-@@ -82,6 +82,17 @@
+@@ -82,6 +82,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11295,7 +11474,7 @@ index f20b13bd0a..06d3996410 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -175,6 +186,10 @@
+@@ -175,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11306,7 +11485,7 @@ index f20b13bd0a..06d3996410 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -191,6 +206,10 @@
+@@ -191,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11317,30 +11496,31 @@ index f20b13bd0a..06d3996410 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -215,6 +234,12 @@
-
- OS_LIBS += [
+@@ -217,6 +237,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 1eb1f12ac7..1047578c1c 100644
+index 6622ae5378e3..67991e81e319 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
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11352,7 +11532,7 @@ index 1eb1f12ac7..1047578c1c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11363,7 +11543,7 @@ index 1eb1f12ac7..1047578c1c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11374,30 +11554,31 @@ index 1eb1f12ac7..1047578c1c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_processing/config_gn/moz.build third_party/libwebrtc/modules/audio_processing/config_gn/moz.build
-index efbaa9991f..01b95bf107 100644
+index da967fbb1dea..13339f97a8af 100644
--- third_party/libwebrtc/modules/audio_processing/config_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/config_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11409,7 +11590,7 @@ index efbaa9991f..01b95bf107 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11420,7 +11601,7 @@ index efbaa9991f..01b95bf107 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11431,30 +11612,31 @@ index efbaa9991f..01b95bf107 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 698d52d09c..5790ee2471 100644
+index 5ca53cc37e10..a0456d5efa49 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11466,7 +11648,7 @@ index 698d52d09c..5790ee2471 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11477,7 +11659,7 @@ index 698d52d09c..5790ee2471 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11488,30 +11670,31 @@ index 698d52d09c..5790ee2471 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e7b4bd602d..cdba1e73d7 100644
+index 225ae5526ac6..4461001328f9 100644
--- third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build
-@@ -80,6 +80,17 @@
+@@ -80,6 +80,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11523,7 +11706,7 @@ index e7b4bd602d..cdba1e73d7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -173,6 +184,10 @@
+@@ -173,6 +185,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11534,7 +11717,7 @@ index e7b4bd602d..cdba1e73d7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -189,6 +204,10 @@
+@@ -189,6 +205,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11545,30 +11728,31 @@ index e7b4bd602d..cdba1e73d7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -213,6 +232,12 @@
-
- OS_LIBS += [
+@@ -215,6 +235,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 aaaed22eeb..174e3ec82d 100644
+index e5d3c463b3c5..370cc5a3cb4e 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11580,7 +11764,7 @@ index aaaed22eeb..174e3ec82d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11591,7 +11775,7 @@ index aaaed22eeb..174e3ec82d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11602,30 +11786,31 @@ index aaaed22eeb..174e3ec82d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a65c04f233..f81dd6ac8b 100644
+index 0999b3a370c1..3fa083e70b9c 100644
--- third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11637,7 +11822,7 @@ index a65c04f233..f81dd6ac8b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11648,7 +11833,7 @@ index a65c04f233..f81dd6ac8b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11659,30 +11844,31 @@ index a65c04f233..f81dd6ac8b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e4fedef6fe..00ff1a6f9c 100644
+index 76ced54a9c78..e7b587f884c5 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11694,7 +11880,7 @@ index e4fedef6fe..00ff1a6f9c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11705,7 +11891,7 @@ index e4fedef6fe..00ff1a6f9c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11717,16 +11903,17 @@ index e4fedef6fe..00ff1a6f9c 100644
DEFINES["_DEBUG"] = True
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 e161f74eb6..ee40243cb5 100644
+index 12b7f3840721..6232c72cfee4 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
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11738,7 +11925,7 @@ index e161f74eb6..ee40243cb5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11749,7 +11936,7 @@ index e161f74eb6..ee40243cb5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11760,30 +11947,31 @@ index e161f74eb6..ee40243cb5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b2589fa2cb..0b6f561dfa 100644
+index 01fc02a9178c..8045c03c2f10 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11795,7 +11983,7 @@ index b2589fa2cb..0b6f561dfa 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11806,7 +11994,7 @@ index b2589fa2cb..0b6f561dfa 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11817,30 +12005,31 @@ index b2589fa2cb..0b6f561dfa 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 cf2a4f08e5..5b75fba966 100644
+index 3b51d9b2dfdd..5d9b07ca2ee3 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11852,7 +12041,7 @@ index cf2a4f08e5..5b75fba966 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -150,6 +161,10 @@
+@@ -150,6 +162,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11863,7 +12052,7 @@ index cf2a4f08e5..5b75fba966 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -166,6 +181,10 @@
+@@ -166,6 +182,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11874,30 +12063,31 @@ index cf2a4f08e5..5b75fba966 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -190,6 +209,12 @@
-
- OS_LIBS += [
+@@ -192,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 bd2401a7cb..8d497539ac 100644
+index 61eb9c051a60..ae671ec9b832 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11909,7 +12099,7 @@ index bd2401a7cb..8d497539ac 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11920,7 +12110,7 @@ index bd2401a7cb..8d497539ac 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11931,30 +12121,31 @@ index bd2401a7cb..8d497539ac 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 06000cbc10..cf42277c70 100644
+index eb5f5e4dd11a..6961975c3dda 100644
--- third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build
-@@ -74,6 +74,17 @@
+@@ -74,6 +74,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -11966,7 +12157,7 @@ index 06000cbc10..cf42277c70 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -11977,7 +12168,7 @@ index 06000cbc10..cf42277c70 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -11988,30 +12179,31 @@ index 06000cbc10..cf42277c70 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build
-index bea08f119f..c104d07962 100644
+index 6c3a778c0097..c0519ddd98a3 100644
--- third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build
+++ third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12023,7 +12215,7 @@ index bea08f119f..c104d07962 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12034,7 +12226,7 @@ index bea08f119f..c104d07962 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12045,30 +12237,31 @@ index bea08f119f..c104d07962 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6b31661826..d0d5e69729 100644
+index 9bdf972c09fc..b7eabacb416c 100644
--- third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build
+++ third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12080,7 +12273,7 @@ index 6b31661826..d0d5e69729 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12091,7 +12284,7 @@ index 6b31661826..d0d5e69729 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12102,30 +12295,31 @@ index 6b31661826..d0d5e69729 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 d98d1f4660..21e9b12b4d 100644
+index 67533c3f3298..2c4432de09be 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12137,7 +12331,7 @@ index d98d1f4660..21e9b12b4d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12148,7 +12342,7 @@ index d98d1f4660..21e9b12b4d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12159,30 +12353,31 @@ index d98d1f4660..21e9b12b4d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 9eabaa60af..cb668afcb1 100644
+index 0bbfdd1eb26e..196220f4735e 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12194,7 +12389,7 @@ index 9eabaa60af..cb668afcb1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12205,7 +12400,7 @@ index 9eabaa60af..cb668afcb1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12216,30 +12411,31 @@ index 9eabaa60af..cb668afcb1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 38da3f33ec..27afbf8699 100644
+index 4a1273d5ea74..165d69b257b2 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
-@@ -74,6 +74,17 @@
+@@ -74,6 +74,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12251,7 +12447,7 @@ index 38da3f33ec..27afbf8699 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -168,6 +179,10 @@
+@@ -168,6 +180,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12262,7 +12458,7 @@ index 38da3f33ec..27afbf8699 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -184,6 +199,10 @@
+@@ -184,6 +200,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12273,30 +12469,31 @@ index 38da3f33ec..27afbf8699 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -208,6 +227,12 @@
-
- OS_LIBS += [
+@@ -210,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 526d42a6da..c10bde89a7 100644
+index 1ad9df4e631e..943c1f213058 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12308,7 +12505,7 @@ index 526d42a6da..c10bde89a7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12319,7 +12516,7 @@ index 526d42a6da..c10bde89a7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12330,30 +12527,31 @@ index 526d42a6da..c10bde89a7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a36d351ab1..4857832777 100644
+index a9d9e3094da0..7a0319827e7f 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12365,7 +12563,7 @@ index a36d351ab1..4857832777 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12376,7 +12574,7 @@ index a36d351ab1..4857832777 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12387,30 +12585,31 @@ index a36d351ab1..4857832777 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build
-index 49fc53c47c..96a190f648 100644
+index b2b2f02ac919..5a060b051f9e 100644
--- third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build
+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12422,7 +12621,7 @@ index 49fc53c47c..96a190f648 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12433,7 +12632,7 @@ index 49fc53c47c..96a190f648 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12444,30 +12643,31 @@ index 49fc53c47c..96a190f648 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e065f6b8d6..de0945c32f 100644
+index a65d3776b5ce..32197f39da47 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12479,7 +12679,7 @@ index e065f6b8d6..de0945c32f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12490,7 +12690,7 @@ index e065f6b8d6..de0945c32f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12501,30 +12701,31 @@ index e065f6b8d6..de0945c32f 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 1a26d6fbed..ef60392c44 100644
+index 30a93699f573..8b7da5576c82 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12536,7 +12737,7 @@ index 1a26d6fbed..ef60392c44 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12547,7 +12748,7 @@ index 1a26d6fbed..ef60392c44 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12558,30 +12759,31 @@ index 1a26d6fbed..ef60392c44 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 ec5aa36c78..873daa331e 100644
+index 658b17534064..25b3b48bb46c 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
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12593,7 +12795,7 @@ index ec5aa36c78..873daa331e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12604,7 +12806,7 @@ index ec5aa36c78..873daa331e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12615,30 +12817,31 @@ index ec5aa36c78..873daa331e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 9e1db4a2ab..c421bb524d 100644
+index 6301809b05d5..0a26bd7766ca 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12650,7 +12853,7 @@ index 9e1db4a2ab..c421bb524d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12661,7 +12864,7 @@ index 9e1db4a2ab..c421bb524d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12672,30 +12875,31 @@ index 9e1db4a2ab..c421bb524d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e2f5330283..8f0c389632 100644
+index 45dee13f8f60..ad793675f80e 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
-@@ -54,6 +54,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -54,6 +54,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12707,7 +12911,7 @@ index e2f5330283..8f0c389632 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -116,6 +127,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -116,6 +128,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12718,7 +12922,7 @@ index e2f5330283..8f0c389632 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -128,6 +143,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -128,6 +144,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12729,9 +12933,9 @@ index e2f5330283..8f0c389632 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -140,6 +159,19 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT":
+@@ -144,6 +164,19 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
- DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
+ DEFINES["USE_X11"] = "1"
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
@@ -12750,16 +12954,17 @@ index e2f5330283..8f0c389632 100644
CXXFLAGS += [
diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
-index a5cf9234d1..59ec34a46a 100644
+index a337a370e3c8..df4ee570dcb9 100644
--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
+++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
-@@ -85,6 +85,59 @@
+@@ -85,6 +85,60 @@ if CONFIG["OS_TARGET"] == "Darwin":
"/third_party/libwebrtc/modules/desktop_capture/mac/window_list_utils.cc"
]
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_PIPEWIRE"] = True
@@ -12813,7 +13018,7 @@ index a5cf9234d1..59ec34a46a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -262,6 +315,10 @@
+@@ -262,6 +316,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12824,7 +13029,7 @@ index a5cf9234d1..59ec34a46a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -274,6 +331,10 @@
+@@ -274,6 +332,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12835,30 +13040,31 @@ index a5cf9234d1..59ec34a46a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -313,6 +374,12 @@
- "/third_party/libwebrtc/modules/desktop_capture/linux/x_error_trap.cc",
- "/third_party/libwebrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc",
+@@ -315,6 +377,12 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
"/third_party/libwebrtc/modules/desktop_capture/linux/x_window_property.cc"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 4cf85ddfa7..0e133b2212 100644
+index 4bf43c55c5b8..261de89c7f1f 100644
--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build
+++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build
-@@ -46,6 +46,29 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -46,6 +46,30 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_X11"] = True
@@ -12882,7 +13088,7 @@ index 4cf85ddfa7..0e133b2212 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -144,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -135,6 +159,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12893,7 +13099,7 @@ index 4cf85ddfa7..0e133b2212 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -156,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -147,6 +175,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12905,16 +13111,17 @@ index 4cf85ddfa7..0e133b2212 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build
-index 6831d8a311..10af878b46 100644
+index 59041730d8d7..56d04b216b0c 100644
--- third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build
+++ third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build
-@@ -54,6 +54,17 @@
+@@ -54,6 +54,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12926,7 +13133,7 @@ index 6831d8a311..10af878b46 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -117,6 +128,10 @@
+@@ -117,6 +129,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12937,7 +13144,7 @@ index 6831d8a311..10af878b46 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -129,6 +144,10 @@
+@@ -129,6 +145,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -12948,30 +13155,31 @@ index 6831d8a311..10af878b46 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -144,6 +163,12 @@
- if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
+@@ -145,6 +165,12 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_X11"] = "1"
-+
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
+ ]
-
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/module_api_gn/moz.build third_party/libwebrtc/modules/module_api_gn/moz.build
-index 18dcb08135..e60a418a5c 100644
+index cc26925123f8..a51d97fc676e 100644
--- third_party/libwebrtc/modules/module_api_gn/moz.build
+++ third_party/libwebrtc/modules/module_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -12983,7 +13191,7 @@ index 18dcb08135..e60a418a5c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -12994,7 +13202,7 @@ index 18dcb08135..e60a418a5c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13006,16 +13214,17 @@ index 18dcb08135..e60a418a5c 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/module_api_public_gn/moz.build third_party/libwebrtc/modules/module_api_public_gn/moz.build
-index 9e786592ef..a45d4b3617 100644
+index 3949c1a2b699..2ad7653ed01a 100644
--- third_party/libwebrtc/modules/module_api_public_gn/moz.build
+++ third_party/libwebrtc/modules/module_api_public_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13027,7 +13236,7 @@ index 9e786592ef..a45d4b3617 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13038,7 +13247,7 @@ index 9e786592ef..a45d4b3617 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13050,16 +13259,17 @@ index 9e786592ef..a45d4b3617 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/module_fec_api_gn/moz.build third_party/libwebrtc/modules/module_fec_api_gn/moz.build
-index 94c74fa40b..d535f75c8e 100644
+index b515f56396db..0a3e28ef72c7 100644
--- third_party/libwebrtc/modules/module_fec_api_gn/moz.build
+++ third_party/libwebrtc/modules/module_fec_api_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13071,7 +13281,7 @@ index 94c74fa40b..d535f75c8e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13082,7 +13292,7 @@ index 94c74fa40b..d535f75c8e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13094,16 +13304,17 @@ index 94c74fa40b..d535f75c8e 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build
-index 303d47a95a..cff53a7075 100644
+index 05dce6370410..b32bebf718a3 100644
--- third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build
+++ third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13115,7 +13326,7 @@ index 303d47a95a..cff53a7075 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13126,7 +13337,7 @@ index 303d47a95a..cff53a7075 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13137,30 +13348,31 @@ index 303d47a95a..cff53a7075 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/pacing/pacing_gn/moz.build third_party/libwebrtc/modules/pacing/pacing_gn/moz.build
-index f6fde08638..01d969c0c9 100644
+index 9650568f3264..99d9ecb75881 100644
--- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build
+++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build
-@@ -73,6 +73,17 @@
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13172,7 +13384,7 @@ index f6fde08638..01d969c0c9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13183,7 +13395,7 @@ index f6fde08638..01d969c0c9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13194,30 +13406,31 @@ index f6fde08638..01d969c0c9 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 bca6684427..599af3d257 100644
+index 80299c856e91..8d33e78a2553 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
-@@ -79,6 +79,17 @@
+@@ -79,6 +79,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13229,7 +13442,7 @@ index bca6684427..599af3d257 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -173,6 +184,10 @@
+@@ -173,6 +185,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13240,7 +13453,7 @@ index bca6684427..599af3d257 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -189,6 +204,10 @@
+@@ -189,6 +205,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13251,30 +13464,31 @@ index bca6684427..599af3d257 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -213,6 +232,12 @@
-
- OS_LIBS += [
+@@ -215,6 +235,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a5ec9f4951..e036ba0402 100644
+index dcc5ada67970..c25283a04393 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
-@@ -109,6 +109,17 @@
+@@ -109,6 +109,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13286,7 +13500,7 @@ index a5ec9f4951..e036ba0402 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -203,6 +214,10 @@
+@@ -203,6 +215,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13297,7 +13511,7 @@ index a5ec9f4951..e036ba0402 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -219,6 +234,10 @@
+@@ -219,6 +235,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13308,30 +13522,31 @@ index a5ec9f4951..e036ba0402 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -243,6 +262,12 @@
-
- OS_LIBS += [
+@@ -245,6 +265,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 33a43eeed5..13217b736d 100644
+index 798b0a5ff305..a10386c6a2f0 100644
--- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build
+++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build
-@@ -121,6 +121,17 @@
+@@ -121,6 +121,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13343,7 +13558,7 @@ index 33a43eeed5..13217b736d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -215,6 +226,10 @@
+@@ -215,6 +227,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13354,7 +13569,7 @@ index 33a43eeed5..13217b736d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -231,6 +246,10 @@
+@@ -231,6 +247,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13365,30 +13580,31 @@ index 33a43eeed5..13217b736d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -255,6 +274,12 @@
-
- OS_LIBS += [
+@@ -257,6 +277,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 aee62695af..087ee836d1 100644
+index c45fc2f0d200..a81c714be9cc 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13400,7 +13616,7 @@ index aee62695af..087ee836d1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13411,7 +13627,7 @@ index aee62695af..087ee836d1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13422,30 +13638,31 @@ index aee62695af..087ee836d1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 60e216ff55..192f544d28 100644
+index 46db193aaee8..c93d28742e4e 100644
--- third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build
+++ third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13457,7 +13674,7 @@ index 60e216ff55..192f544d28 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13468,7 +13685,7 @@ index 60e216ff55..192f544d28 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13479,30 +13696,31 @@ index 60e216ff55..192f544d28 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
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 4004c61364..4e7396bbec 100644
+index fdfdc1fbafa1..31b5ace5e0c9 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
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13514,7 +13732,7 @@ index 4004c61364..4e7396bbec 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13525,7 +13743,7 @@ index 4004c61364..4e7396bbec 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13536,29 +13754,31 @@ index 4004c61364..4e7396bbec 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
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 0fb10bee4bc4..2a811f40f750 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13570,7 +13790,7 @@ diff --git third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build t
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13581,7 +13801,7 @@ diff --git third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build t
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13592,30 +13812,31 @@ diff --git third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build t
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
-+ CXXFLAGS += [
++ CFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CFLAGS += [
diff --git third_party/libwebrtc/modules/utility/utility_gn/moz.build third_party/libwebrtc/modules/utility/utility_gn/moz.build
-index e0b16b4073..5881ab6869 100644
+index 9021063ce8da..f1fab6d7170f 100644
--- third_party/libwebrtc/modules/utility/utility_gn/moz.build
+++ third_party/libwebrtc/modules/utility/utility_gn/moz.build
-@@ -72,6 +72,17 @@
+@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13627,7 +13848,7 @@ index e0b16b4073..5881ab6869 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -165,6 +176,10 @@
+@@ -165,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13638,7 +13859,7 @@ index e0b16b4073..5881ab6869 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -181,6 +196,10 @@
+@@ -181,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13649,30 +13870,31 @@ index e0b16b4073..5881ab6869 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -205,6 +224,12 @@
-
- OS_LIBS += [
+@@ -207,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 3b4e237101..0f5c345da0 100644
+index a310bfe12e65..62be8f11aa00 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
-@@ -64,6 +64,22 @@
+@@ -64,6 +64,23 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13689,7 +13911,7 @@ index 3b4e237101..0f5c345da0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -179,6 +195,10 @@
+@@ -179,6 +196,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13700,7 +13922,7 @@ index 3b4e237101..0f5c345da0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -195,6 +215,10 @@
+@@ -195,6 +216,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13711,30 +13933,31 @@ index 3b4e237101..0f5c345da0 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -215,6 +239,12 @@
-
- OS_LIBS += [
+@@ -217,6 +242,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 86bc0e277d..c0f82da6ef 100644
+index 15fe84223483..a530c52a66b3 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
-@@ -72,6 +72,17 @@
+@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13746,7 +13969,7 @@ index 86bc0e277d..c0f82da6ef 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -166,6 +177,10 @@
+@@ -166,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13757,7 +13980,7 @@ index 86bc0e277d..c0f82da6ef 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -182,6 +197,10 @@
+@@ -182,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13768,30 +13991,31 @@ index 86bc0e277d..c0f82da6ef 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -206,6 +225,12 @@
-
- OS_LIBS += [
+@@ -208,6 +228,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 8519e21097..6181f3b482 100644
+index 92fc169bfa14..e7a9a7935d03 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13803,7 +14027,7 @@ index 8519e21097..6181f3b482 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13814,7 +14038,7 @@ index 8519e21097..6181f3b482 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13825,30 +14049,31 @@ index 8519e21097..6181f3b482 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 5f42fd5adb..7836c9170f 100644
+index 8ade002d0183..7bd98812e223 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
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13860,7 +14085,7 @@ index 5f42fd5adb..7836c9170f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13871,7 +14096,7 @@ index 5f42fd5adb..7836c9170f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13883,16 +14108,17 @@ index 5f42fd5adb..7836c9170f 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build
-index 69874c53ac..b8db8cd9cc 100644
+index 6ae532c089c3..8c9264044d54 100644
--- third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13904,7 +14130,7 @@ index 69874c53ac..b8db8cd9cc 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13915,7 +14141,7 @@ index 69874c53ac..b8db8cd9cc 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13926,30 +14152,31 @@ index 69874c53ac..b8db8cd9cc 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build
-index f6af0518a3..d1f6bff5e2 100644
+index 463f2a08ee63..512e6150c0ae 100644
--- third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -13961,7 +14188,7 @@ index f6af0518a3..d1f6bff5e2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -13972,7 +14199,7 @@ index f6af0518a3..d1f6bff5e2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -13983,30 +14210,31 @@ index f6af0518a3..d1f6bff5e2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build
-index 4ed27aaed8..2a4a1ff7dd 100644
+index 4aad533a809c..07c2d78fda22 100644
--- third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14018,7 +14246,7 @@ index 4ed27aaed8..2a4a1ff7dd 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14029,7 +14257,7 @@ index 4ed27aaed8..2a4a1ff7dd 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14040,30 +14268,31 @@ index 4ed27aaed8..2a4a1ff7dd 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 d8d1780d20..25e50ff6fb 100644
+index af78e013468e..20b730aad06d 100644
--- third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14075,7 +14304,7 @@ index d8d1780d20..25e50ff6fb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -162,6 +173,10 @@
+@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14086,7 +14315,7 @@ index d8d1780d20..25e50ff6fb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -178,6 +193,10 @@
+@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14097,30 +14326,31 @@ index d8d1780d20..25e50ff6fb 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -202,6 +221,12 @@
-
- OS_LIBS += [
+@@ -204,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 8b09cfc9ec..f3e5353ab5 100644
+index 2dc04e5a9cf9..bb721d0a23f8 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14132,7 +14362,7 @@ index 8b09cfc9ec..f3e5353ab5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14143,7 +14373,7 @@ index 8b09cfc9ec..f3e5353ab5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14154,30 +14384,31 @@ index 8b09cfc9ec..f3e5353ab5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build
-index d6059d52d2..2baa67b084 100644
+index 57a43caa16cd..319ba78eaf56 100644
--- third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build
-@@ -68,6 +68,17 @@
+@@ -68,6 +68,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14189,7 +14420,7 @@ index d6059d52d2..2baa67b084 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -161,6 +172,10 @@
+@@ -161,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14200,7 +14431,7 @@ index d6059d52d2..2baa67b084 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -177,6 +192,10 @@
+@@ -177,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14211,30 +14442,31 @@ index d6059d52d2..2baa67b084 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -201,6 +220,12 @@
-
- OS_LIBS += [
+@@ -203,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 e073ac2c3f..e9bb1da50b 100644
+index 0a87d813647e..46196bdd271f 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14246,7 +14478,7 @@ index e073ac2c3f..e9bb1da50b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14257,7 +14489,7 @@ index e073ac2c3f..e9bb1da50b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14268,30 +14500,31 @@ index e073ac2c3f..e9bb1da50b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 8c0f15071b..190ae3c4d6 100644
+index 3e4ab79641cd..1c62a7c7c6b6 100644
--- third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build
-@@ -88,6 +88,17 @@
+@@ -88,6 +88,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14303,7 +14536,7 @@ index 8c0f15071b..190ae3c4d6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -182,6 +193,10 @@
+@@ -182,6 +194,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14314,7 +14547,7 @@ index 8c0f15071b..190ae3c4d6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -198,6 +213,10 @@
+@@ -198,6 +214,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14325,30 +14558,31 @@ index 8c0f15071b..190ae3c4d6 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -222,6 +241,12 @@
-
- OS_LIBS += [
+@@ -224,6 +244,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b6e4b928cf..aef33114b0 100644
+index 9e6b6df5948b..66f5abaf5321 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
-@@ -77,6 +77,17 @@
+@@ -77,6 +77,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14360,7 +14594,7 @@ index b6e4b928cf..aef33114b0 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -171,6 +182,10 @@
+@@ -171,6 +183,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14371,7 +14605,7 @@ index b6e4b928cf..aef33114b0 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -187,6 +202,10 @@
+@@ -187,6 +203,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14382,30 +14616,31 @@ index b6e4b928cf..aef33114b0 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -211,6 +230,12 @@
-
- OS_LIBS += [
+@@ -213,6 +233,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build
-index 2dced7c944..efa5dcadbb 100644
+index 4ae92da9a8fa..5a35d818a775 100644
--- third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build
-@@ -73,6 +73,17 @@
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14417,7 +14652,7 @@ index 2dced7c944..efa5dcadbb 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14428,7 +14663,7 @@ index 2dced7c944..efa5dcadbb 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14439,30 +14674,31 @@ index 2dced7c944..efa5dcadbb 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build
-index 35b41b3c67..f82513bdc4 100644
+index e2ab1612c3c1..5185eb5a05b0 100644
--- third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14474,7 +14710,7 @@ index 35b41b3c67..f82513bdc4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -165,6 +176,10 @@
+@@ -165,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14485,7 +14721,7 @@ index 35b41b3c67..f82513bdc4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -181,6 +196,10 @@
+@@ -181,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14496,30 +14732,31 @@ index 35b41b3c67..f82513bdc4 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -205,6 +224,12 @@
-
- OS_LIBS += [
+@@ -207,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 2315a41528..ecffacb782 100644
+index 2ae04231ee01..30f7f1d5c184 100644
--- third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build
-@@ -72,6 +72,17 @@
+@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14531,7 +14768,7 @@ index 2315a41528..ecffacb782 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -166,6 +177,10 @@
+@@ -166,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14542,7 +14779,7 @@ index 2315a41528..ecffacb782 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -182,6 +197,10 @@
+@@ -182,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14553,30 +14790,31 @@ index 2315a41528..ecffacb782 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -206,6 +225,12 @@
-
- OS_LIBS += [
+@@ -208,6 +228,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 4eef28d19b..4c068c393b 100644
+index 3d3414fadfe1..6d602facfdde 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
-@@ -73,6 +73,17 @@
+@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14588,7 +14826,7 @@ index 4eef28d19b..4c068c393b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -167,6 +178,10 @@
+@@ -167,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14599,7 +14837,7 @@ index 4eef28d19b..4c068c393b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -183,6 +198,10 @@
+@@ -183,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14610,30 +14848,31 @@ index 4eef28d19b..4c068c393b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -207,6 +226,12 @@
-
- OS_LIBS += [
+@@ -209,6 +229,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 cd75be3c84..9d1ce64bba 100644
+index 47791807b58c..086038e359e8 100644
--- third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build
+++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14645,7 +14884,7 @@ index cd75be3c84..9d1ce64bba 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -164,6 +175,10 @@
+@@ -164,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14656,7 +14895,7 @@ index cd75be3c84..9d1ce64bba 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -180,6 +195,10 @@
+@@ -180,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14667,30 +14906,31 @@ index cd75be3c84..9d1ce64bba 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -204,6 +223,12 @@
-
- OS_LIBS += [
+@@ -206,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 4b0b804423..581c06d007 100644
+index 90ce8177ccaa..5d0416fe28bd 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
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14702,7 +14942,7 @@ index 4b0b804423..581c06d007 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -163,6 +174,10 @@
+@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14713,7 +14953,7 @@ index 4b0b804423..581c06d007 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -179,6 +194,10 @@
+@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14724,30 +14964,31 @@ index 4b0b804423..581c06d007 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -203,6 +222,12 @@
-
- OS_LIBS += [
+@@ -205,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build
-index 7407051e7e..5665ec1796 100644
+index 943d2880e350..35f5ca6d1574 100644
--- third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build
+++ third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14759,7 +15000,7 @@ index 7407051e7e..5665ec1796 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14770,7 +15011,7 @@ index 7407051e7e..5665ec1796 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14782,16 +15023,17 @@ index 7407051e7e..5665ec1796 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build
-index f7b210e234..08ca80445c 100644
+index 3d850cb742c1..635c679a60da 100644
--- third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build
+++ third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build
-@@ -74,6 +74,17 @@
+@@ -74,6 +74,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14803,7 +15045,7 @@ index f7b210e234..08ca80445c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -168,6 +179,10 @@
+@@ -168,6 +180,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14814,7 +15056,7 @@ index f7b210e234..08ca80445c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -184,6 +199,10 @@
+@@ -184,6 +200,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14825,30 +15067,31 @@ index f7b210e234..08ca80445c 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -208,6 +227,12 @@
-
- OS_LIBS += [
+@@ -210,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build
-index 476e28a19c..8cf4b20aaf 100644
+index 3502df6640a3..8a5d8f455d4f 100644
--- third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build
+++ third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build
-@@ -65,6 +65,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -65,6 +65,19 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
@@ -14860,8 +15103,8 @@ index 476e28a19c..8cf4b20aaf 100644
+
if CONFIG["OS_TARGET"] == "Linux":
- DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6"
-@@ -133,6 +145,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+ DEFINES["USE_AURA"] = "1"
+@@ -131,6 +144,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14872,7 +15115,7 @@ index 476e28a19c..8cf4b20aaf 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -145,6 +161,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -143,6 +160,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14884,16 +15127,17 @@ index 476e28a19c..8cf4b20aaf 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build
-index cc42b921e5..9e18982afa 100644
+index da44c9b360ab..985bf2d12081 100644
--- third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build
+++ third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build
-@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -14905,7 +15149,7 @@ index cc42b921e5..9e18982afa 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -148,6 +159,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -148,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -14916,7 +15160,7 @@ index cc42b921e5..9e18982afa 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -164,6 +179,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -164,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -14927,7 +15171,7 @@ index cc42b921e5..9e18982afa 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
+@@ -197,6 +217,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android":
"-msse2"
]
@@ -14948,7 +15192,7 @@ index cc42b921e5..9e18982afa 100644
CXXFLAGS += [
diff --git third_party/libwebrtc/moz.build third_party/libwebrtc/moz.build
-index 11313553ed..ee4cf1c70d 100644
+index 11313553ede4..ee4cf1c70d14 100644
--- third_party/libwebrtc/moz.build
+++ third_party/libwebrtc/moz.build
@@ -384,6 +384,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
@@ -15006,16 +15250,17 @@ index 11313553ed..ee4cf1c70d 100644
DIRS += [
diff --git third_party/libwebrtc/rtc_base/atomicops_gn/moz.build third_party/libwebrtc/rtc_base/atomicops_gn/moz.build
-index e81ee452c4..8e62ea0b2f 100644
+index 0f2278b14022..5612c44e9e73 100644
--- third_party/libwebrtc/rtc_base/atomicops_gn/moz.build
+++ third_party/libwebrtc/rtc_base/atomicops_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15027,7 +15272,7 @@ index e81ee452c4..8e62ea0b2f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15038,7 +15283,7 @@ index e81ee452c4..8e62ea0b2f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15050,16 +15295,17 @@ index e81ee452c4..8e62ea0b2f 100644
DEFINES["_DEBUG"] = True
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 1562c0c15e..a317bbaed1 100644
+index 6fde827159a2..d3afdcc420f6 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15071,7 +15317,7 @@ index 1562c0c15e..a317bbaed1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15082,7 +15328,7 @@ index 1562c0c15e..a317bbaed1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15093,30 +15339,31 @@ index 1562c0c15e..a317bbaed1 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/checks_gn/moz.build third_party/libwebrtc/rtc_base/checks_gn/moz.build
-index cd0f53f896..9bc0698b2a 100644
+index 5fdd263725eb..c385eb05e46d 100644
--- third_party/libwebrtc/rtc_base/checks_gn/moz.build
+++ third_party/libwebrtc/rtc_base/checks_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15128,7 +15375,7 @@ index cd0f53f896..9bc0698b2a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15139,7 +15386,7 @@ index cd0f53f896..9bc0698b2a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15150,30 +15397,31 @@ index cd0f53f896..9bc0698b2a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 6d4c494876..f53819d83e 100644
+index cc9fb4afeeb7..358af6937a47 100644
--- third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build
+++ third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15185,7 +15433,7 @@ index 6d4c494876..f53819d83e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15196,7 +15444,7 @@ index 6d4c494876..f53819d83e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15208,16 +15456,17 @@ index 6d4c494876..f53819d83e 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build
-index 4da8d7835a..5a2fc712b7 100644
+index dc7af0cc7b4e..5b6a97914d13 100644
--- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build
+++ third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15229,7 +15478,7 @@ index 4da8d7835a..5a2fc712b7 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15240,7 +15489,7 @@ index 4da8d7835a..5a2fc712b7 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15251,30 +15500,31 @@ index 4da8d7835a..5a2fc712b7 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/deprecation_gn/moz.build third_party/libwebrtc/rtc_base/deprecation_gn/moz.build
-index e270de4c35..e3ba310b6f 100644
+index e576ec263e33..f0986a3bd2d0 100644
--- third_party/libwebrtc/rtc_base/deprecation_gn/moz.build
+++ third_party/libwebrtc/rtc_base/deprecation_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15286,7 +15536,7 @@ index e270de4c35..e3ba310b6f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15297,7 +15547,7 @@ index e270de4c35..e3ba310b6f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15309,16 +15559,17 @@ index e270de4c35..e3ba310b6f 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/divide_round_gn/moz.build third_party/libwebrtc/rtc_base/divide_round_gn/moz.build
-index 0fcf9b238b..67dfd9daa9 100644
+index ee977f0b91f7..8f8d56d658ba 100644
--- third_party/libwebrtc/rtc_base/divide_round_gn/moz.build
+++ third_party/libwebrtc/rtc_base/divide_round_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15330,7 +15581,7 @@ index 0fcf9b238b..67dfd9daa9 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15341,7 +15592,7 @@ index 0fcf9b238b..67dfd9daa9 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15353,16 +15604,17 @@ index 0fcf9b238b..67dfd9daa9 100644
DEFINES["_DEBUG"] = True
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 82b2d0f65b..5c95c7e43a 100644
+index 5076aa3951db..b8ee320a0e62 100644
--- third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build
+++ third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15374,7 +15626,7 @@ index 82b2d0f65b..5c95c7e43a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15385,7 +15637,7 @@ index 82b2d0f65b..5c95c7e43a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15396,30 +15648,31 @@ index 82b2d0f65b..5c95c7e43a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 5d3674f5ec..0fe9133e79 100644
+index c48685df8e03..78a27d0efddd 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15431,7 +15684,7 @@ index 5d3674f5ec..0fe9133e79 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15442,7 +15695,7 @@ index 5d3674f5ec..0fe9133e79 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15453,30 +15706,31 @@ index 5d3674f5ec..0fe9133e79 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 09a8a30dcc..6edf8f0f03 100644
+index 5f2f908122bf..7ce9c47f10da 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15488,7 +15742,7 @@ index 09a8a30dcc..6edf8f0f03 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15499,7 +15753,7 @@ index 09a8a30dcc..6edf8f0f03 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15510,30 +15764,31 @@ index 09a8a30dcc..6edf8f0f03 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 9affe97b83..b1b560526a 100644
+index bf646534f8f8..f9dd309d8cf3 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
-@@ -70,6 +70,17 @@
+@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15545,7 +15800,7 @@ index 9affe97b83..b1b560526a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -156,6 +167,10 @@
+@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15556,7 +15811,7 @@ index 9affe97b83..b1b560526a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -172,6 +187,10 @@
+@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15567,30 +15822,31 @@ index 9affe97b83..b1b560526a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -196,6 +215,12 @@
-
- OS_LIBS += [
+@@ -198,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build
-index 6f0e85bc42..32f1ce05c6 100644
+index ed518edf357e..28796ebf9568 100644
--- third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build
+++ third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15602,7 +15858,7 @@ index 6f0e85bc42..32f1ce05c6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15613,7 +15869,7 @@ index 6f0e85bc42..32f1ce05c6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15624,30 +15880,31 @@ index 6f0e85bc42..32f1ce05c6 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 d1321d6a34..7eb3cfdc8d 100644
+index 7df6c18a56f4..2e5f8e4e2d47 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15659,7 +15916,7 @@ index d1321d6a34..7eb3cfdc8d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15670,7 +15927,7 @@ index d1321d6a34..7eb3cfdc8d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15681,30 +15938,31 @@ index d1321d6a34..7eb3cfdc8d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 9c23102ce9..dcb4e39f25 100644
+index 35a5009b34ea..abd9bb149720 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15716,7 +15974,7 @@ index 9c23102ce9..dcb4e39f25 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15727,7 +15985,7 @@ index 9c23102ce9..dcb4e39f25 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15738,30 +15996,31 @@ index 9c23102ce9..dcb4e39f25 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 d336e658c0..ceb5cf6cbe 100644
+index 2c99c2c421d4..319ae51143b9 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15773,7 +16032,7 @@ index d336e658c0..ceb5cf6cbe 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15784,7 +16043,7 @@ index d336e658c0..ceb5cf6cbe 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15795,30 +16054,31 @@ index d336e658c0..ceb5cf6cbe 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 9b65e10218..286f122ed6 100644
+index b528e59e49a7..8dc3f18273bb 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15830,7 +16090,7 @@ index 9b65e10218..286f122ed6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15841,7 +16101,7 @@ index 9b65e10218..286f122ed6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15852,30 +16112,31 @@ index 9b65e10218..286f122ed6 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 c5b21c9f05..a75e83a45d 100644
+index 9eaaf07e6765..5874c42d75d3 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15887,7 +16148,7 @@ index c5b21c9f05..a75e83a45d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15898,7 +16159,7 @@ index c5b21c9f05..a75e83a45d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15909,30 +16170,31 @@ index c5b21c9f05..a75e83a45d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 0be8b6e56e..063f6ca854 100644
+index 3e07bebe0728..9cb798710726 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -15944,7 +16206,7 @@ index 0be8b6e56e..063f6ca854 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -15955,7 +16217,7 @@ index 0be8b6e56e..063f6ca854 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -15966,30 +16228,31 @@ index 0be8b6e56e..063f6ca854 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 5edc266617..0b15891971 100644
+index 75793c100c1b..c762b39da093 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16001,7 +16264,7 @@ index 5edc266617..0b15891971 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16012,7 +16275,7 @@ index 5edc266617..0b15891971 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16023,30 +16286,31 @@ index 5edc266617..0b15891971 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 c90ea47893..1e0ae39f5a 100644
+index 18f87abc115d..e1f34dc446f5 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16058,7 +16322,7 @@ index c90ea47893..1e0ae39f5a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16069,7 +16333,7 @@ index c90ea47893..1e0ae39f5a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16080,30 +16344,31 @@ index c90ea47893..1e0ae39f5a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build
-index 83bd305dbd..397c03437b 100644
+index b837b3be93e4..3c29ace274c5 100644
--- third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build
+++ third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16115,7 +16380,7 @@ index 83bd305dbd..397c03437b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16126,7 +16391,7 @@ index 83bd305dbd..397c03437b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16138,16 +16403,17 @@ index 83bd305dbd..397c03437b 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build
-index 1d41d27c81..daafa435c6 100644
+index c9bd4aaf7cce..1778c8910649 100644
--- third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build
+++ third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16159,7 +16425,7 @@ index 1d41d27c81..daafa435c6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16170,7 +16436,7 @@ index 1d41d27c81..daafa435c6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16182,16 +16448,17 @@ index 1d41d27c81..daafa435c6 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/logging_gn/moz.build third_party/libwebrtc/rtc_base/logging_gn/moz.build
-index 3cd69d3494..816cbc3dba 100644
+index 4ddf3d502c67..8e0a387efa26 100644
--- third_party/libwebrtc/rtc_base/logging_gn/moz.build
+++ third_party/libwebrtc/rtc_base/logging_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16203,7 +16470,7 @@ index 3cd69d3494..816cbc3dba 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16214,7 +16481,7 @@ index 3cd69d3494..816cbc3dba 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16225,30 +16492,31 @@ index 3cd69d3494..816cbc3dba 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/macromagic_gn/moz.build third_party/libwebrtc/rtc_base/macromagic_gn/moz.build
-index bf9b26b06d..f400c123d1 100644
+index 3e73fcc95526..801274649bb5 100644
--- third_party/libwebrtc/rtc_base/macromagic_gn/moz.build
+++ third_party/libwebrtc/rtc_base/macromagic_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16260,7 +16528,7 @@ index bf9b26b06d..f400c123d1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16271,7 +16539,7 @@ index bf9b26b06d..f400c123d1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16283,16 +16551,17 @@ index bf9b26b06d..f400c123d1 100644
DEFINES["_DEBUG"] = True
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 8eb7cbafda..7270026522 100644
+index 601a6b8f2e06..782efcccd542 100644
--- third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build
+++ third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16304,7 +16573,7 @@ index 8eb7cbafda..7270026522 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16315,7 +16584,7 @@ index 8eb7cbafda..7270026522 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16326,30 +16595,31 @@ index 8eb7cbafda..7270026522 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 175efb565e..01002b6f68 100644
+index 8be1fae0a0c0..720f0931d3fc 100644
--- third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build
+++ third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16361,7 +16631,7 @@ index 175efb565e..01002b6f68 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16372,7 +16642,7 @@ index 175efb565e..01002b6f68 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16383,30 +16653,31 @@ index 175efb565e..01002b6f68 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build
-index 27d304aa8a..4e0da258de 100644
+index b6293be69792..b68d967de875 100644
--- third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build
+++ third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16418,7 +16689,7 @@ index 27d304aa8a..4e0da258de 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16429,7 +16700,7 @@ index 27d304aa8a..4e0da258de 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16440,30 +16711,31 @@ index 27d304aa8a..4e0da258de 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 b8919fe70d..92c62a2dc5 100644
+index eb194f6ed06e..5adbd7cf775b 100644
--- third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build
+++ third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16475,7 +16747,7 @@ index b8919fe70d..92c62a2dc5 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16486,7 +16758,7 @@ index b8919fe70d..92c62a2dc5 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16497,30 +16769,31 @@ index b8919fe70d..92c62a2dc5 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build
-index 29bb85689a..51a5a79011 100644
+index f97f10d57ab0..55dd021acb7b 100644
--- third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build
+++ third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16532,7 +16805,7 @@ index 29bb85689a..51a5a79011 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16543,7 +16816,7 @@ index 29bb85689a..51a5a79011 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16555,16 +16828,17 @@ index 29bb85689a..51a5a79011 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build
-index 4b43624a4d..8f90e5fc32 100644
+index 26c5559e1a30..baadf7fc54f3 100644
--- third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build
+++ third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16576,7 +16850,7 @@ index 4b43624a4d..8f90e5fc32 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16587,7 +16861,7 @@ index 4b43624a4d..8f90e5fc32 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16598,30 +16872,31 @@ index 4b43624a4d..8f90e5fc32 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/refcount_gn/moz.build third_party/libwebrtc/rtc_base/refcount_gn/moz.build
-index 0bb1831752..e1e97a1c61 100644
+index 5940fcf85e96..b9d96b70b765 100644
--- third_party/libwebrtc/rtc_base/refcount_gn/moz.build
+++ third_party/libwebrtc/rtc_base/refcount_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16633,7 +16908,7 @@ index 0bb1831752..e1e97a1c61 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16644,7 +16919,7 @@ index 0bb1831752..e1e97a1c61 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16656,16 +16931,17 @@ index 0bb1831752..e1e97a1c61 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build
-index 1a0a056251..681b7f6e3e 100644
+index 3e717cd1514e..71ba1ead7d69 100644
--- third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build
+++ third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build
-@@ -80,6 +80,17 @@
+@@ -80,6 +80,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16677,7 +16953,7 @@ index 1a0a056251..681b7f6e3e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -170,6 +181,10 @@
+@@ -170,6 +182,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16688,7 +16964,7 @@ index 1a0a056251..681b7f6e3e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -186,6 +201,10 @@
+@@ -186,6 +202,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16699,30 +16975,31 @@ index 1a0a056251..681b7f6e3e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -210,6 +229,12 @@
-
- OS_LIBS += [
+@@ -212,6 +232,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build
-index 2831f73c90..208fc12f5a 100644
+index 329aeaeead7a..32274c815a64 100644
--- third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build
+++ third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build
-@@ -94,6 +94,21 @@
+@@ -94,6 +94,22 @@ if CONFIG["OS_TARGET"] == "Darwin":
"/third_party/libwebrtc/rtc_base/mac_ifaddrs_converter.cc"
]
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16738,7 +17015,7 @@ index 2831f73c90..208fc12f5a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -203,6 +218,10 @@
+@@ -203,6 +219,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16749,7 +17026,7 @@ index 2831f73c90..208fc12f5a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -219,6 +238,10 @@
+@@ -219,6 +239,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16760,30 +17037,31 @@ index 2831f73c90..208fc12f5a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -243,6 +266,12 @@
-
- OS_LIBS += [
+@@ -245,6 +269,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build
-index 76376fd45d..a299d4f539 100644
+index af655f6cdd2f..f93f5340f469 100644
--- third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build
+++ third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16795,7 +17073,7 @@ index 76376fd45d..a299d4f539 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16806,7 +17084,7 @@ index 76376fd45d..a299d4f539 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16817,30 +17095,31 @@ index 76376fd45d..a299d4f539 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build
-index 4a6ac162af..9e1f79a96a 100644
+index 7132b7de4c65..2e92d7344341 100644
--- third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build
+++ third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16852,7 +17131,7 @@ index 4a6ac162af..9e1f79a96a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -155,6 +166,10 @@
+@@ -155,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16863,7 +17142,7 @@ index 4a6ac162af..9e1f79a96a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -171,6 +186,10 @@
+@@ -171,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16874,30 +17153,31 @@ index 4a6ac162af..9e1f79a96a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -195,6 +214,12 @@
-
- OS_LIBS += [
+@@ -197,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 16c3631473..a03e2565fe 100644
+index cb528e769092..cd0e19301272 100644
--- third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build
+++ third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16909,7 +17189,7 @@ index 16c3631473..a03e2565fe 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16920,7 +17200,7 @@ index 16c3631473..a03e2565fe 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16931,30 +17211,31 @@ index 16c3631473..a03e2565fe 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build
-index e4bad4fb28..7654bf0046 100644
+index 4b03f7145e97..7c825e4608c1 100644
--- third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build
+++ third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -16966,7 +17247,7 @@ index e4bad4fb28..7654bf0046 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -16977,7 +17258,7 @@ index e4bad4fb28..7654bf0046 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -16989,16 +17270,17 @@ index e4bad4fb28..7654bf0046 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build
-index ac5270a93e..817797ec60 100644
+index 719f61950dd9..19cab3746d29 100644
--- third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build
+++ third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17010,7 +17292,7 @@ index ac5270a93e..817797ec60 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17021,7 +17303,7 @@ index ac5270a93e..817797ec60 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17033,16 +17315,17 @@ index ac5270a93e..817797ec60 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build
-index cced167265..3a03342908 100644
+index 9dab259015b2..d30709ad50e4 100644
--- third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build
+++ third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17054,7 +17337,7 @@ index cced167265..3a03342908 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17065,7 +17348,7 @@ index cced167265..3a03342908 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17077,16 +17360,17 @@ index cced167265..3a03342908 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build
-index 5e7a5ecc50..5d37d4610f 100644
+index 6ad477795ef6..72f60a087101 100644
--- third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build
+++ third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17098,7 +17382,7 @@ index 5e7a5ecc50..5d37d4610f 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17109,7 +17393,7 @@ index 5e7a5ecc50..5d37d4610f 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17121,16 +17405,17 @@ index 5e7a5ecc50..5d37d4610f 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/stringutils_gn/moz.build third_party/libwebrtc/rtc_base/stringutils_gn/moz.build
-index e398bb8abc..709e325bd2 100644
+index dd57b533a6ee..3ab60bc2433a 100644
--- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build
+++ third_party/libwebrtc/rtc_base/stringutils_gn/moz.build
-@@ -71,6 +71,17 @@
+@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17142,7 +17427,7 @@ index e398bb8abc..709e325bd2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17153,7 +17438,7 @@ index e398bb8abc..709e325bd2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17164,30 +17449,31 @@ index e398bb8abc..709e325bd2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build
-index 184fcdaa67..ca2360f09e 100644
+index 28a348f23b38..f1e461427937 100644
--- third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build
+++ third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17199,7 +17485,7 @@ index 184fcdaa67..ca2360f09e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17210,7 +17496,7 @@ index 184fcdaa67..ca2360f09e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17221,30 +17507,31 @@ index 184fcdaa67..ca2360f09e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build
-index 5f14995c08..c88bc65d9a 100644
+index bba961a57406..b36abfe0f431 100644
--- third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build
+++ third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build
-@@ -71,6 +71,21 @@
+@@ -71,6 +71,22 @@ if CONFIG["OS_TARGET"] == "Darwin":
"/third_party/libwebrtc/rtc_base/synchronization/rw_lock_posix.cc"
]
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17260,7 +17547,7 @@ index 5f14995c08..c88bc65d9a 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17271,7 +17558,7 @@ index 5f14995c08..c88bc65d9a 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -185,6 +204,10 @@
+@@ -185,6 +205,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17282,30 +17569,31 @@ index 5f14995c08..c88bc65d9a 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -209,6 +232,12 @@
-
- OS_LIBS += [
+@@ -211,6 +235,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build
-index 5ec0cff625..5d5103a811 100644
+index 88ca07fad511..04aff66fe6ce 100644
--- third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build
+++ third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17317,7 +17605,7 @@ index 5ec0cff625..5d5103a811 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17328,7 +17616,7 @@ index 5ec0cff625..5d5103a811 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17339,30 +17627,31 @@ index 5ec0cff625..5d5103a811 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build
-index 1ca980e259..a2f7bfb8e2 100644
+index 29e8fea9bb64..52a10290862f 100644
--- third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build
+++ third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17374,7 +17663,7 @@ index 1ca980e259..a2f7bfb8e2 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17385,7 +17674,7 @@ index 1ca980e259..a2f7bfb8e2 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17396,30 +17685,31 @@ index 1ca980e259..a2f7bfb8e2 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 5939126563..3d272a6f47 100644
+index bbe945437b4a..b112811f5be5 100644
--- third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build
+++ third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17431,7 +17721,7 @@ index 5939126563..3d272a6f47 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17442,7 +17732,7 @@ index 5939126563..3d272a6f47 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17453,30 +17743,31 @@ index 5939126563..3d272a6f47 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/system/arch_gn/moz.build third_party/libwebrtc/rtc_base/system/arch_gn/moz.build
-index a6e7dec918..51b7a68162 100644
+index 34b3e7ce3f03..70d4d54a080e 100644
--- third_party/libwebrtc/rtc_base/system/arch_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/arch_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17488,7 +17779,7 @@ index a6e7dec918..51b7a68162 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17499,7 +17790,7 @@ index a6e7dec918..51b7a68162 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17511,16 +17802,17 @@ index a6e7dec918..51b7a68162 100644
DEFINES["_DEBUG"] = True
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 bc4d7e2469..e6036253b3 100644
+index 4270970a6caf..f5f8017e0ea7 100644
--- third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17532,7 +17824,7 @@ index bc4d7e2469..e6036253b3 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17543,7 +17835,7 @@ index bc4d7e2469..e6036253b3 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17554,30 +17846,31 @@ index bc4d7e2469..e6036253b3 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 2e4468530c..1498b1c742 100644
+index a309c892c7b2..ae730662b413 100644
--- third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17589,7 +17882,7 @@ index 2e4468530c..1498b1c742 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17600,7 +17893,7 @@ index 2e4468530c..1498b1c742 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17612,16 +17905,17 @@ index 2e4468530c..1498b1c742 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/system/inline_gn/moz.build third_party/libwebrtc/rtc_base/system/inline_gn/moz.build
-index e82f4a2ce6..7430a8635d 100644
+index 560b2c6c8a2a..8a1ca508f7d4 100644
--- third_party/libwebrtc/rtc_base/system/inline_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/inline_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17633,7 +17927,7 @@ index e82f4a2ce6..7430a8635d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17644,7 +17938,7 @@ index e82f4a2ce6..7430a8635d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17656,16 +17950,17 @@ index e82f4a2ce6..7430a8635d 100644
DEFINES["_DEBUG"] = True
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 e4448145e5..b7d6723671 100644
+index 808489cd5377..c2c5d71ce33d 100644
--- third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17677,7 +17972,7 @@ index e4448145e5..b7d6723671 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17688,7 +17983,7 @@ index e4448145e5..b7d6723671 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17700,16 +17995,17 @@ index e4448145e5..b7d6723671 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build
-index 87feb69ca5..687319e0f3 100644
+index 839aa9fd442f..455fad587b89 100644
--- third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17721,7 +18017,7 @@ index 87feb69ca5..687319e0f3 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17732,7 +18028,7 @@ index 87feb69ca5..687319e0f3 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17744,16 +18040,17 @@ index 87feb69ca5..687319e0f3 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/system/unused_gn/moz.build third_party/libwebrtc/rtc_base/system/unused_gn/moz.build
-index 0b8030c571..99f9f67bd6 100644
+index 2e07907d9bd6..84c342e4205f 100644
--- third_party/libwebrtc/rtc_base/system/unused_gn/moz.build
+++ third_party/libwebrtc/rtc_base/system/unused_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17765,7 +18062,7 @@ index 0b8030c571..99f9f67bd6 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17776,7 +18073,7 @@ index 0b8030c571..99f9f67bd6 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17788,16 +18085,17 @@ index 0b8030c571..99f9f67bd6 100644
DEFINES["_DEBUG"] = True
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 1792dad542..52e4dd3757 100644
+index c7f38056fefe..de6ea9995e0f 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
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17809,7 +18107,7 @@ index 1792dad542..52e4dd3757 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17820,7 +18118,7 @@ index 1792dad542..52e4dd3757 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17832,16 +18130,17 @@ index 1792dad542..52e4dd3757 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build
-index 3186044467..f6f80401b4 100644
+index 9ce3ee38ebc2..15ab4fd4c17d 100644
--- third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build
+++ third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17853,7 +18152,7 @@ index 3186044467..f6f80401b4 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17864,7 +18163,7 @@ index 3186044467..f6f80401b4 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17875,30 +18174,31 @@ index 3186044467..f6f80401b4 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 3218f68235..bcb9f2e32e 100644
+index 4565e236463e..cf4e034b9d1a 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
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17910,7 +18210,7 @@ index 3218f68235..bcb9f2e32e 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -160,6 +171,10 @@
+@@ -160,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17921,7 +18221,7 @@ index 3218f68235..bcb9f2e32e 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -176,6 +191,10 @@
+@@ -176,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17932,30 +18232,31 @@ index 3218f68235..bcb9f2e32e 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -200,6 +219,12 @@
-
- OS_LIBS += [
+@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build
-index f6d95c5d8f..acb9a10fb1 100644
+index 94eb61355690..65b1605d357a 100644
--- third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build
+++ third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -17967,7 +18268,7 @@ index f6d95c5d8f..acb9a10fb1 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -17978,7 +18279,7 @@ index f6d95c5d8f..acb9a10fb1 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -17990,16 +18291,17 @@ index f6d95c5d8f..acb9a10fb1 100644
DEFINES["_DEBUG"] = True
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 0849487bee..5f494b2a1d 100644
+index d9860d658db2..a6f6f0ad62d9 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
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18011,7 +18313,7 @@ index 0849487bee..5f494b2a1d 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18022,7 +18324,7 @@ index 0849487bee..5f494b2a1d 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18033,30 +18335,31 @@ index 0849487bee..5f494b2a1d 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
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 a3c1b2d092..41d659e69b 100644
+index f1565d997d35..ddcee9314727 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
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18068,7 +18371,7 @@ index a3c1b2d092..41d659e69b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -145,6 +156,10 @@
+@@ -145,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18079,7 +18382,7 @@ index a3c1b2d092..41d659e69b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -161,6 +176,10 @@
+@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18090,30 +18393,31 @@ index a3c1b2d092..41d659e69b 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -185,6 +204,12 @@
-
- OS_LIBS += [
+@@ -187,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build
-index eb1c598134..3b4bd04a61 100644
+index 2854447fc96b..fe22df70bbef 100644
--- third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build
+++ third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18125,7 +18429,7 @@ index eb1c598134..3b4bd04a61 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18136,7 +18440,7 @@ index eb1c598134..3b4bd04a61 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18148,16 +18452,17 @@ index eb1c598134..3b4bd04a61 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build
-index 7dd65b9bb4..9ecca631cd 100644
+index dbdeabc46618..19c81e523ffc 100644
--- third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build
+++ third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build
-@@ -63,6 +63,17 @@
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18169,7 +18474,7 @@ index 7dd65b9bb4..9ecca631cd 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18180,7 +18485,7 @@ index 7dd65b9bb4..9ecca631cd 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18191,30 +18496,31 @@ index 7dd65b9bb4..9ecca631cd 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/timeutils_gn/moz.build third_party/libwebrtc/rtc_base/timeutils_gn/moz.build
-index 39632fc6d5..0224cebffc 100644
+index 86ae9ca6a443..63d80e45ef47 100644
--- third_party/libwebrtc/rtc_base/timeutils_gn/moz.build
+++ third_party/libwebrtc/rtc_base/timeutils_gn/moz.build
-@@ -69,6 +69,17 @@
+@@ -69,6 +69,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18226,7 +18532,7 @@ index 39632fc6d5..0224cebffc 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -155,6 +166,10 @@
+@@ -155,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18237,7 +18543,7 @@ index 39632fc6d5..0224cebffc 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -171,6 +186,10 @@
+@@ -171,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18248,30 +18554,31 @@ index 39632fc6d5..0224cebffc 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -195,6 +214,12 @@
-
- OS_LIBS += [
+@@ -197,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/rtc_base/type_traits_gn/moz.build third_party/libwebrtc/rtc_base/type_traits_gn/moz.build
-index 5cff354c04..eec4cdbb8b 100644
+index dc45b6a74d26..793d754ec4f6 100644
--- third_party/libwebrtc/rtc_base/type_traits_gn/moz.build
+++ third_party/libwebrtc/rtc_base/type_traits_gn/moz.build
-@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -59,6 +59,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18283,7 +18590,7 @@ index 5cff354c04..eec4cdbb8b 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18294,7 +18601,7 @@ index 5cff354c04..eec4cdbb8b 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18306,16 +18613,17 @@ index 5cff354c04..eec4cdbb8b 100644
DEFINES["_DEBUG"] = True
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 5d22a0584d..f0cdf14d4c 100644
+index 9c760fe00b9e..7aa0672ec4c3 100644
--- third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build
+++ third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build
-@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin":
+@@ -63,6 +63,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18327,7 +18635,7 @@ index 5d22a0584d..f0cdf14d4c 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
+@@ -141,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18338,7 +18646,7 @@ index 5d22a0584d..f0cdf14d4c 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
+@@ -157,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18350,16 +18658,17 @@ index 5d22a0584d..f0cdf14d4c 100644
DEFINES["_DEBUG"] = True
diff --git third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build
-index a9a520b2bc..507a1f5c53 100644
+index ff01c7b9dccd..faae6f06aff5 100644
--- third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build
+++ third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18371,7 +18680,7 @@ index a9a520b2bc..507a1f5c53 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -149,6 +160,10 @@
+@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18382,7 +18691,7 @@ index a9a520b2bc..507a1f5c53 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -165,6 +180,10 @@
+@@ -165,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18393,30 +18702,31 @@ index a9a520b2bc..507a1f5c53 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -189,6 +208,12 @@
-
- OS_LIBS += [
+@@ -191,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build
-index e8fd3bd45c..69cd370233 100644
+index 0850c19cc547..03bc05e949f4 100644
--- third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build
+++ third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18428,7 +18738,7 @@ index e8fd3bd45c..69cd370233 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18439,7 +18749,7 @@ index e8fd3bd45c..69cd370233 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18450,30 +18760,31 @@ index e8fd3bd45c..69cd370233 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS += [
+@@ -195,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
"android_support"
-+ ]
-+
+ ]
+
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD":
+
+ CXXFLAGS += [
+ "-msse2"
- ]
-
++ ]
++
if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+ CXXFLAGS += [
diff --git third_party/libwebrtc/system_wrappers/metrics_gn/moz.build third_party/libwebrtc/system_wrappers/metrics_gn/moz.build
-index 0edfd92501..c3e0662ddc 100644
+index 1af4cfb73ea0..72587bfd04c6 100644
--- third_party/libwebrtc/system_wrappers/metrics_gn/moz.build
+++ third_party/libwebrtc/system_wrappers/metrics_gn/moz.build
-@@ -67,6 +67,17 @@
+@@ -67,6 +67,18 @@ if CONFIG["OS_TARGET"] == "Darwin":
DEFINES["__STDC_CONSTANT_MACROS"] = True
DEFINES["__STDC_FORMAT_MACROS"] = True
+if CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_GLIB"] = "1"
++ DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -18485,7 +18796,7 @@ index 0edfd92501..c3e0662ddc 100644
if CONFIG["OS_TARGET"] == "Linux":
DEFINES["USE_AURA"] = "1"
-@@ -153,6 +164,10 @@
+@@ -153,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_FORTIFY_SOURCE"] = "2"
@@ -18496,7 +18807,7 @@ index 0edfd92501..c3e0662ddc 100644
if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_FORTIFY_SOURCE"] = "2"
-@@ -169,6 +184,10 @@
+@@ -169,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin":
DEFINES["_DEBUG"] = True
@@ -18507,30 +18818,31 @@ index 0edfd92501..c3e0662ddc 100644
if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
DEFINES["_DEBUG"] = True
-@@ -193,6 +212,12 @@
-
- OS_LIBS +=