From 87ce874f99eff5bc200b74a816f8e1c9ed7cacdd Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Fri, 1 Feb 2019 19:40:11 +0100 Subject: [PATCH] Allow link-time injection of the DefaultTaskQueueFactory Bug: webrtc:10191 Change-Id: If6a2fb32bee63328cf2cb86be2aac69bc5bd65dd Reviewed-on: https://webrtc-review.googlesource.com/c/120964 Reviewed-by: Karl Wiberg Commit-Queue: Danil Chapovalov Cr-Commit-Position: refs/heads/master@{#26552} --- api/task_queue/BUILD.gn | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/api/task_queue/BUILD.gn b/api/task_queue/BUILD.gn index 69f21336fb..8884bd3fb4 100644 --- a/api/task_queue/BUILD.gn +++ b/api/task_queue/BUILD.gn @@ -63,20 +63,25 @@ rtc_source_set("default_task_queue_factory") { # supported platforms. visibility = [ ":global_task_queue_factory" ] sources = [ - "default_task_queue_factory.cc", "default_task_queue_factory.h", ] deps = [ ":task_queue_factory", - "../../rtc_base:checks", ] + + # TODO(bugs.webrtc.org/10284): Include implementation unconditionally when + # global task queue factory is removed. + if (rtc_link_task_queue_impl) { + sources += [ "default_task_queue_factory.cc" ] + deps += [ "../../rtc_base:checks" ] + } } # Linking with global_task_queue_factory adds link-time implementation of the # rtc::TaskQueue that allows run-time injection of the TaskQueue implementaion. rtc_source_set("global_task_queue_factory") { - # TODO(danilchap): Remove this target when task queue factory propagated to - # all components that create TaskQueues. + # TODO(bugs.webrtc.org/10284): Remove this target when task queue factory + # propagated to all components that create TaskQueues. visibility = [ "*" ] sources = [ "global_task_queue_factory.cc",