blob: 0ac661054afa69dfe44e9ef34d02cbe97145f6a4 [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",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200536 "system:rtc_export",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200537 "//third_party/abseil-cpp/absl/memory",
perkj650fdae2017-08-25 05:00:11 -0700538 ]
539}
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200540
Danil Chapovalova10d1642018-08-31 13:47:59 +0200541rtc_source_set("rtc_cancelable_task") {
542 sources = [
543 "cancelable_periodic_task.h",
544 "cancelable_task_handle.cc",
545 "cancelable_task_handle.h",
546 ]
547 deps = [
548 ":checks",
549 ":logging",
550 ":macromagic",
551 ":ptr_util",
552 ":refcount",
553 ":rtc_task_queue",
554 ":safe_conversions",
555 ":sequenced_task_checker",
556 ":thread_checker",
557 "//third_party/abseil-cpp/absl/memory",
558 ]
559}
560
Tommi8d2c5a82018-03-19 11:12:48 +0100561if (rtc_enable_libevent) {
562 rtc_source_set("rtc_task_queue_libevent") {
563 visibility = [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700564 sources = [
Niels Möller15c9cf72017-10-19 12:38:09 +0200565 "task_queue_libevent.cc",
566 "task_queue_posix.cc",
567 "task_queue_posix.h",
perkj650fdae2017-08-25 05:00:11 -0700568 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100569 deps = [
570 ":checks",
571 ":criticalsection",
572 ":logging",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200573 ":macromagic",
Tommi8d2c5a82018-03-19 11:12:48 +0100574 ":platform_thread",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200575 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100576 ":ptr_util",
577 ":refcount",
578 ":rtc_task_queue_api",
579 ":safe_conversions",
580 ":timeutils",
Niels Möllera12c42a2018-07-25 16:05:48 +0200581 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100582 ]
583 if (rtc_build_libevent) {
584 deps += [ "//base/third_party/libevent" ]
585 }
586 }
587}
588
589if (is_mac || is_ios) {
590 rtc_source_set("rtc_task_queue_gcd") {
591 visibility = [ ":rtc_task_queue_impl" ]
592 sources = [
593 "task_queue_gcd.cc",
594 "task_queue_posix.cc",
595 "task_queue_posix.h",
596 ]
597 deps = [
598 ":checks",
599 ":logging",
600 ":ptr_util",
601 ":refcount",
602 ":rtc_task_queue_api",
603 ]
604 }
605}
606
607if (is_win) {
608 rtc_source_set("rtc_task_queue_win") {
609 visibility = [ ":rtc_task_queue_impl" ]
610 sources = [
611 "task_queue_win.cc",
612 ]
613 deps = [
614 ":checks",
615 ":criticalsection",
616 ":logging",
617 ":macromagic",
618 ":platform_thread",
619 ":ptr_util",
620 ":refcount",
621 ":rtc_event",
622 ":rtc_task_queue_api",
623 ":safe_conversions",
624 ":timeutils",
625 ]
626 }
627}
628
Robin Raymond22027b92018-11-23 09:07:50 -0500629rtc_source_set("rtc_task_queue_stdlib") {
630 visibility = [ ":rtc_task_queue_impl" ]
631 sources = [
632 "task_queue_stdlib.cc",
633 ]
634 deps = [
635 ":checks",
636 ":criticalsection",
637 ":logging",
638 ":macromagic",
639 ":platform_thread",
640 ":ptr_util",
641 ":refcount",
642 ":rtc_event",
643 ":rtc_task_queue_api",
644 ":safe_conversions",
645 ":timeutils",
646 ]
647}
648
Tommi8d2c5a82018-03-19 11:12:48 +0100649rtc_source_set("rtc_task_queue_impl") {
650 visibility = [ "*" ]
651 if (rtc_enable_libevent) {
652 deps = [
653 ":rtc_task_queue_libevent",
654 ]
perkj650fdae2017-08-25 05:00:11 -0700655 } else {
Niels Möller15c9cf72017-10-19 12:38:09 +0200656 if (is_mac || is_ios) {
Tommi8d2c5a82018-03-19 11:12:48 +0100657 deps = [
658 ":rtc_task_queue_gcd",
Niels Möller17a04742017-09-27 10:53:21 +0200659 ]
Niels Möller15c9cf72017-10-19 12:38:09 +0200660 }
661 if (is_win) {
Robin Raymond22027b92018-11-23 09:07:50 -0500662 if (current_os == "winuwp") {
663 deps = [
664 ":rtc_task_queue_stdlib",
665 ]
666 } else {
667 deps = [
668 ":rtc_task_queue_win",
669 ]
670 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200671 }
672 }
673}
674
Tommi8d2c5a82018-03-19 11:12:48 +0100675rtc_source_set("sequenced_task_checker") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200676 sources = [
677 "sequenced_task_checker.h",
678 "sequenced_task_checker_impl.cc",
679 "sequenced_task_checker_impl.h",
680 ]
681 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100682 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100683 ":criticalsection",
684 ":macromagic",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200685 ":rtc_task_queue",
Tommi8d2c5a82018-03-19 11:12:48 +0100686 ":thread_checker",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200687 ]
688}
689
690rtc_static_library("weak_ptr") {
691 sources = [
692 "weak_ptr.cc",
693 "weak_ptr.h",
694 ]
695 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100696 ":ptr_util",
697 ":refcount",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200698 ":sequenced_task_checker",
699 ]
700}
701
702rtc_static_library("rtc_numerics") {
703 sources = [
704 "numerics/exp_filter.cc",
705 "numerics/exp_filter.h",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +0100706 "numerics/moving_average.cc",
707 "numerics/moving_average.h",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +0100708 "numerics/moving_median_filter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200709 "numerics/percentile_filter.h",
Artem Titove4ed6ea2019-01-11 11:02:19 +0100710 "numerics/samples_stats_counter.cc",
711 "numerics/samples_stats_counter.h",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200712 "numerics/sequence_number_util.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200713 ]
714 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100715 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200716 ":rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100717 ":safe_compare",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200718 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200719 ]
720}
721
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200722rtc_source_set("rtc_json") {
723 defines = []
724 sources = [
Sam Zackrissonb45bdb52018-10-02 16:25:59 +0200725 "strings/json.cc",
726 "strings/json.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200727 ]
Jonas Olsson941a07c2018-09-13 10:07:07 +0200728 deps = [
729 ":stringutils",
730 ]
Mirko Bonadeia0e29fc2018-01-26 16:50:02 +0100731 all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200732 if (rtc_build_json) {
733 public_deps = [
734 "//third_party/jsoncpp",
735 ]
736 } else {
737 include_dirs = [ "$rtc_jsoncpp_root" ]
738
739 # When defined changes the include path for json.h to where it is
740 # expected to be when building json outside of the standalone build.
741 defines += [ "WEBRTC_EXTERNAL_JSON" ]
742 }
743}
744
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100745rtc_source_set("nethelpers") {
746 # 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 # "net_helpers.cc",
750 # "net_helpers.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100751 # ]
752}
753
754rtc_source_set("asyncresolverinterface") {
755 # 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 # "async_resolver_interface.cc",
759 # "async_resolver_interface.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100760 # ]
761}
762
763rtc_source_set("ipaddress") {
764 # 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 # "ip_address.cc",
768 # "ip_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100769 # ]
770}
771
772rtc_source_set("socketaddress") {
773 # 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_address.cc",
777 # "socket_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100778 # ]
779}
780
781rtc_source_set("nullsocketserver") {
782 # TODO(bugs.webrtc.org/9987): This build target will soon contain
783 # the following files:
784 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800785 # "null_socket_server.cc",
786 # "null_socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100787 # ]
788}
789
790rtc_source_set("socketserver") {
791 # TODO(bugs.webrtc.org/9987): This build target will soon contain
792 # the following files:
793 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800794 # "socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100795 # ]
796}
797
798rtc_source_set("threading") {
799 # TODO(bugs.webrtc.org/9987): This build target will soon contain
800 # the following files:
801 # sources = [
802 # "asyncresolver.cc",
803 # "asyncresolver.h",
804 # "defaultsocketserver.cc",
805 # "defaultsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800806 # "message_handler.cc",
807 # "message_handler.h",
808 # "message_queue.cc",
809 # "message_queue.h",
810 # "network_monitor.cc",
811 # "network_monitor.h",
812 # "physical_socket_server.cc",
813 # "physical_socket_server.h",
814 # "signal_thread.cc",
815 # "signal_thread.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100816 # "thread.cc",
817 # "thread.h",
818 # ]
819}
820
821rtc_source_set("socketfactory") {
822 # TODO(bugs.webrtc.org/9987): This build target will soon contain
823 # the following files:
824 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800825 # "socket_factory.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100826 # ]
827}
828
829rtc_source_set("asyncsocket") {
830 # TODO(bugs.webrtc.org/9987): This build target will soon contain
831 # the following files:
832 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800833 # "async_socket.cc",
834 # "async_socket.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100835 # ]
836}
837
838rtc_source_set("socket") {
839 # TODO(bugs.webrtc.org/9987): This build target will soon contain
840 # the following files:
841 # sources = [
842 # "socket.cc",
843 # "socket.h",
844 # ]
845}
846
847rtc_source_set("network_constants") {
848 # TODO(bugs.webrtc.org/9987): This build target will soon contain
849 # the following files:
850 # sources = [
851 # "network_constants.h",
852 # ]
853}
854
855if (is_android) {
856 rtc_source_set("ifaddrs_android") {
857 # TODO(bugs.webrtc.org/9987): This build target will soon contain
858 # the following files:
859 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800860 # "ifaddrs_android.cc",
861 # "ifaddrs_android.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100862 # ]
863 }
864}
865
866if (is_win) {
867 rtc_source_set("win32") {
868 # TODO(bugs.webrtc.org/9987): This build target will soon contain
869 # the following files:
870 # sources = [
871 # "win32.cc",
872 # "win32.h",
873 # ]
874 }
875}
876
mbonadei9c5e5112017-09-05 05:17:02 -0700877rtc_static_library("rtc_base") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000878 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200879 cflags = []
880 cflags_cc = []
881 libs = []
882 defines = []
883 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100884 ":checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100885 ":stringutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200886 "..:webrtc_common",
Joachim Bauch58daf402017-12-21 22:00:34 +0100887 "../api:array_view",
Sebastian Janssone07864e2018-10-15 09:28:15 +0200888 "network:sent_packet",
Artem Titova76af0c2018-07-23 17:38:12 +0200889 "third_party/base64",
Artem Titove41c4332018-07-25 15:04:28 +0200890 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200891 "//third_party/abseil-cpp/absl/memory",
Niels Möller3c7d5992018-10-19 15:29:54 +0200892 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200893 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200894 ]
895 public_deps = [
896 ":rtc_base_approved",
897 ]
898 public_configs = []
899
900 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
901
902 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800903 "async_invoker.cc",
904 "async_invoker.h",
905 "async_invoker_inl.h",
906 "async_packet_socket.cc",
907 "async_packet_socket.h",
908 "async_resolver_interface.cc",
909 "async_resolver_interface.h",
910 "async_socket.cc",
911 "async_socket.h",
912 "async_tcp_socket.cc",
913 "async_tcp_socket.h",
914 "async_udp_socket.cc",
915 "async_udp_socket.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800916 "asyncinvoker-inl.h",
917 "asyncinvoker.h",
918 "asyncpacketsocket.h",
919 "asyncresolverinterface.h",
920 "asyncsocket.h",
921 "asynctcpsocket.h",
922 "asyncudpsocket.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200923 "crc32.cc",
924 "crc32.h",
Steve Anton10542f22019-01-11 09:11:00 -0800925 "crypt_string.cc",
926 "crypt_string.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800927 "cryptstring.h",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +0100928 "data_rate_limiter.cc",
929 "data_rate_limiter.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100930 "dscp.h",
Steve Anton10542f22019-01-11 09:11:00 -0800931 "file_rotating_stream.cc",
932 "file_rotating_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800933 "filerotatingstream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200934 "gunit_prod.h",
935 "helpers.cc",
936 "helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -0800937 "http_common.cc",
938 "http_common.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800939 "httpcommon.h",
Steve Anton10542f22019-01-11 09:11:00 -0800940 "ip_address.cc",
941 "ip_address.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800942 "ipaddress.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100943 "keep_ref_until_done.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700944 "key_derivation.cc",
945 "key_derivation.h",
Qingsi Wang09619332018-09-12 22:51:55 -0700946 "mdns_responder_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800947 "message_digest.cc",
948 "message_digest.h",
949 "message_handler.cc",
950 "message_handler.h",
951 "message_queue.cc",
952 "message_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800953 "messagedigest.h",
954 "messagehandler.h",
955 "messagequeue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800956 "net_helper.cc",
957 "net_helper.h",
958 "net_helpers.cc",
959 "net_helpers.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800960 "nethelper.h",
961 "nethelpers.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200962 "network.cc",
963 "network.h",
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200964 "network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -0800965 "network_monitor.cc",
966 "network_monitor.h",
967 "network_route.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800968 "networkmonitor.h",
969 "networkroute.h",
Steve Anton10542f22019-01-11 09:11:00 -0800970 "null_socket_server.cc",
971 "null_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800972 "nullsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200973 "openssl.h",
Steve Anton10542f22019-01-11 09:11:00 -0800974 "openssl_adapter.cc",
975 "openssl_adapter.h",
976 "openssl_certificate.cc",
977 "openssl_certificate.h",
978 "openssl_digest.cc",
979 "openssl_digest.h",
980 "openssl_identity.cc",
981 "openssl_identity.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700982 "openssl_key_derivation_hkdf.cc",
983 "openssl_key_derivation_hkdf.h",
Steve Anton10542f22019-01-11 09:11:00 -0800984 "openssl_session_cache.cc",
985 "openssl_session_cache.h",
986 "openssl_stream_adapter.cc",
987 "openssl_stream_adapter.h",
988 "openssl_utility.cc",
989 "openssl_utility.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800990 "openssladapter.h",
991 "opensslcertificate.h",
992 "openssldigest.h",
993 "opensslidentity.h",
994 "opensslsessioncache.h",
995 "opensslstreamadapter.h",
996 "opensslutility.h",
Steve Anton10542f22019-01-11 09:11:00 -0800997 "physical_socket_server.cc",
998 "physical_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800999 "physicalsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001000 "proxy_info.cc",
1001 "proxy_info.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001002 "proxyinfo.h",
Steve Anton10542f22019-01-11 09:11:00 -08001003 "rtc_certificate.cc",
1004 "rtc_certificate.h",
1005 "rtc_certificate_generator.cc",
1006 "rtc_certificate_generator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001007 "rtccertificate.h",
1008 "rtccertificategenerator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001009 "signal_thread.cc",
1010 "signal_thread.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001011 "signalthread.h",
Steve Anton10542f22019-01-11 09:11:00 -08001012 "sigslot_repeater.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001013 "sigslotrepeater.h",
Qingsi Wang6e641e62018-04-11 20:14:17 -07001014 "socket.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001015 "socket.h",
Steve Anton10542f22019-01-11 09:11:00 -08001016 "socket_adapters.cc",
1017 "socket_adapters.h",
1018 "socket_address.cc",
1019 "socket_address.h",
1020 "socket_address_pair.cc",
1021 "socket_address_pair.h",
1022 "socket_factory.h",
1023 "socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001024 "socketadapters.h",
1025 "socketaddress.h",
1026 "socketaddresspair.h",
1027 "socketfactory.h",
1028 "socketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001029 "ssl_adapter.cc",
1030 "ssl_adapter.h",
1031 "ssl_certificate.cc",
1032 "ssl_certificate.h",
1033 "ssl_fingerprint.cc",
1034 "ssl_fingerprint.h",
1035 "ssl_identity.cc",
1036 "ssl_identity.h",
1037 "ssl_stream_adapter.cc",
1038 "ssl_stream_adapter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001039 "ssladapter.h",
1040 "sslcertificate.h",
1041 "sslfingerprint.h",
1042 "sslidentity.h",
1043 "sslstreamadapter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001044 "stream.cc",
1045 "stream.h",
1046 "thread.cc",
1047 "thread.h",
1048 ]
1049
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001050 if (build_with_chromium) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001051 include_dirs = [ "../../boringssl/src/include" ]
1052 public_configs += [ ":rtc_base_chromium_config" ]
1053 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001054 sources += [
1055 "callback.h",
Steve Anton10542f22019-01-11 09:11:00 -08001056 "log_sinks.cc",
1057 "log_sinks.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001058 "logsinks.h",
Steve Anton10542f22019-01-11 09:11:00 -08001059 "numerics/math_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001060 "numerics/mathutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001061 "rolling_accumulator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001062 "rollingaccumulator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001063 "ssl_roots.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001064 "sslroots.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001065 ]
1066
1067 if (is_win) {
Steve Antonaec15aa2019-01-11 09:13:07 -08001068 sources += [
1069 "win32_socket_init.h",
1070 "win32socketinit.h",
1071 ]
Robin Raymondce1b1402018-11-22 20:10:11 -05001072 if (current_os != "winuwp") {
1073 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001074 "win32_socket_server.cc",
1075 "win32_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001076 "win32socketserver.h",
Robin Raymondce1b1402018-11-22 20:10:11 -05001077 ]
1078 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001079 }
1080 } # !build_with_chromium
1081
1082 if (rtc_build_ssl) {
1083 deps += [ "//third_party/boringssl" ]
Dan Minor9cdd8762018-01-16 10:40:39 -05001084 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001085 configs += [ ":external_ssl_library" ]
1086 }
1087
1088 if (is_android) {
1089 sources += [
Steve Antonaec15aa2019-01-11 09:13:07 -08001090 "ifaddrs-android.h",
Steve Anton10542f22019-01-11 09:11:00 -08001091 "ifaddrs_android.cc",
1092 "ifaddrs_android.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001093 ]
1094
1095 libs += [
1096 "log",
1097 "GLESv2",
1098 ]
1099 }
1100
1101 if (is_ios || is_mac) {
Steve Anton10542f22019-01-11 09:11:00 -08001102 sources += [ "mac_ifaddrs_converter.cc" ]
Kári Tristan Helgason62b13452018-10-12 12:57:49 +02001103 deps += [ "system:cocoa_threading" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001104 }
1105
Joachim Bauch75f18fc2017-12-20 21:25:47 +01001106 if (rtc_use_x11) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001107 libs += [
1108 "dl",
1109 "rt",
1110 "Xext",
1111 "X11",
1112 "Xcomposite",
1113 "Xrender",
1114 ]
1115 }
1116
1117 if (is_linux) {
1118 libs += [
1119 "dl",
1120 "rt",
1121 ]
1122 }
1123
1124 if (is_mac) {
1125 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001126 "mac_utils.cc",
1127 "mac_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001128 "macutils.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001129 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001130 }
1131
1132 if (is_win) {
1133 sources += [
1134 "win32.cc",
1135 "win32.h",
Steve Anton10542f22019-01-11 09:11:00 -08001136 "win32_window.cc",
1137 "win32_window.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001138 "win32window.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001139 ]
1140
1141 libs += [
1142 "crypt32.lib",
1143 "iphlpapi.lib",
1144 "secur32.lib",
1145 ]
1146
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001147 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
1148 }
1149
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001150 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001151 sources += [
1152 "ifaddrs_converter.cc",
1153 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001154 ]
1155 }
1156
1157 if (is_nacl) {
1158 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
1159 defines += [ "timezone=_timezone" ]
1160 sources -= [ "ifaddrs_converter.cc" ]
1161 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001162}
1163
1164rtc_source_set("gtest_prod") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001165 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001166 sources = [
1167 "gtest_prod_util.h",
1168 ]
1169}
1170
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001171rtc_source_set("gunit_helpers") {
1172 testonly = true
1173 sources = [
1174 "gunit.cc",
1175 "gunit.h",
1176 ]
1177 deps = [
1178 ":logging",
1179 ":rtc_base",
1180 ":rtc_base_tests_utils",
1181 ":stringutils",
1182 "../test:test_support",
Steve Anton68586e82018-12-13 17:41:25 -08001183 "//third_party/abseil-cpp/absl/strings",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001184 ]
1185}
1186
1187rtc_source_set("testclient") {
1188 testonly = true
1189 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001190 "test_client.cc",
1191 "test_client.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001192 "testclient.h",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001193 ]
1194 deps = [
1195 ":criticalsection",
1196 ":gunit_helpers",
1197 ":macromagic",
1198 ":rtc_base",
1199 ":rtc_base_tests_utils",
1200 ":timeutils",
Yves Gerey3e707812018-11-28 16:47:49 +01001201 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001202 ]
1203}
1204
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001205rtc_source_set("rtc_base_tests_utils") {
1206 testonly = true
1207 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001208 "cpu_time.cc",
1209 "cpu_time.h",
Steve Anton10542f22019-01-11 09:11:00 -08001210 "fake_clock.cc",
1211 "fake_clock.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001212 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 09:11:00 -08001213 "fake_network.h",
1214 "fake_ssl_identity.cc",
1215 "fake_ssl_identity.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001216 "fakeclock.h",
1217 "fakenetwork.h",
1218 "fakesslidentity.h",
Steve Anton10542f22019-01-11 09:11:00 -08001219 "firewall_socket_server.cc",
1220 "firewall_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001221 "firewallsocketserver.h",
Niels Möllere7547d52018-11-01 09:33:08 +01001222 "memory_stream.cc",
1223 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001224 "memory_usage.cc",
1225 "memory_usage.h",
Steve Anton10542f22019-01-11 09:11:00 -08001226 "nat_server.cc",
1227 "nat_server.h",
1228 "nat_socket_factory.cc",
1229 "nat_socket_factory.h",
1230 "nat_types.cc",
1231 "nat_types.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001232 "natserver.h",
1233 "natsocketfactory.h",
1234 "nattypes.h",
Steve Anton10542f22019-01-11 09:11:00 -08001235 "proxy_server.cc",
1236 "proxy_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001237 "proxyserver.h",
Niels Möller44153152018-12-17 14:04:05 +01001238 "server_socket_adapters.cc",
1239 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001240 "sigslot_tester.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001241 "sigslottester.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001242 "sigslottester.h.pump",
Steve Anton10542f22019-01-11 09:11:00 -08001243 "socket_stream.cc",
1244 "socket_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001245 "socketstream.h",
Steve Anton10542f22019-01-11 09:11:00 -08001246 "test_base64.h",
1247 "test_certificate_verifier.h",
1248 "test_echo_server.cc",
1249 "test_echo_server.h",
1250 "test_utils.cc",
1251 "test_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001252 "testbase64.h",
1253 "testcertificateverifier.h",
1254 "testechoserver.h",
1255 "testutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001256 "virtual_socket_server.cc",
1257 "virtual_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001258 "virtualsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001259 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001260 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001261 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001262 ":rtc_base",
Sebastian Jansson5f83cf02018-05-08 14:52:22 +02001263 "../api/units:time_delta",
Artem Titove41c4332018-07-25 15:04:28 +02001264 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001265 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001266 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001267}
1268
Tommida8781f2018-02-19 12:41:43 +01001269rtc_source_set("rtc_task_queue_for_test") {
1270 visibility = [ "*" ]
1271 testonly = true
1272
1273 sources = [
1274 "task_queue_for_test.cc",
1275 "task_queue_for_test.h",
1276 ]
1277 deps = [
1278 ":checks",
1279 ":rtc_base_approved",
1280 ":rtc_task_queue",
1281 ]
1282}
1283
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001284if (rtc_include_tests) {
Artem Titove41c4332018-07-25 15:04:28 +02001285 rtc_source_set("sigslot_unittest") {
1286 testonly = true
1287 sources = [
1288 "sigslot_unittest.cc",
1289 ]
1290 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001291 ":gunit_helpers",
Artem Titove41c4332018-07-25 15:04:28 +02001292 ":rtc_base",
1293 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 16:47:49 +01001294 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001295 "third_party/sigslot",
1296 ]
1297 }
1298
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001299 rtc_source_set("rtc_base_tests_main") {
1300 testonly = true
1301 sources = [
1302 "unittest_main.cc",
1303 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001304 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001305 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001306 ":rtc_base",
1307 ":rtc_base_approved",
1308 ":rtc_base_tests_utils",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001309 "../system_wrappers:field_trial",
1310 "../system_wrappers:metrics",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001311 "../test:field_trial",
1312 "../test:test_support",
1313 ]
1314
1315 public_deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001316 "//testing/gtest",
1317 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001318 }
1319
1320 rtc_source_set("rtc_base_nonparallel_tests") {
1321 testonly = true
1322
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001323 sources = [
1324 "cpu_time_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001325 "file_rotating_stream_unittest.cc",
1326 "null_socket_server_unittest.cc",
1327 "physical_socket_server_unittest.cc",
1328 "socket_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001329 "socket_unittest.cc",
1330 "socket_unittest.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001331 ]
1332 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001333 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001334 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001335 ":rtc_base",
1336 ":rtc_base_tests_main",
1337 ":rtc_base_tests_utils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001338 ":testclient",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001339 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001340 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001341 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001342 "third_party/sigslot:sigslot",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001343 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001344 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001345 ]
1346 if (is_win) {
Steve Anton10542f22019-01-11 09:11:00 -08001347 sources += [ "win32_socket_server_unittest.cc" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001348 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001349 }
1350
1351 rtc_source_set("rtc_base_approved_unittests") {
1352 testonly = true
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001353 if (is_msan) {
1354 cflags = [ "-fsanitize=memory" ]
1355 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001356 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001357 "atomic_ops_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001358 "base64_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001359 "bind_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001360 "bit_buffer_unittest.cc",
1361 "bitrate_allocation_strategy_unittest.cc",
1362 "buffer_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001363 "buffer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001364 "byte_buffer_unittest.cc",
1365 "byte_order_unittest.cc",
1366 "copy_on_write_buffer_unittest.cc",
1367 "critical_section_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001368 "event_tracer_unittest.cc",
1369 "event_unittest.cc",
1370 "file_unittest.cc",
1371 "function_view_unittest.cc",
1372 "logging_unittest.cc",
Karl Wiberg65c39222017-11-22 12:25:14 +01001373 "numerics/histogram_percentile_counter_unittest.cc",
1374 "numerics/mod_ops_unittest.cc",
1375 "numerics/moving_max_counter_unittest.cc",
Karl Wiberge40468b2017-11-22 10:42:26 +01001376 "numerics/safe_compare_unittest.cc",
1377 "numerics/safe_minmax_unittest.cc",
Ilya Nikolaevskiy0beed5d2018-05-22 10:54:30 +02001378 "numerics/sample_counter_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001379 "one_time_event_unittest.cc",
Artem Titove62f6002018-03-19 15:40:00 +01001380 "platform_file_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001381 "platform_thread_unittest.cc",
1382 "random_unittest.cc",
1383 "rate_limiter_unittest.cc",
1384 "rate_statistics_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001385 "rate_tracker_unittest.cc",
1386 "ref_counted_object_unittest.cc",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001387 "sanitizer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001388 "string_encode_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001389 "string_to_number_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001390 "string_utils_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001391 "stringize_macros_unittest.cc",
Tommifef05002018-02-27 13:51:08 +01001392 "strings/string_builder_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001393 "swap_queue_unittest.cc",
1394 "thread_annotations_unittest.cc",
1395 "thread_checker_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001396 "time_utils_unittest.cc",
1397 "timestamp_aligner_unittest.cc",
1398 "virtual_socket_unittest.cc",
Joachim Bauch5b32f232018-03-07 20:02:26 +01001399 "zero_memory_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001400 ]
henrika3ca48a62018-05-21 13:34:51 +02001401 if (is_win) {
1402 sources += [ "win/windows_version_unittest.cc" ]
1403 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001404 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001405 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001406 ":gunit_helpers",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001407 ":rate_limiter",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001408 ":rtc_base",
1409 ":rtc_base_approved",
1410 ":rtc_base_tests_main",
1411 ":rtc_base_tests_utils",
1412 ":rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001413 ":safe_compare",
Karl Wiberg12edf4c2018-03-07 14:18:56 +01001414 ":safe_minmax",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001415 ":sanitizer",
Patrik Höglund3e113432017-12-15 14:40:10 +01001416 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001417 ":testclient",
kwiberg529662a2017-09-04 05:43:17 -07001418 "../api:array_view",
Yves Gerey3e707812018-11-28 16:47:49 +01001419 "../api/units:time_delta",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001420 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001421 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001422 "../test:test_support",
Karl Wiberg29e7bee2018-03-22 14:11:52 +01001423 "memory:unittests",
Artem Titova76af0c2018-07-23 17:38:12 +02001424 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +01001425 "third_party/sigslot:sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001426 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001427 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001428 }
1429
1430 rtc_source_set("rtc_task_queue_unittests") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001431 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001432 testonly = true
1433
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001434 sources = [
Danil Chapovalova10d1642018-08-31 13:47:59 +02001435 "cancelable_periodic_task_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001436 "task_queue_unittest.cc",
1437 ]
1438 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001439 ":gunit_helpers",
mbonadei95c8f652017-08-27 23:40:10 -07001440 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001441 ":rtc_base_tests_main",
1442 ":rtc_base_tests_utils",
Danil Chapovalova10d1642018-08-31 13:47:59 +02001443 ":rtc_cancelable_task",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001444 ":rtc_task_queue",
Tommi68561562018-02-13 19:47:50 +01001445 ":rtc_task_queue_for_test",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001446 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001447 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001448 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001449 }
1450
1451 rtc_source_set("sequenced_task_checker_unittests") {
1452 testonly = true
1453
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001454 sources = [
1455 "sequenced_task_checker_unittest.cc",
1456 ]
1457 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001458 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001459 ":rtc_base_approved",
1460 ":rtc_base_tests_main",
1461 ":rtc_task_queue",
1462 ":sequenced_task_checker",
1463 "../test:test_support",
1464 ]
1465 }
1466
1467 rtc_source_set("weak_ptr_unittests") {
1468 testonly = true
1469
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001470 sources = [
1471 "weak_ptr_unittest.cc",
1472 ]
1473 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001474 ":gunit_helpers",
Mirko Bonadeica270912018-10-10 15:51:03 +02001475 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001476 ":rtc_base_tests_main",
1477 ":rtc_base_tests_utils",
Tommi8d2c5a82018-03-19 11:12:48 +01001478 ":rtc_event",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001479 ":rtc_task_queue",
1480 ":weak_ptr",
1481 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001482 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001483 ]
1484 }
1485
1486 rtc_source_set("rtc_numerics_unittests") {
1487 testonly = true
1488
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001489 sources = [
1490 "numerics/exp_filter_unittest.cc",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +01001491 "numerics/moving_average_unittest.cc",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +01001492 "numerics/moving_median_filter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001493 "numerics/percentile_filter_unittest.cc",
Artem Titove4ed6ea2019-01-11 11:02:19 +01001494 "numerics/samples_stats_counter_unittest.cc",
Bjorn Tereliusa194e582017-10-25 13:07:09 +02001495 "numerics/sequence_number_util_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001496 ]
1497 deps = [
1498 ":rtc_base_approved",
1499 ":rtc_base_tests_main",
1500 ":rtc_numerics",
1501 "../test:test_support",
1502 ]
1503 }
1504
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001505 rtc_source_set("rtc_json_unittests") {
1506 testonly = true
1507
1508 sources = [
1509 "strings/json_unittest.cc",
1510 ]
1511 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001512 ":gunit_helpers",
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001513 ":rtc_base_tests_main",
1514 ":rtc_base_tests_utils",
1515 ":rtc_json",
1516 "../test:test_support",
1517 ]
1518 }
1519
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001520 rtc_source_set("rtc_base_unittests") {
1521 testonly = true
Benjamin Wrightd6f86e82018-05-08 13:12:25 -07001522 defines = []
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001523
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001524 sources = [
1525 "callback_unittest.cc",
1526 "crc32_unittest.cc",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +01001527 "data_rate_limiter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001528 "helpers_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001529 "ip_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001530 "memory_usage_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001531 "message_digest_unittest.cc",
1532 "message_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001533 "nat_unittest.cc",
1534 "network_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001535 "proxy_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001536 "rolling_accumulator_unittest.cc",
1537 "rtc_certificate_generator_unittest.cc",
1538 "rtc_certificate_unittest.cc",
1539 "signal_thread_unittest.cc",
1540 "sigslot_tester_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001541 "stream_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001542 "test_client_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001543 "thread_unittest.cc",
1544 ]
1545 if (is_win) {
1546 sources += [
1547 "win32_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001548 "win32_window_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001549 ]
1550 }
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001551 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001552 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001553 "openssl_adapter_unittest.cc",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -07001554 "openssl_key_derivation_hkdf_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001555 "openssl_session_cache_unittest.cc",
1556 "openssl_utility_unittest.cc",
1557 "ssl_adapter_unittest.cc",
1558 "ssl_identity_unittest.cc",
1559 "ssl_stream_adapter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001560 ]
1561 }
1562 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001563 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001564 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001565 ":rtc_base_tests_main",
1566 ":rtc_base_tests_utils",
Patrik Höglund3e113432017-12-15 14:40:10 +01001567 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001568 ":testclient",
Joachim Bauch58daf402017-12-21 22:00:34 +01001569 "../api:array_view",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001570 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001571 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001572 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001573 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +02001574 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001575 ]
1576 public_deps = [
1577 ":rtc_base",
1578 ]
Diogo Real1dca9d52017-08-29 12:18:32 -07001579 if (build_with_chromium) {
1580 include_dirs = [ "../../boringssl/src/include" ]
1581 }
1582 if (rtc_build_ssl) {
1583 deps += [ "//third_party/boringssl" ]
1584 } else {
1585 configs += [ ":external_ssl_library" ]
1586 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001587 }
1588}
1589
Henrik Kjellander73e21802017-06-20 08:38:58 +02001590if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +00001591 rtc_android_library("base_java") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001592 java_files = [
1593 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 14:31:38 +02001594 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001595 "java/src/org/webrtc/Logging.java",
1596 "java/src/org/webrtc/Size.java",
1597 "java/src/org/webrtc/ThreadUtils.java",
1598 ]
Artem Titarenko69540f42018-12-10 12:30:46 +01001599 deps = [
1600 "//third_party/android_deps:android_support_annotations_java",
1601 ]
Henrik Kjellander73e21802017-06-20 08:38:58 +02001602 }
1603}