Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Unified Diff: webrtc/rtc_base/BUILD.gn

Issue 2988433002: Decoupling rtc_base_approved from Obj-C code (Closed)
Patch Set: Proxy target + naming + private visibility Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/rtc_base/noop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/BUILD.gn
diff --git a/webrtc/rtc_base/BUILD.gn b/webrtc/rtc_base/BUILD.gn
index 60d1f57583cf9f86f0d74ac6c63484d30a5f39c6..7d133a7a8aeac5fd66263b4e4e1b4d33b1886c52 100644
--- a/webrtc/rtc_base/BUILD.gn
+++ b/webrtc/rtc_base/BUILD.gn
@@ -31,12 +31,6 @@ group("base") {
}
}
-config("rtc_base_approved_all_dependent_config") {
- if (is_mac && !build_with_chromium) {
- libs = [ "Foundation.framework" ] # needed for logging_mac.mm
- }
-}
-
config("rtc_base_chromium_config") {
defines = [ "NO_MAIN_THREAD_WRAPPING" ]
}
@@ -86,16 +80,31 @@ source_set("compile_assert_c") {
]
}
-# The subset of rtc_base approved for use outside of libjingle.
rtc_static_library("rtc_base_approved") {
kwiberg-webrtc 2017/08/31 20:57:02 If you make this a source set, can you drop the no
mbonadei 2017/09/01 09:46:38 Yes, done.
+ sources = [
+ "noop.cc",
+ ]
+ if (is_mac && !build_with_chromium) {
+ public_deps = [
+ ":rtc_base_approved_objc",
+ ]
+ } else {
+ public_deps = [
+ ":rtc_base_approved_generic",
+ ]
kwiberg-webrtc 2017/08/31 20:57:02 Can you make this public_dep unconditional, and tu
mbonadei 2017/09/01 09:46:38 Done.
+ }
+}
+
+# The subset of rtc_base approved for use outside of libjingle.
+rtc_static_library("rtc_base_approved_generic") {
# TODO(kjellander): Remove (bugs.webrtc.org/7480)
# Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc:
# :rtc_base_approved -> ../system_wrappers -> :rtc_base_approved
+ visibility = [ ":*" ]
kwiberg-webrtc 2017/08/31 20:57:03 Could you tighten the visibility restrictions here
mbonadei 2017/09/01 09:46:38 Yes, I remember I talked about this with kjellande
kjellander_webrtc 2017/09/01 10:11:20 It's just laziness, I wouldn't say we prefer one o
check_includes = false
defines = []
libs = []
deps = []
- all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ]
sources = [
"array_view.h",
@@ -210,7 +219,6 @@ rtc_static_library("rtc_base_approved") {
sources += [
"logging.cc",
"logging.h",
- "logging_mac.mm",
]
}
if (is_component_build && is_win) {
@@ -290,6 +298,24 @@ rtc_static_library("rtc_base_approved") {
}
}
+if (is_mac && !build_with_chromium) {
+ config("rtc_base_approved_objc_all_dependent_config") {
+ visibility = [ ":*" ]
+ libs = [ "Foundation.framework" ] # needed for logging_mac.mm
+ }
+
+ rtc_static_library("rtc_base_approved_objc") {
+ visibility = [ ":*" ]
+ all_dependent_configs = [ ":rtc_base_approved_objc_all_dependent_config" ]
+ sources = [
+ "logging_mac.mm",
+ ]
+ public_deps = [
+ ":rtc_base_approved_generic",
+ ]
+ }
+}
+
config("enable_libevent_config") {
defines = [ "WEBRTC_BUILD_LIBEVENT" ]
}
« no previous file with comments | « no previous file | webrtc/rtc_base/noop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698