blob: cd9d1799f416a24da5688b9c165b03f59a3f330e [file] [log] [blame]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
Henrik Kjellander73e21802017-06-20 08:38:58 +02002#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
Henrik Kjellanderc0362762017-06-29 08:03:04 +02009import("//build/config/crypto.gni")
10import("//build/config/ui.gni")
Henrik Kjellander73e21802017-06-20 08:38:58 +020011import("../webrtc.gni")
12
13if (is_android) {
14 import("//build/config/android/config.gni")
15 import("//build/config/android/rules.gni")
16}
17
Henrik Kjellanderc0362762017-06-29 08:03:04 +020018config("rtc_base_chromium_config") {
19 defines = [ "NO_MAIN_THREAD_WRAPPING" ]
20}
21
22config("rtc_base_all_dependent_config") {
23 if (is_ios) {
24 libs = [
25 "CFNetwork.framework",
Jiawei Ouc0216b82018-02-03 12:24:24 -080026 "Foundation.framework",
Henrik Kjellanderc0362762017-06-29 08:03:04 +020027 "Security.framework",
28 "SystemConfiguration.framework",
29 "UIKit.framework",
30 ]
31 }
32 if (is_mac) {
33 libs = [
34 "Cocoa.framework",
35 "Foundation.framework",
36 "IOKit.framework",
37 "Security.framework",
38 "SystemConfiguration.framework",
39 ]
40 }
41}
42
Dan Minor9cdd8762018-01-16 10:40:39 -050043if (!rtc_build_ssl) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +020044 config("external_ssl_library") {
45 assert(rtc_ssl_root != "",
46 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
47 include_dirs = [ rtc_ssl_root ]
48 }
49}
50
Oleh Prypindd214742018-07-17 13:49:46 +020051rtc_source_set("protobuf_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000052 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +020053 sources = [
54 "protobuf_utils.h",
55 ]
56 if (rtc_enable_protobuf) {
Mirko Bonadeid8661a02018-08-13 15:04:25 +020057 public_configs = [ "//third_party/protobuf:protobuf_config" ]
58 deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +020059 "//third_party/protobuf:protobuf_lite",
60 ]
61 }
62}
63
Oleh Prypindd214742018-07-17 13:49:46 +020064rtc_source_set("compile_assert_c") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +020065 sources = [
66 "compile_assert_c.h",
67 ]
68}
69
Mirko Bonadeica270912018-10-10 15:51:03 +020070# The subset of rtc_base approved for use outside of libjingle.
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +010071# TODO(bugs.webrtc.org/9838): Create small and focused build targets and remove
Mirko Bonadeica270912018-10-10 15:51:03 +020072# the old concept of rtc_base and rtc_base_approved.
mbonadeibc378472017-09-11 03:43:34 -070073rtc_source_set("rtc_base_approved") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000074 visibility = [ "*" ]
Mirko Bonadeica270912018-10-10 15:51:03 +020075 deps = [
76 ":checks",
77 ":rtc_task_queue",
78 ":safe_compare",
Sebastian Janssond28efe52018-10-18 12:26:46 +020079 ":safe_minmax",
Mirko Bonadeica270912018-10-10 15:51:03 +020080 ":type_traits",
Mirko Bonadeica270912018-10-10 15:51:03 +020081 "../api:array_view",
Sebastian Janssond28efe52018-10-18 12:26:46 +020082 "../system_wrappers:field_trial",
83 "experiments:field_trial_parser",
Mirko Bonadeica270912018-10-10 15:51:03 +020084 "system:arch",
85 "system:unused",
86 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +010087 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeica270912018-10-10 15:51:03 +020088 "//third_party/abseil-cpp/absl/types:optional",
89 ]
90
91 sources = [
92 "bind.h",
Steve Anton10542f22019-01-11 09:11:00 -080093 "bit_buffer.cc",
94 "bit_buffer.h",
Steve Antonaec15aa2019-01-11 09:13:07 -080095 "bitbuffer.h",
Steve Anton10542f22019-01-11 09:11:00 -080096 "bitrate_allocation_strategy.cc",
97 "bitrate_allocation_strategy.h",
Steve Antonaec15aa2019-01-11 09:13:07 -080098 "bitrateallocationstrategy.h",
Mirko Bonadeica270912018-10-10 15:51:03 +020099 "buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800100 "buffer_queue.cc",
101 "buffer_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800102 "bufferqueue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800103 "byte_buffer.cc",
104 "byte_buffer.h",
105 "byte_order.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800106 "bytebuffer.h",
107 "byteorder.h",
Steve Anton10542f22019-01-11 09:11:00 -0800108 "copy_on_write_buffer.cc",
109 "copy_on_write_buffer.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800110 "copyonwritebuffer.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200111 "event_tracer.cc",
112 "event_tracer.h",
113 "file.cc",
114 "file.h",
115 "flags.cc",
116 "flags.h",
117 "function_view.h",
118 "ignore_wundef.h",
119 "location.cc",
120 "location.h",
121 "message_buffer_reader.h",
122 "numerics/histogram_percentile_counter.cc",
123 "numerics/histogram_percentile_counter.h",
124 "numerics/mod_ops.h",
125 "numerics/moving_max_counter.h",
126 "numerics/sample_counter.cc",
127 "numerics/sample_counter.h",
Steve Anton10542f22019-01-11 09:11:00 -0800128 "one_time_event.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800129 "onetimeevent.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200130 "platform_file.cc",
131 "platform_file.h",
132 "race_checker.cc",
133 "race_checker.h",
134 "random.cc",
135 "random.h",
136 "rate_statistics.cc",
137 "rate_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800138 "rate_tracker.cc",
139 "rate_tracker.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800140 "ratetracker.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200141 "swap_queue.h",
142 "template_util.h",
Steve Anton10542f22019-01-11 09:11:00 -0800143 "timestamp_aligner.cc",
144 "timestamp_aligner.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800145 "timestampaligner.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200146 "trace_event.h",
147 "zero_memory.cc",
148 "zero_memory.h",
149 ]
150
151 if (is_posix || is_fuchsia) {
152 sources += [ "file_posix.cc" ]
153 }
154
155 if (is_win) {
156 sources += [
157 "file_win.cc",
158 "win/windows_version.cc",
159 "win/windows_version.h",
160 ]
161 data_deps = [
162 "//build/win:runtime_libs",
163 ]
164 }
165
166 if (is_nacl) {
167 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
168 }
169
170 if (is_android) {
171 libs = [ "log" ]
172 }
173
174 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
Tommi8d2c5a82018-03-19 11:12:48 +0100175 ":atomicops",
176 ":criticalsection",
177 ":logging",
178 ":macromagic",
179 ":platform_thread",
180 ":platform_thread_types",
181 ":ptr_util",
182 ":refcount",
Tommi8d2c5a82018-03-19 11:12:48 +0100183 ":rtc_event",
184 ":safe_conversions",
185 ":stringutils",
186 ":thread_checker",
187 ":timeutils",
mbonadeibc378472017-09-11 03:43:34 -0700188 ]
mbonadeibc378472017-09-11 03:43:34 -0700189}
190
Tommi8d2c5a82018-03-19 11:12:48 +0100191rtc_source_set("macromagic") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200192 # TODO(bugs.webrtc.org/9606): This should not be public.
193 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100194 sources = [
195 "arraysize.h",
Steve Anton10542f22019-01-11 09:11:00 -0800196 "constructor_magic.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800197 "constructormagic.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100198 "format_macros.h",
199 "stringize_macros.h",
200 "thread_annotations.h",
201 ]
Niels Möllera12c42a2018-07-25 16:05:48 +0200202 deps = [
203 "system:arch",
204 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100205}
206
207rtc_source_set("platform_thread_types") {
208 sources = [
209 "platform_thread_types.cc",
210 "platform_thread_types.h",
211 ]
212}
213
214rtc_source_set("ptr_util") {
Mirko Bonadeica14a3a2018-08-09 09:47:12 +0200215 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100216 sources = [
Tommi8d2c5a82018-03-19 11:12:48 +0100217 "scoped_ref_ptr.h",
218 ]
Mirko Bonadei85340ce2018-11-19 15:51:39 +0100219 deps = [
220 "../api:scoped_refptr",
221 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100222}
223
224rtc_source_set("refcount") {
Mirko Bonadeica14a3a2018-08-09 09:47:12 +0200225 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100226 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800227 "ref_count.h",
228 "ref_counted_object.h",
229 "ref_counter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800230 "refcount.h",
231 "refcountedobject.h",
232 "refcounter.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100233 ]
234 deps = [
235 ":atomicops",
236 ":macromagic",
237 ]
238}
239
240rtc_source_set("criticalsection") {
241 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800242 "critical_section.cc",
243 "critical_section.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800244 "criticalsection.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100245 ]
246 deps = [
247 ":atomicops",
248 ":checks",
249 ":macromagic",
250 ":platform_thread_types",
Niels Möllera12c42a2018-07-25 16:05:48 +0200251 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100252 ]
253}
254
255rtc_source_set("platform_thread") {
256 visibility = [
257 ":rtc_base_approved",
Tommi8d2c5a82018-03-19 11:12:48 +0100258 ":rtc_task_queue_libevent",
259 ":rtc_task_queue_win",
Robin Raymond22027b92018-11-23 09:07:50 -0500260 ":rtc_task_queue_stdlib",
Tommi8d2c5a82018-03-19 11:12:48 +0100261 ":sequenced_task_checker",
262 ]
263 sources = [
264 "platform_thread.cc",
265 "platform_thread.h",
266 ]
267 deps = [
268 ":atomicops",
269 ":checks",
270 ":macromagic",
271 ":platform_thread_types",
272 ":rtc_event",
273 ":thread_checker",
274 ":timeutils",
Tommi8d2c5a82018-03-19 11:12:48 +0100275 ]
276}
277
278rtc_source_set("rtc_event") {
John Budorick6c9a7862018-03-26 06:23:34 -0700279 deps = [
280 ":checks",
John Budorick6c9a7862018-03-26 06:23:34 -0700281 ]
282
Tommi8d2c5a82018-03-19 11:12:48 +0100283 if (build_with_chromium) {
John Budorick6c9a7862018-03-26 06:23:34 -0700284 # Dependency on chromium's waitable_event (in //base).
285 deps += [ "//base:base" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100286 sources = [
287 "../../webrtc_overrides/rtc_base/event.cc",
288 "../../webrtc_overrides/rtc_base/event.h",
289 ]
290 } else {
291 sources = [
292 "event.cc",
293 "event.h",
294 ]
295 }
Tommi8d2c5a82018-03-19 11:12:48 +0100296}
297
298rtc_source_set("logging") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200299 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200300 libs = []
Tommi8d2c5a82018-03-19 11:12:48 +0100301 deps = [
Yves Gerey988cc082018-10-23 12:03:01 +0200302 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100303 ":criticalsection",
304 ":macromagic",
305 ":platform_thread_types",
306 ":stringutils",
307 ":timeutils",
Jonas Olssonf2ce37c2018-09-12 15:32:47 +0200308 "//third_party/abseil-cpp/absl/strings",
Tommi8d2c5a82018-03-19 11:12:48 +0100309 ]
310
311 if (build_with_chromium) {
312 # Dependency on chromium's logging (in //base).
313 deps += [ "//base:base" ]
314 sources = [
315 "../../webrtc_overrides/rtc_base/logging.cc",
316 "../../webrtc_overrides/rtc_base/logging.h",
317 ]
318 } else {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200319 configs += [
320 "..:no_exit_time_destructors",
321 "..:no_global_constructors",
322 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100323 sources = [
324 "logging.cc",
325 "logging.h",
326 ]
Karl Wibergcefc4652018-05-23 23:20:38 +0200327 deps += [ "system:inline" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100328
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200329 if (is_mac) {
330 deps += [ ":logging_mac" ]
331 }
332
Tommi8d2c5a82018-03-19 11:12:48 +0100333 # logging.h needs the deprecation header while downstream projects are
334 # removing code that depends on logging implementation details.
335 deps += [ ":deprecation" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200336
337 if (is_android) {
338 libs += [ "log" ]
339 }
Tommi8d2c5a82018-03-19 11:12:48 +0100340 }
341}
342
343rtc_source_set("thread_checker") {
344 sources = [
345 "thread_checker.h",
346 "thread_checker_impl.cc",
347 "thread_checker_impl.h",
348 ]
349 deps = [
350 ":checks",
351 ":criticalsection",
352 ":macromagic",
353 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100354 ]
355}
356
357rtc_source_set("atomicops") {
358 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800359 "atomic_ops.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800360 "atomicops.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100361 ]
362}
363
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100364rtc_source_set("checks") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200365 # TODO(bugs.webrtc.org/9607): This should not be public.
366 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200367 libs = []
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100368 sources = [
369 "checks.cc",
370 "checks.h",
371 ]
372 deps = [
373 ":safe_compare",
Jonas Olssonf8e5c112018-06-14 13:14:22 +0200374 "system:inline",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100375 ]
Patrik Höglund77301932018-10-09 15:09:51 +0200376 if (is_android) {
377 libs += [ "log" ]
378 }
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100379}
380
Patrik Höglund3e113432017-12-15 14:40:10 +0100381rtc_source_set("rate_limiter") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100382 sources = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100383 "rate_limiter.cc",
384 "rate_limiter.h",
385 ]
386 deps = [
387 ":rtc_base_approved",
388 "../system_wrappers",
Yves Gerey988cc082018-10-23 12:03:01 +0200389 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100390 ]
391}
392
393rtc_source_set("sanitizer") {
394 sources = [
395 "sanitizer.h",
396 ]
Jiawei Oua6e034a2018-11-24 20:59:41 -0800397 deps = [
398 "//third_party/abseil-cpp/absl/meta:type_traits",
399 ]
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100400}
401
402rtc_source_set("safe_compare") {
403 sources = [
404 "numerics/safe_compare.h",
405 ]
406 deps = [
407 ":type_traits",
408 ]
409}
410
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100411rtc_source_set("safe_minmax") {
412 sources = [
413 "numerics/safe_minmax.h",
414 ]
415 deps = [
416 ":checks",
417 ":safe_compare",
418 ":type_traits",
419 ]
420}
421
Tommi8d2c5a82018-03-19 11:12:48 +0100422rtc_source_set("safe_conversions") {
423 sources = [
424 "numerics/safe_conversions.h",
425 "numerics/safe_conversions_impl.h",
426 ]
427 deps = [
428 ":checks",
429 ]
430}
431
432rtc_source_set("timeutils") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200433 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100434 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800435 "time_utils.cc",
436 "time_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800437 "timeutils.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100438 ]
439 deps = [
440 ":checks",
441 ":safe_conversions",
Jonas Olsson366a50c2018-09-06 13:41:30 +0200442 ":stringutils",
Tommi8d2c5a82018-03-19 11:12:48 +0100443 ]
444}
445
Patrik Höglund3e113432017-12-15 14:40:10 +0100446rtc_source_set("stringutils") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100447 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800448 "string_encode.cc",
449 "string_encode.h",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200450 "string_to_number.cc",
451 "string_to_number.h",
Steve Anton10542f22019-01-11 09:11:00 -0800452 "string_utils.cc",
453 "string_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800454 "stringencode.h",
Karl Wiberg881f1682018-03-08 15:03:23 +0100455 "strings/string_builder.cc",
Tommifef05002018-02-27 13:51:08 +0100456 "strings/string_builder.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800457 "stringutils.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100458 ]
459 deps = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100460 ":checks",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200461 ":macromagic",
Karl Wiberg881f1682018-03-08 15:03:23 +0100462 ":safe_minmax",
463 "../api:array_view",
Jonas Olsson88e18482018-09-03 10:15:08 +0200464 "//third_party/abseil-cpp/absl/strings:strings",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200465 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglund3e113432017-12-15 14:40:10 +0100466 ]
467}
468
Jonas Olsson74395342018-04-03 12:22:07 +0200469rtc_source_set("audio_format_to_string") {
470 sources = [
471 "strings/audio_format_to_string.cc",
472 "strings/audio_format_to_string.h",
473 ]
474 deps = [
475 ":stringutils",
476 "../api/audio_codecs:audio_codecs_api",
477 ]
478}
479
Patrik Höglund3e113432017-12-15 14:40:10 +0100480rtc_source_set("type_traits") {
481 sources = [
482 "type_traits.h",
483 ]
484}
485
486rtc_source_set("deprecation") {
487 sources = [
488 "deprecation.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100489 ]
490}
491
mbonadeibc378472017-09-11 03:43:34 -0700492if (is_mac && !build_with_chromium) {
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200493 rtc_source_set("logging_mac") {
494 visibility = [ ":logging" ]
495 libs = [ "Foundation.framework" ]
mbonadeibc378472017-09-11 03:43:34 -0700496 sources = [
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200497 "logging_mac.h",
mbonadeibc378472017-09-11 03:43:34 -0700498 "logging_mac.mm",
499 ]
mbonadeibc378472017-09-11 03:43:34 -0700500 }
501}
502
perkj650fdae2017-08-25 05:00:11 -0700503rtc_source_set("rtc_task_queue") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000504 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100505 deps = []
mbonadei95c8f652017-08-27 23:40:10 -0700506 public_deps = [
perkj650fdae2017-08-25 05:00:11 -0700507 ":rtc_task_queue_api",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200508 ]
509
perkj650fdae2017-08-25 05:00:11 -0700510 if (rtc_link_task_queue_impl) {
mbonadei95c8f652017-08-27 23:40:10 -0700511 deps += [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700512 }
513}
514
515# WebRTC targets must not directly depend on rtc_task_queue_api or
516# rtc_task_queue_impl. Instead, depend on rtc_task_queue.
517# The build flag |rtc_link_task_queue_impl| decides if WebRTC targets will link
518# to the default implemenation in rtc_task_queue_impl or if an externally
519# provided implementation should be used. An external implementation should
520# depend on rtc_task_queue_api.
521rtc_source_set("rtc_task_queue_api") {
Tommi8d2c5a82018-03-19 11:12:48 +0100522 # The visibility list is commented out so that we won't break external
523 # implementations, but left here to manually test as well as for sake of what
524 # targets we expect to depend on rtc_task_queue_api.
525 # visibility = [
526 # ":rtc_task_queue",
527 # ":rtc_task_queue_impl",
528 # ":sequenced_task_checker",
529 # ]
nisse75dd6d42017-09-19 08:28:00 -0700530 sources = [
531 "task_queue.h",
532 ]
perkj650fdae2017-08-25 05:00:11 -0700533 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100534 ":macromagic",
535 ":ptr_util",
Danil Chapovalov959e9b62019-01-14 14:29:18 +0100536 "../api/task_queue",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200537 "system:rtc_export",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200538 "//third_party/abseil-cpp/absl/memory",
perkj650fdae2017-08-25 05:00:11 -0700539 ]
540}
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200541
Danil Chapovalova10d1642018-08-31 13:47:59 +0200542rtc_source_set("rtc_cancelable_task") {
543 sources = [
544 "cancelable_periodic_task.h",
545 "cancelable_task_handle.cc",
546 "cancelable_task_handle.h",
547 ]
548 deps = [
549 ":checks",
550 ":logging",
551 ":macromagic",
552 ":ptr_util",
553 ":refcount",
554 ":rtc_task_queue",
555 ":safe_conversions",
556 ":sequenced_task_checker",
557 ":thread_checker",
558 "//third_party/abseil-cpp/absl/memory",
559 ]
560}
561
Tommi8d2c5a82018-03-19 11:12:48 +0100562if (rtc_enable_libevent) {
563 rtc_source_set("rtc_task_queue_libevent") {
564 visibility = [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700565 sources = [
Niels Möller15c9cf72017-10-19 12:38:09 +0200566 "task_queue_libevent.cc",
567 "task_queue_posix.cc",
568 "task_queue_posix.h",
perkj650fdae2017-08-25 05:00:11 -0700569 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100570 deps = [
571 ":checks",
572 ":criticalsection",
573 ":logging",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200574 ":macromagic",
Tommi8d2c5a82018-03-19 11:12:48 +0100575 ":platform_thread",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200576 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100577 ":ptr_util",
578 ":refcount",
579 ":rtc_task_queue_api",
580 ":safe_conversions",
581 ":timeutils",
Niels Möllera12c42a2018-07-25 16:05:48 +0200582 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100583 ]
584 if (rtc_build_libevent) {
585 deps += [ "//base/third_party/libevent" ]
586 }
587 }
588}
589
590if (is_mac || is_ios) {
591 rtc_source_set("rtc_task_queue_gcd") {
592 visibility = [ ":rtc_task_queue_impl" ]
593 sources = [
594 "task_queue_gcd.cc",
595 "task_queue_posix.cc",
596 "task_queue_posix.h",
597 ]
598 deps = [
599 ":checks",
600 ":logging",
601 ":ptr_util",
602 ":refcount",
603 ":rtc_task_queue_api",
604 ]
605 }
606}
607
608if (is_win) {
609 rtc_source_set("rtc_task_queue_win") {
610 visibility = [ ":rtc_task_queue_impl" ]
611 sources = [
612 "task_queue_win.cc",
613 ]
614 deps = [
615 ":checks",
616 ":criticalsection",
617 ":logging",
618 ":macromagic",
619 ":platform_thread",
620 ":ptr_util",
621 ":refcount",
622 ":rtc_event",
623 ":rtc_task_queue_api",
624 ":safe_conversions",
625 ":timeutils",
626 ]
627 }
628}
629
Robin Raymond22027b92018-11-23 09:07:50 -0500630rtc_source_set("rtc_task_queue_stdlib") {
631 visibility = [ ":rtc_task_queue_impl" ]
632 sources = [
633 "task_queue_stdlib.cc",
634 ]
635 deps = [
636 ":checks",
637 ":criticalsection",
638 ":logging",
639 ":macromagic",
640 ":platform_thread",
641 ":ptr_util",
642 ":refcount",
643 ":rtc_event",
644 ":rtc_task_queue_api",
645 ":safe_conversions",
646 ":timeutils",
647 ]
648}
649
Tommi8d2c5a82018-03-19 11:12:48 +0100650rtc_source_set("rtc_task_queue_impl") {
651 visibility = [ "*" ]
652 if (rtc_enable_libevent) {
653 deps = [
654 ":rtc_task_queue_libevent",
655 ]
perkj650fdae2017-08-25 05:00:11 -0700656 } else {
Niels Möller15c9cf72017-10-19 12:38:09 +0200657 if (is_mac || is_ios) {
Tommi8d2c5a82018-03-19 11:12:48 +0100658 deps = [
659 ":rtc_task_queue_gcd",
Niels Möller17a04742017-09-27 10:53:21 +0200660 ]
Niels Möller15c9cf72017-10-19 12:38:09 +0200661 }
662 if (is_win) {
Robin Raymond22027b92018-11-23 09:07:50 -0500663 if (current_os == "winuwp") {
664 deps = [
665 ":rtc_task_queue_stdlib",
666 ]
667 } else {
668 deps = [
669 ":rtc_task_queue_win",
670 ]
671 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200672 }
673 }
674}
675
Tommi8d2c5a82018-03-19 11:12:48 +0100676rtc_source_set("sequenced_task_checker") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200677 sources = [
678 "sequenced_task_checker.h",
679 "sequenced_task_checker_impl.cc",
680 "sequenced_task_checker_impl.h",
681 ]
682 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100683 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100684 ":criticalsection",
685 ":macromagic",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200686 ":rtc_task_queue",
Tommi8d2c5a82018-03-19 11:12:48 +0100687 ":thread_checker",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200688 ]
689}
690
691rtc_static_library("weak_ptr") {
692 sources = [
693 "weak_ptr.cc",
694 "weak_ptr.h",
695 ]
696 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100697 ":ptr_util",
698 ":refcount",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200699 ":sequenced_task_checker",
700 ]
701}
702
703rtc_static_library("rtc_numerics") {
704 sources = [
705 "numerics/exp_filter.cc",
706 "numerics/exp_filter.h",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +0100707 "numerics/moving_average.cc",
708 "numerics/moving_average.h",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +0100709 "numerics/moving_median_filter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200710 "numerics/percentile_filter.h",
Artem Titove4ed6ea2019-01-11 11:02:19 +0100711 "numerics/samples_stats_counter.cc",
712 "numerics/samples_stats_counter.h",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200713 "numerics/sequence_number_util.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200714 ]
715 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100716 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200717 ":rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100718 ":safe_compare",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200719 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200720 ]
721}
722
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200723rtc_source_set("rtc_json") {
724 defines = []
725 sources = [
Sam Zackrissonb45bdb52018-10-02 16:25:59 +0200726 "strings/json.cc",
727 "strings/json.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200728 ]
Jonas Olsson941a07c2018-09-13 10:07:07 +0200729 deps = [
730 ":stringutils",
731 ]
Mirko Bonadeia0e29fc2018-01-26 16:50:02 +0100732 all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200733 if (rtc_build_json) {
734 public_deps = [
735 "//third_party/jsoncpp",
736 ]
737 } else {
738 include_dirs = [ "$rtc_jsoncpp_root" ]
739
740 # When defined changes the include path for json.h to where it is
741 # expected to be when building json outside of the standalone build.
742 defines += [ "WEBRTC_EXTERNAL_JSON" ]
743 }
744}
745
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100746rtc_source_set("nethelpers") {
747 # TODO(bugs.webrtc.org/9987): This build target will soon contain
748 # the following files:
749 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800750 # "net_helpers.cc",
751 # "net_helpers.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100752 # ]
753}
754
755rtc_source_set("asyncresolverinterface") {
756 # TODO(bugs.webrtc.org/9987): This build target will soon contain
757 # the following files:
758 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800759 # "async_resolver_interface.cc",
760 # "async_resolver_interface.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100761 # ]
762}
763
764rtc_source_set("ipaddress") {
765 # TODO(bugs.webrtc.org/9987): This build target will soon contain
766 # the following files:
767 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800768 # "ip_address.cc",
769 # "ip_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100770 # ]
771}
772
773rtc_source_set("socketaddress") {
774 # TODO(bugs.webrtc.org/9987): This build target will soon contain
775 # the following files:
776 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800777 # "socket_address.cc",
778 # "socket_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100779 # ]
780}
781
782rtc_source_set("nullsocketserver") {
783 # TODO(bugs.webrtc.org/9987): This build target will soon contain
784 # the following files:
785 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800786 # "null_socket_server.cc",
787 # "null_socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100788 # ]
789}
790
791rtc_source_set("socketserver") {
792 # TODO(bugs.webrtc.org/9987): This build target will soon contain
793 # the following files:
794 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800795 # "socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100796 # ]
797}
798
799rtc_source_set("threading") {
800 # TODO(bugs.webrtc.org/9987): This build target will soon contain
801 # the following files:
802 # sources = [
803 # "asyncresolver.cc",
804 # "asyncresolver.h",
805 # "defaultsocketserver.cc",
806 # "defaultsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800807 # "message_handler.cc",
808 # "message_handler.h",
809 # "message_queue.cc",
810 # "message_queue.h",
811 # "network_monitor.cc",
812 # "network_monitor.h",
813 # "physical_socket_server.cc",
814 # "physical_socket_server.h",
815 # "signal_thread.cc",
816 # "signal_thread.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100817 # "thread.cc",
818 # "thread.h",
819 # ]
820}
821
822rtc_source_set("socketfactory") {
823 # TODO(bugs.webrtc.org/9987): This build target will soon contain
824 # the following files:
825 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800826 # "socket_factory.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100827 # ]
828}
829
830rtc_source_set("asyncsocket") {
831 # TODO(bugs.webrtc.org/9987): This build target will soon contain
832 # the following files:
833 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800834 # "async_socket.cc",
835 # "async_socket.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100836 # ]
837}
838
839rtc_source_set("socket") {
840 # TODO(bugs.webrtc.org/9987): This build target will soon contain
841 # the following files:
842 # sources = [
843 # "socket.cc",
844 # "socket.h",
845 # ]
846}
847
848rtc_source_set("network_constants") {
849 # TODO(bugs.webrtc.org/9987): This build target will soon contain
850 # the following files:
851 # sources = [
852 # "network_constants.h",
853 # ]
854}
855
856if (is_android) {
857 rtc_source_set("ifaddrs_android") {
858 # TODO(bugs.webrtc.org/9987): This build target will soon contain
859 # the following files:
860 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800861 # "ifaddrs_android.cc",
862 # "ifaddrs_android.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100863 # ]
864 }
865}
866
867if (is_win) {
868 rtc_source_set("win32") {
869 # TODO(bugs.webrtc.org/9987): This build target will soon contain
870 # the following files:
871 # sources = [
872 # "win32.cc",
873 # "win32.h",
874 # ]
875 }
876}
877
mbonadei9c5e5112017-09-05 05:17:02 -0700878rtc_static_library("rtc_base") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000879 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200880 cflags = []
881 cflags_cc = []
882 libs = []
883 defines = []
884 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100885 ":checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100886 ":stringutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200887 "..:webrtc_common",
Joachim Bauch58daf402017-12-21 22:00:34 +0100888 "../api:array_view",
Sebastian Janssone07864e2018-10-15 09:28:15 +0200889 "network:sent_packet",
Artem Titova76af0c2018-07-23 17:38:12 +0200890 "third_party/base64",
Artem Titove41c4332018-07-25 15:04:28 +0200891 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200892 "//third_party/abseil-cpp/absl/memory",
Niels Möller3c7d5992018-10-19 15:29:54 +0200893 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200894 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200895 ]
896 public_deps = [
897 ":rtc_base_approved",
898 ]
899 public_configs = []
900
901 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
902
903 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800904 "async_invoker.cc",
905 "async_invoker.h",
906 "async_invoker_inl.h",
907 "async_packet_socket.cc",
908 "async_packet_socket.h",
909 "async_resolver_interface.cc",
910 "async_resolver_interface.h",
911 "async_socket.cc",
912 "async_socket.h",
913 "async_tcp_socket.cc",
914 "async_tcp_socket.h",
915 "async_udp_socket.cc",
916 "async_udp_socket.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800917 "asyncinvoker-inl.h",
918 "asyncinvoker.h",
919 "asyncpacketsocket.h",
920 "asyncresolverinterface.h",
921 "asyncsocket.h",
922 "asynctcpsocket.h",
923 "asyncudpsocket.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200924 "crc32.cc",
925 "crc32.h",
Steve Anton10542f22019-01-11 09:11:00 -0800926 "crypt_string.cc",
927 "crypt_string.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800928 "cryptstring.h",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +0100929 "data_rate_limiter.cc",
930 "data_rate_limiter.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100931 "dscp.h",
Steve Anton10542f22019-01-11 09:11:00 -0800932 "file_rotating_stream.cc",
933 "file_rotating_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800934 "filerotatingstream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200935 "gunit_prod.h",
936 "helpers.cc",
937 "helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -0800938 "http_common.cc",
939 "http_common.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800940 "httpcommon.h",
Steve Anton10542f22019-01-11 09:11:00 -0800941 "ip_address.cc",
942 "ip_address.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800943 "ipaddress.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100944 "keep_ref_until_done.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700945 "key_derivation.cc",
946 "key_derivation.h",
Qingsi Wang09619332018-09-12 22:51:55 -0700947 "mdns_responder_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800948 "message_digest.cc",
949 "message_digest.h",
950 "message_handler.cc",
951 "message_handler.h",
952 "message_queue.cc",
953 "message_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800954 "messagedigest.h",
955 "messagehandler.h",
956 "messagequeue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800957 "net_helper.cc",
958 "net_helper.h",
959 "net_helpers.cc",
960 "net_helpers.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800961 "nethelper.h",
962 "nethelpers.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200963 "network.cc",
964 "network.h",
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200965 "network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -0800966 "network_monitor.cc",
967 "network_monitor.h",
968 "network_route.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800969 "networkmonitor.h",
970 "networkroute.h",
Steve Anton10542f22019-01-11 09:11:00 -0800971 "null_socket_server.cc",
972 "null_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800973 "nullsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200974 "openssl.h",
Steve Anton10542f22019-01-11 09:11:00 -0800975 "openssl_adapter.cc",
976 "openssl_adapter.h",
977 "openssl_certificate.cc",
978 "openssl_certificate.h",
979 "openssl_digest.cc",
980 "openssl_digest.h",
981 "openssl_identity.cc",
982 "openssl_identity.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700983 "openssl_key_derivation_hkdf.cc",
984 "openssl_key_derivation_hkdf.h",
Steve Anton10542f22019-01-11 09:11:00 -0800985 "openssl_session_cache.cc",
986 "openssl_session_cache.h",
987 "openssl_stream_adapter.cc",
988 "openssl_stream_adapter.h",
989 "openssl_utility.cc",
990 "openssl_utility.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800991 "openssladapter.h",
992 "opensslcertificate.h",
993 "openssldigest.h",
994 "opensslidentity.h",
995 "opensslsessioncache.h",
996 "opensslstreamadapter.h",
997 "opensslutility.h",
Steve Anton10542f22019-01-11 09:11:00 -0800998 "physical_socket_server.cc",
999 "physical_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001000 "physicalsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001001 "proxy_info.cc",
1002 "proxy_info.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001003 "proxyinfo.h",
Steve Anton10542f22019-01-11 09:11:00 -08001004 "rtc_certificate.cc",
1005 "rtc_certificate.h",
1006 "rtc_certificate_generator.cc",
1007 "rtc_certificate_generator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001008 "rtccertificate.h",
1009 "rtccertificategenerator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001010 "signal_thread.cc",
1011 "signal_thread.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001012 "signalthread.h",
Steve Anton10542f22019-01-11 09:11:00 -08001013 "sigslot_repeater.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001014 "sigslotrepeater.h",
Qingsi Wang6e641e62018-04-11 20:14:17 -07001015 "socket.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001016 "socket.h",
Steve Anton10542f22019-01-11 09:11:00 -08001017 "socket_adapters.cc",
1018 "socket_adapters.h",
1019 "socket_address.cc",
1020 "socket_address.h",
1021 "socket_address_pair.cc",
1022 "socket_address_pair.h",
1023 "socket_factory.h",
1024 "socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001025 "socketadapters.h",
1026 "socketaddress.h",
1027 "socketaddresspair.h",
1028 "socketfactory.h",
1029 "socketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001030 "ssl_adapter.cc",
1031 "ssl_adapter.h",
1032 "ssl_certificate.cc",
1033 "ssl_certificate.h",
1034 "ssl_fingerprint.cc",
1035 "ssl_fingerprint.h",
1036 "ssl_identity.cc",
1037 "ssl_identity.h",
1038 "ssl_stream_adapter.cc",
1039 "ssl_stream_adapter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001040 "ssladapter.h",
1041 "sslcertificate.h",
1042 "sslfingerprint.h",
1043 "sslidentity.h",
1044 "sslstreamadapter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001045 "stream.cc",
1046 "stream.h",
1047 "thread.cc",
1048 "thread.h",
1049 ]
1050
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001051 if (build_with_chromium) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001052 include_dirs = [ "../../boringssl/src/include" ]
1053 public_configs += [ ":rtc_base_chromium_config" ]
1054 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001055 sources += [
1056 "callback.h",
Steve Anton10542f22019-01-11 09:11:00 -08001057 "log_sinks.cc",
1058 "log_sinks.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001059 "logsinks.h",
Steve Anton10542f22019-01-11 09:11:00 -08001060 "numerics/math_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001061 "numerics/mathutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001062 "rolling_accumulator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001063 "rollingaccumulator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001064 "ssl_roots.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001065 "sslroots.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001066 ]
1067
1068 if (is_win) {
Steve Antonaec15aa2019-01-11 09:13:07 -08001069 sources += [
1070 "win32_socket_init.h",
1071 "win32socketinit.h",
1072 ]
Robin Raymondce1b1402018-11-22 20:10:11 -05001073 if (current_os != "winuwp") {
1074 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001075 "win32_socket_server.cc",
1076 "win32_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001077 "win32socketserver.h",
Robin Raymondce1b1402018-11-22 20:10:11 -05001078 ]
1079 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001080 }
1081 } # !build_with_chromium
1082
1083 if (rtc_build_ssl) {
1084 deps += [ "//third_party/boringssl" ]
Dan Minor9cdd8762018-01-16 10:40:39 -05001085 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001086 configs += [ ":external_ssl_library" ]
1087 }
1088
1089 if (is_android) {
1090 sources += [
Steve Antonaec15aa2019-01-11 09:13:07 -08001091 "ifaddrs-android.h",
Steve Anton10542f22019-01-11 09:11:00 -08001092 "ifaddrs_android.cc",
1093 "ifaddrs_android.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001094 ]
1095
1096 libs += [
1097 "log",
1098 "GLESv2",
1099 ]
1100 }
1101
1102 if (is_ios || is_mac) {
Steve Anton10542f22019-01-11 09:11:00 -08001103 sources += [ "mac_ifaddrs_converter.cc" ]
Kári Tristan Helgason62b13452018-10-12 12:57:49 +02001104 deps += [ "system:cocoa_threading" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001105 }
1106
Joachim Bauch75f18fc2017-12-20 21:25:47 +01001107 if (rtc_use_x11) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001108 libs += [
1109 "dl",
1110 "rt",
1111 "Xext",
1112 "X11",
1113 "Xcomposite",
1114 "Xrender",
1115 ]
1116 }
1117
1118 if (is_linux) {
1119 libs += [
1120 "dl",
1121 "rt",
1122 ]
1123 }
1124
1125 if (is_mac) {
1126 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001127 "mac_utils.cc",
1128 "mac_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001129 "macutils.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001130 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001131 }
1132
1133 if (is_win) {
1134 sources += [
1135 "win32.cc",
1136 "win32.h",
Steve Anton10542f22019-01-11 09:11:00 -08001137 "win32_window.cc",
1138 "win32_window.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001139 "win32window.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001140 ]
1141
1142 libs += [
1143 "crypt32.lib",
1144 "iphlpapi.lib",
1145 "secur32.lib",
1146 ]
1147
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001148 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
1149 }
1150
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001151 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001152 sources += [
1153 "ifaddrs_converter.cc",
1154 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001155 ]
1156 }
1157
1158 if (is_nacl) {
1159 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
1160 defines += [ "timezone=_timezone" ]
1161 sources -= [ "ifaddrs_converter.cc" ]
1162 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001163}
1164
1165rtc_source_set("gtest_prod") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001166 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001167 sources = [
1168 "gtest_prod_util.h",
1169 ]
1170}
1171
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001172rtc_source_set("gunit_helpers") {
1173 testonly = true
1174 sources = [
1175 "gunit.cc",
1176 "gunit.h",
1177 ]
1178 deps = [
1179 ":logging",
1180 ":rtc_base",
1181 ":rtc_base_tests_utils",
1182 ":stringutils",
1183 "../test:test_support",
Steve Anton68586e82018-12-13 17:41:25 -08001184 "//third_party/abseil-cpp/absl/strings",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001185 ]
1186}
1187
1188rtc_source_set("testclient") {
1189 testonly = true
1190 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001191 "test_client.cc",
1192 "test_client.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001193 "testclient.h",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001194 ]
1195 deps = [
1196 ":criticalsection",
1197 ":gunit_helpers",
1198 ":macromagic",
1199 ":rtc_base",
1200 ":rtc_base_tests_utils",
1201 ":timeutils",
Yves Gerey3e707812018-11-28 16:47:49 +01001202 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001203 ]
1204}
1205
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001206rtc_source_set("rtc_base_tests_utils") {
1207 testonly = true
1208 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001209 "cpu_time.cc",
1210 "cpu_time.h",
Steve Anton10542f22019-01-11 09:11:00 -08001211 "fake_clock.cc",
1212 "fake_clock.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001213 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 09:11:00 -08001214 "fake_network.h",
1215 "fake_ssl_identity.cc",
1216 "fake_ssl_identity.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001217 "fakeclock.h",
1218 "fakenetwork.h",
1219 "fakesslidentity.h",
Steve Anton10542f22019-01-11 09:11:00 -08001220 "firewall_socket_server.cc",
1221 "firewall_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001222 "firewallsocketserver.h",
Niels Möllere7547d52018-11-01 09:33:08 +01001223 "memory_stream.cc",
1224 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001225 "memory_usage.cc",
1226 "memory_usage.h",
Steve Anton10542f22019-01-11 09:11:00 -08001227 "nat_server.cc",
1228 "nat_server.h",
1229 "nat_socket_factory.cc",
1230 "nat_socket_factory.h",
1231 "nat_types.cc",
1232 "nat_types.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001233 "natserver.h",
1234 "natsocketfactory.h",
1235 "nattypes.h",
Steve Anton10542f22019-01-11 09:11:00 -08001236 "proxy_server.cc",
1237 "proxy_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001238 "proxyserver.h",
Niels Möller44153152018-12-17 14:04:05 +01001239 "server_socket_adapters.cc",
1240 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001241 "sigslot_tester.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001242 "sigslottester.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001243 "sigslottester.h.pump",
Steve Anton10542f22019-01-11 09:11:00 -08001244 "socket_stream.cc",
1245 "socket_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001246 "socketstream.h",
Steve Anton10542f22019-01-11 09:11:00 -08001247 "test_base64.h",
1248 "test_certificate_verifier.h",
1249 "test_echo_server.cc",
1250 "test_echo_server.h",
1251 "test_utils.cc",
1252 "test_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001253 "testbase64.h",
1254 "testcertificateverifier.h",
1255 "testechoserver.h",
1256 "testutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001257 "virtual_socket_server.cc",
1258 "virtual_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001259 "virtualsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001260 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001261 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001262 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001263 ":rtc_base",
Sebastian Jansson5f83cf02018-05-08 14:52:22 +02001264 "../api/units:time_delta",
Artem Titove41c4332018-07-25 15:04:28 +02001265 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001266 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001267 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001268}
1269
Tommida8781f2018-02-19 12:41:43 +01001270rtc_source_set("rtc_task_queue_for_test") {
1271 visibility = [ "*" ]
1272 testonly = true
1273
1274 sources = [
1275 "task_queue_for_test.cc",
1276 "task_queue_for_test.h",
1277 ]
1278 deps = [
1279 ":checks",
1280 ":rtc_base_approved",
1281 ":rtc_task_queue",
1282 ]
1283}
1284
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001285if (rtc_include_tests) {
Artem Titove41c4332018-07-25 15:04:28 +02001286 rtc_source_set("sigslot_unittest") {
1287 testonly = true
1288 sources = [
1289 "sigslot_unittest.cc",
1290 ]
1291 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001292 ":gunit_helpers",
Artem Titove41c4332018-07-25 15:04:28 +02001293 ":rtc_base",
1294 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 16:47:49 +01001295 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001296 "third_party/sigslot",
1297 ]
1298 }
1299
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001300 rtc_source_set("rtc_base_tests_main") {
1301 testonly = true
1302 sources = [
1303 "unittest_main.cc",
1304 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001305 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001306 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001307 ":rtc_base",
1308 ":rtc_base_approved",
1309 ":rtc_base_tests_utils",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001310 "../system_wrappers:field_trial",
1311 "../system_wrappers:metrics",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001312 "../test:field_trial",
1313 "../test:test_support",
1314 ]
1315
1316 public_deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001317 "//testing/gtest",
1318 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001319 }
1320
1321 rtc_source_set("rtc_base_nonparallel_tests") {
1322 testonly = true
1323
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001324 sources = [
1325 "cpu_time_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001326 "file_rotating_stream_unittest.cc",
1327 "null_socket_server_unittest.cc",
1328 "physical_socket_server_unittest.cc",
1329 "socket_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001330 "socket_unittest.cc",
1331 "socket_unittest.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001332 ]
1333 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001334 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001335 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001336 ":rtc_base",
1337 ":rtc_base_tests_main",
1338 ":rtc_base_tests_utils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001339 ":testclient",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001340 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001341 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001342 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001343 "third_party/sigslot:sigslot",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001344 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001345 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001346 ]
1347 if (is_win) {
Steve Anton10542f22019-01-11 09:11:00 -08001348 sources += [ "win32_socket_server_unittest.cc" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001349 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001350 }
1351
1352 rtc_source_set("rtc_base_approved_unittests") {
1353 testonly = true
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001354 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001355 "atomic_ops_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001356 "base64_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001357 "bind_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001358 "bit_buffer_unittest.cc",
1359 "bitrate_allocation_strategy_unittest.cc",
1360 "buffer_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001361 "buffer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001362 "byte_buffer_unittest.cc",
1363 "byte_order_unittest.cc",
1364 "copy_on_write_buffer_unittest.cc",
1365 "critical_section_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001366 "event_tracer_unittest.cc",
1367 "event_unittest.cc",
1368 "file_unittest.cc",
1369 "function_view_unittest.cc",
1370 "logging_unittest.cc",
Karl Wiberg65c39222017-11-22 12:25:14 +01001371 "numerics/histogram_percentile_counter_unittest.cc",
1372 "numerics/mod_ops_unittest.cc",
1373 "numerics/moving_max_counter_unittest.cc",
Karl Wiberge40468b2017-11-22 10:42:26 +01001374 "numerics/safe_compare_unittest.cc",
1375 "numerics/safe_minmax_unittest.cc",
Ilya Nikolaevskiy0beed5d2018-05-22 10:54:30 +02001376 "numerics/sample_counter_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001377 "one_time_event_unittest.cc",
Artem Titove62f6002018-03-19 15:40:00 +01001378 "platform_file_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001379 "platform_thread_unittest.cc",
1380 "random_unittest.cc",
1381 "rate_limiter_unittest.cc",
1382 "rate_statistics_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001383 "rate_tracker_unittest.cc",
1384 "ref_counted_object_unittest.cc",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001385 "sanitizer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001386 "string_encode_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001387 "string_to_number_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001388 "string_utils_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001389 "stringize_macros_unittest.cc",
Tommifef05002018-02-27 13:51:08 +01001390 "strings/string_builder_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001391 "swap_queue_unittest.cc",
1392 "thread_annotations_unittest.cc",
1393 "thread_checker_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001394 "time_utils_unittest.cc",
1395 "timestamp_aligner_unittest.cc",
1396 "virtual_socket_unittest.cc",
Joachim Bauch5b32f232018-03-07 20:02:26 +01001397 "zero_memory_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001398 ]
henrika3ca48a62018-05-21 13:34:51 +02001399 if (is_win) {
1400 sources += [ "win/windows_version_unittest.cc" ]
1401 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001402 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001403 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001404 ":gunit_helpers",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001405 ":rate_limiter",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001406 ":rtc_base",
1407 ":rtc_base_approved",
1408 ":rtc_base_tests_main",
1409 ":rtc_base_tests_utils",
1410 ":rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001411 ":safe_compare",
Karl Wiberg12edf4c2018-03-07 14:18:56 +01001412 ":safe_minmax",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001413 ":sanitizer",
Patrik Höglund3e113432017-12-15 14:40:10 +01001414 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001415 ":testclient",
kwiberg529662a2017-09-04 05:43:17 -07001416 "../api:array_view",
Yves Gerey3e707812018-11-28 16:47:49 +01001417 "../api/units:time_delta",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001418 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001419 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001420 "../test:test_support",
Karl Wiberg29e7bee2018-03-22 14:11:52 +01001421 "memory:unittests",
Artem Titova76af0c2018-07-23 17:38:12 +02001422 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +01001423 "third_party/sigslot:sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001424 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001425 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001426 }
1427
1428 rtc_source_set("rtc_task_queue_unittests") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001429 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001430 testonly = true
1431
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001432 sources = [
Danil Chapovalova10d1642018-08-31 13:47:59 +02001433 "cancelable_periodic_task_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001434 "task_queue_unittest.cc",
1435 ]
1436 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001437 ":gunit_helpers",
mbonadei95c8f652017-08-27 23:40:10 -07001438 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001439 ":rtc_base_tests_main",
1440 ":rtc_base_tests_utils",
Danil Chapovalova10d1642018-08-31 13:47:59 +02001441 ":rtc_cancelable_task",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001442 ":rtc_task_queue",
Tommi68561562018-02-13 19:47:50 +01001443 ":rtc_task_queue_for_test",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001444 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001445 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001446 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001447 }
1448
1449 rtc_source_set("sequenced_task_checker_unittests") {
1450 testonly = true
1451
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001452 sources = [
1453 "sequenced_task_checker_unittest.cc",
1454 ]
1455 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001456 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001457 ":rtc_base_approved",
1458 ":rtc_base_tests_main",
1459 ":rtc_task_queue",
1460 ":sequenced_task_checker",
1461 "../test:test_support",
1462 ]
1463 }
1464
1465 rtc_source_set("weak_ptr_unittests") {
1466 testonly = true
1467
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001468 sources = [
1469 "weak_ptr_unittest.cc",
1470 ]
1471 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001472 ":gunit_helpers",
Mirko Bonadeica270912018-10-10 15:51:03 +02001473 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001474 ":rtc_base_tests_main",
1475 ":rtc_base_tests_utils",
Tommi8d2c5a82018-03-19 11:12:48 +01001476 ":rtc_event",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001477 ":rtc_task_queue",
1478 ":weak_ptr",
1479 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001480 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001481 ]
1482 }
1483
1484 rtc_source_set("rtc_numerics_unittests") {
1485 testonly = true
1486
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001487 sources = [
1488 "numerics/exp_filter_unittest.cc",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +01001489 "numerics/moving_average_unittest.cc",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +01001490 "numerics/moving_median_filter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001491 "numerics/percentile_filter_unittest.cc",
Artem Titove4ed6ea2019-01-11 11:02:19 +01001492 "numerics/samples_stats_counter_unittest.cc",
Bjorn Tereliusa194e582017-10-25 13:07:09 +02001493 "numerics/sequence_number_util_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001494 ]
1495 deps = [
1496 ":rtc_base_approved",
1497 ":rtc_base_tests_main",
1498 ":rtc_numerics",
1499 "../test:test_support",
1500 ]
1501 }
1502
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001503 rtc_source_set("rtc_json_unittests") {
1504 testonly = true
1505
1506 sources = [
1507 "strings/json_unittest.cc",
1508 ]
1509 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001510 ":gunit_helpers",
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001511 ":rtc_base_tests_main",
1512 ":rtc_base_tests_utils",
1513 ":rtc_json",
1514 "../test:test_support",
1515 ]
1516 }
1517
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001518 rtc_source_set("rtc_base_unittests") {
1519 testonly = true
Benjamin Wrightd6f86e82018-05-08 13:12:25 -07001520 defines = []
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001521
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001522 sources = [
1523 "callback_unittest.cc",
1524 "crc32_unittest.cc",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +01001525 "data_rate_limiter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001526 "helpers_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001527 "ip_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001528 "memory_usage_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001529 "message_digest_unittest.cc",
1530 "message_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001531 "nat_unittest.cc",
1532 "network_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001533 "proxy_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001534 "rolling_accumulator_unittest.cc",
1535 "rtc_certificate_generator_unittest.cc",
1536 "rtc_certificate_unittest.cc",
1537 "signal_thread_unittest.cc",
1538 "sigslot_tester_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001539 "stream_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001540 "test_client_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001541 "thread_unittest.cc",
1542 ]
1543 if (is_win) {
1544 sources += [
1545 "win32_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001546 "win32_window_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001547 ]
1548 }
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001549 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001550 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001551 "openssl_adapter_unittest.cc",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -07001552 "openssl_key_derivation_hkdf_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001553 "openssl_session_cache_unittest.cc",
1554 "openssl_utility_unittest.cc",
1555 "ssl_adapter_unittest.cc",
1556 "ssl_identity_unittest.cc",
1557 "ssl_stream_adapter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001558 ]
1559 }
1560 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001561 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001562 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001563 ":rtc_base_tests_main",
1564 ":rtc_base_tests_utils",
Patrik Höglund3e113432017-12-15 14:40:10 +01001565 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001566 ":testclient",
Joachim Bauch58daf402017-12-21 22:00:34 +01001567 "../api:array_view",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001568 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001569 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001570 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001571 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +02001572 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001573 ]
1574 public_deps = [
1575 ":rtc_base",
1576 ]
Diogo Real1dca9d52017-08-29 12:18:32 -07001577 if (build_with_chromium) {
1578 include_dirs = [ "../../boringssl/src/include" ]
1579 }
1580 if (rtc_build_ssl) {
1581 deps += [ "//third_party/boringssl" ]
1582 } else {
1583 configs += [ ":external_ssl_library" ]
1584 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001585 }
1586}
1587
Henrik Kjellander73e21802017-06-20 08:38:58 +02001588if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +00001589 rtc_android_library("base_java") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001590 java_files = [
1591 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 14:31:38 +02001592 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001593 "java/src/org/webrtc/Logging.java",
1594 "java/src/org/webrtc/Size.java",
1595 "java/src/org/webrtc/ThreadUtils.java",
1596 ]
Artem Titarenko69540f42018-12-10 12:30:46 +01001597 deps = [
1598 "//third_party/android_deps:android_support_annotations_java",
1599 ]
Henrik Kjellander73e21802017-06-20 08:38:58 +02001600 }
1601}