blob: ceb856cddd4de9fb48815b3891e69f4c72136c10 [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",
Danil Chapovalov5a1a6db2019-01-17 19:55:46 +0100275 "//third_party/abseil-cpp/absl/strings",
Tommi8d2c5a82018-03-19 11:12:48 +0100276 ]
277}
278
279rtc_source_set("rtc_event") {
John Budorick6c9a7862018-03-26 06:23:34 -0700280 deps = [
281 ":checks",
John Budorick6c9a7862018-03-26 06:23:34 -0700282 ]
283
Tommi8d2c5a82018-03-19 11:12:48 +0100284 if (build_with_chromium) {
John Budorick6c9a7862018-03-26 06:23:34 -0700285 # Dependency on chromium's waitable_event (in //base).
286 deps += [ "//base:base" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100287 sources = [
288 "../../webrtc_overrides/rtc_base/event.cc",
289 "../../webrtc_overrides/rtc_base/event.h",
290 ]
291 } else {
292 sources = [
293 "event.cc",
294 "event.h",
295 ]
296 }
Tommi8d2c5a82018-03-19 11:12:48 +0100297}
298
299rtc_source_set("logging") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200300 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200301 libs = []
Tommi8d2c5a82018-03-19 11:12:48 +0100302 deps = [
Yves Gerey988cc082018-10-23 12:03:01 +0200303 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100304 ":criticalsection",
305 ":macromagic",
306 ":platform_thread_types",
307 ":stringutils",
308 ":timeutils",
Jonas Olssonf2ce37c2018-09-12 15:32:47 +0200309 "//third_party/abseil-cpp/absl/strings",
Tommi8d2c5a82018-03-19 11:12:48 +0100310 ]
311
312 if (build_with_chromium) {
313 # Dependency on chromium's logging (in //base).
314 deps += [ "//base:base" ]
315 sources = [
316 "../../webrtc_overrides/rtc_base/logging.cc",
317 "../../webrtc_overrides/rtc_base/logging.h",
318 ]
319 } else {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200320 configs += [
321 "..:no_exit_time_destructors",
322 "..:no_global_constructors",
323 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100324 sources = [
325 "logging.cc",
326 "logging.h",
327 ]
Karl Wibergcefc4652018-05-23 23:20:38 +0200328 deps += [ "system:inline" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100329
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200330 if (is_mac) {
331 deps += [ ":logging_mac" ]
332 }
333
Tommi8d2c5a82018-03-19 11:12:48 +0100334 # logging.h needs the deprecation header while downstream projects are
335 # removing code that depends on logging implementation details.
336 deps += [ ":deprecation" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200337
338 if (is_android) {
339 libs += [ "log" ]
340 }
Tommi8d2c5a82018-03-19 11:12:48 +0100341 }
342}
343
344rtc_source_set("thread_checker") {
345 sources = [
346 "thread_checker.h",
347 "thread_checker_impl.cc",
348 "thread_checker_impl.h",
349 ]
350 deps = [
351 ":checks",
352 ":criticalsection",
353 ":macromagic",
354 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100355 ]
356}
357
358rtc_source_set("atomicops") {
359 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800360 "atomic_ops.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800361 "atomicops.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100362 ]
363}
364
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100365rtc_source_set("checks") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200366 # TODO(bugs.webrtc.org/9607): This should not be public.
367 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200368 libs = []
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100369 sources = [
370 "checks.cc",
371 "checks.h",
372 ]
373 deps = [
374 ":safe_compare",
Jonas Olssonf8e5c112018-06-14 13:14:22 +0200375 "system:inline",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100376 ]
Patrik Höglund77301932018-10-09 15:09:51 +0200377 if (is_android) {
378 libs += [ "log" ]
379 }
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100380}
381
Patrik Höglund3e113432017-12-15 14:40:10 +0100382rtc_source_set("rate_limiter") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100383 sources = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100384 "rate_limiter.cc",
385 "rate_limiter.h",
386 ]
387 deps = [
388 ":rtc_base_approved",
389 "../system_wrappers",
Yves Gerey988cc082018-10-23 12:03:01 +0200390 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100391 ]
392}
393
394rtc_source_set("sanitizer") {
395 sources = [
396 "sanitizer.h",
397 ]
Jiawei Oua6e034a2018-11-24 20:59:41 -0800398 deps = [
399 "//third_party/abseil-cpp/absl/meta:type_traits",
400 ]
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100401}
402
403rtc_source_set("safe_compare") {
404 sources = [
405 "numerics/safe_compare.h",
406 ]
407 deps = [
408 ":type_traits",
409 ]
410}
411
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100412rtc_source_set("safe_minmax") {
413 sources = [
414 "numerics/safe_minmax.h",
415 ]
416 deps = [
417 ":checks",
418 ":safe_compare",
419 ":type_traits",
420 ]
421}
422
Tommi8d2c5a82018-03-19 11:12:48 +0100423rtc_source_set("safe_conversions") {
424 sources = [
425 "numerics/safe_conversions.h",
426 "numerics/safe_conversions_impl.h",
427 ]
428 deps = [
429 ":checks",
430 ]
431}
432
433rtc_source_set("timeutils") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200434 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100435 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800436 "time_utils.cc",
437 "time_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800438 "timeutils.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100439 ]
440 deps = [
441 ":checks",
442 ":safe_conversions",
Jonas Olsson366a50c2018-09-06 13:41:30 +0200443 ":stringutils",
Tommi8d2c5a82018-03-19 11:12:48 +0100444 ]
445}
446
Patrik Höglund3e113432017-12-15 14:40:10 +0100447rtc_source_set("stringutils") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100448 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800449 "string_encode.cc",
450 "string_encode.h",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200451 "string_to_number.cc",
452 "string_to_number.h",
Steve Anton10542f22019-01-11 09:11:00 -0800453 "string_utils.cc",
454 "string_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800455 "stringencode.h",
Karl Wiberg881f1682018-03-08 15:03:23 +0100456 "strings/string_builder.cc",
Tommifef05002018-02-27 13:51:08 +0100457 "strings/string_builder.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800458 "stringutils.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100459 ]
460 deps = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100461 ":checks",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200462 ":macromagic",
Karl Wiberg881f1682018-03-08 15:03:23 +0100463 ":safe_minmax",
464 "../api:array_view",
Jonas Olsson88e18482018-09-03 10:15:08 +0200465 "//third_party/abseil-cpp/absl/strings:strings",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200466 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglund3e113432017-12-15 14:40:10 +0100467 ]
468}
469
Jonas Olsson74395342018-04-03 12:22:07 +0200470rtc_source_set("audio_format_to_string") {
471 sources = [
472 "strings/audio_format_to_string.cc",
473 "strings/audio_format_to_string.h",
474 ]
475 deps = [
476 ":stringutils",
477 "../api/audio_codecs:audio_codecs_api",
478 ]
479}
480
Patrik Höglund3e113432017-12-15 14:40:10 +0100481rtc_source_set("type_traits") {
482 sources = [
483 "type_traits.h",
484 ]
485}
486
487rtc_source_set("deprecation") {
488 sources = [
489 "deprecation.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100490 ]
491}
492
mbonadeibc378472017-09-11 03:43:34 -0700493if (is_mac && !build_with_chromium) {
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200494 rtc_source_set("logging_mac") {
495 visibility = [ ":logging" ]
496 libs = [ "Foundation.framework" ]
mbonadeibc378472017-09-11 03:43:34 -0700497 sources = [
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200498 "logging_mac.h",
mbonadeibc378472017-09-11 03:43:34 -0700499 "logging_mac.mm",
500 ]
mbonadeibc378472017-09-11 03:43:34 -0700501 }
502}
503
perkj650fdae2017-08-25 05:00:11 -0700504rtc_source_set("rtc_task_queue") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000505 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100506 deps = []
mbonadei95c8f652017-08-27 23:40:10 -0700507 public_deps = [
perkj650fdae2017-08-25 05:00:11 -0700508 ":rtc_task_queue_api",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200509 ]
510
perkj650fdae2017-08-25 05:00:11 -0700511 if (rtc_link_task_queue_impl) {
mbonadei95c8f652017-08-27 23:40:10 -0700512 deps += [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700513 }
514}
515
516# WebRTC targets must not directly depend on rtc_task_queue_api or
517# rtc_task_queue_impl. Instead, depend on rtc_task_queue.
518# The build flag |rtc_link_task_queue_impl| decides if WebRTC targets will link
519# to the default implemenation in rtc_task_queue_impl or if an externally
520# provided implementation should be used. An external implementation should
521# depend on rtc_task_queue_api.
522rtc_source_set("rtc_task_queue_api") {
Tommi8d2c5a82018-03-19 11:12:48 +0100523 # The visibility list is commented out so that we won't break external
524 # implementations, but left here to manually test as well as for sake of what
525 # targets we expect to depend on rtc_task_queue_api.
526 # visibility = [
527 # ":rtc_task_queue",
528 # ":rtc_task_queue_impl",
529 # ":sequenced_task_checker",
530 # ]
nisse75dd6d42017-09-19 08:28:00 -0700531 sources = [
532 "task_queue.h",
533 ]
perkj650fdae2017-08-25 05:00:11 -0700534 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100535 ":macromagic",
536 ":ptr_util",
Danil Chapovalov959e9b62019-01-14 14:29:18 +0100537 "../api/task_queue",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200538 "system:rtc_export",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200539 "//third_party/abseil-cpp/absl/memory",
perkj650fdae2017-08-25 05:00:11 -0700540 ]
541}
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200542
Tommi8d2c5a82018-03-19 11:12:48 +0100543if (rtc_enable_libevent) {
544 rtc_source_set("rtc_task_queue_libevent") {
545 visibility = [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700546 sources = [
Niels Möller15c9cf72017-10-19 12:38:09 +0200547 "task_queue_libevent.cc",
548 "task_queue_posix.cc",
549 "task_queue_posix.h",
perkj650fdae2017-08-25 05:00:11 -0700550 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100551 deps = [
552 ":checks",
553 ":criticalsection",
554 ":logging",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200555 ":macromagic",
Tommi8d2c5a82018-03-19 11:12:48 +0100556 ":platform_thread",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200557 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100558 ":ptr_util",
559 ":refcount",
560 ":rtc_task_queue_api",
561 ":safe_conversions",
562 ":timeutils",
Niels Möllera12c42a2018-07-25 16:05:48 +0200563 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100564 ]
565 if (rtc_build_libevent) {
566 deps += [ "//base/third_party/libevent" ]
567 }
568 }
569}
570
571if (is_mac || is_ios) {
572 rtc_source_set("rtc_task_queue_gcd") {
573 visibility = [ ":rtc_task_queue_impl" ]
574 sources = [
575 "task_queue_gcd.cc",
576 "task_queue_posix.cc",
577 "task_queue_posix.h",
578 ]
579 deps = [
580 ":checks",
581 ":logging",
582 ":ptr_util",
583 ":refcount",
584 ":rtc_task_queue_api",
585 ]
586 }
587}
588
589if (is_win) {
590 rtc_source_set("rtc_task_queue_win") {
591 visibility = [ ":rtc_task_queue_impl" ]
592 sources = [
593 "task_queue_win.cc",
594 ]
595 deps = [
596 ":checks",
597 ":criticalsection",
598 ":logging",
599 ":macromagic",
600 ":platform_thread",
601 ":ptr_util",
602 ":refcount",
603 ":rtc_event",
604 ":rtc_task_queue_api",
605 ":safe_conversions",
606 ":timeutils",
607 ]
608 }
609}
610
Robin Raymond22027b92018-11-23 09:07:50 -0500611rtc_source_set("rtc_task_queue_stdlib") {
612 visibility = [ ":rtc_task_queue_impl" ]
613 sources = [
614 "task_queue_stdlib.cc",
615 ]
616 deps = [
617 ":checks",
618 ":criticalsection",
619 ":logging",
620 ":macromagic",
621 ":platform_thread",
622 ":ptr_util",
623 ":refcount",
624 ":rtc_event",
625 ":rtc_task_queue_api",
626 ":safe_conversions",
627 ":timeutils",
628 ]
629}
630
Tommi8d2c5a82018-03-19 11:12:48 +0100631rtc_source_set("rtc_task_queue_impl") {
632 visibility = [ "*" ]
633 if (rtc_enable_libevent) {
634 deps = [
635 ":rtc_task_queue_libevent",
636 ]
perkj650fdae2017-08-25 05:00:11 -0700637 } else {
Niels Möller15c9cf72017-10-19 12:38:09 +0200638 if (is_mac || is_ios) {
Tommi8d2c5a82018-03-19 11:12:48 +0100639 deps = [
640 ":rtc_task_queue_gcd",
Niels Möller17a04742017-09-27 10:53:21 +0200641 ]
Niels Möller15c9cf72017-10-19 12:38:09 +0200642 }
643 if (is_win) {
Robin Raymond22027b92018-11-23 09:07:50 -0500644 if (current_os == "winuwp") {
645 deps = [
646 ":rtc_task_queue_stdlib",
647 ]
648 } else {
649 deps = [
650 ":rtc_task_queue_win",
651 ]
652 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200653 }
654 }
655}
656
Tommi8d2c5a82018-03-19 11:12:48 +0100657rtc_source_set("sequenced_task_checker") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200658 sources = [
659 "sequenced_task_checker.h",
660 "sequenced_task_checker_impl.cc",
661 "sequenced_task_checker_impl.h",
662 ]
663 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100664 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100665 ":criticalsection",
666 ":macromagic",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200667 ":rtc_task_queue",
Tommi8d2c5a82018-03-19 11:12:48 +0100668 ":thread_checker",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200669 ]
670}
671
672rtc_static_library("weak_ptr") {
673 sources = [
674 "weak_ptr.cc",
675 "weak_ptr.h",
676 ]
677 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100678 ":ptr_util",
679 ":refcount",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200680 ":sequenced_task_checker",
681 ]
682}
683
684rtc_static_library("rtc_numerics") {
685 sources = [
686 "numerics/exp_filter.cc",
687 "numerics/exp_filter.h",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +0100688 "numerics/moving_average.cc",
689 "numerics/moving_average.h",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +0100690 "numerics/moving_median_filter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200691 "numerics/percentile_filter.h",
Artem Titove4ed6ea2019-01-11 11:02:19 +0100692 "numerics/samples_stats_counter.cc",
693 "numerics/samples_stats_counter.h",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200694 "numerics/sequence_number_util.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200695 ]
696 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100697 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200698 ":rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100699 ":safe_compare",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200700 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200701 ]
702}
703
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200704rtc_source_set("rtc_json") {
705 defines = []
706 sources = [
Sam Zackrissonb45bdb52018-10-02 16:25:59 +0200707 "strings/json.cc",
708 "strings/json.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200709 ]
Jonas Olsson941a07c2018-09-13 10:07:07 +0200710 deps = [
711 ":stringutils",
712 ]
Mirko Bonadeia0e29fc2018-01-26 16:50:02 +0100713 all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200714 if (rtc_build_json) {
715 public_deps = [
716 "//third_party/jsoncpp",
717 ]
718 } else {
719 include_dirs = [ "$rtc_jsoncpp_root" ]
720
721 # When defined changes the include path for json.h to where it is
722 # expected to be when building json outside of the standalone build.
723 defines += [ "WEBRTC_EXTERNAL_JSON" ]
724 }
725}
726
Karl Wiberg28522dc2019-01-22 17:54:34 +0100727rtc_source_set("net_helpers") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100728 # TODO(bugs.webrtc.org/9987): This build target will soon contain
729 # the following files:
730 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800731 # "net_helpers.cc",
732 # "net_helpers.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100733 # ]
734}
735
Karl Wiberg28522dc2019-01-22 17:54:34 +0100736rtc_source_set("async_resolver_interface") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100737 # TODO(bugs.webrtc.org/9987): This build target will soon contain
738 # the following files:
739 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800740 # "async_resolver_interface.cc",
741 # "async_resolver_interface.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100742 # ]
743}
744
Karl Wiberg28522dc2019-01-22 17:54:34 +0100745rtc_source_set("ip_address") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100746 # TODO(bugs.webrtc.org/9987): This build target will soon contain
747 # the following files:
748 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800749 # "ip_address.cc",
750 # "ip_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100751 # ]
752}
753
Karl Wiberg28522dc2019-01-22 17:54:34 +0100754rtc_source_set("socket_address") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100755 # TODO(bugs.webrtc.org/9987): This build target will soon contain
756 # the following files:
757 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800758 # "socket_address.cc",
759 # "socket_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100760 # ]
761}
762
Karl Wiberg28522dc2019-01-22 17:54:34 +0100763rtc_source_set("null_socket_server") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100764 # TODO(bugs.webrtc.org/9987): This build target will soon contain
765 # the following files:
766 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800767 # "null_socket_server.cc",
768 # "null_socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100769 # ]
770}
771
Karl Wiberg28522dc2019-01-22 17:54:34 +0100772rtc_source_set("socket_server") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100773 # TODO(bugs.webrtc.org/9987): This build target will soon contain
774 # the following files:
775 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800776 # "socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100777 # ]
778}
779
780rtc_source_set("threading") {
781 # TODO(bugs.webrtc.org/9987): This build target will soon contain
782 # the following files:
783 # sources = [
784 # "asyncresolver.cc",
785 # "asyncresolver.h",
786 # "defaultsocketserver.cc",
787 # "defaultsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800788 # "message_handler.cc",
789 # "message_handler.h",
790 # "message_queue.cc",
791 # "message_queue.h",
792 # "network_monitor.cc",
793 # "network_monitor.h",
794 # "physical_socket_server.cc",
795 # "physical_socket_server.h",
796 # "signal_thread.cc",
797 # "signal_thread.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100798 # "thread.cc",
799 # "thread.h",
800 # ]
801}
802
Karl Wiberg28522dc2019-01-22 17:54:34 +0100803rtc_source_set("socket_factory") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100804 # TODO(bugs.webrtc.org/9987): This build target will soon contain
805 # the following files:
806 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800807 # "socket_factory.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100808 # ]
809}
810
Karl Wiberg28522dc2019-01-22 17:54:34 +0100811rtc_source_set("async_socket") {
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100812 # TODO(bugs.webrtc.org/9987): This build target will soon contain
813 # the following files:
814 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800815 # "async_socket.cc",
816 # "async_socket.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100817 # ]
818}
819
820rtc_source_set("socket") {
821 # TODO(bugs.webrtc.org/9987): This build target will soon contain
822 # the following files:
823 # sources = [
824 # "socket.cc",
825 # "socket.h",
826 # ]
827}
828
829rtc_source_set("network_constants") {
830 # TODO(bugs.webrtc.org/9987): This build target will soon contain
831 # the following files:
832 # sources = [
833 # "network_constants.h",
834 # ]
835}
836
837if (is_android) {
838 rtc_source_set("ifaddrs_android") {
839 # TODO(bugs.webrtc.org/9987): This build target will soon contain
840 # the following files:
841 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800842 # "ifaddrs_android.cc",
843 # "ifaddrs_android.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100844 # ]
845 }
846}
847
848if (is_win) {
849 rtc_source_set("win32") {
850 # TODO(bugs.webrtc.org/9987): This build target will soon contain
851 # the following files:
852 # sources = [
853 # "win32.cc",
854 # "win32.h",
855 # ]
856 }
857}
858
mbonadei9c5e5112017-09-05 05:17:02 -0700859rtc_static_library("rtc_base") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000860 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200861 cflags = []
862 cflags_cc = []
863 libs = []
864 defines = []
865 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100866 ":checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100867 ":stringutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200868 "..:webrtc_common",
Joachim Bauch58daf402017-12-21 22:00:34 +0100869 "../api:array_view",
Sebastian Janssone07864e2018-10-15 09:28:15 +0200870 "network:sent_packet",
Niels Möller23213d92019-01-22 11:01:24 +0100871 "system:file_wrapper",
Artem Titova76af0c2018-07-23 17:38:12 +0200872 "third_party/base64",
Artem Titove41c4332018-07-25 15:04:28 +0200873 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200874 "//third_party/abseil-cpp/absl/memory",
Niels Möller3c7d5992018-10-19 15:29:54 +0200875 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200876 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200877 ]
878 public_deps = [
879 ":rtc_base_approved",
880 ]
881 public_configs = []
882
883 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
884
885 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800886 "async_invoker.cc",
887 "async_invoker.h",
888 "async_invoker_inl.h",
889 "async_packet_socket.cc",
890 "async_packet_socket.h",
891 "async_resolver_interface.cc",
892 "async_resolver_interface.h",
893 "async_socket.cc",
894 "async_socket.h",
895 "async_tcp_socket.cc",
896 "async_tcp_socket.h",
897 "async_udp_socket.cc",
898 "async_udp_socket.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800899 "asyncinvoker-inl.h",
900 "asyncinvoker.h",
901 "asyncpacketsocket.h",
902 "asyncresolverinterface.h",
903 "asyncsocket.h",
904 "asynctcpsocket.h",
905 "asyncudpsocket.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200906 "crc32.cc",
907 "crc32.h",
Steve Anton10542f22019-01-11 09:11:00 -0800908 "crypt_string.cc",
909 "crypt_string.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800910 "cryptstring.h",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +0100911 "data_rate_limiter.cc",
912 "data_rate_limiter.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100913 "dscp.h",
Steve Anton10542f22019-01-11 09:11:00 -0800914 "file_rotating_stream.cc",
915 "file_rotating_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800916 "filerotatingstream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200917 "gunit_prod.h",
918 "helpers.cc",
919 "helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -0800920 "http_common.cc",
921 "http_common.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800922 "httpcommon.h",
Steve Anton10542f22019-01-11 09:11:00 -0800923 "ip_address.cc",
924 "ip_address.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800925 "ipaddress.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100926 "keep_ref_until_done.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700927 "key_derivation.cc",
928 "key_derivation.h",
Qingsi Wang09619332018-09-12 22:51:55 -0700929 "mdns_responder_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800930 "message_digest.cc",
931 "message_digest.h",
932 "message_handler.cc",
933 "message_handler.h",
934 "message_queue.cc",
935 "message_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800936 "messagedigest.h",
937 "messagehandler.h",
938 "messagequeue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800939 "net_helper.cc",
940 "net_helper.h",
941 "net_helpers.cc",
942 "net_helpers.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800943 "nethelper.h",
944 "nethelpers.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200945 "network.cc",
946 "network.h",
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200947 "network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -0800948 "network_monitor.cc",
949 "network_monitor.h",
950 "network_route.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800951 "networkmonitor.h",
952 "networkroute.h",
Steve Anton10542f22019-01-11 09:11:00 -0800953 "null_socket_server.cc",
954 "null_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800955 "nullsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200956 "openssl.h",
Steve Anton10542f22019-01-11 09:11:00 -0800957 "openssl_adapter.cc",
958 "openssl_adapter.h",
959 "openssl_certificate.cc",
960 "openssl_certificate.h",
961 "openssl_digest.cc",
962 "openssl_digest.h",
963 "openssl_identity.cc",
964 "openssl_identity.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700965 "openssl_key_derivation_hkdf.cc",
966 "openssl_key_derivation_hkdf.h",
Steve Anton10542f22019-01-11 09:11:00 -0800967 "openssl_session_cache.cc",
968 "openssl_session_cache.h",
969 "openssl_stream_adapter.cc",
970 "openssl_stream_adapter.h",
971 "openssl_utility.cc",
972 "openssl_utility.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800973 "openssladapter.h",
974 "opensslcertificate.h",
975 "openssldigest.h",
976 "opensslidentity.h",
977 "opensslsessioncache.h",
978 "opensslstreamadapter.h",
979 "opensslutility.h",
Steve Anton10542f22019-01-11 09:11:00 -0800980 "physical_socket_server.cc",
981 "physical_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800982 "physicalsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800983 "proxy_info.cc",
984 "proxy_info.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800985 "proxyinfo.h",
Steve Anton10542f22019-01-11 09:11:00 -0800986 "rtc_certificate.cc",
987 "rtc_certificate.h",
988 "rtc_certificate_generator.cc",
989 "rtc_certificate_generator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800990 "rtccertificate.h",
991 "rtccertificategenerator.h",
Steve Anton10542f22019-01-11 09:11:00 -0800992 "signal_thread.cc",
993 "signal_thread.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800994 "signalthread.h",
Steve Anton10542f22019-01-11 09:11:00 -0800995 "sigslot_repeater.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800996 "sigslotrepeater.h",
Qingsi Wang6e641e62018-04-11 20:14:17 -0700997 "socket.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200998 "socket.h",
Steve Anton10542f22019-01-11 09:11:00 -0800999 "socket_adapters.cc",
1000 "socket_adapters.h",
1001 "socket_address.cc",
1002 "socket_address.h",
1003 "socket_address_pair.cc",
1004 "socket_address_pair.h",
1005 "socket_factory.h",
1006 "socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001007 "socketadapters.h",
1008 "socketaddress.h",
1009 "socketaddresspair.h",
1010 "socketfactory.h",
1011 "socketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001012 "ssl_adapter.cc",
1013 "ssl_adapter.h",
1014 "ssl_certificate.cc",
1015 "ssl_certificate.h",
1016 "ssl_fingerprint.cc",
1017 "ssl_fingerprint.h",
1018 "ssl_identity.cc",
1019 "ssl_identity.h",
1020 "ssl_stream_adapter.cc",
1021 "ssl_stream_adapter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001022 "ssladapter.h",
1023 "sslcertificate.h",
1024 "sslfingerprint.h",
1025 "sslidentity.h",
1026 "sslstreamadapter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001027 "stream.cc",
1028 "stream.h",
1029 "thread.cc",
1030 "thread.h",
1031 ]
1032
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001033 if (build_with_chromium) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001034 include_dirs = [ "../../boringssl/src/include" ]
1035 public_configs += [ ":rtc_base_chromium_config" ]
1036 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001037 sources += [
1038 "callback.h",
Steve Anton10542f22019-01-11 09:11:00 -08001039 "log_sinks.cc",
1040 "log_sinks.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001041 "logsinks.h",
Steve Anton10542f22019-01-11 09:11:00 -08001042 "numerics/math_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001043 "numerics/mathutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001044 "rolling_accumulator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001045 "rollingaccumulator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001046 "ssl_roots.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001047 "sslroots.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001048 ]
1049
1050 if (is_win) {
Steve Antonaec15aa2019-01-11 09:13:07 -08001051 sources += [
1052 "win32_socket_init.h",
1053 "win32socketinit.h",
1054 ]
Robin Raymondce1b1402018-11-22 20:10:11 -05001055 if (current_os != "winuwp") {
1056 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001057 "win32_socket_server.cc",
1058 "win32_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001059 "win32socketserver.h",
Robin Raymondce1b1402018-11-22 20:10:11 -05001060 ]
1061 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001062 }
1063 } # !build_with_chromium
1064
1065 if (rtc_build_ssl) {
1066 deps += [ "//third_party/boringssl" ]
Dan Minor9cdd8762018-01-16 10:40:39 -05001067 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001068 configs += [ ":external_ssl_library" ]
1069 }
1070
1071 if (is_android) {
1072 sources += [
Steve Antonaec15aa2019-01-11 09:13:07 -08001073 "ifaddrs-android.h",
Steve Anton10542f22019-01-11 09:11:00 -08001074 "ifaddrs_android.cc",
1075 "ifaddrs_android.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001076 ]
1077
1078 libs += [
1079 "log",
1080 "GLESv2",
1081 ]
1082 }
1083
1084 if (is_ios || is_mac) {
Steve Anton10542f22019-01-11 09:11:00 -08001085 sources += [ "mac_ifaddrs_converter.cc" ]
Kári Tristan Helgason62b13452018-10-12 12:57:49 +02001086 deps += [ "system:cocoa_threading" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001087 }
1088
Joachim Bauch75f18fc2017-12-20 21:25:47 +01001089 if (rtc_use_x11) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001090 libs += [
1091 "dl",
1092 "rt",
1093 "Xext",
1094 "X11",
1095 "Xcomposite",
1096 "Xrender",
1097 ]
1098 }
1099
1100 if (is_linux) {
1101 libs += [
1102 "dl",
1103 "rt",
1104 ]
1105 }
1106
1107 if (is_mac) {
1108 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001109 "mac_utils.cc",
1110 "mac_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001111 "macutils.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001112 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001113 }
1114
1115 if (is_win) {
1116 sources += [
1117 "win32.cc",
1118 "win32.h",
Steve Anton10542f22019-01-11 09:11:00 -08001119 "win32_window.cc",
1120 "win32_window.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001121 "win32window.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001122 ]
1123
1124 libs += [
1125 "crypt32.lib",
1126 "iphlpapi.lib",
1127 "secur32.lib",
1128 ]
1129
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001130 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
1131 }
1132
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001133 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001134 sources += [
1135 "ifaddrs_converter.cc",
1136 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001137 ]
1138 }
1139
1140 if (is_nacl) {
1141 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
1142 defines += [ "timezone=_timezone" ]
1143 sources -= [ "ifaddrs_converter.cc" ]
1144 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001145}
1146
1147rtc_source_set("gtest_prod") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001148 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001149 sources = [
1150 "gtest_prod_util.h",
1151 ]
1152}
1153
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001154rtc_source_set("gunit_helpers") {
1155 testonly = true
1156 sources = [
1157 "gunit.cc",
1158 "gunit.h",
1159 ]
1160 deps = [
1161 ":logging",
1162 ":rtc_base",
1163 ":rtc_base_tests_utils",
1164 ":stringutils",
1165 "../test:test_support",
Steve Anton68586e82018-12-13 17:41:25 -08001166 "//third_party/abseil-cpp/absl/strings",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001167 ]
1168}
1169
1170rtc_source_set("testclient") {
1171 testonly = true
1172 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001173 "test_client.cc",
1174 "test_client.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001175 "testclient.h",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001176 ]
1177 deps = [
1178 ":criticalsection",
1179 ":gunit_helpers",
1180 ":macromagic",
1181 ":rtc_base",
1182 ":rtc_base_tests_utils",
1183 ":timeutils",
Yves Gerey3e707812018-11-28 16:47:49 +01001184 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001185 ]
1186}
1187
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001188rtc_source_set("rtc_base_tests_utils") {
1189 testonly = true
1190 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001191 "cpu_time.cc",
1192 "cpu_time.h",
Steve Anton10542f22019-01-11 09:11:00 -08001193 "fake_clock.cc",
1194 "fake_clock.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001195 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 09:11:00 -08001196 "fake_network.h",
1197 "fake_ssl_identity.cc",
1198 "fake_ssl_identity.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001199 "fakeclock.h",
1200 "fakenetwork.h",
1201 "fakesslidentity.h",
Steve Anton10542f22019-01-11 09:11:00 -08001202 "firewall_socket_server.cc",
1203 "firewall_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001204 "firewallsocketserver.h",
Niels Möllere7547d52018-11-01 09:33:08 +01001205 "memory_stream.cc",
1206 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001207 "memory_usage.cc",
1208 "memory_usage.h",
Steve Anton10542f22019-01-11 09:11:00 -08001209 "nat_server.cc",
1210 "nat_server.h",
1211 "nat_socket_factory.cc",
1212 "nat_socket_factory.h",
1213 "nat_types.cc",
1214 "nat_types.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001215 "natserver.h",
1216 "natsocketfactory.h",
1217 "nattypes.h",
Steve Anton10542f22019-01-11 09:11:00 -08001218 "proxy_server.cc",
1219 "proxy_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001220 "proxyserver.h",
Niels Möller44153152018-12-17 14:04:05 +01001221 "server_socket_adapters.cc",
1222 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001223 "sigslot_tester.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001224 "sigslottester.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001225 "sigslottester.h.pump",
Steve Anton10542f22019-01-11 09:11:00 -08001226 "socket_stream.cc",
1227 "socket_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001228 "socketstream.h",
Steve Anton10542f22019-01-11 09:11:00 -08001229 "test_base64.h",
1230 "test_certificate_verifier.h",
1231 "test_echo_server.cc",
1232 "test_echo_server.h",
1233 "test_utils.cc",
1234 "test_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001235 "testbase64.h",
1236 "testcertificateverifier.h",
1237 "testechoserver.h",
1238 "testutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001239 "virtual_socket_server.cc",
1240 "virtual_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001241 "virtualsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001242 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001243 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001244 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001245 ":rtc_base",
Sebastian Jansson5f83cf02018-05-08 14:52:22 +02001246 "../api/units:time_delta",
Artem Titove41c4332018-07-25 15:04:28 +02001247 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001248 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001249 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001250}
1251
Tommida8781f2018-02-19 12:41:43 +01001252rtc_source_set("rtc_task_queue_for_test") {
1253 visibility = [ "*" ]
1254 testonly = true
1255
1256 sources = [
1257 "task_queue_for_test.cc",
1258 "task_queue_for_test.h",
1259 ]
1260 deps = [
1261 ":checks",
1262 ":rtc_base_approved",
1263 ":rtc_task_queue",
1264 ]
1265}
1266
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001267if (rtc_include_tests) {
Artem Titove41c4332018-07-25 15:04:28 +02001268 rtc_source_set("sigslot_unittest") {
1269 testonly = true
1270 sources = [
1271 "sigslot_unittest.cc",
1272 ]
1273 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001274 ":gunit_helpers",
Artem Titove41c4332018-07-25 15:04:28 +02001275 ":rtc_base",
1276 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 16:47:49 +01001277 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001278 "third_party/sigslot",
1279 ]
1280 }
1281
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001282 rtc_source_set("rtc_base_tests_main") {
1283 testonly = true
1284 sources = [
1285 "unittest_main.cc",
1286 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001287 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001288 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001289 ":rtc_base",
1290 ":rtc_base_approved",
1291 ":rtc_base_tests_utils",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001292 "../system_wrappers:field_trial",
1293 "../system_wrappers:metrics",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001294 "../test:field_trial",
1295 "../test:test_support",
1296 ]
1297
1298 public_deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001299 "//testing/gtest",
1300 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001301 }
1302
1303 rtc_source_set("rtc_base_nonparallel_tests") {
1304 testonly = true
1305
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001306 sources = [
1307 "cpu_time_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001308 "file_rotating_stream_unittest.cc",
1309 "null_socket_server_unittest.cc",
1310 "physical_socket_server_unittest.cc",
1311 "socket_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001312 "socket_unittest.cc",
1313 "socket_unittest.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001314 ]
1315 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001316 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001317 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001318 ":rtc_base",
1319 ":rtc_base_tests_main",
1320 ":rtc_base_tests_utils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001321 ":testclient",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001322 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001323 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001324 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001325 "third_party/sigslot:sigslot",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001326 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001327 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001328 ]
1329 if (is_win) {
Steve Anton10542f22019-01-11 09:11:00 -08001330 sources += [ "win32_socket_server_unittest.cc" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001331 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001332 }
1333
1334 rtc_source_set("rtc_base_approved_unittests") {
1335 testonly = true
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001336 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001337 "atomic_ops_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001338 "base64_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001339 "bind_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001340 "bit_buffer_unittest.cc",
1341 "bitrate_allocation_strategy_unittest.cc",
1342 "buffer_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001343 "buffer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001344 "byte_buffer_unittest.cc",
1345 "byte_order_unittest.cc",
1346 "copy_on_write_buffer_unittest.cc",
1347 "critical_section_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001348 "event_tracer_unittest.cc",
1349 "event_unittest.cc",
1350 "file_unittest.cc",
1351 "function_view_unittest.cc",
1352 "logging_unittest.cc",
Karl Wiberg65c39222017-11-22 12:25:14 +01001353 "numerics/histogram_percentile_counter_unittest.cc",
1354 "numerics/mod_ops_unittest.cc",
1355 "numerics/moving_max_counter_unittest.cc",
Karl Wiberge40468b2017-11-22 10:42:26 +01001356 "numerics/safe_compare_unittest.cc",
1357 "numerics/safe_minmax_unittest.cc",
Ilya Nikolaevskiy0beed5d2018-05-22 10:54:30 +02001358 "numerics/sample_counter_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001359 "one_time_event_unittest.cc",
Artem Titove62f6002018-03-19 15:40:00 +01001360 "platform_file_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001361 "platform_thread_unittest.cc",
1362 "random_unittest.cc",
1363 "rate_limiter_unittest.cc",
1364 "rate_statistics_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001365 "rate_tracker_unittest.cc",
1366 "ref_counted_object_unittest.cc",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001367 "sanitizer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001368 "string_encode_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001369 "string_to_number_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001370 "string_utils_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001371 "stringize_macros_unittest.cc",
Tommifef05002018-02-27 13:51:08 +01001372 "strings/string_builder_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001373 "swap_queue_unittest.cc",
1374 "thread_annotations_unittest.cc",
1375 "thread_checker_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001376 "time_utils_unittest.cc",
1377 "timestamp_aligner_unittest.cc",
1378 "virtual_socket_unittest.cc",
Joachim Bauch5b32f232018-03-07 20:02:26 +01001379 "zero_memory_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001380 ]
henrika3ca48a62018-05-21 13:34:51 +02001381 if (is_win) {
1382 sources += [ "win/windows_version_unittest.cc" ]
1383 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001384 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001385 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001386 ":gunit_helpers",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001387 ":rate_limiter",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001388 ":rtc_base",
1389 ":rtc_base_approved",
1390 ":rtc_base_tests_main",
1391 ":rtc_base_tests_utils",
1392 ":rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001393 ":safe_compare",
Karl Wiberg12edf4c2018-03-07 14:18:56 +01001394 ":safe_minmax",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001395 ":sanitizer",
Patrik Höglund3e113432017-12-15 14:40:10 +01001396 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001397 ":testclient",
kwiberg529662a2017-09-04 05:43:17 -07001398 "../api:array_view",
Yves Gerey3e707812018-11-28 16:47:49 +01001399 "../api/units:time_delta",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001400 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001401 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001402 "../test:test_support",
Karl Wiberg29e7bee2018-03-22 14:11:52 +01001403 "memory:unittests",
Artem Titova76af0c2018-07-23 17:38:12 +02001404 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +01001405 "third_party/sigslot:sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001406 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001407 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001408 }
1409
1410 rtc_source_set("rtc_task_queue_unittests") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001411 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001412 testonly = true
1413
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001414 sources = [
1415 "task_queue_unittest.cc",
1416 ]
1417 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001418 ":gunit_helpers",
mbonadei95c8f652017-08-27 23:40:10 -07001419 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001420 ":rtc_base_tests_main",
1421 ":rtc_base_tests_utils",
1422 ":rtc_task_queue",
Tommi68561562018-02-13 19:47:50 +01001423 ":rtc_task_queue_for_test",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001424 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001425 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001426 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001427 }
1428
1429 rtc_source_set("sequenced_task_checker_unittests") {
1430 testonly = true
1431
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001432 sources = [
1433 "sequenced_task_checker_unittest.cc",
1434 ]
1435 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001436 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001437 ":rtc_base_approved",
1438 ":rtc_base_tests_main",
1439 ":rtc_task_queue",
1440 ":sequenced_task_checker",
1441 "../test:test_support",
1442 ]
1443 }
1444
1445 rtc_source_set("weak_ptr_unittests") {
1446 testonly = true
1447
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001448 sources = [
1449 "weak_ptr_unittest.cc",
1450 ]
1451 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001452 ":gunit_helpers",
Mirko Bonadeica270912018-10-10 15:51:03 +02001453 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001454 ":rtc_base_tests_main",
1455 ":rtc_base_tests_utils",
Tommi8d2c5a82018-03-19 11:12:48 +01001456 ":rtc_event",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001457 ":rtc_task_queue",
1458 ":weak_ptr",
1459 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001460 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001461 ]
1462 }
1463
1464 rtc_source_set("rtc_numerics_unittests") {
1465 testonly = true
1466
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001467 sources = [
1468 "numerics/exp_filter_unittest.cc",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +01001469 "numerics/moving_average_unittest.cc",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +01001470 "numerics/moving_median_filter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001471 "numerics/percentile_filter_unittest.cc",
Artem Titove4ed6ea2019-01-11 11:02:19 +01001472 "numerics/samples_stats_counter_unittest.cc",
Bjorn Tereliusa194e582017-10-25 13:07:09 +02001473 "numerics/sequence_number_util_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001474 ]
1475 deps = [
1476 ":rtc_base_approved",
1477 ":rtc_base_tests_main",
1478 ":rtc_numerics",
1479 "../test:test_support",
1480 ]
1481 }
1482
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001483 rtc_source_set("rtc_json_unittests") {
1484 testonly = true
1485
1486 sources = [
1487 "strings/json_unittest.cc",
1488 ]
1489 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001490 ":gunit_helpers",
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001491 ":rtc_base_tests_main",
1492 ":rtc_base_tests_utils",
1493 ":rtc_json",
1494 "../test:test_support",
1495 ]
1496 }
1497
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001498 rtc_source_set("rtc_base_unittests") {
1499 testonly = true
Benjamin Wrightd6f86e82018-05-08 13:12:25 -07001500 defines = []
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001501
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001502 sources = [
1503 "callback_unittest.cc",
1504 "crc32_unittest.cc",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +01001505 "data_rate_limiter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001506 "helpers_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001507 "ip_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001508 "memory_usage_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001509 "message_digest_unittest.cc",
1510 "message_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001511 "nat_unittest.cc",
1512 "network_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001513 "proxy_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001514 "rolling_accumulator_unittest.cc",
1515 "rtc_certificate_generator_unittest.cc",
1516 "rtc_certificate_unittest.cc",
1517 "signal_thread_unittest.cc",
1518 "sigslot_tester_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001519 "stream_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001520 "test_client_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001521 "thread_unittest.cc",
1522 ]
1523 if (is_win) {
1524 sources += [
1525 "win32_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001526 "win32_window_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001527 ]
1528 }
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001529 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001530 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001531 "openssl_adapter_unittest.cc",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -07001532 "openssl_key_derivation_hkdf_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001533 "openssl_session_cache_unittest.cc",
1534 "openssl_utility_unittest.cc",
1535 "ssl_adapter_unittest.cc",
1536 "ssl_identity_unittest.cc",
1537 "ssl_stream_adapter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001538 ]
1539 }
1540 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001541 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001542 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001543 ":rtc_base_tests_main",
1544 ":rtc_base_tests_utils",
Patrik Höglund3e113432017-12-15 14:40:10 +01001545 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001546 ":testclient",
Joachim Bauch58daf402017-12-21 22:00:34 +01001547 "../api:array_view",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001548 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001549 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001550 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001551 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +02001552 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001553 ]
1554 public_deps = [
1555 ":rtc_base",
1556 ]
Diogo Real1dca9d52017-08-29 12:18:32 -07001557 if (build_with_chromium) {
1558 include_dirs = [ "../../boringssl/src/include" ]
1559 }
1560 if (rtc_build_ssl) {
1561 deps += [ "//third_party/boringssl" ]
1562 } else {
1563 configs += [ ":external_ssl_library" ]
1564 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001565 }
1566}
1567
Henrik Kjellander73e21802017-06-20 08:38:58 +02001568if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +00001569 rtc_android_library("base_java") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001570 java_files = [
1571 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 14:31:38 +02001572 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001573 "java/src/org/webrtc/Logging.java",
1574 "java/src/org/webrtc/Size.java",
1575 "java/src/org/webrtc/ThreadUtils.java",
1576 ]
Artem Titarenko69540f42018-12-10 12:30:46 +01001577 deps = [
1578 "//third_party/android_deps:android_support_annotations_java",
1579 ]
Henrik Kjellander73e21802017-06-20 08:38:58 +02001580 }
1581}