From a5cec5543412540daafbb4284774d7be90cd39d5 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Thu, 6 Feb 2020 10:16:20 +0100 Subject: [PATCH] Make rtp_generator buildable from Chromium. Bug: chromium:942546 Change-Id: I90d077eca55f6cbae119c576d1ba1ec456858377 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168245 Reviewed-by: Artem Titov Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#30470} --- rtc_tools/BUILD.gn | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index bffa033655..30c0cf5172 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -138,9 +138,10 @@ if (!build_with_chromium && !build_with_mozilla) { } } -# Only expose the targets needed by Chromium (e.g. frame_analyzer) to avoid -# building a lot of redundant code as part of Chromium builds. -if (!build_with_chromium) { +if (!is_component_build) { + # 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. rtc_executable("rtp_generator") { visibility = [ "*" ] testonly = true @@ -183,8 +184,17 @@ if (!build_with_chromium) { "//third_party/abseil-cpp/absl/flags:usage", "//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" ] + } } +} +# Only expose the targets needed by Chromium (e.g. frame_analyzer) to avoid +# building a lot of redundant code as part of Chromium builds. +if (!build_with_chromium) { rtc_executable("psnr_ssim_analyzer") { testonly = true sources = [ "psnr_ssim_analyzer/psnr_ssim_analyzer.cc" ]