From 915bbd53e477d86515b9782d66b3a7275a172fa5 Mon Sep 17 00:00:00 2001 From: nisse Date: Mon, 20 Feb 2017 00:50:22 -0800 Subject: [PATCH] Add gn target rtc_task_runner. This is step 1 in the following process to move the task runner abstraction over to Chrome, without gettings link errors on duplicate symbols. 1. Move files from the rtc_base target to a new target rtc_task_runner, and let rtc_base publicly depend on it. 2. In Chrome, add an explicit dependency on rtc_task_runner where it depends on rtc_base. 3. Drop the webrtc dependency rtc_base --> rtc_task_runner. 4. Copy task runner code to Chrome (cl https://codereview.chromium.org/2694903005/), and drop its dependency on webrtc's rtc_task_runner target. 5. Delete the rtc_task_runner target and corresponding source files from webrtc. Mission accomplished! BUG=webrtc:6424 Review-Url: https://codereview.webrtc.org/2696703009 Cr-Commit-Position: refs/heads/master@{#16710} --- webrtc/base/BUILD.gn | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 4e03dc7b9e..82e23d0a08 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -348,6 +348,19 @@ config("rtc_base_warnings_config") { } } +# TODO(nisse): This target is temporarily split out, to aid moving the +# code over to Chrome. It should be deleted from webrtc soon. +rtc_static_library("rtc_task_runner") { + sources = [ + "task.cc", + "task.h", + "taskparent.cc", + "taskparent.h", + "taskrunner.cc", + "taskrunner.h", + ] +} + rtc_static_library("rtc_base") { cflags = [] cflags_cc = [] @@ -358,6 +371,7 @@ rtc_static_library("rtc_base") { ] public_deps = [ ":rtc_base_approved", + ":rtc_task_runner", ] public_configs = [] @@ -463,12 +477,6 @@ rtc_static_library("rtc_base") { "sslstreamadapter.h", "stream.cc", "stream.h", - "task.cc", - "task.h", - "taskparent.cc", - "taskparent.h", - "taskrunner.cc", - "taskrunner.h", "thread.cc", "thread.h", ]