Chromium Code Reviews| Index: webrtc/rtc_base/BUILD.gn |
| diff --git a/webrtc/rtc_base/BUILD.gn b/webrtc/rtc_base/BUILD.gn |
| index 60d1f57583cf9f86f0d74ac6c63484d30a5f39c6..474e06c898898a55147f6e01ac2f7e2d049c08b6 100644 |
| --- a/webrtc/rtc_base/BUILD.gn |
| +++ b/webrtc/rtc_base/BUILD.gn |
| @@ -294,42 +294,65 @@ config("enable_libevent_config") { |
| defines = [ "WEBRTC_BUILD_LIBEVENT" ] |
| } |
| -rtc_static_library("rtc_task_queue") { |
| +rtc_source_set("rtc_task_queue") { |
| public_deps = [ |
| ":rtc_base_approved", |
| + ":rtc_task_queue_api", |
| ] |
| + if (rtc_link_task_queue_impl) { |
| + deps = [ |
| + ":rtc_task_queue_impl", |
| + ] |
| + } |
| +} |
|
kwiberg-webrtc
2017/08/23 13:23:26
I think it would be better to not have this target
|
| + |
| +rtc_source_set("rtc_task_queue_api") { |
|
kwiberg-webrtc
2017/08/23 13:23:26
Note in a comment that anyone who uses this needs
|
| if (build_with_chromium) { |
| sources = [ |
| - "../../webrtc_overrides/webrtc/rtc_base/task_queue.cc", |
| "../../webrtc_overrides/webrtc/rtc_base/task_queue.h", |
| ] |
| } else { |
| sources = [ |
| "task_queue.h", |
| - "task_queue_posix.h", |
| ] |
| + } |
| + deps = [ |
| + ":rtc_base_approved", |
| + ] |
| +} |
| + |
| +rtc_source_set("rtc_task_queue_impl") { |
|
kwiberg-webrtc
2017/08/23 13:23:26
Excellent with the _api and _impl targets. Things
|
| + deps = [ |
| + ":rtc_base_approved", |
| + ":rtc_task_queue_api", |
| + ] |
| + if (build_with_chromium) { |
| + sources = [ |
| + "../../webrtc_overrides/webrtc/rtc_base/task_queue.cc", |
| + ] |
| + } else { |
| if (rtc_build_libevent) { |
| - deps = [ |
| - "//base/third_party/libevent", |
| - ] |
| + deps += [ "//base/third_party/libevent" ] |
| } |
| - |
| if (rtc_enable_libevent) { |
| - sources += [ |
| + sources = [ |
| "task_queue_libevent.cc", |
| "task_queue_posix.cc", |
| + "task_queue_posix.h", |
| ] |
| all_dependent_configs = [ ":enable_libevent_config" ] |
| } else { |
| if (is_mac || is_ios) { |
| - sources += [ |
| + sources = [ |
| "task_queue_gcd.cc", |
| "task_queue_posix.cc", |
| ] |
| } |
| if (is_win) { |
| - sources += [ "task_queue_win.cc" ] |
| + sources = [ |
| + "task_queue_win.cc", |
| + ] |
| } |
| } |
| } |