blob: f4766f5cb5479ccd1737a2946e80a88d4e5cc2dd [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 Wiberg0b6d0e62018-12-06 14:50:45 +0100727rtc_source_set("nethelpers") {
728 # 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
736rtc_source_set("asyncresolverinterface") {
737 # 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
745rtc_source_set("ipaddress") {
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 # "ip_address.cc",
750 # "ip_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100751 # ]
752}
753
754rtc_source_set("socketaddress") {
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 # "socket_address.cc",
759 # "socket_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100760 # ]
761}
762
763rtc_source_set("nullsocketserver") {
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 # "null_socket_server.cc",
768 # "null_socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100769 # ]
770}
771
772rtc_source_set("socketserver") {
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_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
803rtc_source_set("socketfactory") {
804 # 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
811rtc_source_set("asyncsocket") {
812 # 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",
Artem Titova76af0c2018-07-23 17:38:12 +0200871 "third_party/base64",
Artem Titove41c4332018-07-25 15:04:28 +0200872 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200873 "//third_party/abseil-cpp/absl/memory",
Niels Möller3c7d5992018-10-19 15:29:54 +0200874 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200875 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200876 ]
877 public_deps = [
878 ":rtc_base_approved",
879 ]
880 public_configs = []
881
882 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
883
884 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800885 "async_invoker.cc",
886 "async_invoker.h",
887 "async_invoker_inl.h",
888 "async_packet_socket.cc",
889 "async_packet_socket.h",
890 "async_resolver_interface.cc",
891 "async_resolver_interface.h",
892 "async_socket.cc",
893 "async_socket.h",
894 "async_tcp_socket.cc",
895 "async_tcp_socket.h",
896 "async_udp_socket.cc",
897 "async_udp_socket.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800898 "asyncinvoker-inl.h",
899 "asyncinvoker.h",
900 "asyncpacketsocket.h",
901 "asyncresolverinterface.h",
902 "asyncsocket.h",
903 "asynctcpsocket.h",
904 "asyncudpsocket.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200905 "crc32.cc",
906 "crc32.h",
Steve Anton10542f22019-01-11 09:11:00 -0800907 "crypt_string.cc",
908 "crypt_string.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800909 "cryptstring.h",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +0100910 "data_rate_limiter.cc",
911 "data_rate_limiter.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100912 "dscp.h",
Steve Anton10542f22019-01-11 09:11:00 -0800913 "file_rotating_stream.cc",
914 "file_rotating_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800915 "filerotatingstream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200916 "gunit_prod.h",
917 "helpers.cc",
918 "helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -0800919 "http_common.cc",
920 "http_common.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800921 "httpcommon.h",
Steve Anton10542f22019-01-11 09:11:00 -0800922 "ip_address.cc",
923 "ip_address.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800924 "ipaddress.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100925 "keep_ref_until_done.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700926 "key_derivation.cc",
927 "key_derivation.h",
Qingsi Wang09619332018-09-12 22:51:55 -0700928 "mdns_responder_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800929 "message_digest.cc",
930 "message_digest.h",
931 "message_handler.cc",
932 "message_handler.h",
933 "message_queue.cc",
934 "message_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800935 "messagedigest.h",
936 "messagehandler.h",
937 "messagequeue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800938 "net_helper.cc",
939 "net_helper.h",
940 "net_helpers.cc",
941 "net_helpers.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800942 "nethelper.h",
943 "nethelpers.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200944 "network.cc",
945 "network.h",
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200946 "network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -0800947 "network_monitor.cc",
948 "network_monitor.h",
949 "network_route.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800950 "networkmonitor.h",
951 "networkroute.h",
Steve Anton10542f22019-01-11 09:11:00 -0800952 "null_socket_server.cc",
953 "null_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800954 "nullsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200955 "openssl.h",
Steve Anton10542f22019-01-11 09:11:00 -0800956 "openssl_adapter.cc",
957 "openssl_adapter.h",
958 "openssl_certificate.cc",
959 "openssl_certificate.h",
960 "openssl_digest.cc",
961 "openssl_digest.h",
962 "openssl_identity.cc",
963 "openssl_identity.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700964 "openssl_key_derivation_hkdf.cc",
965 "openssl_key_derivation_hkdf.h",
Steve Anton10542f22019-01-11 09:11:00 -0800966 "openssl_session_cache.cc",
967 "openssl_session_cache.h",
968 "openssl_stream_adapter.cc",
969 "openssl_stream_adapter.h",
970 "openssl_utility.cc",
971 "openssl_utility.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800972 "openssladapter.h",
973 "opensslcertificate.h",
974 "openssldigest.h",
975 "opensslidentity.h",
976 "opensslsessioncache.h",
977 "opensslstreamadapter.h",
978 "opensslutility.h",
Steve Anton10542f22019-01-11 09:11:00 -0800979 "physical_socket_server.cc",
980 "physical_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800981 "physicalsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800982 "proxy_info.cc",
983 "proxy_info.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800984 "proxyinfo.h",
Steve Anton10542f22019-01-11 09:11:00 -0800985 "rtc_certificate.cc",
986 "rtc_certificate.h",
987 "rtc_certificate_generator.cc",
988 "rtc_certificate_generator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800989 "rtccertificate.h",
990 "rtccertificategenerator.h",
Steve Anton10542f22019-01-11 09:11:00 -0800991 "signal_thread.cc",
992 "signal_thread.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800993 "signalthread.h",
Steve Anton10542f22019-01-11 09:11:00 -0800994 "sigslot_repeater.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800995 "sigslotrepeater.h",
Qingsi Wang6e641e62018-04-11 20:14:17 -0700996 "socket.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200997 "socket.h",
Steve Anton10542f22019-01-11 09:11:00 -0800998 "socket_adapters.cc",
999 "socket_adapters.h",
1000 "socket_address.cc",
1001 "socket_address.h",
1002 "socket_address_pair.cc",
1003 "socket_address_pair.h",
1004 "socket_factory.h",
1005 "socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001006 "socketadapters.h",
1007 "socketaddress.h",
1008 "socketaddresspair.h",
1009 "socketfactory.h",
1010 "socketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001011 "ssl_adapter.cc",
1012 "ssl_adapter.h",
1013 "ssl_certificate.cc",
1014 "ssl_certificate.h",
1015 "ssl_fingerprint.cc",
1016 "ssl_fingerprint.h",
1017 "ssl_identity.cc",
1018 "ssl_identity.h",
1019 "ssl_stream_adapter.cc",
1020 "ssl_stream_adapter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001021 "ssladapter.h",
1022 "sslcertificate.h",
1023 "sslfingerprint.h",
1024 "sslidentity.h",
1025 "sslstreamadapter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001026 "stream.cc",
1027 "stream.h",
1028 "thread.cc",
1029 "thread.h",
1030 ]
1031
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001032 if (build_with_chromium) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001033 include_dirs = [ "../../boringssl/src/include" ]
1034 public_configs += [ ":rtc_base_chromium_config" ]
1035 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001036 sources += [
1037 "callback.h",
Steve Anton10542f22019-01-11 09:11:00 -08001038 "log_sinks.cc",
1039 "log_sinks.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001040 "logsinks.h",
Steve Anton10542f22019-01-11 09:11:00 -08001041 "numerics/math_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001042 "numerics/mathutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001043 "rolling_accumulator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001044 "rollingaccumulator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001045 "ssl_roots.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001046 "sslroots.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001047 ]
1048
1049 if (is_win) {
Steve Antonaec15aa2019-01-11 09:13:07 -08001050 sources += [
1051 "win32_socket_init.h",
1052 "win32socketinit.h",
1053 ]
Robin Raymondce1b1402018-11-22 20:10:11 -05001054 if (current_os != "winuwp") {
1055 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001056 "win32_socket_server.cc",
1057 "win32_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001058 "win32socketserver.h",
Robin Raymondce1b1402018-11-22 20:10:11 -05001059 ]
1060 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001061 }
1062 } # !build_with_chromium
1063
1064 if (rtc_build_ssl) {
1065 deps += [ "//third_party/boringssl" ]
Dan Minor9cdd8762018-01-16 10:40:39 -05001066 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001067 configs += [ ":external_ssl_library" ]
1068 }
1069
1070 if (is_android) {
1071 sources += [
Steve Antonaec15aa2019-01-11 09:13:07 -08001072 "ifaddrs-android.h",
Steve Anton10542f22019-01-11 09:11:00 -08001073 "ifaddrs_android.cc",
1074 "ifaddrs_android.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001075 ]
1076
1077 libs += [
1078 "log",
1079 "GLESv2",
1080 ]
1081 }
1082
1083 if (is_ios || is_mac) {
Steve Anton10542f22019-01-11 09:11:00 -08001084 sources += [ "mac_ifaddrs_converter.cc" ]
Kári Tristan Helgason62b13452018-10-12 12:57:49 +02001085 deps += [ "system:cocoa_threading" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001086 }
1087
Joachim Bauch75f18fc2017-12-20 21:25:47 +01001088 if (rtc_use_x11) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001089 libs += [
1090 "dl",
1091 "rt",
1092 "Xext",
1093 "X11",
1094 "Xcomposite",
1095 "Xrender",
1096 ]
1097 }
1098
1099 if (is_linux) {
1100 libs += [
1101 "dl",
1102 "rt",
1103 ]
1104 }
1105
1106 if (is_mac) {
1107 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001108 "mac_utils.cc",
1109 "mac_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001110 "macutils.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001111 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001112 }
1113
1114 if (is_win) {
1115 sources += [
1116 "win32.cc",
1117 "win32.h",
Steve Anton10542f22019-01-11 09:11:00 -08001118 "win32_window.cc",
1119 "win32_window.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001120 "win32window.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001121 ]
1122
1123 libs += [
1124 "crypt32.lib",
1125 "iphlpapi.lib",
1126 "secur32.lib",
1127 ]
1128
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001129 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
1130 }
1131
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001132 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001133 sources += [
1134 "ifaddrs_converter.cc",
1135 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001136 ]
1137 }
1138
1139 if (is_nacl) {
1140 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
1141 defines += [ "timezone=_timezone" ]
1142 sources -= [ "ifaddrs_converter.cc" ]
1143 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001144}
1145
1146rtc_source_set("gtest_prod") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001147 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001148 sources = [
1149 "gtest_prod_util.h",
1150 ]
1151}
1152
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001153rtc_source_set("gunit_helpers") {
1154 testonly = true
1155 sources = [
1156 "gunit.cc",
1157 "gunit.h",
1158 ]
1159 deps = [
1160 ":logging",
1161 ":rtc_base",
1162 ":rtc_base_tests_utils",
1163 ":stringutils",
1164 "../test:test_support",
Steve Anton68586e82018-12-13 17:41:25 -08001165 "//third_party/abseil-cpp/absl/strings",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001166 ]
1167}
1168
1169rtc_source_set("testclient") {
1170 testonly = true
1171 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001172 "test_client.cc",
1173 "test_client.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001174 "testclient.h",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001175 ]
1176 deps = [
1177 ":criticalsection",
1178 ":gunit_helpers",
1179 ":macromagic",
1180 ":rtc_base",
1181 ":rtc_base_tests_utils",
1182 ":timeutils",
Yves Gerey3e707812018-11-28 16:47:49 +01001183 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001184 ]
1185}
1186
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001187rtc_source_set("rtc_base_tests_utils") {
1188 testonly = true
1189 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001190 "cpu_time.cc",
1191 "cpu_time.h",
Steve Anton10542f22019-01-11 09:11:00 -08001192 "fake_clock.cc",
1193 "fake_clock.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001194 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 09:11:00 -08001195 "fake_network.h",
1196 "fake_ssl_identity.cc",
1197 "fake_ssl_identity.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001198 "fakeclock.h",
1199 "fakenetwork.h",
1200 "fakesslidentity.h",
Steve Anton10542f22019-01-11 09:11:00 -08001201 "firewall_socket_server.cc",
1202 "firewall_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001203 "firewallsocketserver.h",
Niels Möllere7547d52018-11-01 09:33:08 +01001204 "memory_stream.cc",
1205 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001206 "memory_usage.cc",
1207 "memory_usage.h",
Steve Anton10542f22019-01-11 09:11:00 -08001208 "nat_server.cc",
1209 "nat_server.h",
1210 "nat_socket_factory.cc",
1211 "nat_socket_factory.h",
1212 "nat_types.cc",
1213 "nat_types.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001214 "natserver.h",
1215 "natsocketfactory.h",
1216 "nattypes.h",
Steve Anton10542f22019-01-11 09:11:00 -08001217 "proxy_server.cc",
1218 "proxy_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001219 "proxyserver.h",
Niels Möller44153152018-12-17 14:04:05 +01001220 "server_socket_adapters.cc",
1221 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001222 "sigslot_tester.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001223 "sigslottester.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001224 "sigslottester.h.pump",
Steve Anton10542f22019-01-11 09:11:00 -08001225 "socket_stream.cc",
1226 "socket_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001227 "socketstream.h",
Steve Anton10542f22019-01-11 09:11:00 -08001228 "test_base64.h",
1229 "test_certificate_verifier.h",
1230 "test_echo_server.cc",
1231 "test_echo_server.h",
1232 "test_utils.cc",
1233 "test_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001234 "testbase64.h",
1235 "testcertificateverifier.h",
1236 "testechoserver.h",
1237 "testutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001238 "virtual_socket_server.cc",
1239 "virtual_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001240 "virtualsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001241 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001242 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001243 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001244 ":rtc_base",
Sebastian Jansson5f83cf02018-05-08 14:52:22 +02001245 "../api/units:time_delta",
Artem Titove41c4332018-07-25 15:04:28 +02001246 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001247 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001248 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001249}
1250
Tommida8781f2018-02-19 12:41:43 +01001251rtc_source_set("rtc_task_queue_for_test") {
1252 visibility = [ "*" ]
1253 testonly = true
1254
1255 sources = [
1256 "task_queue_for_test.cc",
1257 "task_queue_for_test.h",
1258 ]
1259 deps = [
1260 ":checks",
1261 ":rtc_base_approved",
1262 ":rtc_task_queue",
1263 ]
1264}
1265
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001266if (rtc_include_tests) {
Artem Titove41c4332018-07-25 15:04:28 +02001267 rtc_source_set("sigslot_unittest") {
1268 testonly = true
1269 sources = [
1270 "sigslot_unittest.cc",
1271 ]
1272 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001273 ":gunit_helpers",
Artem Titove41c4332018-07-25 15:04:28 +02001274 ":rtc_base",
1275 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 16:47:49 +01001276 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001277 "third_party/sigslot",
1278 ]
1279 }
1280
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001281 rtc_source_set("rtc_base_tests_main") {
1282 testonly = true
1283 sources = [
1284 "unittest_main.cc",
1285 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001286 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001287 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001288 ":rtc_base",
1289 ":rtc_base_approved",
1290 ":rtc_base_tests_utils",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001291 "../system_wrappers:field_trial",
1292 "../system_wrappers:metrics",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001293 "../test:field_trial",
1294 "../test:test_support",
1295 ]
1296
1297 public_deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001298 "//testing/gtest",
1299 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001300 }
1301
1302 rtc_source_set("rtc_base_nonparallel_tests") {
1303 testonly = true
1304
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001305 sources = [
1306 "cpu_time_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001307 "file_rotating_stream_unittest.cc",
1308 "null_socket_server_unittest.cc",
1309 "physical_socket_server_unittest.cc",
1310 "socket_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001311 "socket_unittest.cc",
1312 "socket_unittest.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001313 ]
1314 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001315 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001316 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001317 ":rtc_base",
1318 ":rtc_base_tests_main",
1319 ":rtc_base_tests_utils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001320 ":testclient",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001321 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001322 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001323 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001324 "third_party/sigslot:sigslot",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001325 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001326 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001327 ]
1328 if (is_win) {
Steve Anton10542f22019-01-11 09:11:00 -08001329 sources += [ "win32_socket_server_unittest.cc" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001330 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001331 }
1332
1333 rtc_source_set("rtc_base_approved_unittests") {
1334 testonly = true
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001335 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001336 "atomic_ops_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001337 "base64_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001338 "bind_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001339 "bit_buffer_unittest.cc",
1340 "bitrate_allocation_strategy_unittest.cc",
1341 "buffer_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001342 "buffer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001343 "byte_buffer_unittest.cc",
1344 "byte_order_unittest.cc",
1345 "copy_on_write_buffer_unittest.cc",
1346 "critical_section_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001347 "event_tracer_unittest.cc",
1348 "event_unittest.cc",
1349 "file_unittest.cc",
1350 "function_view_unittest.cc",
1351 "logging_unittest.cc",
Karl Wiberg65c39222017-11-22 12:25:14 +01001352 "numerics/histogram_percentile_counter_unittest.cc",
1353 "numerics/mod_ops_unittest.cc",
1354 "numerics/moving_max_counter_unittest.cc",
Karl Wiberge40468b2017-11-22 10:42:26 +01001355 "numerics/safe_compare_unittest.cc",
1356 "numerics/safe_minmax_unittest.cc",
Ilya Nikolaevskiy0beed5d2018-05-22 10:54:30 +02001357 "numerics/sample_counter_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001358 "one_time_event_unittest.cc",
Artem Titove62f6002018-03-19 15:40:00 +01001359 "platform_file_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001360 "platform_thread_unittest.cc",
1361 "random_unittest.cc",
1362 "rate_limiter_unittest.cc",
1363 "rate_statistics_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001364 "rate_tracker_unittest.cc",
1365 "ref_counted_object_unittest.cc",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001366 "sanitizer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001367 "string_encode_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001368 "string_to_number_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001369 "string_utils_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001370 "stringize_macros_unittest.cc",
Tommifef05002018-02-27 13:51:08 +01001371 "strings/string_builder_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001372 "swap_queue_unittest.cc",
1373 "thread_annotations_unittest.cc",
1374 "thread_checker_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001375 "time_utils_unittest.cc",
1376 "timestamp_aligner_unittest.cc",
1377 "virtual_socket_unittest.cc",
Joachim Bauch5b32f232018-03-07 20:02:26 +01001378 "zero_memory_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001379 ]
henrika3ca48a62018-05-21 13:34:51 +02001380 if (is_win) {
1381 sources += [ "win/windows_version_unittest.cc" ]
1382 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001383 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001384 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001385 ":gunit_helpers",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001386 ":rate_limiter",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001387 ":rtc_base",
1388 ":rtc_base_approved",
1389 ":rtc_base_tests_main",
1390 ":rtc_base_tests_utils",
1391 ":rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001392 ":safe_compare",
Karl Wiberg12edf4c2018-03-07 14:18:56 +01001393 ":safe_minmax",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001394 ":sanitizer",
Patrik Höglund3e113432017-12-15 14:40:10 +01001395 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001396 ":testclient",
kwiberg529662a2017-09-04 05:43:17 -07001397 "../api:array_view",
Yves Gerey3e707812018-11-28 16:47:49 +01001398 "../api/units:time_delta",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001399 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001400 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001401 "../test:test_support",
Karl Wiberg29e7bee2018-03-22 14:11:52 +01001402 "memory:unittests",
Artem Titova76af0c2018-07-23 17:38:12 +02001403 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +01001404 "third_party/sigslot:sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001405 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001406 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001407 }
1408
1409 rtc_source_set("rtc_task_queue_unittests") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001410 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001411 testonly = true
1412
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001413 sources = [
1414 "task_queue_unittest.cc",
1415 ]
1416 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001417 ":gunit_helpers",
mbonadei95c8f652017-08-27 23:40:10 -07001418 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001419 ":rtc_base_tests_main",
1420 ":rtc_base_tests_utils",
1421 ":rtc_task_queue",
Tommi68561562018-02-13 19:47:50 +01001422 ":rtc_task_queue_for_test",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001423 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001424 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001425 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001426 }
1427
1428 rtc_source_set("sequenced_task_checker_unittests") {
1429 testonly = true
1430
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001431 sources = [
1432 "sequenced_task_checker_unittest.cc",
1433 ]
1434 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001435 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001436 ":rtc_base_approved",
1437 ":rtc_base_tests_main",
1438 ":rtc_task_queue",
1439 ":sequenced_task_checker",
1440 "../test:test_support",
1441 ]
1442 }
1443
1444 rtc_source_set("weak_ptr_unittests") {
1445 testonly = true
1446
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001447 sources = [
1448 "weak_ptr_unittest.cc",
1449 ]
1450 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001451 ":gunit_helpers",
Mirko Bonadeica270912018-10-10 15:51:03 +02001452 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001453 ":rtc_base_tests_main",
1454 ":rtc_base_tests_utils",
Tommi8d2c5a82018-03-19 11:12:48 +01001455 ":rtc_event",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001456 ":rtc_task_queue",
1457 ":weak_ptr",
1458 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001459 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001460 ]
1461 }
1462
1463 rtc_source_set("rtc_numerics_unittests") {
1464 testonly = true
1465
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001466 sources = [
1467 "numerics/exp_filter_unittest.cc",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +01001468 "numerics/moving_average_unittest.cc",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +01001469 "numerics/moving_median_filter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001470 "numerics/percentile_filter_unittest.cc",
Artem Titove4ed6ea2019-01-11 11:02:19 +01001471 "numerics/samples_stats_counter_unittest.cc",
Bjorn Tereliusa194e582017-10-25 13:07:09 +02001472 "numerics/sequence_number_util_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001473 ]
1474 deps = [
1475 ":rtc_base_approved",
1476 ":rtc_base_tests_main",
1477 ":rtc_numerics",
1478 "../test:test_support",
1479 ]
1480 }
1481
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001482 rtc_source_set("rtc_json_unittests") {
1483 testonly = true
1484
1485 sources = [
1486 "strings/json_unittest.cc",
1487 ]
1488 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001489 ":gunit_helpers",
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001490 ":rtc_base_tests_main",
1491 ":rtc_base_tests_utils",
1492 ":rtc_json",
1493 "../test:test_support",
1494 ]
1495 }
1496
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001497 rtc_source_set("rtc_base_unittests") {
1498 testonly = true
Benjamin Wrightd6f86e82018-05-08 13:12:25 -07001499 defines = []
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001500
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001501 sources = [
1502 "callback_unittest.cc",
1503 "crc32_unittest.cc",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +01001504 "data_rate_limiter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001505 "helpers_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001506 "ip_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001507 "memory_usage_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001508 "message_digest_unittest.cc",
1509 "message_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001510 "nat_unittest.cc",
1511 "network_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001512 "proxy_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001513 "rolling_accumulator_unittest.cc",
1514 "rtc_certificate_generator_unittest.cc",
1515 "rtc_certificate_unittest.cc",
1516 "signal_thread_unittest.cc",
1517 "sigslot_tester_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001518 "stream_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001519 "test_client_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001520 "thread_unittest.cc",
1521 ]
1522 if (is_win) {
1523 sources += [
1524 "win32_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001525 "win32_window_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001526 ]
1527 }
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001528 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001529 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001530 "openssl_adapter_unittest.cc",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -07001531 "openssl_key_derivation_hkdf_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001532 "openssl_session_cache_unittest.cc",
1533 "openssl_utility_unittest.cc",
1534 "ssl_adapter_unittest.cc",
1535 "ssl_identity_unittest.cc",
1536 "ssl_stream_adapter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001537 ]
1538 }
1539 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001540 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001541 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001542 ":rtc_base_tests_main",
1543 ":rtc_base_tests_utils",
Patrik Höglund3e113432017-12-15 14:40:10 +01001544 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001545 ":testclient",
Joachim Bauch58daf402017-12-21 22:00:34 +01001546 "../api:array_view",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001547 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001548 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001549 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001550 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +02001551 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001552 ]
1553 public_deps = [
1554 ":rtc_base",
1555 ]
Diogo Real1dca9d52017-08-29 12:18:32 -07001556 if (build_with_chromium) {
1557 include_dirs = [ "../../boringssl/src/include" ]
1558 }
1559 if (rtc_build_ssl) {
1560 deps += [ "//third_party/boringssl" ]
1561 } else {
1562 configs += [ ":external_ssl_library" ]
1563 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001564 }
1565}
1566
Henrik Kjellander73e21802017-06-20 08:38:58 +02001567if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +00001568 rtc_android_library("base_java") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001569 java_files = [
1570 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 14:31:38 +02001571 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001572 "java/src/org/webrtc/Logging.java",
1573 "java/src/org/webrtc/Size.java",
1574 "java/src/org/webrtc/ThreadUtils.java",
1575 ]
Artem Titarenko69540f42018-12-10 12:30:46 +01001576 deps = [
1577 "//third_party/android_deps:android_support_annotations_java",
1578 ]
Henrik Kjellander73e21802017-06-20 08:38:58 +02001579 }
1580}