Files
Michael Froman 5b11b5bd6a Bug 2064200 - Vendor libwebrtc from 93173ec4f5
Upstream commit: https://webrtc.googlesource.com/src/+/93173ec4f5fdf71a9249e56e87707ccae750ad52
    Restrict rtc_event_log.proto to offline tools + add documentation

    1. Remove the legacy rtc_event_log_proto dependency from the production
       libwebrtc static library GN target in root BUILD.gn.
    2. Restrict proto_library("rtc_event_log_proto") visibility in logging/BUILD.gn
       exclusively to offline parsers, neteq tools, and test suites to prevent
       accidental linking into production runtimes.
    3. Add a deprecation banner and usage instruction to rtc_event_log.proto,
       update doc comments in rtc_event_log.h, and add a dedicated section in
       logging/g3doc/rtc_event_log.md guiding humans and AI agents on format rules.

    CONV=ac69de71-4eeb-4b00-b142-f66d9edf397b

    Bug: webrtc:144833892
    Change-Id: I91f19d1f9664ecf17e38e0fa44a46b854361d6bd
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/493540
    Reviewed-by: Björn Terelius <terelius@webrtc.org>
    Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#48287}
2026-08-28 09:30:55 +00:00

269 lines
9.5 KiB
Diff

From: Nico Grunbaum <na-g@nostrum.com>
Date: Wed, 14 Jul 2021 22:26:00 +0000
Subject: Bug 1654112 - deconflate the target and host architectures in
libwebrtc build files; r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D119707
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/58f47eacaf10d12e21dff7362743b6f4cdd1696b
---
BUILD.gn | 6 +++---
common_audio/BUILD.gn | 16 ++++++++--------
common_audio/third_party/ooura/BUILD.gn | 6 +++---
common_audio/third_party/spl_sqrt_floor/BUILD.gn | 4 ++--
modules/audio_processing/aec3/BUILD.gn | 6 +++---
modules/audio_processing/agc/BUILD.gn | 2 +-
modules/audio_processing/agc2/rnn_vad/BUILD.gn | 2 +-
modules/audio_processing/ns/BUILD.gn | 2 +-
modules/desktop_capture/BUILD.gn | 2 +-
webrtc.gni | 2 +-
10 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/BUILD.gn b/BUILD.gn
index 2fd44a6e56..0cf538bb28 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -457,12 +457,12 @@ config("common_config") {
}
}
- if (current_cpu == "arm64") {
+ if (target_cpu == "arm64") {
defines += [ "WEBRTC_ARCH_ARM64" ]
defines += [ "WEBRTC_HAS_NEON" ]
}
- if (current_cpu == "arm") {
+ if (target_cpu == "arm") {
defines += [ "WEBRTC_ARCH_ARM" ]
if (arm_version >= 7) {
defines += [ "WEBRTC_ARCH_ARM_V7" ]
@@ -472,7 +472,7 @@ config("common_config") {
}
}
- if (current_cpu == "mipsel") {
+ if (target_cpu == "mipsel") {
defines += [ "MIPS32_LE" ]
if (mips_float_abi == "hard") {
defines += [ "MIPS_FPU_LE" ]
diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn
index 77445d26d8..e0a9d3a7c8 100644
--- a/common_audio/BUILD.gn
+++ b/common_audio/BUILD.gn
@@ -66,7 +66,7 @@ rtc_library("common_audio") {
deps += [ ":common_audio_neon" ]
}
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (target_cpu == "x86" || target_cpu == "x64") {
deps += [ ":common_audio_sse2" ]
deps += [ ":common_audio_avx2" ]
}
@@ -89,7 +89,7 @@ rtc_source_set("mock_common_audio") {
rtc_source_set("common_audio_c_arm_asm") {
sources = []
deps = []
- if (current_cpu == "arm") {
+ if (target_cpu == "arm") {
sources += [ "signal_processing/complex_bit_reverse_arm.S" ]
if (arm_version >= 7) {
@@ -151,7 +151,7 @@ rtc_library("common_audio_c") {
"vad/webrtc_vad.c",
]
- if (current_cpu == "mipsel") {
+ if (target_cpu == "mipsel") {
sources += [
"signal_processing/complex_bit_reverse_mips.c",
"signal_processing/complex_fft_mips.c",
@@ -169,7 +169,7 @@ rtc_library("common_audio_c") {
sources += [ "signal_processing/complex_fft.c" ]
}
- if (current_cpu != "arm" && current_cpu != "mipsel") {
+ if (target_cpu != "arm" && target_cpu != "mipsel") {
sources += [
"signal_processing/complex_bit_reverse.c",
"signal_processing/filter_ar_fast_q12.c",
@@ -227,7 +227,7 @@ rtc_library("fir_filter_factory") {
"../rtc_base:cpu_info",
"../rtc_base/system:arch",
]
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (target_cpu == "x86" || target_cpu == "x64") {
deps += [ ":common_audio_sse2" ]
deps += [ ":common_audio_avx2" ]
}
@@ -236,7 +236,7 @@ rtc_library("fir_filter_factory") {
}
}
-if (current_cpu == "x86" || current_cpu == "x64") {
+if (target_cpu == "x86" || target_cpu == "x64") {
rtc_library("common_audio_sse2") {
sources = [
"fir_filter_sse.cc",
@@ -285,7 +285,7 @@ if (rtc_build_with_neon) {
"resampler/sinc_resampler_neon.cc",
]
- if (current_cpu != "arm64") {
+ if (target_cpu != "arm64") {
# Enable compilation for the NEON instruction set.
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
@@ -308,7 +308,7 @@ if (rtc_build_with_neon) {
"signal_processing/min_max_operations_neon.c",
]
- if (current_cpu != "arm64") {
+ if (target_cpu != "arm64") {
# Enable compilation for the NEON instruction set.
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
diff --git a/common_audio/third_party/ooura/BUILD.gn b/common_audio/third_party/ooura/BUILD.gn
index a12adb2c0b..589142b014 100644
--- a/common_audio/third_party/ooura/BUILD.gn
+++ b/common_audio/third_party/ooura/BUILD.gn
@@ -20,7 +20,7 @@ rtc_library("fft_size_128") {
]
cflags = []
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (target_cpu == "x86" || target_cpu == "x64") {
sources += [
"fft_size_128/ooura_fft_sse2.cc",
"fft_size_128/ooura_fft_tables_neon_sse2.h",
@@ -38,14 +38,14 @@ rtc_library("fft_size_128") {
deps += [ "../../../common_audio" ]
- if (current_cpu != "arm64") {
+ if (target_cpu != "arm64") {
# Enable compilation for the NEON instruction set.
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags += [ "-mfpu=neon" ]
}
}
- if (current_cpu == "mipsel" && mips_float_abi == "hard") {
+ if (target_cpu == "mipsel" && mips_float_abi == "hard") {
sources += [ "fft_size_128/ooura_fft_mips.cc" ]
}
}
diff --git a/common_audio/third_party/spl_sqrt_floor/BUILD.gn b/common_audio/third_party/spl_sqrt_floor/BUILD.gn
index ac862c65a8..e66ed2796e 100644
--- a/common_audio/third_party/spl_sqrt_floor/BUILD.gn
+++ b/common_audio/third_party/spl_sqrt_floor/BUILD.gn
@@ -12,11 +12,11 @@ rtc_library("spl_sqrt_floor") {
visibility = [ "../..:common_audio_c" ]
sources = [ "spl_sqrt_floor.h" ]
deps = []
- if (current_cpu == "arm") {
+ if (target_cpu == "arm") {
sources += [ "spl_sqrt_floor_arm.S" ]
deps += [ "../../../rtc_base/system:asm_defines" ]
- } else if (current_cpu == "mipsel") {
+ } else if (target_cpu == "mipsel") {
sources += [ "spl_sqrt_floor_mips.c" ]
} else {
sources += [ "spl_sqrt_floor.c" ]
diff --git a/modules/audio_processing/aec3/BUILD.gn b/modules/audio_processing/aec3/BUILD.gn
index f6849a8504..709dcbdd24 100644
--- a/modules/audio_processing/aec3/BUILD.gn
+++ b/modules/audio_processing/aec3/BUILD.gn
@@ -125,7 +125,7 @@ rtc_library("aec3") {
]
defines = []
- if (rtc_build_with_neon && current_cpu != "arm64") {
+ if (rtc_build_with_neon && target_cpu != "arm64") {
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
}
@@ -163,7 +163,7 @@ rtc_library("aec3") {
"//third_party/abseil-cpp/absl/strings:string_view",
]
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (target_cpu == "x86" || target_cpu == "x64") {
deps += [ ":aec3_avx2" ]
}
}
@@ -249,7 +249,7 @@ rtc_source_set("fft_data") {
]
}
-if (current_cpu == "x86" || current_cpu == "x64") {
+if (target_cpu == "x86" || target_cpu == "x64") {
rtc_library("aec3_avx2") {
configs += [ "..:apm_debug_dump" ]
sources = [
diff --git a/modules/audio_processing/agc/BUILD.gn b/modules/audio_processing/agc/BUILD.gn
index c697c5d7c4..59b933ff6c 100644
--- a/modules/audio_processing/agc/BUILD.gn
+++ b/modules/audio_processing/agc/BUILD.gn
@@ -77,7 +77,7 @@ rtc_library("legacy_agc") {
]
if (rtc_build_with_neon) {
- if (current_cpu != "arm64") {
+ if (target_cpu != "arm64") {
# Enable compilation for the NEON instruction set.
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
diff --git a/modules/audio_processing/agc2/rnn_vad/BUILD.gn b/modules/audio_processing/agc2/rnn_vad/BUILD.gn
index 2eaafdeb6a..ff042a17f4 100644
--- a/modules/audio_processing/agc2/rnn_vad/BUILD.gn
+++ b/modules/audio_processing/agc2/rnn_vad/BUILD.gn
@@ -18,7 +18,7 @@ rtc_library("rnn_vad") {
]
defines = []
- if (rtc_build_with_neon && current_cpu != "arm64") {
+ if (rtc_build_with_neon && target_cpu != "arm64") {
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
}
diff --git a/modules/audio_processing/ns/BUILD.gn b/modules/audio_processing/ns/BUILD.gn
index 3b8c3960d5..d0b66cd592 100644
--- a/modules/audio_processing/ns/BUILD.gn
+++ b/modules/audio_processing/ns/BUILD.gn
@@ -43,7 +43,7 @@ rtc_static_library("ns") {
]
defines = []
- if (rtc_build_with_neon && current_cpu != "arm64") {
+ if (rtc_build_with_neon && target_cpu != "arm64") {
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
}
diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn
index 6f9569430e..f38ba5a5c7 100644
--- a/modules/desktop_capture/BUILD.gn
+++ b/modules/desktop_capture/BUILD.gn
@@ -10,7 +10,7 @@ import("//build/config/linux/gtk/gtk.gni")
import("//build/config/ui.gni")
import("../../webrtc.gni")
-use_desktop_capture_differ_sse2 = current_cpu == "x86" || current_cpu == "x64"
+use_desktop_capture_differ_sse2 = target_cpu == "x86" || target_cpu == "x64"
config("x11_config") {
if (rtc_use_x11_extensions) {
diff --git a/webrtc.gni b/webrtc.gni
index 130a25742c..000a6c66d1 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -160,7 +160,7 @@ declare_args() {
# Determines whether NEON code will be built.
rtc_build_with_neon =
- (current_cpu == "arm" && arm_use_neon) || current_cpu == "arm64"
+ (target_cpu == "arm" && arm_use_neon) || target_cpu == "arm64"
# Enable this to build OpenH264 encoder/FFmpeg decoder. When building WebRTC
# as part of Chromium, this is delegated to `media_use_openh264`. When