Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: webrtc/base/BUILD.gn

Issue 2931273002: Split rtc_task_queue target. Add separate target for sequenced_task_checker and weak_ptr. (Closed)
Patch Set: Cleaned up deps on rtc_base_approved. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("//build/config/crypto.gni") 9 import("//build/config/crypto.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
11 import("../webrtc.gni") 11 import("../webrtc.gni")
12 12
13 if (is_android) { 13 if (is_android) {
14 import("//build/config/android/config.gni") 14 import("//build/config/android/config.gni")
15 import("//build/config/android/rules.gni") 15 import("//build/config/android/rules.gni")
16 } 16 }
17 if (is_win) { 17 if (is_win) {
18 import("//build/config/clang/clang.gni") 18 import("//build/config/clang/clang.gni")
19 } 19 }
20 20
21 group("base") { 21 group("base") {
22 public_deps = [ 22 public_deps = [
23 ":rtc_base", 23 ":rtc_base",
24 ":rtc_base_approved", 24 ":rtc_base_approved",
25 ":rtc_task_queue", 25 ":rtc_task_queue",
26 ":sequenced_task_checker",
27 ":weak_ptr",
26 ] 28 ]
27 if (is_android) { 29 if (is_android) {
28 public_deps += [ ":base_java" ] 30 public_deps += [ ":base_java" ]
29 } 31 }
30 } 32 }
31 33
32 config("rtc_base_approved_all_dependent_config") { 34 config("rtc_base_approved_all_dependent_config") {
33 if (is_mac && !build_with_chromium) { 35 if (is_mac && !build_with_chromium) {
34 libs = [ "Foundation.framework" ] # needed for logging_mac.mm 36 libs = [ "Foundation.framework" ] # needed for logging_mac.mm
35 } 37 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 290
289 config("enable_libevent_config") { 291 config("enable_libevent_config") {
290 defines = [ "WEBRTC_BUILD_LIBEVENT" ] 292 defines = [ "WEBRTC_BUILD_LIBEVENT" ]
291 } 293 }
292 294
293 rtc_static_library("rtc_task_queue") { 295 rtc_static_library("rtc_task_queue") {
294 public_deps = [ 296 public_deps = [
295 ":rtc_base_approved", 297 ":rtc_base_approved",
296 ] 298 ]
297 299
298 sources = [
299 "sequenced_task_checker.h",
300 "sequenced_task_checker_impl.cc",
301 "sequenced_task_checker_impl.h",
302 "weak_ptr.cc",
303 "weak_ptr.h",
304 ]
305
306 if (build_with_chromium) { 300 if (build_with_chromium) {
307 sources += [ 301 sources = [
308 "../../webrtc_overrides/webrtc/base/task_queue.cc", 302 "../../webrtc_overrides/webrtc/base/task_queue.cc",
309 "../../webrtc_overrides/webrtc/base/task_queue.h", 303 "../../webrtc_overrides/webrtc/base/task_queue.h",
310 ] 304 ]
311 } else { 305 } else {
312 sources += [ 306 sources = [
313 "task_queue.h", 307 "task_queue.h",
314 "task_queue_posix.h", 308 "task_queue_posix.h",
315 ] 309 ]
316 if (rtc_build_libevent) { 310 if (rtc_build_libevent) {
317 deps = [ 311 deps = [
318 "//base/third_party/libevent", 312 "//base/third_party/libevent",
319 ] 313 ]
320 } 314 }
321 315
322 if (rtc_enable_libevent) { 316 if (rtc_enable_libevent) {
323 sources += [ 317 sources += [
324 "task_queue_libevent.cc", 318 "task_queue_libevent.cc",
325 "task_queue_posix.cc", 319 "task_queue_posix.cc",
326 ] 320 ]
327 all_dependent_configs = [ ":enable_libevent_config" ] 321 all_dependent_configs = [ ":enable_libevent_config" ]
328 } else { 322 } else {
329 if (is_mac || is_ios) { 323 if (is_mac || is_ios) {
330 sources += [ 324 sources += [
331 "task_queue_gcd.cc", 325 "task_queue_gcd.cc",
332 "task_queue_posix.cc", 326 "task_queue_posix.cc",
333 ] 327 ]
334 } 328 }
335 if (is_win) { 329 if (is_win) {
336 sources += [ "task_queue_win.cc" ] 330 sources += [ "task_queue_win.cc" ]
337 } 331 }
338 } 332 }
339 } 333 }
340 } 334 }
341 335
336 rtc_static_library("sequenced_task_checker") {
337 sources = [
338 "sequenced_task_checker.h",
339 "sequenced_task_checker_impl.cc",
340 "sequenced_task_checker_impl.h",
341 ]
342 deps = [
343 ":rtc_task_queue",
344 ]
345 }
346
347 rtc_static_library("weak_ptr") {
348 sources = [
349 "weak_ptr.cc",
350 "weak_ptr.h",
351 ]
352 deps = [
353 ":rtc_base_approved",
354 ":sequenced_task_checker",
355 ]
356 }
357
342 rtc_static_library("rtc_numerics") { 358 rtc_static_library("rtc_numerics") {
343 sources = [ 359 sources = [
344 "numerics/exp_filter.cc", 360 "numerics/exp_filter.cc",
345 "numerics/exp_filter.h", 361 "numerics/exp_filter.h",
346 "numerics/percentile_filter.h", 362 "numerics/percentile_filter.h",
347 ] 363 ]
348 deps = [ 364 deps = [
349 ":rtc_base_approved", 365 ":rtc_base_approved",
350 ] 366 ]
351 } 367 }
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 ":rtc_task_queue", 852 ":rtc_task_queue",
837 "../system_wrappers:system_wrappers", 853 "../system_wrappers:system_wrappers",
838 "../test:test_support", 854 "../test:test_support",
839 ] 855 ]
840 if (!build_with_chromium && is_clang) { 856 if (!build_with_chromium && is_clang) {
841 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 857 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
842 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 858 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
843 } 859 }
844 } 860 }
845 861
846 rtc_source_set("rtc_task_queue_unittests") { 862 rtc_source_set("rtc_task_queue_unittests") {
mbonadei 2017/06/12 11:31:50 I am thinking if it makes sense to split also the
perkj_webrtc 2017/06/12 11:49:14 Yes it make sense. I did not do that since I thoug
847 testonly = true 863 testonly = true
848 864
849 # Skip restricting visibility on mobile platforms since the tests on those 865 # Skip restricting visibility on mobile platforms since the tests on those
850 # gets additional generated targets which would require many lines here to 866 # gets additional generated targets which would require many lines here to
851 # cover (which would be confusing to read and hard to maintain). 867 # cover (which would be confusing to read and hard to maintain).
852 if (!is_android && !is_ios) { 868 if (!is_android && !is_ios) {
853 visibility = [ "//webrtc:rtc_unittests" ] 869 visibility = [ "//webrtc:rtc_unittests" ]
854 } 870 }
855 sources = [ 871 sources = [
856 "sequenced_task_checker_unittest.cc", 872 "sequenced_task_checker_unittest.cc",
857 "task_queue_unittest.cc", 873 "task_queue_unittest.cc",
858 "weak_ptr_unittest.cc", 874 "weak_ptr_unittest.cc",
859 ] 875 ]
860 deps = [ 876 deps = [
861 ":rtc_base_tests_main", 877 ":rtc_base_tests_main",
862 ":rtc_base_tests_utils", 878 ":rtc_base_tests_utils",
863 ":rtc_task_queue", 879 ":rtc_task_queue",
880 ":sequenced_task_checker",
881 ":weak_ptr",
864 "../test:test_support", 882 "../test:test_support",
865 ] 883 ]
866 if (!build_with_chromium && is_clang) { 884 if (!build_with_chromium && is_clang) {
867 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 885 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
868 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 886 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
869 } 887 }
870 } 888 }
871 889
872 rtc_source_set("rtc_numerics_unittests") { 890 rtc_source_set("rtc_numerics_unittests") {
873 testonly = true 891 testonly = true
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 if (is_android) { 986 if (is_android) {
969 android_library("base_java") { 987 android_library("base_java") {
970 java_files = [ 988 java_files = [
971 "java/src/org/webrtc/ContextUtils.java", 989 "java/src/org/webrtc/ContextUtils.java",
972 "java/src/org/webrtc/Logging.java", 990 "java/src/org/webrtc/Logging.java",
973 "java/src/org/webrtc/Size.java", 991 "java/src/org/webrtc/Size.java",
974 "java/src/org/webrtc/ThreadUtils.java", 992 "java/src/org/webrtc/ThreadUtils.java",
975 ] 993 ]
976 } 994 }
977 } 995 }
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698