Index: webrtc/rtc_base/BUILD.gn |
diff --git a/webrtc/rtc_base/BUILD.gn b/webrtc/rtc_base/BUILD.gn |
index 6676fdf2eaf81043016c105a9cd83f150f701d4a..9572f179d2dceb8627f7d85de27ffb389744aa1a 100644 |
--- a/webrtc/rtc_base/BUILD.gn |
+++ b/webrtc/rtc_base/BUILD.gn |
@@ -428,6 +428,35 @@ rtc_source_set("rtc_json") { |
} |
rtc_static_library("rtc_base") { |
+ public_deps = [ |
+ ":rtc_base_generic", |
+ ] |
+ if (is_win) { |
+ sources = [ |
+ "noop.cc", |
+ ] |
+ } |
+ if (is_ios || is_mac) { |
+ sources = [ |
+ "noop.mm", |
+ ] |
+ public_deps += [ ":rtc_base_objc" ] |
+ } |
+} |
+ |
+if (is_ios || is_mac) { |
+ rtc_source_set("rtc_base_objc") { |
+ sources = [ |
+ "thread_darwin.mm", |
+ ] |
+ deps = [ |
+ ":rtc_base_generic", |
+ ] |
+ visibility = [ ":rtc_base" ] |
+ } |
+} |
+ |
+rtc_static_library("rtc_base_generic") { |
cflags = [] |
cflags_cc = [] |
libs = [] |
@@ -537,6 +566,11 @@ rtc_static_library("rtc_base") { |
"thread.h", |
] |
+ visibility = [ |
+ ":rtc_base", |
+ ":rtc_base_objc", |
+ ] |
+ |
# TODO(henrike): issue 3307, make rtc_base build with the Chromium default |
# compiler settings. |
suppressed_configs += [ "//build/config/compiler:chromium_code" ] |
@@ -596,10 +630,7 @@ rtc_static_library("rtc_base") { |
} |
if (is_ios || is_mac) { |
- sources += [ |
- "macifaddrs_converter.cc", |
- "thread_darwin.mm", |
- ] |
+ sources += [ "macifaddrs_converter.cc" ] |
} |
if (use_x11) { |