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

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

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules Created 3 years, 5 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 | « webrtc/modules/audio_device/BUILD.gn ('k') | webrtc/rtc_base/DEPS » ('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) 2017 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")
10 import("//build/config/ui.gni")
9 import("../webrtc.gni") 11 import("../webrtc.gni")
10 12
11 if (is_android) { 13 if (is_android) {
12 import("//build/config/android/config.gni") 14 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni") 15 import("//build/config/android/rules.gni")
14 } 16 }
15 17 if (is_win) {
16 group("rtc_base") { 18 import("//build/config/clang/clang.gni")
17 public_deps = [] 19 }
20
21 group("base") {
22 public_deps = [
23 ":rtc_base",
24 ":rtc_base_approved",
25 ":rtc_task_queue",
26 ":sequenced_task_checker",
27 ":weak_ptr",
28 ]
18 if (is_android) { 29 if (is_android) {
19 public_deps += [ ":base_java" ] 30 public_deps += [ ":base_java" ]
20 } 31 }
21 } 32 }
22 33
34 config("rtc_base_approved_all_dependent_config") {
35 if (is_mac && !build_with_chromium) {
36 libs = [ "Foundation.framework" ] # needed for logging_mac.mm
37 }
38 }
39
40 config("rtc_base_chromium_config") {
41 defines = [ "NO_MAIN_THREAD_WRAPPING" ]
42 }
43
44 config("rtc_base_all_dependent_config") {
45 if (is_ios) {
46 libs = [
47 "CFNetwork.framework",
48 "Security.framework",
49 "SystemConfiguration.framework",
50 "UIKit.framework",
51 ]
52 }
53 if (is_mac) {
54 libs = [
55 "Cocoa.framework",
56 "Foundation.framework",
57 "IOKit.framework",
58 "Security.framework",
59 "SystemConfiguration.framework",
60 ]
61 }
62 }
63
64 if (!rtc_build_ssl) {
65 config("external_ssl_library") {
66 assert(rtc_ssl_root != "",
67 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
68 include_dirs = [ rtc_ssl_root ]
69 }
70 }
71
72 source_set("protobuf_utils") {
73 sources = [
74 "protobuf_utils.h",
75 ]
76 if (rtc_enable_protobuf) {
77 public_deps = [
78 "//third_party/protobuf:protobuf_lite",
79 ]
80 }
81 }
82
83 source_set("compile_assert_c") {
84 sources = [
85 "compile_assert_c.h",
86 ]
87 }
88
89 # The subset of rtc_base approved for use outside of libjingle.
90 rtc_static_library("rtc_base_approved") {
91 # TODO(kjellander): Remove (bugs.webrtc.org/7480)
92 # Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc:
93 # :rtc_base_approved -> //webrtc/system_wrappers -> :rtc_base_approved
94 check_includes = false
95 defines = []
96 libs = []
97 deps = []
98 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ]
99
100 sources = [
101 "array_view.h",
102 "arraysize.h",
103 "atomicops.h",
104 "base64.cc",
105 "base64.h",
106 "basictypes.h",
107 "bind.h",
108 "bitbuffer.cc",
109 "bitbuffer.h",
110 "buffer.h",
111 "bufferqueue.cc",
112 "bufferqueue.h",
113 "bytebuffer.cc",
114 "bytebuffer.h",
115 "byteorder.h",
116 "checks.cc",
117 "checks.h",
118 "constructormagic.h",
119 "copyonwritebuffer.cc",
120 "copyonwritebuffer.h",
121 "criticalsection.cc",
122 "criticalsection.h",
123 "deprecation.h",
124 "event.cc",
125 "event.h",
126 "event_tracer.cc",
127 "event_tracer.h",
128 "file.cc",
129 "file.h",
130 "flags.cc",
131 "flags.h",
132 "format_macros.h",
133 "function_view.h",
134 "ignore_wundef.h",
135 "location.cc",
136 "location.h",
137 "mod_ops.h",
138 "onetimeevent.h",
139 "optional.cc",
140 "optional.h",
141 "pathutils.cc",
142 "pathutils.h",
143 "platform_file.cc",
144 "platform_file.h",
145 "platform_thread.cc",
146 "platform_thread.h",
147 "platform_thread_types.h",
148 "ptr_util.h",
149 "race_checker.cc",
150 "race_checker.h",
151 "random.cc",
152 "random.h",
153 "rate_limiter.cc",
154 "rate_limiter.h",
155 "rate_statistics.cc",
156 "rate_statistics.h",
157 "ratetracker.cc",
158 "ratetracker.h",
159 "refcount.h",
160 "refcountedobject.h",
161 "safe_compare.h",
162 "safe_conversions.h",
163 "safe_conversions_impl.h",
164 "safe_minmax.h",
165 "sanitizer.h",
166 "scoped_ref_ptr.h",
167 "string_to_number.cc",
168 "string_to_number.h",
169 "stringencode.cc",
170 "stringencode.h",
171 "stringize_macros.h",
172 "stringutils.cc",
173 "stringutils.h",
174 "swap_queue.h",
175 "template_util.h",
176 "thread_annotations.h",
177 "thread_checker.h",
178 "thread_checker_impl.cc",
179 "thread_checker_impl.h",
180 "timestampaligner.cc",
181 "timestampaligner.h",
182 "timeutils.cc",
183 "timeutils.h",
184 "trace_event.h",
185 "type_traits.h",
186 ]
187
188 deps += [ "..:webrtc_common" ]
189
190 if (is_android) {
191 libs += [ "log" ]
192 }
193
194 if (is_posix) {
195 sources += [ "file_posix.cc" ]
196 }
197
198 if (is_win) {
199 sources += [ "file_win.cc" ]
200 }
201
202 if (build_with_chromium) {
203 # Dependency on chromium's logging (in //base).
204 deps += [ "//base:base" ]
205 sources += [
206 "../../webrtc_overrides/webrtc/base/logging.cc",
207 "../../webrtc_overrides/webrtc/base/logging.h",
208 ]
209 } else {
210 sources += [
211 "logging.cc",
212 "logging.h",
213 "logging_mac.mm",
214 ]
215 }
216 if (is_component_build && is_win) {
217 # Copy the VS runtime DLLs into the isolate so that they don't have to be
218 # preinstalled on the target machine. The debug runtimes have a "d" at
219 # the end.
220 # This is a copy of https://codereview.chromium.org/1783973002.
221 # TODO(ehmaldonado): We'd like Chromium to make this changes easier to use,
222 # so we don't have to copy their changes and risk breakages.
223 # See http://crbug.com/653569
224 if (is_debug) {
225 vcrt_suffix = "d"
226 } else {
227 vcrt_suffix = ""
228 }
229
230 # These runtime files are copied to the output directory by the
231 # vs_toolchain script that runs as part of toolchain configuration.
232 data = [
233 "$root_out_dir/msvcp140${vcrt_suffix}.dll",
234 "$root_out_dir/vccorlib140${vcrt_suffix}.dll",
235 "$root_out_dir/vcruntime140${vcrt_suffix}.dll",
236
237 # Universal Windows 10 CRT files
238 "$root_out_dir/api-ms-win-core-console-l1-1-0.dll",
239 "$root_out_dir/api-ms-win-core-datetime-l1-1-0.dll",
240 "$root_out_dir/api-ms-win-core-debug-l1-1-0.dll",
241 "$root_out_dir/api-ms-win-core-errorhandling-l1-1-0.dll",
242 "$root_out_dir/api-ms-win-core-file-l1-1-0.dll",
243 "$root_out_dir/api-ms-win-core-file-l1-2-0.dll",
244 "$root_out_dir/api-ms-win-core-file-l2-1-0.dll",
245 "$root_out_dir/api-ms-win-core-handle-l1-1-0.dll",
246 "$root_out_dir/api-ms-win-core-heap-l1-1-0.dll",
247 "$root_out_dir/api-ms-win-core-interlocked-l1-1-0.dll",
248 "$root_out_dir/api-ms-win-core-libraryloader-l1-1-0.dll",
249 "$root_out_dir/api-ms-win-core-localization-l1-2-0.dll",
250 "$root_out_dir/api-ms-win-core-memory-l1-1-0.dll",
251 "$root_out_dir/api-ms-win-core-namedpipe-l1-1-0.dll",
252 "$root_out_dir/api-ms-win-core-processenvironment-l1-1-0.dll",
253 "$root_out_dir/api-ms-win-core-processthreads-l1-1-0.dll",
254 "$root_out_dir/api-ms-win-core-processthreads-l1-1-1.dll",
255 "$root_out_dir/api-ms-win-core-profile-l1-1-0.dll",
256 "$root_out_dir/api-ms-win-core-rtlsupport-l1-1-0.dll",
257 "$root_out_dir/api-ms-win-core-string-l1-1-0.dll",
258 "$root_out_dir/api-ms-win-core-synch-l1-1-0.dll",
259 "$root_out_dir/api-ms-win-core-synch-l1-2-0.dll",
260 "$root_out_dir/api-ms-win-core-sysinfo-l1-1-0.dll",
261 "$root_out_dir/api-ms-win-core-timezone-l1-1-0.dll",
262 "$root_out_dir/api-ms-win-core-util-l1-1-0.dll",
263 "$root_out_dir/api-ms-win-crt-conio-l1-1-0.dll",
264 "$root_out_dir/api-ms-win-crt-convert-l1-1-0.dll",
265 "$root_out_dir/api-ms-win-crt-environment-l1-1-0.dll",
266 "$root_out_dir/api-ms-win-crt-filesystem-l1-1-0.dll",
267 "$root_out_dir/api-ms-win-crt-heap-l1-1-0.dll",
268 "$root_out_dir/api-ms-win-crt-locale-l1-1-0.dll",
269 "$root_out_dir/api-ms-win-crt-math-l1-1-0.dll",
270 "$root_out_dir/api-ms-win-crt-multibyte-l1-1-0.dll",
271 "$root_out_dir/api-ms-win-crt-private-l1-1-0.dll",
272 "$root_out_dir/api-ms-win-crt-process-l1-1-0.dll",
273 "$root_out_dir/api-ms-win-crt-runtime-l1-1-0.dll",
274 "$root_out_dir/api-ms-win-crt-stdio-l1-1-0.dll",
275 "$root_out_dir/api-ms-win-crt-string-l1-1-0.dll",
276 "$root_out_dir/api-ms-win-crt-time-l1-1-0.dll",
277 "$root_out_dir/api-ms-win-crt-utility-l1-1-0.dll",
278 "$root_out_dir/ucrtbase${vcrt_suffix}.dll",
279 ]
280 if (is_asan) {
281 if (current_cpu == "x64") {
282 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-x86_64.dll" ]
283 } else {
284 data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_r t.asan_dynamic-i386.dll" ]
285 }
286 }
287 }
288 if (is_nacl) {
289 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
290 }
291 }
292
293 config("enable_libevent_config") {
294 defines = [ "WEBRTC_BUILD_LIBEVENT" ]
295 }
296
297 rtc_static_library("rtc_task_queue") {
298 public_deps = [
299 ":rtc_base_approved",
300 ]
301
302 if (build_with_chromium) {
303 sources = [
304 "../../webrtc_overrides/webrtc/base/task_queue.cc",
305 "../../webrtc_overrides/webrtc/base/task_queue.h",
306 ]
307 } else {
308 sources = [
309 "task_queue.h",
310 "task_queue_posix.h",
311 ]
312 if (rtc_build_libevent) {
313 deps = [
314 "//base/third_party/libevent",
315 ]
316 }
317
318 if (rtc_enable_libevent) {
319 sources += [
320 "task_queue_libevent.cc",
321 "task_queue_posix.cc",
322 ]
323 all_dependent_configs = [ ":enable_libevent_config" ]
324 } else {
325 if (is_mac || is_ios) {
326 sources += [
327 "task_queue_gcd.cc",
328 "task_queue_posix.cc",
329 ]
330 }
331 if (is_win) {
332 sources += [ "task_queue_win.cc" ]
333 }
334 }
335 }
336 }
337
338 rtc_static_library("sequenced_task_checker") {
339 sources = [
340 "sequenced_task_checker.h",
341 "sequenced_task_checker_impl.cc",
342 "sequenced_task_checker_impl.h",
343 ]
344 deps = [
345 ":rtc_task_queue",
346 ]
347 }
348
349 rtc_static_library("weak_ptr") {
350 sources = [
351 "weak_ptr.cc",
352 "weak_ptr.h",
353 ]
354 deps = [
355 ":rtc_base_approved",
356 ":sequenced_task_checker",
357 ]
358 }
359
360 rtc_static_library("rtc_numerics") {
361 sources = [
362 "numerics/exp_filter.cc",
363 "numerics/exp_filter.h",
364 "numerics/percentile_filter.h",
365 ]
366 deps = [
367 ":rtc_base_approved",
368 ]
369 }
370
371 config("rtc_base_warnings_config") {
372 if (is_win && is_clang) {
373 cflags = [
374 # Disable warnings failing when compiling with Clang on Windows.
375 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
376 "-Wno-sign-compare",
377 "-Wno-missing-braces",
378 ]
379 }
380 }
381
382 rtc_source_set("rtc_json") {
383 defines = []
384 sources = [
385 "json.cc",
386 "json.h",
387 ]
388 if (rtc_build_json) {
389 public_deps = [
390 "//third_party/jsoncpp",
391 ]
392 } else {
393 include_dirs = [ "$rtc_jsoncpp_root" ]
394
395 # When defined changes the include path for json.h to where it is
396 # expected to be when building json outside of the standalone build.
397 defines += [ "WEBRTC_EXTERNAL_JSON" ]
398 }
399 }
400
401 rtc_static_library("rtc_base") {
402 cflags = []
403 cflags_cc = []
404 libs = []
405 defines = []
406 deps = [
407 "..:webrtc_common",
408 ]
409 public_deps = [
410 ":rtc_base_approved",
411 ]
412 public_configs = []
413
414 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
415
416 sources = [
417 "applefilesystem.mm",
418 "asyncinvoker-inl.h",
419 "asyncinvoker.cc",
420 "asyncinvoker.h",
421 "asyncpacketsocket.cc",
422 "asyncpacketsocket.h",
423 "asyncresolverinterface.cc",
424 "asyncresolverinterface.h",
425 "asyncsocket.cc",
426 "asyncsocket.h",
427 "asynctcpsocket.cc",
428 "asynctcpsocket.h",
429 "asyncudpsocket.cc",
430 "asyncudpsocket.h",
431 "crc32.cc",
432 "crc32.h",
433 "cryptstring.cc",
434 "cryptstring.h",
435 "filerotatingstream.cc",
436 "filerotatingstream.h",
437 "fileutils.cc",
438 "fileutils.h",
439 "gunit_prod.h",
440 "helpers.cc",
441 "helpers.h",
442 "httpbase.cc",
443 "httpbase.h",
444 "httpcommon-inl.h",
445 "httpcommon.cc",
446 "httpcommon.h",
447 "ipaddress.cc",
448 "ipaddress.h",
449 "messagedigest.cc",
450 "messagedigest.h",
451 "messagehandler.cc",
452 "messagehandler.h",
453 "messagequeue.cc",
454 "messagequeue.h",
455 "nethelpers.cc",
456 "nethelpers.h",
457 "network.cc",
458 "network.h",
459 "networkmonitor.cc",
460 "networkmonitor.h",
461 "nullsocketserver.cc",
462 "nullsocketserver.h",
463 "openssl.h",
464 "openssladapter.cc",
465 "openssladapter.h",
466 "openssldigest.cc",
467 "openssldigest.h",
468 "opensslidentity.cc",
469 "opensslidentity.h",
470 "opensslstreamadapter.cc",
471 "opensslstreamadapter.h",
472 "physicalsocketserver.cc",
473 "physicalsocketserver.h",
474 "proxyinfo.cc",
475 "proxyinfo.h",
476 "ratelimiter.cc",
477 "ratelimiter.h",
478 "rtccertificate.cc",
479 "rtccertificate.h",
480 "rtccertificategenerator.cc",
481 "rtccertificategenerator.h",
482 "signalthread.cc",
483 "signalthread.h",
484 "sigslot.cc",
485 "sigslot.h",
486 "socket.h",
487 "socketadapters.cc",
488 "socketadapters.h",
489 "socketaddress.cc",
490 "socketaddress.h",
491 "socketaddresspair.cc",
492 "socketaddresspair.h",
493 "socketfactory.h",
494 "socketserver.h",
495 "socketstream.cc",
496 "socketstream.h",
497 "ssladapter.cc",
498 "ssladapter.h",
499 "sslfingerprint.cc",
500 "sslfingerprint.h",
501 "sslidentity.cc",
502 "sslidentity.h",
503 "sslstreamadapter.cc",
504 "sslstreamadapter.h",
505 "stream.cc",
506 "stream.h",
507 "thread.cc",
508 "thread.h",
509 ]
510
511 # TODO(henrike): issue 3307, make rtc_base build with the Chromium default
512 # compiler settings.
513 suppressed_configs += [ "//build/config/compiler:chromium_code" ]
514 configs += [ "//build/config/compiler:no_chromium_code" ]
515 if (!is_win) {
516 cflags += [ "-Wno-uninitialized" ]
517 }
518
519 if (build_with_chromium) {
520 if (is_win) {
521 sources += [ "../../webrtc_overrides/webrtc/base/win32socketinit.cc" ]
522 }
523 include_dirs = [ "../../boringssl/src/include" ]
524 public_configs += [ ":rtc_base_chromium_config" ]
525 } else {
526 configs += [ ":rtc_base_warnings_config" ]
527 sources += [
528 "callback.h",
529 "logsinks.cc",
530 "logsinks.h",
531 "mathutils.h",
532 "optionsfile.cc",
533 "optionsfile.h",
534 "rollingaccumulator.h",
535 "sslroots.h",
536 "transformadapter.cc",
537 "transformadapter.h",
538 "window.h",
539 ]
540
541 if (is_win) {
542 sources += [
543 "win32socketinit.cc",
544 "win32socketinit.h",
545 "win32socketserver.cc",
546 "win32socketserver.h",
547 ]
548 }
549 } # !build_with_chromium
550
551 if (rtc_build_ssl) {
552 deps += [ "//third_party/boringssl" ]
553 } else {
554 configs += [ ":external_ssl_library" ]
555 }
556
557 if (is_android) {
558 sources += [
559 "ifaddrs-android.cc",
560 "ifaddrs-android.h",
561 ]
562
563 libs += [
564 "log",
565 "GLESv2",
566 ]
567 }
568
569 if (is_ios || is_mac) {
570 sources += [
571 "macifaddrs_converter.cc",
572 "thread_darwin.mm",
573 ]
574 }
575
576 if (use_x11) {
577 libs += [
578 "dl",
579 "rt",
580 "Xext",
581 "X11",
582 "Xcomposite",
583 "Xrender",
584 ]
585 }
586
587 if (is_linux) {
588 libs += [
589 "dl",
590 "rt",
591 ]
592 }
593
594 if (is_mac) {
595 sources += [
596 "macutils.cc",
597 "macutils.h",
598 ]
599 libs += [
600 # For ProcessInformationCopyDictionary in unixfilesystem.cc.
601 "ApplicationServices.framework",
602 ]
603 }
604
605 if (is_win) {
606 sources += [
607 "win32.cc",
608 "win32.h",
609 "win32filesystem.cc",
610 "win32filesystem.h",
611 "win32securityerrors.cc",
612 "win32window.cc",
613 "win32window.h",
614 ]
615
616 libs += [
617 "crypt32.lib",
618 "iphlpapi.lib",
619 "secur32.lib",
620 ]
621
622 cflags += [
623 # Suppress warnings about WIN32_LEAN_AND_MEAN.
624 "/wd4005",
625 "/wd4703",
626 ]
627
628 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
629 }
630
631 if (is_posix) {
632 sources += [
633 "ifaddrs_converter.cc",
634 "ifaddrs_converter.h",
635 "unixfilesystem.cc",
636 "unixfilesystem.h",
637 ]
638 }
639
640 if (is_nacl) {
641 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
642 defines += [ "timezone=_timezone" ]
643 sources -= [ "ifaddrs_converter.cc" ]
644 }
645 if (is_win && is_clang) {
646 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
647 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
648 }
649 }
650
651 rtc_source_set("gtest_prod") {
652 sources = [
653 "gtest_prod_util.h",
654 ]
655 }
656
657 config("rtc_base_tests_utils_exported_config") {
658 defines = [ "GTEST_RELATIVE_PATH" ]
659 }
660
661 config("rtc_base_tests_utils_warnings_config") {
662 if (is_win && is_clang) {
663 cflags = [
664 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
665 "-Wno-reorder",
666 "-Wno-sign-compare",
667 ]
668 }
669 }
670
671 rtc_source_set("rtc_base_tests_utils") {
672 testonly = true
673 sources = [
674 # Also use this as a convenient dumping ground for misc files that are
675 # included by multiple targets below.
676 "cpu_time.cc",
677 "cpu_time.h",
678 "fakeclock.cc",
679 "fakeclock.h",
680 "fakenetwork.h",
681 "fakesslidentity.h",
682 "firewallsocketserver.cc",
683 "firewallsocketserver.h",
684 "gunit.h",
685 "httpserver.cc",
686 "httpserver.h",
687 "md5.cc",
688 "md5.h",
689 "md5digest.cc",
690 "md5digest.h",
691 "memory_usage.cc",
692 "memory_usage.h",
693 "natserver.cc",
694 "natserver.h",
695 "natsocketfactory.cc",
696 "natsocketfactory.h",
697 "nattypes.cc",
698 "nattypes.h",
699 "proxyserver.cc",
700 "proxyserver.h",
701 "sha1.cc",
702 "sha1.h",
703 "sha1digest.cc",
704 "sha1digest.h",
705 "sigslottester.h",
706 "sigslottester.h.pump",
707 "testbase64.h",
708 "testclient.cc",
709 "testclient.h",
710 "testechoserver.h",
711 "testutils.h",
712 "timedelta.h",
713 "virtualsocketserver.cc",
714 "virtualsocketserver.h",
715 ]
716 configs += [ ":rtc_base_tests_utils_warnings_config" ]
717 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
718 deps = [
719 ":rtc_base",
720 "../test:field_trial",
721 "../test:test_support",
722 ]
723 public_deps = [
724 "//testing/gmock",
725 "//testing/gtest",
726 ]
727
728 if (!build_with_chromium && is_clang) {
729 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
730 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
731 }
732 }
733
734 if (rtc_include_tests) {
735 rtc_source_set("rtc_base_tests_main") {
736 testonly = true
737 sources = [
738 "unittest_main.cc",
739 ]
740 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
741 deps = [
742 ":rtc_base",
743 ":rtc_base_approved",
744 ":rtc_base_tests_utils",
745 "../test:field_trial",
746 "../test:test_support",
747 ]
748
749 public_deps = [
750 "//testing/gmock",
751 "//testing/gtest",
752 ]
753
754 if (!build_with_chromium && is_clang) {
755 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
756 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
757 }
758 }
759
760 rtc_source_set("rtc_base_nonparallel_tests") {
761 testonly = true
762
763 # Skip restricting visibility on mobile platforms since the tests on those
764 # gets additional generated targets which would require many lines here to
765 # cover (which would be confusing to read and hard to maintain).
766 if (!is_android && !is_ios) {
767 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
768 #visibility = [ "//webrtc:webrtc_nonparallel_tests" ]
769 }
770 sources = [
771 "cpu_time_unittest.cc",
772 "filerotatingstream_unittest.cc",
773 "nullsocketserver_unittest.cc",
774 "physicalsocketserver_unittest.cc",
775 "socket_unittest.cc",
776 "socket_unittest.h",
777 "socketaddress_unittest.cc",
778 ]
779 deps = [
780 ":rtc_base",
781 ":rtc_base_tests_main",
782 ":rtc_base_tests_utils",
783 "../system_wrappers:system_wrappers",
784 "../test:test_support",
785 "//testing/gtest",
786 ]
787 if (is_win) {
788 sources += [ "win32socketserver_unittest.cc" ]
789 }
790
791 if (!build_with_chromium && is_clang) {
792 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
793 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
794 }
795 }
796
797 rtc_source_set("rtc_base_approved_unittests") {
798 testonly = true
799
800 # Skip restricting visibility on mobile platforms since the tests on those
801 # gets additional generated targets which would require many lines here to
802 # cover (which would be confusing to read and hard to maintain).
803 if (!is_android && !is_ios) {
804 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
805 #visibility = [ "//webrtc:rtc_unittests" ]
806 }
807 sources = [
808 "array_view_unittest.cc",
809 "atomicops_unittest.cc",
810 "base64_unittest.cc",
811 "basictypes_unittest.cc",
812 "bind_unittest.cc",
813 "bitbuffer_unittest.cc",
814 "buffer_unittest.cc",
815 "bufferqueue_unittest.cc",
816 "bytebuffer_unittest.cc",
817 "byteorder_unittest.cc",
818 "copyonwritebuffer_unittest.cc",
819 "criticalsection_unittest.cc",
820 "event_tracer_unittest.cc",
821 "event_unittest.cc",
822 "file_unittest.cc",
823 "function_view_unittest.cc",
824 "logging_unittest.cc",
825 "md5digest_unittest.cc",
826 "mod_ops_unittest.cc",
827 "onetimeevent_unittest.cc",
828 "optional_unittest.cc",
829 "pathutils_unittest.cc",
830 "platform_thread_unittest.cc",
831 "random_unittest.cc",
832 "rate_limiter_unittest.cc",
833 "rate_statistics_unittest.cc",
834 "ratetracker_unittest.cc",
835 "refcountedobject_unittest.cc",
836 "safe_compare_unittest.cc",
837 "safe_minmax_unittest.cc",
838 "string_to_number_unittest.cc",
839 "stringencode_unittest.cc",
840 "stringize_macros_unittest.cc",
841 "stringutils_unittest.cc",
842 "swap_queue_unittest.cc",
843 "thread_annotations_unittest.cc",
844 "thread_checker_unittest.cc",
845 "timestampaligner_unittest.cc",
846 "timeutils_unittest.cc",
847 "virtualsocket_unittest.cc",
848 ]
849 deps = [
850 ":rtc_base",
851 ":rtc_base_approved",
852 ":rtc_base_tests_main",
853 ":rtc_base_tests_utils",
854 ":rtc_task_queue",
855 "../system_wrappers:system_wrappers",
856 "../test:test_support",
857 ]
858 if (!build_with_chromium && is_clang) {
859 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
860 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
861 }
862 }
863
864 rtc_source_set("rtc_task_queue_unittests") {
865 testonly = true
866
867 # Skip restricting visibility on mobile platforms since the tests on those
868 # gets additional generated targets which would require many lines here to
869 # cover (which would be confusing to read and hard to maintain).
870 if (!is_android && !is_ios) {
871 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
872 #visibility = [ "//webrtc:rtc_unittests" ]
873 }
874 sources = [
875 "task_queue_unittest.cc",
876 ]
877 deps = [
878 ":rtc_base_tests_main",
879 ":rtc_base_tests_utils",
880 ":rtc_task_queue",
881 "../test:test_support",
882 ]
883 if (!build_with_chromium && is_clang) {
884 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
885 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
886 }
887 }
888
889 rtc_source_set("sequenced_task_checker_unittests") {
890 testonly = true
891
892 # Skip restricting visibility on mobile platforms since the tests on those
893 # gets additional generated targets which would require many lines here to
894 # cover (which would be confusing to read and hard to maintain).
895 if (!is_android && !is_ios) {
896 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
897 #visibility = [ "//webrtc:rtc_unittests" ]
898 }
899 sources = [
900 "sequenced_task_checker_unittest.cc",
901 ]
902 deps = [
903 ":rtc_base_approved",
904 ":rtc_base_tests_main",
905 ":rtc_task_queue",
906 ":sequenced_task_checker",
907 "../test:test_support",
908 ]
909 }
910
911 rtc_source_set("weak_ptr_unittests") {
912 testonly = true
913
914 # Skip restricting visibility on mobile platforms since the tests on those
915 # gets additional generated targets which would require many lines here to
916 # cover (which would be confusing to read and hard to maintain).
917 if (!is_android && !is_ios) {
918 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
919 #visibility = [ "//webrtc:rtc_unittests" ]
920 }
921 sources = [
922 "weak_ptr_unittest.cc",
923 ]
924 deps = [
925 ":rtc_base_tests_main",
926 ":rtc_base_tests_utils",
927 ":rtc_task_queue",
928 ":weak_ptr",
929 "../test:test_support",
930 ]
931 }
932
933 rtc_source_set("rtc_numerics_unittests") {
934 testonly = true
935
936 # Skip restricting visibility on mobile platforms since the tests on those
937 # gets additional generated targets which would require many lines here to
938 # cover (which would be confusing to read and hard to maintain).
939 if (!is_android && !is_ios) {
940 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
941 #visibility = [ "//webrtc:rtc_unittests" ]
942 }
943 sources = [
944 "numerics/exp_filter_unittest.cc",
945 "numerics/percentile_filter_unittest.cc",
946 ]
947 deps = [
948 ":rtc_base_approved",
949 ":rtc_base_tests_main",
950 ":rtc_numerics",
951 "../test:test_support",
952 ]
953 }
954
955 config("rtc_base_unittests_config") {
956 if (is_clang) {
957 cflags = [ "-Wno-unused-const-variable" ]
958 }
959 }
960 rtc_source_set("rtc_base_unittests") {
961 testonly = true
962
963 # Skip restricting visibility on mobile platforms since the tests on those
964 # gets additional generated targets which would require many lines here to
965 # cover (which would be confusing to read and hard to maintain).
966 if (!is_android && !is_ios) {
967 # TODO(kjellander): Reenable after finishing https://bugs.webrtc.org/7634.
968 #visibility = [ "//webrtc:rtc_unittests" ]
969 }
970 sources = [
971 "callback_unittest.cc",
972 "crc32_unittest.cc",
973 "fileutils_unittest.cc",
974 "helpers_unittest.cc",
975 "httpbase_unittest.cc",
976 "httpcommon_unittest.cc",
977 "httpserver_unittest.cc",
978 "ipaddress_unittest.cc",
979 "memory_usage_unittest.cc",
980 "messagedigest_unittest.cc",
981 "messagequeue_unittest.cc",
982 "nat_unittest.cc",
983 "network_unittest.cc",
984 "optionsfile_unittest.cc",
985 "proxy_unittest.cc",
986 "ptr_util_unittest.cc",
987 "ratelimiter_unittest.cc",
988 "rollingaccumulator_unittest.cc",
989 "rtccertificate_unittest.cc",
990 "rtccertificategenerator_unittest.cc",
991 "sha1digest_unittest.cc",
992 "signalthread_unittest.cc",
993 "sigslot_unittest.cc",
994 "sigslottester_unittest.cc",
995 "stream_unittest.cc",
996 "testclient_unittest.cc",
997 "thread_unittest.cc",
998 ]
999 if (is_win) {
1000 sources += [
1001 "win32_unittest.cc",
1002 "win32window_unittest.cc",
1003 ]
1004 }
1005 if (is_mac) {
1006 sources += [ "macutils_unittest.cc" ]
1007 }
1008 if (is_posix) {
1009 sources += [
1010 "ssladapter_unittest.cc",
1011 "sslidentity_unittest.cc",
1012 "sslstreamadapter_unittest.cc",
1013 ]
1014 }
1015 deps = [
1016 ":rtc_base_tests_main",
1017 ":rtc_base_tests_utils",
1018 "../test:test_support",
1019 ]
1020 public_deps = [
1021 ":rtc_base",
1022 ]
1023 configs += [ ":rtc_base_unittests_config" ]
1024 if (!build_with_chromium && is_clang) {
1025 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
1026 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
1027 }
1028 }
1029 }
1030
23 if (is_android) { 1031 if (is_android) {
24 android_library("base_java") { 1032 android_library("base_java") {
25 # TODO(kjellander): android_library hits an assert during GN generation 1033 java_files = [
26 # unless java_files is set and contains at least one file. 1034 "java/src/org/webrtc/ContextUtils.java",
27 # This will be cleaned up after the rename migration is completed. 1035 "java/src/org/webrtc/Logging.java",
28 # This target currently exists only so downstream projects can migrate 1036 "java/src/org/webrtc/Size.java",
29 # to depend on both the old and the new target. 1037 "java/src/org/webrtc/ThreadUtils.java",
30 # See https://bugs.webrtc.org/7634 for more details. 1038 ]
31 java_files = [ "Dummy.java" ] 1039 }
32 } 1040 }
33 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/BUILD.gn ('k') | webrtc/rtc_base/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698