From b3f78deb788449f8601173639764acfb727e66d5 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Thu, 18 Jul 2019 22:25:48 +0200 Subject: [PATCH] Reland "Don't use all_dependent_configs for sdk frameworks" This is a reland of 63741c7fa1aa55a38af11ac8cc04498722f9407d It's possible to reland after the downstream fix in https://chromium-review.googlesource.com/1730415 Original change's description: > Don't use all_dependent_configs for sdk frameworks > > libs should be propagated to the final binary even without that: > https://gn.googlesource.com/gn/+/master/docs/reference.md#var_libs > > But add some missing SDK framework dependencies: > > * RTCNativeI420Buffer.mm uses CGBitmapContextGetBytesPerRow. > * socketrocket uses SecCertificateCopyData. > > Bug: None > Change-Id: Iba38a5dfaf470a5a790d494cbec8ade44b1d16ba > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146082 > Reviewed-by: Mirko Bonadei > Commit-Queue: Oleh Prypin > Cr-Commit-Position: refs/heads/master@{#28605} Bug: None Change-Id: I6a1cd80c5177ef3a3b92ee55fc91e187b202d864 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147720 Commit-Queue: Oleh Prypin Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#28740} --- examples/BUILD.gn | 1 + rtc_base/BUILD.gn | 39 ++++++++++++++++----------------------- sdk/BUILD.gn | 1 + 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/examples/BUILD.gn b/examples/BUILD.gn index a09d6a2ca4..ce60643e0c 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -588,6 +588,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { libs = [ "CFNetwork.framework", + "Security.framework", "icucore", ] } diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 56527b6019..713fb34ef9 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -19,27 +19,6 @@ config("rtc_base_chromium_config") { defines = [ "NO_MAIN_THREAD_WRAPPING" ] } -config("rtc_base_all_dependent_config") { - if (is_ios) { - libs = [ - "CFNetwork.framework", - "Foundation.framework", - "Security.framework", - "SystemConfiguration.framework", - "UIKit.framework", - ] - } - if (is_mac) { - libs = [ - "Cocoa.framework", - "Foundation.framework", - "IOKit.framework", - "Security.framework", - "SystemConfiguration.framework", - ] - } -} - if (!rtc_build_ssl) { config("external_ssl_library") { assert(rtc_ssl_root != "", @@ -792,8 +771,6 @@ rtc_static_library("rtc_base") { ] public_configs = [] - all_dependent_configs = [ ":rtc_base_all_dependent_config" ] - sources = [ "async_invoker.cc", "async_invoker.h", @@ -959,6 +936,22 @@ rtc_static_library("rtc_base") { "mac_utils.cc", "mac_utils.h", ] + libs += [ + "Cocoa.framework", + "Foundation.framework", + "IOKit.framework", + "Security.framework", + "SystemConfiguration.framework", + ] + } + if (is_ios) { + libs += [ + "CFNetwork.framework", + "Foundation.framework", + "Security.framework", + "SystemConfiguration.framework", + "UIKit.framework", + ] } if (is_win) { diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 8303d8af46..a778fb1666 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -373,6 +373,7 @@ if (is_ios || is_mac) { ] libs = [ "VideoToolbox.framework", + "CoreGraphics.framework", "CoreVideo.framework", ] }