From 63dda507f53b0e0822d5d1dcfdcb5bcc43c6af3a Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Fri, 18 Nov 2022 12:15:28 +0000 Subject: [PATCH] Revert "Do not compile frame_analyzer on component builds." This reverts commit 892e61cd1e4186049ab65da7ca60bc6a2e05c16e. Reason for revert: Needs more work. Original change's description: > 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 > Commit-Queue: Mirko Bonadei > Cr-Commit-Position: refs/heads/main@{#38675} Bug: None Change-Id: I9afe8a057f98e49cf4fbe64b947e04796e40f89d No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284100 Auto-Submit: Mirko Bonadei Bot-Commit: rubber-stamper@appspot.gserviceaccount.com Owners-Override: Mirko Bonadei Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#38678} --- rtc_tools/BUILD.gn | 74 ++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index c49eab50be..d219f598a9 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -124,6 +124,40 @@ 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) { @@ -148,44 +182,6 @@ 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 @@ -245,7 +241,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 "video_replay" target in "third_party/abseil-cpp/absl.gni" allows + # for the "frame_analyzer" target in "third_party/abseil-cpp/absl.gni" allows # it to be build in chromium. rtc_executable("video_replay") { visibility = [ "*" ]