Index: webrtc/rtc_base/BUILD.gn |
diff --git a/webrtc/rtc_base/BUILD.gn b/webrtc/rtc_base/BUILD.gn |
index 925f915aca4efd600f1d7adca70b55e8ca99a08c..7d83bfe2c666bce6b512fecd04eed054b2999d37 100644 |
--- a/webrtc/rtc_base/BUILD.gn |
+++ b/webrtc/rtc_base/BUILD.gn |
@@ -399,6 +399,43 @@ rtc_source_set("rtc_json") { |
} |
rtc_static_library("rtc_base") { |
kwiberg-webrtc
2017/08/31 20:46:14
If you made this a source set, would the need for
mbonadei
2017/09/01 09:24:35
In the next patch set I have switched to rtc_sourc
kwiberg-webrtc
2017/09/01 11:23:44
The default Chromium advice is to use a source set
|
+ if (is_ios || is_mac) { |
+ # In order to build a static_library targeting macOS or iOS |
+ # we have to provide at least one source file to avoid a build |
+ # error. |
+ sources = [ |
+ "noop.mm", |
+ ] |
+ public_deps = [ |
+ ":rtc_base_objc", |
+ ] |
+ } else { |
+ # In order to build a static_library targeting macOS or iOS |
+ # we have to provide at least one source file to avoid a build |
+ # error. |
+ sources = [ |
+ "noop.cc", |
+ ] |
kwiberg-webrtc
2017/08/31 20:46:14
I'm confused. In the else clause, we *aren't* on m
mbonadei
2017/09/01 09:24:35
Oh wait... Yes you are right! In similar CLs I avo
|
+ public_deps = [ |
+ ":rtc_base_generic", |
+ ] |
kwiberg-webrtc
2017/08/31 20:46:14
This one could be lifted out of the if-else, right
mbonadei
2017/09/01 09:24:36
This is the right thing to do. I was too focused o
|
+ } |
+} |
+ |
+if (is_ios || is_mac) { |
+ rtc_static_library("rtc_base_objc") { |
+ sources = [ |
+ "applefilesystem.mm", |
+ "thread_darwin.mm", |
+ ] |
+ public_deps = [ |
+ ":rtc_base_generic", |
+ ] |
+ visibility = [ ":rtc_base" ] |
+ } |
+} |
+ |
+rtc_static_library("rtc_base_generic") { |
cflags = [] |
cflags_cc = [] |
libs = [] |
@@ -414,7 +451,6 @@ rtc_static_library("rtc_base") { |
all_dependent_configs = [ ":rtc_base_all_dependent_config" ] |
sources = [ |
- "applefilesystem.mm", |
"asyncinvoker-inl.h", |
"asyncinvoker.cc", |
"asyncinvoker.h", |
@@ -508,6 +544,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" ] |
@@ -567,10 +608,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) { |