Index: webrtc/base/BUILD.gn |
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn |
index 83cb750dd22039d88eaebdf21c03963adf6a4135..2433371775caf20dfe745c2fcb60ccd3e2951a4f 100644 |
--- a/webrtc/base/BUILD.gn |
+++ b/webrtc/base/BUILD.gn |
@@ -23,6 +23,8 @@ group("base") { |
":rtc_base", |
":rtc_base_approved", |
":rtc_task_queue", |
+ ":sequenced_task_checker", |
+ ":weak_ptr", |
] |
if (is_android) { |
public_deps += [ ":base_java" ] |
@@ -295,21 +297,13 @@ rtc_static_library("rtc_task_queue") { |
":rtc_base_approved", |
] |
- sources = [ |
- "sequenced_task_checker.h", |
- "sequenced_task_checker_impl.cc", |
- "sequenced_task_checker_impl.h", |
- "weak_ptr.cc", |
- "weak_ptr.h", |
- ] |
- |
if (build_with_chromium) { |
- sources += [ |
+ sources = [ |
"../../webrtc_overrides/webrtc/base/task_queue.cc", |
"../../webrtc_overrides/webrtc/base/task_queue.h", |
] |
} else { |
- sources += [ |
+ sources = [ |
"task_queue.h", |
"task_queue_posix.h", |
] |
@@ -339,6 +333,28 @@ rtc_static_library("rtc_task_queue") { |
} |
} |
+rtc_static_library("sequenced_task_checker") { |
+ sources = [ |
+ "sequenced_task_checker.h", |
+ "sequenced_task_checker_impl.cc", |
+ "sequenced_task_checker_impl.h", |
+ ] |
+ deps = [ |
+ ":rtc_task_queue", |
+ ] |
+} |
+ |
+rtc_static_library("weak_ptr") { |
+ sources = [ |
+ "weak_ptr.cc", |
+ "weak_ptr.h", |
+ ] |
+ deps = [ |
+ ":rtc_base_approved", |
+ ":sequenced_task_checker", |
+ ] |
+} |
+ |
rtc_static_library("rtc_numerics") { |
sources = [ |
"numerics/exp_filter.cc", |
@@ -853,9 +869,7 @@ if (rtc_include_tests) { |
visibility = [ "//webrtc:rtc_unittests" ] |
} |
sources = [ |
- "sequenced_task_checker_unittest.cc", |
"task_queue_unittest.cc", |
- "weak_ptr_unittest.cc", |
] |
deps = [ |
":rtc_base_tests_main", |
@@ -869,6 +883,48 @@ if (rtc_include_tests) { |
} |
} |
+ rtc_source_set("sequenced_task_checker_unittests") { |
+ testonly = true |
+ |
+ # Skip restricting visibility on mobile platforms since the tests on those |
+ # gets additional generated targets which would require many lines here to |
+ # cover (which would be confusing to read and hard to maintain). |
+ if (!is_android && !is_ios) { |
+ visibility = [ "//webrtc:rtc_unittests" ] |
+ } |
+ sources = [ |
+ "sequenced_task_checker_unittest.cc", |
+ ] |
+ deps = [ |
+ ":rtc_base_approved", |
+ ":rtc_base_tests_main", |
+ ":rtc_task_queue", |
+ ":sequenced_task_checker", |
+ "../test:test_support", |
+ ] |
+ } |
+ |
+ rtc_source_set("weak_ptr_unittests") { |
+ testonly = true |
+ |
+ # Skip restricting visibility on mobile platforms since the tests on those |
+ # gets additional generated targets which would require many lines here to |
+ # cover (which would be confusing to read and hard to maintain). |
+ if (!is_android && !is_ios) { |
+ visibility = [ "//webrtc:rtc_unittests" ] |
+ } |
+ sources = [ |
+ "weak_ptr_unittest.cc", |
+ ] |
+ deps = [ |
+ ":rtc_base_tests_main", |
+ ":rtc_base_tests_utils", |
+ ":rtc_task_queue", |
+ ":weak_ptr", |
+ "../test:test_support", |
+ ] |
+ } |
+ |
rtc_source_set("rtc_numerics_unittests") { |
testonly = true |