Do not compile frame_analyzer on component builds.

Bug: None
Change-Id: I1e66c26d8e9717bc43cf6037852ec2e23b466339
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284061
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38675}
This commit is contained in:
Mirko Bonadei
2022-11-18 10:46:21 +00:00
committed by WebRTC LUCI CQ
parent 3d9b5590c2
commit 892e61cd1e

View File

@ -124,40 +124,6 @@ rtc_library("video_quality_analysis") {
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
# Abseil dependencies are not moved to the absl_deps field deliberately.
# If build_with_chromium is true, the absl_deps replaces the dependencies with
# the "//third_party/abseil-cpp:absl" target. Which doesn't include absl/flags
# (and some others) because they cannot be used in Chromiums. Special exception
# for the "frame_analyzer" target in "third_party/abseil-cpp/absl.gni" allows
# it to be build in chromium.
rtc_executable("frame_analyzer") {
visibility = [ "*" ]
testonly = true
sources = [ "frame_analyzer/frame_analyzer.cc" ]
deps = [
":video_file_reader",
":video_file_writer",
":video_quality_analysis",
"../api:make_ref_counted",
"../api:scoped_refptr",
"../api/test/metrics:chrome_perf_dashboard_metrics_exporter",
"../api/test/metrics:global_metrics_logger_and_exporter",
"../api/test/metrics:metrics_exporter",
"../api/test/metrics:stdout_metrics_exporter",
"../rtc_base:stringutils",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/strings",
]
if (build_with_chromium) {
# When building from Chromium, WebRTC's metrics and field trial
# implementations need to be replaced by the Chromium ones.
deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
}
}
# TODO(bugs.webrtc.org/11474): Enable this on win if needed. For now it
# is only required for Linux and Android.
if (!build_with_chromium && !build_with_mozilla && !is_win && !is_ios) {
@ -182,6 +148,44 @@ if (!is_component_build) {
# (and some others) because they cannot be used in Chromiums. Special exception
# for the "frame_analyzer" target in "third_party/abseil-cpp/absl.gni" allows
# it to be build in chromium.
rtc_executable("frame_analyzer") {
visibility = [ "*" ]
testonly = true
sources = [ "frame_analyzer/frame_analyzer.cc" ]
deps = [
":video_file_reader",
":video_file_writer",
":video_quality_analysis",
"../api:make_ref_counted",
"../api:scoped_refptr",
"../api/test/metrics:chrome_perf_dashboard_metrics_exporter",
"../api/test/metrics:global_metrics_logger_and_exporter",
"../api/test/metrics:metrics_exporter",
"../api/test/metrics:stdout_metrics_exporter",
"../rtc_base:stringutils",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/strings",
]
if (build_with_chromium) {
# When building from Chromium, WebRTC's metrics and field trial
# implementations need to be replaced by the Chromium ones.
deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
}
}
# This target can be built from Chromium but it doesn't support
# is_component_build=true because it depends on WebRTC testonly code
# which is not part of //third_party/webrtc_overrides:webrtc_component.
# Abseil dependencies are not moved to the absl_deps field deliberately.
# If build_with_chromium is true, the absl_deps replaces the dependencies with
# the "//third_party/abseil-cpp:absl" target. Which doesn't include absl/flags
# (and some others) because they cannot be used in Chromiums. Special exception
# for the "rtp_generator" target in "third_party/abseil-cpp/absl.gni" allows
# it to be build in chromium.
rtc_executable("rtp_generator") {
visibility = [ "*" ]
testonly = true
@ -241,7 +245,7 @@ if (!is_component_build) {
# If build_with_chromium is true, the absl_deps replaces the dependencies with
# the "//third_party/abseil-cpp:absl" target. Which doesn't include absl/flags
# (and some others) because they cannot be used in Chromiums. Special exception
# for the "frame_analyzer" target in "third_party/abseil-cpp/absl.gni" allows
# for the "video_replay" target in "third_party/abseil-cpp/absl.gni" allows
# it to be build in chromium.
rtc_executable("video_replay") {
visibility = [ "*" ]