blob: 7765c612026e227144b8ee4625184749b6056095 [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
Andrey Logvin5e227ab2021-01-29 10:34:55 +00009import("//third_party/google_benchmark/buildconfig.gni")
Henrik Kjellander73e21802017-06-20 08:38:58 +020010import("../webrtc.gni")
11
12if (is_android) {
13 import("//build/config/android/config.gni")
14 import("//build/config/android/rules.gni")
15}
16
Dan Minor9cdd8762018-01-16 10:40:39 -050017if (!rtc_build_ssl) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +020018 config("external_ssl_library") {
19 assert(rtc_ssl_root != "",
20 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
21 include_dirs = [ rtc_ssl_root ]
22 }
23}
24
Oleh Prypindd214742018-07-17 13:49:46 +020025rtc_source_set("protobuf_utils") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010026 sources = [ "protobuf_utils.h" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +020027 if (rtc_enable_protobuf) {
Mirko Bonadeid8661a02018-08-13 15:04:25 +020028 public_configs = [ "//third_party/protobuf:protobuf_config" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010029 deps = [ "//third_party/protobuf:protobuf_lite" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +020030 }
31}
32
Danil Chapovalov5af152c2021-08-31 15:27:51 +020033rtc_source_set("bitstream_reader") {
34 sources = [
35 "bitstream_reader.cc",
36 "bitstream_reader.h",
37 ]
38 deps = [
39 ":checks",
40 ":safe_conversions",
41 "../api:array_view",
42 ]
43 absl_deps = [
44 "//third_party/abseil-cpp/absl/base:core_headers",
45 "//third_party/abseil-cpp/absl/numeric:bits",
46 "//third_party/abseil-cpp/absl/strings",
47 ]
48}
49
Oleh Prypindd214742018-07-17 13:49:46 +020050rtc_source_set("compile_assert_c") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010051 sources = [ "compile_assert_c.h" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +020052}
53
Mirko Bonadei3663ed32019-10-19 12:03:23 +020054rtc_source_set("ignore_wundef") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010055 sources = [ "ignore_wundef.h" ]
Mirko Bonadei3663ed32019-10-19 12:03:23 +020056}
57
Karl Wiberg70026f92020-09-18 10:03:16 +020058rtc_source_set("untyped_function") {
59 sources = [ "untyped_function.h" ]
Karl Wiberg3d452cf2020-09-11 16:09:46 +020060 deps = [ "system:assume" ]
61}
62
Mirko Bonadei3d259352020-10-23 12:04:40 +020063rtc_source_set("callback_list") {
Karl Wiberg3d452cf2020-09-11 16:09:46 +020064 sources = [
Mirko Bonadei3d259352020-10-23 12:04:40 +020065 "callback_list.cc",
66 "callback_list.h",
Karl Wiberg3d452cf2020-09-11 16:09:46 +020067 ]
68 deps = [
Karl Wiberg01a36f32020-11-11 11:48:04 +010069 ":checks",
Karl Wiberg70026f92020-09-18 10:03:16 +020070 ":untyped_function",
Karl Wiberg3d452cf2020-09-11 16:09:46 +020071 "../api:function_view",
72 "system:assume",
Karl Wibergd2c69672020-09-29 13:55:13 +020073 "system:inline",
Tomas Gunnarsson9797dcd2022-04-10 13:27:13 +020074 "system:rtc_export",
Karl Wiberg3d452cf2020-09-11 16:09:46 +020075 ]
76}
77
Florent Castellif9c59842022-04-19 17:07:23 +020078rtc_source_set("buffer") {
79 visibility = [ "*" ]
80 sources = [ "buffer.h" ]
81 deps = [
82 ":checks",
83 ":type_traits",
84 ":zero_memory",
85 "../api:array_view",
86 ]
87 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
88}
89
Florent Castellia876a922022-04-19 17:18:36 +020090rtc_source_set("byte_order") {
91 visibility = [ "*" ]
92 sources = [ "byte_order.h" ]
93 deps = [ "system:arch" ]
94}
95
Florent Castelli31764092022-04-14 13:41:58 +020096rtc_source_set("mod_ops") {
97 visibility = [ "*" ]
98 sources = [ "numerics/mod_ops.h" ]
99 deps = [ ":checks" ]
100}
101
102rtc_source_set("moving_max_counter") {
103 visibility = [ "*" ]
104 sources = [ "numerics/moving_max_counter.h" ]
105 deps = [ ":checks" ]
106 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
107}
108
Florent Castelli6b608592022-04-14 13:18:04 +0200109rtc_source_set("one_time_event") {
110 visibility = [ "*" ]
111 sources = [ "one_time_event.h" ]
112 deps = [ "synchronization:mutex" ]
113}
114
Florent Castellia6c10e32022-04-14 13:08:44 +0200115rtc_source_set("strong_alias") {
116 visibility = [ "*" ]
117 sources = [ "strong_alias.h" ]
118}
119
Florent Castellid119b9e2022-04-14 13:23:51 +0200120rtc_source_set("swap_queue") {
121 visibility = [ "*" ]
122 sources = [ "swap_queue.h" ]
123 deps = [ ":checks" ]
124 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
125}
126
Tommi8d2c5a82018-03-19 11:12:48 +0100127rtc_source_set("macromagic") {
128 sources = [
129 "arraysize.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100130 "format_macros.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100131 "thread_annotations.h",
132 ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100133 deps = [ "system:arch" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100134}
135
Florent Castelli7f623b02022-04-14 13:34:56 +0200136rtc_library("bit_buffer") {
137 visibility = [ "*" ]
138 sources = [
139 "bit_buffer.cc",
140 "bit_buffer.h",
141 ]
142 deps = [ ":checks" ]
143 absl_deps = [ "//third_party/abseil-cpp/absl/numeric:bits" ]
144}
145
Florent Castelliceb7b362022-04-19 17:35:04 +0200146rtc_library("byte_buffer") {
147 visibility = [ "*" ]
148 sources = [
149 "byte_buffer.cc",
150 "byte_buffer.h",
151 ]
152 deps = [
153 ":buffer",
154 ":byte_order",
155 ]
156 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
157}
158
Florent Castelli76063752022-04-19 17:14:26 +0200159rtc_library("buffer_queue") {
160 visibility = [ "*" ]
161 sources = [
162 "buffer_queue.cc",
163 "buffer_queue.h",
164 ]
165 deps = [
166 ":buffer",
167 ":macromagic",
168 "../api:sequence_checker",
169 "system:no_unique_address",
170 ]
171}
172
Florent Castellied4aadc2022-04-19 17:40:46 +0200173rtc_library("copy_on_write_buffer") {
174 visibility = [ "*" ]
175 sources = [
176 "copy_on_write_buffer.cc",
177 "copy_on_write_buffer.h",
178 ]
179 deps = [
180 ":buffer",
181 ":checks",
182 ":refcount",
183 ":type_traits",
184 "../api:scoped_refptr",
185 "system:rtc_export",
186 ]
187}
188
Florent Castellia30aef32022-04-19 17:47:13 +0200189rtc_library("event_tracer") {
190 visibility = [ "*" ]
191 sources = [
192 "event_tracer.cc",
193 "event_tracer.h",
194 "trace_event.h",
195 ]
196 deps = [
197 ":atomicops",
198 ":checks",
199 ":logging",
200 ":macromagic",
201 ":platform_thread",
202 ":platform_thread_types",
203 ":rtc_event",
204 ":timeutils",
205 "../api:sequence_checker",
206 "synchronization:mutex",
207 "system:rtc_export",
208 ]
209 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
210}
211
Florent Castelli17296422022-04-14 13:48:10 +0200212rtc_library("histogram_percentile_counter") {
213 visibility = [ "*" ]
214 sources = [
215 "numerics/histogram_percentile_counter.cc",
216 "numerics/histogram_percentile_counter.h",
217 ]
218 deps = [ ":checks" ]
219 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
220}
221
Florent Castelliaa6d05d2022-04-14 13:13:56 +0200222rtc_library("location") {
223 visibility = [ "*" ]
224 sources = [
225 "location.cc",
226 "location.h",
227 ]
228 deps = [ "system:rtc_export" ]
229}
230
Florent Castelli7f623b02022-04-14 13:34:56 +0200231rtc_library("race_checker") {
232 visibility = [ "*" ]
233 sources = [
234 "race_checker.cc",
235 "race_checker.h",
236 ]
237 deps = [
238 ":checks",
239 ":macromagic",
240 ":platform_thread_types",
241 ]
242}
243
Florent Castelli71337f32022-04-14 12:41:26 +0200244rtc_library("random") {
245 visibility = [ "*" ]
246 sources = [
247 "random.cc",
248 "random.h",
249 ]
250 deps = [
251 ":checks",
252 ":safe_conversions",
253 ]
254}
255
Florent Castelli6bb1fd32022-04-19 15:58:39 +0200256rtc_library("rate_statistics") {
257 visibility = [ "*" ]
258 sources = [
259 "rate_statistics.cc",
260 "rate_statistics.h",
261 ]
262 deps = [
263 ":checks",
264 ":logging",
265 ":safe_conversions",
266 "system:rtc_export",
267 ]
268 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
269}
270
Florent Castelli58cc4682022-04-19 15:50:28 +0200271rtc_library("rate_tracker") {
272 visibility = [ "*" ]
273 sources = [
274 "rate_tracker.cc",
275 "rate_tracker.h",
276 ]
277 deps = [
278 ":checks",
279 ":timeutils",
280 ]
281}
282
Florent Castelli83a36d42022-04-14 13:44:39 +0200283rtc_library("sample_counter") {
284 visibility = [ "*" ]
285 sources = [
286 "numerics/sample_counter.cc",
287 "numerics/sample_counter.h",
288 ]
289 deps = [
290 ":checks",
291 ":safe_conversions",
292 ]
293 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
294}
295
Florent Castellib1dc4e42022-04-14 13:20:12 +0200296rtc_library("timestamp_aligner") {
297 visibility = [ "*" ]
298 sources = [
299 "timestamp_aligner.cc",
300 "timestamp_aligner.h",
301 ]
302 deps = [
303 ":checks",
304 ":logging",
305 ":timeutils",
306 "system:rtc_export",
307 ]
308}
309
Florent Castellid119b9e2022-04-14 13:23:51 +0200310rtc_library("zero_memory") {
311 visibility = [ "*" ]
312 sources = [
313 "zero_memory.cc",
314 "zero_memory.h",
315 ]
316 deps = [
317 ":checks",
318 "../api:array_view",
319 ]
320}
321
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200322rtc_library("platform_thread_types") {
Tommi8d2c5a82018-03-19 11:12:48 +0100323 sources = [
324 "platform_thread_types.cc",
325 "platform_thread_types.h",
326 ]
Tommicf846072020-05-17 14:51:10 +0200327 deps = [ ":macromagic" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100328}
329
Tommi8d2c5a82018-03-19 11:12:48 +0100330rtc_source_set("refcount") {
Mirko Bonadeica14a3a2018-08-09 09:47:12 +0200331 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100332 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800333 "ref_count.h",
334 "ref_counted_object.h",
335 "ref_counter.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100336 ]
Tomas Gunnarssond7842002021-04-22 17:41:33 +0200337 deps = [
338 ":macromagic",
339 "../api:scoped_refptr",
340 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100341}
342
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200343rtc_library("criticalsection") {
Tommi8d2c5a82018-03-19 11:12:48 +0100344 sources = [
Markus Handell3cb525b2020-07-16 16:16:09 +0200345 "deprecated/recursive_critical_section.cc",
346 "deprecated/recursive_critical_section.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100347 ]
348 deps = [
349 ":atomicops",
350 ":checks",
351 ":macromagic",
352 ":platform_thread_types",
Markus Handellf70fbc82020-06-04 00:41:20 +0200353 "synchronization:yield",
Niels Möllera12c42a2018-07-25 16:05:48 +0200354 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100355 ]
356}
357
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200358rtc_library("platform_thread") {
Tommi8d2c5a82018-03-19 11:12:48 +0100359 sources = [
360 "platform_thread.cc",
361 "platform_thread.h",
362 ]
363 deps = [
364 ":atomicops",
365 ":checks",
366 ":macromagic",
367 ":platform_thread_types",
368 ":rtc_event",
Tommi8d2c5a82018-03-19 11:12:48 +0100369 ":timeutils",
Artem Titovd15a5752021-02-10 14:31:24 +0100370 "../api:sequence_checker",
Tommi8d2c5a82018-03-19 11:12:48 +0100371 ]
Markus Handell97c44582021-04-20 17:41:54 +0200372 absl_deps = [
373 "//third_party/abseil-cpp/absl/memory",
374 "//third_party/abseil-cpp/absl/strings",
Markus Handellad5037b2021-05-07 15:02:36 +0200375 "//third_party/abseil-cpp/absl/types:optional",
Markus Handell97c44582021-04-20 17:41:54 +0200376 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100377}
378
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200379rtc_library("rtc_event") {
Tommi8d2c5a82018-03-19 11:12:48 +0100380 if (build_with_chromium) {
381 sources = [
382 "../../webrtc_overrides/rtc_base/event.cc",
383 "../../webrtc_overrides/rtc_base/event.h",
384 ]
Karl Wiberg98417032019-03-24 19:12:40 +0100385 deps = [
386 ":checks",
Mirko Bonadeid4002a72019-11-12 20:11:48 +0100387 "system:rtc_export", # Only Chromium's rtc::Event use RTC_EXPORT.
Karl Wiberg98417032019-03-24 19:12:40 +0100388 "//base", # Dependency on chromium's waitable_event.
389 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100390 } else {
391 sources = [
392 "event.cc",
393 "event.h",
394 ]
Karl Wiberg98417032019-03-24 19:12:40 +0100395 deps = [
396 ":checks",
397 "synchronization:yield_policy",
398 "system:warn_current_thread_is_deadlocked",
399 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200400 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100401 }
Tommi8d2c5a82018-03-19 11:12:48 +0100402}
403
Mirko Bonadeicb03e382022-02-10 14:27:57 +0100404config("chromium_logging_config") {
Danil Chapovalove6106102022-02-16 12:29:02 +0100405 defines = [ "LOGGING_INSIDE_WEBRTC" ]
Mirko Bonadeicb03e382022-02-10 14:27:57 +0100406}
407
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200408rtc_library("logging") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200409 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200410 libs = []
Tommi8d2c5a82018-03-19 11:12:48 +0100411 deps = [
Yves Gerey988cc082018-10-23 12:03:01 +0200412 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100413 ":macromagic",
414 ":platform_thread_types",
415 ":stringutils",
416 ":timeutils",
Markus Handellde8a9352020-06-10 15:40:42 +0200417 "synchronization:mutex",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200418 ]
419 absl_deps = [
Danil Chapovalovef98ae62019-10-11 17:18:29 +0200420 "//third_party/abseil-cpp/absl/base:core_headers",
Sebastian Janssonf4e085a2019-05-20 18:34:07 +0200421 "//third_party/abseil-cpp/absl/meta:type_traits",
Jonas Olssonf2ce37c2018-09-12 15:32:47 +0200422 "//third_party/abseil-cpp/absl/strings",
Tommi8d2c5a82018-03-19 11:12:48 +0100423 ]
424
425 if (build_with_chromium) {
426 # Dependency on chromium's logging (in //base).
Artem Titov94b57c02019-03-21 13:35:10 +0100427 deps += [ "//base" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100428 sources = [
429 "../../webrtc_overrides/rtc_base/logging.cc",
430 "../../webrtc_overrides/rtc_base/logging.h",
431 ]
Danil Chapovalove6106102022-02-16 12:29:02 +0100432
Mirko Bonadeicb03e382022-02-10 14:27:57 +0100433 # This macro needs to be both present in all WebRTC targets (see its
434 # definition in //BUILD.gn but also propagated to all the targets
435 # depending on the Chromium component defined in
436 # //third_party/webrtc_overrides:webrtc_component. This public_config
437 # allows GN to propagate the macro accordingly.
Danil Chapovalove6106102022-02-16 12:29:02 +0100438 public_configs = [ ":chromium_logging_config" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100439 } else {
440 sources = [
441 "logging.cc",
442 "logging.h",
443 ]
Karl Wibergcefc4652018-05-23 23:20:38 +0200444 deps += [ "system:inline" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100445
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200446 if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +0200447 frameworks = [ "Foundation.framework" ]
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200448 }
449
Patrik Höglund77301932018-10-09 15:09:51 +0200450 if (is_android) {
451 libs += [ "log" ]
452 }
Tommi8d2c5a82018-03-19 11:12:48 +0100453 }
454}
455
Tommi8d2c5a82018-03-19 11:12:48 +0100456rtc_source_set("atomicops") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100457 sources = [ "atomic_ops.h" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100458}
459
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200460rtc_library("checks") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200461 # TODO(bugs.webrtc.org/9607): This should not be public.
462 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200463 libs = []
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100464 sources = [
465 "checks.cc",
466 "checks.h",
467 ]
468 deps = [
469 ":safe_compare",
Niels Möller94327682022-04-28 13:20:29 +0200470 "../api:scoped_refptr",
Jonas Olssonf8e5c112018-06-14 13:14:22 +0200471 "system:inline",
Mirko Bonadei35214fc2019-09-23 14:54:28 +0200472 "system:rtc_export",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200473 ]
474 absl_deps = [
Sebastian Janssonf4e085a2019-05-20 18:34:07 +0200475 "//third_party/abseil-cpp/absl/meta:type_traits",
Mirko Bonadeid4a37a62019-03-11 10:31:22 +0100476 "//third_party/abseil-cpp/absl/strings",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100477 ]
Patrik Höglund77301932018-10-09 15:09:51 +0200478 if (is_android) {
479 libs += [ "log" ]
480 }
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100481}
482
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200483rtc_library("rate_limiter") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100484 sources = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100485 "rate_limiter.cc",
486 "rate_limiter.h",
487 ]
488 deps = [
Florent Castelli4467ad72022-04-04 15:18:46 +0200489 ":macromagic",
Florent Castelli6bb1fd32022-04-19 15:58:39 +0200490 ":rate_statistics",
Patrik Höglund3e113432017-12-15 14:40:10 +0100491 "../system_wrappers",
Markus Handell18523c32020-07-08 17:55:58 +0200492 "synchronization:mutex",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100493 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200494 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100495}
496
497rtc_source_set("sanitizer") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100498 sources = [ "sanitizer.h" ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200499 absl_deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ]
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100500}
501
Karl Wibergc1269372020-03-02 20:23:41 +0100502rtc_source_set("bounded_inline_vector") {
503 public = [ "bounded_inline_vector.h" ]
504 sources = [ "bounded_inline_vector_impl.h" ]
505 deps = [ ":checks" ]
506}
507
Danil Chapovalov33b83fd2019-09-18 15:48:23 +0200508rtc_source_set("divide_round") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100509 sources = [ "numerics/divide_round.h" ]
Danil Chapovalov33b83fd2019-09-18 15:48:23 +0200510 deps = [
511 ":checks",
512 ":safe_compare",
513 ]
514}
515
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100516rtc_source_set("safe_compare") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100517 sources = [ "numerics/safe_compare.h" ]
518 deps = [ ":type_traits" ]
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100519}
520
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100521rtc_source_set("safe_minmax") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100522 sources = [ "numerics/safe_minmax.h" ]
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100523 deps = [
524 ":checks",
525 ":safe_compare",
526 ":type_traits",
527 ]
528}
529
Tommi8d2c5a82018-03-19 11:12:48 +0100530rtc_source_set("safe_conversions") {
531 sources = [
532 "numerics/safe_conversions.h",
533 "numerics/safe_conversions_impl.h",
534 ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100535 deps = [ ":checks" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100536}
537
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200538rtc_library("timeutils") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200539 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100540 sources = [
Johannes Kronb73c9f02021-02-15 13:29:45 +0100541 "system_time.cc",
542 "system_time.h",
Steve Anton10542f22019-01-11 09:11:00 -0800543 "time_utils.cc",
544 "time_utils.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100545 ]
546 deps = [
547 ":checks",
548 ":safe_conversions",
Jonas Olsson366a50c2018-09-06 13:41:30 +0200549 ":stringutils",
Mirko Bonadei35214fc2019-09-23 14:54:28 +0200550 "system:rtc_export",
Tommi8d2c5a82018-03-19 11:12:48 +0100551 ]
Johannes Kronbb52bdf2021-02-25 10:10:08 +0100552 if (rtc_exclude_system_time) {
553 defines = [ "WEBRTC_EXCLUDE_SYSTEM_TIME" ]
554 }
555
Noah Richards342989d2019-03-18 13:50:20 -0700556 libs = []
557 if (is_win) {
558 libs += [ "winmm.lib" ]
559 }
Tommi8d2c5a82018-03-19 11:12:48 +0100560}
561
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200562rtc_library("stringutils") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100563 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800564 "string_encode.cc",
565 "string_encode.h",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200566 "string_to_number.cc",
567 "string_to_number.h",
Steve Anton10542f22019-01-11 09:11:00 -0800568 "string_utils.cc",
569 "string_utils.h",
Karl Wiberg881f1682018-03-08 15:03:23 +0100570 "strings/string_builder.cc",
Tommifef05002018-02-27 13:51:08 +0100571 "strings/string_builder.h",
henrikaf0dc5c52020-04-09 18:46:00 +0200572 "strings/string_format.cc",
573 "strings/string_format.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100574 ]
575 deps = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100576 ":checks",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200577 ":macromagic",
Karl Wiberg881f1682018-03-08 15:03:23 +0100578 ":safe_minmax",
579 "../api:array_view",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200580 ]
581 absl_deps = [
Artem Titov94b57c02019-03-21 13:35:10 +0100582 "//third_party/abseil-cpp/absl/strings",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200583 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglund3e113432017-12-15 14:40:10 +0100584 ]
585}
586
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200587rtc_library("audio_format_to_string") {
Jonas Olsson74395342018-04-03 12:22:07 +0200588 sources = [
589 "strings/audio_format_to_string.cc",
590 "strings/audio_format_to_string.h",
591 ]
592 deps = [
593 ":stringutils",
594 "../api/audio_codecs:audio_codecs_api",
595 ]
596}
597
Patrik Höglund3e113432017-12-15 14:40:10 +0100598rtc_source_set("type_traits") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100599 sources = [ "type_traits.h" ]
Patrik Höglund3e113432017-12-15 14:40:10 +0100600}
601
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200602rtc_library("rtc_task_queue") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000603 visibility = [ "*" ]
nisse75dd6d42017-09-19 08:28:00 -0700604 sources = [
Danil Chapovalov07a4f2b2019-03-05 19:58:28 +0100605 "task_queue.cc",
nisse75dd6d42017-09-19 08:28:00 -0700606 "task_queue.h",
607 ]
perkj650fdae2017-08-25 05:00:11 -0700608 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100609 ":macromagic",
Danil Chapovalov959e9b62019-01-14 14:29:18 +0100610 "../api/task_queue",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200611 "system:rtc_export",
Danil Chapovalov3b548dd2019-03-01 14:58:44 +0100612 "task_utils:to_queued_task",
perkj650fdae2017-08-25 05:00:11 -0700613 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200614 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Danil Chapovalov07a4f2b2019-03-05 19:58:28 +0100615}
616
Henrik Boström27c29362019-10-21 15:21:55 +0200617rtc_source_set("rtc_operations_chain") {
618 visibility = [ "*" ]
619 sources = [
620 "operations_chain.cc",
621 "operations_chain.h",
622 ]
623 deps = [
624 ":checks",
625 ":macromagic",
626 ":refcount",
Niels Möller95129102022-01-13 11:00:05 +0100627 "../api:refcountedbase",
Henrik Boström27c29362019-10-21 15:21:55 +0200628 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 14:31:24 +0100629 "../api:sequence_checker",
Mirko Bonadei20e4c802020-11-23 11:07:42 +0100630 "system:no_unique_address",
Henrik Boström27c29362019-10-21 15:21:55 +0200631 ]
Henrik Boströme574a312020-08-25 10:20:11 +0200632 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Henrik Boström27c29362019-10-21 15:21:55 +0200633}
634
Tommi8d2c5a82018-03-19 11:12:48 +0100635if (rtc_enable_libevent) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200636 rtc_library("rtc_task_queue_libevent") {
Danil Chapovalov07a4f2b2019-03-05 19:58:28 +0100637 visibility = [ "../api/task_queue:default_task_queue_factory" ]
perkj650fdae2017-08-25 05:00:11 -0700638 sources = [
Niels Möller15c9cf72017-10-19 12:38:09 +0200639 "task_queue_libevent.cc",
Danil Chapovaloveb175242019-02-12 10:44:38 +0100640 "task_queue_libevent.h",
perkj650fdae2017-08-25 05:00:11 -0700641 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100642 deps = [
643 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100644 ":logging",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200645 ":macromagic",
Tommi8d2c5a82018-03-19 11:12:48 +0100646 ":platform_thread",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200647 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100648 ":safe_conversions",
649 ":timeutils",
Danil Chapovaloveb175242019-02-12 10:44:38 +0100650 "../api/task_queue",
Markus Handell18523c32020-07-08 17:55:58 +0200651 "synchronization:mutex",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200652 ]
653 absl_deps = [
Steve Anton9a83dd72020-01-09 11:03:25 -0800654 "//third_party/abseil-cpp/absl/container:inlined_vector",
Danil Chapovaloveb175242019-02-12 10:44:38 +0100655 "//third_party/abseil-cpp/absl/strings",
Tommi8d2c5a82018-03-19 11:12:48 +0100656 ]
657 if (rtc_build_libevent) {
658 deps += [ "//base/third_party/libevent" ]
659 }
660 }
661}
662
663if (is_mac || is_ios) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200664 rtc_library("rtc_task_queue_gcd") {
Byoungchan Lee08438fc2021-10-12 22:53:35 +0900665 visibility = [ "../api/task_queue:default_task_queue_factory" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100666 sources = [
667 "task_queue_gcd.cc",
Danil Chapovalov47cf5ea2019-02-19 20:20:16 +0100668 "task_queue_gcd.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100669 ]
670 deps = [
671 ":checks",
672 ":logging",
Danil Chapovalov47cf5ea2019-02-19 20:20:16 +0100673 "../api/task_queue",
Markus Handell18523c32020-07-08 17:55:58 +0200674 "synchronization:mutex",
Yura Yaroshevichebf739b2020-03-16 18:00:59 +0300675 "system:gcd_helpers",
Tommi8d2c5a82018-03-19 11:12:48 +0100676 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200677 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100678 }
679}
680
681if (is_win) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200682 rtc_library("rtc_task_queue_win") {
Danil Chapovalov07a4f2b2019-03-05 19:58:28 +0100683 visibility = [ "../api/task_queue:default_task_queue_factory" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100684 sources = [
685 "task_queue_win.cc",
Danil Chapovalov826f2e72019-02-20 18:13:09 +0100686 "task_queue_win.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100687 ]
688 deps = [
689 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100690 ":logging",
691 ":macromagic",
692 ":platform_thread",
Tommi8d2c5a82018-03-19 11:12:48 +0100693 ":rtc_event",
Tommi8d2c5a82018-03-19 11:12:48 +0100694 ":safe_conversions",
695 ":timeutils",
Danil Chapovalov826f2e72019-02-20 18:13:09 +0100696 "../api/task_queue",
Markus Handell18523c32020-07-08 17:55:58 +0200697 "synchronization:mutex",
Tommi8d2c5a82018-03-19 11:12:48 +0100698 ]
Markus Handellad5037b2021-05-07 15:02:36 +0200699 absl_deps = [
700 "//third_party/abseil-cpp/absl/strings",
701 "//third_party/abseil-cpp/absl/types:optional",
702 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100703 }
704}
705
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200706rtc_library("rtc_task_queue_stdlib") {
Robin Raymond22027b92018-11-23 09:07:50 -0500707 sources = [
708 "task_queue_stdlib.cc",
Danil Chapovalovfa52efa2019-02-21 11:13:58 +0100709 "task_queue_stdlib.h",
Robin Raymond22027b92018-11-23 09:07:50 -0500710 ]
711 deps = [
712 ":checks",
Robin Raymond22027b92018-11-23 09:07:50 -0500713 ":logging",
714 ":macromagic",
715 ":platform_thread",
Robin Raymond22027b92018-11-23 09:07:50 -0500716 ":rtc_event",
Robin Raymond22027b92018-11-23 09:07:50 -0500717 ":safe_conversions",
718 ":timeutils",
Danil Chapovalovfa52efa2019-02-21 11:13:58 +0100719 "../api/task_queue",
Markus Handell18523c32020-07-08 17:55:58 +0200720 "synchronization:mutex",
Robin Raymond22027b92018-11-23 09:07:50 -0500721 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200722 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Robin Raymond22027b92018-11-23 09:07:50 -0500723}
724
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200725rtc_library("weak_ptr") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200726 sources = [
727 "weak_ptr.cc",
728 "weak_ptr.h",
729 ]
730 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100731 ":refcount",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100732 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 14:31:24 +0100733 "../api:sequence_checker",
Mirko Bonadei20e4c802020-11-23 11:07:42 +0100734 "system:no_unique_address",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200735 ]
736}
737
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200738rtc_library("rtc_numerics") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200739 sources = [
Jonas Oreland63dced92019-11-25 13:00:15 +0100740 "numerics/event_based_exponential_moving_average.cc",
741 "numerics/event_based_exponential_moving_average.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200742 "numerics/exp_filter.cc",
743 "numerics/exp_filter.h",
Yves Gerey890f62b2019-04-10 17:18:48 +0200744 "numerics/math_utils.h",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +0100745 "numerics/moving_average.cc",
746 "numerics/moving_average.h",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +0100747 "numerics/moving_median_filter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200748 "numerics/percentile_filter.h",
Yves Gerey890f62b2019-04-10 17:18:48 +0200749 "numerics/running_statistics.h",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200750 "numerics/sequence_number_util.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200751 ]
752 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100753 ":checks",
Florent Castelli31764092022-04-14 13:41:58 +0200754 ":mod_ops",
Artem Titov9d777622020-09-18 18:23:08 +0200755 ]
756 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
757}
758
759rtc_library("rtc_stats_counters") {
760 sources = [
761 "numerics/event_rate_counter.cc",
762 "numerics/event_rate_counter.h",
763 "numerics/sample_stats.cc",
764 "numerics/sample_stats.h",
765 ]
766 deps = [
767 "../api/numerics",
Sebastian Janssonefa3f762019-12-02 07:19:55 +0100768 "../api/units:data_rate",
769 "../api/units:time_delta",
Artem Titov6fcdbc12019-09-11 11:45:40 +0200770 "../api/units:timestamp",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200771 ]
Artem Titov9d777622020-09-18 18:23:08 +0200772 absl_deps = []
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200773}
774
Mirko Bonadei65643662019-07-12 13:29:30 +0200775config("rtc_json_suppressions") {
Mirko Bonadei94077762019-06-27 11:24:25 +0200776 if (!is_win || is_clang) {
Mirko Bonadei65643662019-07-12 13:29:30 +0200777 cflags_cc = [
Mirko Bonadei1cd6f322019-07-12 21:47:47 +0200778 # TODO(bugs.webrtc.org/10814): Remove -Wno-undef as soon as it get
Mirko Bonadei65643662019-07-12 13:29:30 +0200779 # removed upstream.
780 "-Wno-undef",
781 ]
Mirko Bonadei94077762019-06-27 11:24:25 +0200782 }
783}
784
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200785rtc_library("rtc_json") {
Mirko Bonadei65643662019-07-12 13:29:30 +0200786 public_configs = [ ":rtc_json_suppressions" ]
Sam Zackrisson492fdf42019-10-25 10:45:58 +0200787 poisonous = [ "rtc_json" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200788 defines = []
789 sources = [
Sam Zackrissonb45bdb52018-10-02 16:25:59 +0200790 "strings/json.cc",
791 "strings/json.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200792 ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100793 deps = [ ":stringutils" ]
Mirko Bonadeia0e29fc2018-01-26 16:50:02 +0100794 all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200795 if (rtc_build_json) {
Florent Castellif35611a2022-04-14 11:55:57 +0200796 deps += [ "//third_party/jsoncpp" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200797 } else {
798 include_dirs = [ "$rtc_jsoncpp_root" ]
799
800 # When defined changes the include path for json.h to where it is
801 # expected to be when building json outside of the standalone build.
802 defines += [ "WEBRTC_EXTERNAL_JSON" ]
803 }
Ali Tofigh7fa90572022-03-17 15:47:49 +0100804 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200805}
806
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100807rtc_library("net_helpers") {
808 sources = [
809 "net_helpers.cc",
810 "net_helpers.h",
811 ]
812 deps = []
813 if (is_android) {
814 deps += [ ":ifaddrs_android" ]
815 }
816 if (is_win) {
Nico Weber79bd4f12021-10-05 15:01:26 -0400817 deps += [
Nico Weber79bd4f12021-10-05 15:01:26 -0400818 ":win32",
Florent Castelli15a3c3f2022-04-27 10:33:27 +0200819 "win:windows_version",
Nico Weber79bd4f12021-10-05 15:01:26 -0400820 ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100821 }
Ali Tofigh2ab914c2022-04-13 12:55:15 +0200822 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100823}
824
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100825rtc_library("async_resolver_interface") {
Karl Wiberg02f4e322019-02-11 00:43:43 +0100826 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100827 sources = [
828 "async_resolver_interface.cc",
829 "async_resolver_interface.h",
830 ]
831 deps = [
832 ":socket_address",
833 "system:rtc_export",
834 "third_party/sigslot",
835 ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100836}
837
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100838rtc_library("ip_address") {
Karl Wiberg02f4e322019-02-11 00:43:43 +0100839 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100840 sources = [
841 "ip_address.cc",
842 "ip_address.h",
843 ]
844 deps = [
Florent Castellia876a922022-04-19 17:18:36 +0200845 ":byte_order",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100846 ":net_helpers",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100847 ":stringutils",
848 "system:rtc_export",
849 ]
850 if (is_win) {
851 deps += [ ":win32" ]
852 }
Ali Tofigh7fa90572022-03-17 15:47:49 +0100853 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100854}
855
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100856rtc_library("socket_address") {
Karl Wiberg02f4e322019-02-11 00:43:43 +0100857 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100858 sources = [
859 "socket_address.cc",
860 "socket_address.h",
861 ]
862 deps = [
Florent Castellia876a922022-04-19 17:18:36 +0200863 ":byte_order",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100864 ":checks",
865 ":ip_address",
866 ":logging",
867 ":net_helpers",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100868 ":safe_conversions",
869 ":stringutils",
870 "system:rtc_export",
871 ]
872 if (is_win) {
873 deps += [ ":win32" ]
874 }
Ali Tofigh7fa90572022-03-17 15:47:49 +0100875 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100876}
877
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100878rtc_library("null_socket_server") {
879 sources = [
880 "null_socket_server.cc",
881 "null_socket_server.h",
882 ]
883 deps = [
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100884 ":checks",
885 ":rtc_event",
886 ":socket",
887 ":socket_server",
888 "system:rtc_export",
889 ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100890}
891
Karl Wiberg28522dc2019-01-22 17:54:34 +0100892rtc_source_set("socket_server") {
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100893 sources = [ "socket_server.h" ]
894 deps = [ ":socket_factory" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100895}
896
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100897rtc_library("threading") {
Karl Wiberg02f4e322019-02-11 00:43:43 +0100898 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100899
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100900 sources = [
901 "async_resolver.cc",
902 "async_resolver.h",
903 "internal/default_socket_server.cc",
904 "internal/default_socket_server.h",
905 "message_handler.cc",
906 "message_handler.h",
907 "network_monitor.cc",
908 "network_monitor.h",
909 "network_monitor_factory.cc",
910 "network_monitor_factory.h",
911 "physical_socket_server.cc",
912 "physical_socket_server.h",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100913 "thread.cc",
914 "thread.h",
915 "thread_message.h",
916 ]
Henrik Boström2deee4b2022-01-20 11:58:05 +0100917 absl_deps = [
918 "//third_party/abseil-cpp/absl/algorithm:container",
919 "//third_party/abseil-cpp/absl/base:core_headers",
Ali Tofigh7fa90572022-03-17 15:47:49 +0100920 "//third_party/abseil-cpp/absl/strings",
Henrik Boström2deee4b2022-01-20 11:58:05 +0100921 ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100922 deps = [
923 ":async_resolver_interface",
924 ":atomicops",
Florent Castellia876a922022-04-19 17:18:36 +0200925 ":byte_order",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100926 ":checks",
927 ":criticalsection",
Florent Castellia30aef32022-04-19 17:47:13 +0200928 ":event_tracer",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100929 ":ip_address",
Florent Castelliaa6d05d2022-04-14 13:13:56 +0200930 ":location",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100931 ":logging",
932 ":macromagic",
933 ":network_constants",
934 ":null_socket_server",
Florent Castelli45a05992022-04-14 12:18:28 +0200935 ":platform_thread",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100936 ":platform_thread_types",
Florent Castellif86f6f92022-04-05 02:54:12 +0200937 ":refcount",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100938 ":rtc_event",
939 ":rtc_task_queue",
940 ":socket_address",
941 ":socket_server",
942 ":timeutils",
943 "../api:function_view",
Markus Handell1366b0f2021-04-21 10:22:34 +0200944 "../api:refcountedbase",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100945 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 14:31:24 +0100946 "../api:sequence_checker",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100947 "../api/task_queue",
Niels Möller6d176022021-02-09 14:44:48 +0100948 "synchronization:mutex",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100949 "system:no_unique_address",
950 "system:rtc_export",
951 "task_utils:pending_task_safety_flag",
952 "task_utils:to_queued_task",
953 "third_party/sigslot",
954 ]
955 if (is_android) {
956 deps += [ ":ifaddrs_android" ]
957 }
958 if (is_win) {
959 deps += [ ":win32" ]
960 }
961 if (is_mac || is_ios) {
Byoungchan Lee08438fc2021-10-12 22:53:35 +0900962 deps += [ "system:cocoa_threading" ]
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100963 }
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100964}
965
Karl Wiberg28522dc2019-01-22 17:54:34 +0100966rtc_source_set("socket_factory") {
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100967 sources = [ "socket_factory.h" ]
Niels Möllerd0b88792021-08-12 10:32:30 +0200968 deps = [ ":socket" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100969}
970
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100971rtc_library("async_socket") {
972 sources = [
973 "async_socket.cc",
974 "async_socket.h",
975 ]
976 deps = [
977 ":checks",
978 ":socket",
979 ":socket_address",
980 "third_party/sigslot",
981 ]
Niels Möller8729d782021-08-11 11:22:44 +0200982 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100983}
984
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100985rtc_library("socket") {
986 sources = [
987 "socket.cc",
988 "socket.h",
989 ]
990 deps = [
991 ":macromagic",
992 ":socket_address",
Niels Möllerd0b88792021-08-12 10:32:30 +0200993 "third_party/sigslot",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +0100994 ]
995 if (is_win) {
996 deps += [ ":win32" ]
997 }
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100998}
999
1000rtc_source_set("network_constants") {
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001001 sources = [
1002 "network_constants.cc",
1003 "network_constants.h",
1004 ]
1005 deps = [ ":checks" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +01001006}
1007
1008if (is_android) {
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001009 rtc_library("ifaddrs_android") {
1010 sources = [
1011 "ifaddrs_android.cc",
1012 "ifaddrs_android.h",
1013 ]
1014 libs = [
1015 "log",
1016 "GLESv2",
1017 ]
Danil Chapovalove6106102022-02-16 12:29:02 +01001018 absl_deps = [ "//third_party/abseil-cpp/absl/cleanup" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +01001019 }
1020}
1021
1022if (is_win) {
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001023 rtc_library("win32") {
Tommi16db7ff2020-09-26 11:57:26 +02001024 sources = [
1025 "win32.cc",
1026 "win32.h",
1027 "win32_window.cc",
1028 "win32_window.h",
1029 ]
1030
1031 deps = [
Florent Castellia876a922022-04-19 17:18:36 +02001032 ":byte_order",
Tommi16db7ff2020-09-26 11:57:26 +02001033 ":checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001034 ":logging",
Tommi16db7ff2020-09-26 11:57:26 +02001035 ":macromagic",
Florent Castelli57aa81b2022-04-04 17:14:02 +02001036 ":stringutils",
Tommi16db7ff2020-09-26 11:57:26 +02001037 ]
1038
1039 libs = [
1040 "crypt32.lib",
1041 "iphlpapi.lib",
1042 "secur32.lib",
1043 ]
1044
1045 defines = [ "_CRT_NONSTDC_NO_DEPRECATE" ]
Karl Wiberg0b6d0e62018-12-06 14:50:45 +01001046 }
1047}
1048
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001049rtc_library("rtc_base") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001050 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001051 cflags = []
1052 cflags_cc = []
1053 libs = []
1054 defines = []
1055 deps = [
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001056 ":async_resolver_interface",
1057 ":async_socket",
Florent Castellif9c59842022-04-19 17:07:23 +02001058 ":buffer",
Florent Castelliceb7b362022-04-19 17:35:04 +02001059 ":byte_buffer",
Florent Castellia876a922022-04-19 17:18:36 +02001060 ":byte_order",
Tomas Gunnarssonf15189d2022-04-13 09:03:52 +00001061 ":callback_list",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001062 ":checks",
Florent Castellied4aadc2022-04-19 17:40:46 +02001063 ":copy_on_write_buffer",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001064 ":ip_address",
Florent Castelliaa6d05d2022-04-14 13:13:56 +02001065 ":location",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001066 ":logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001067 ":macromagic",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001068 ":network_constants",
1069 ":null_socket_server",
Florent Castellif86f6f92022-04-05 02:54:12 +02001070 ":refcount",
Florent Castelli33d31fb2022-04-04 16:57:52 +02001071 ":rtc_event",
Markus Handellfbf4ad22020-05-26 18:43:55 +02001072 ":rtc_task_queue",
Florent Castellie10a9f62022-04-04 17:04:37 +02001073 ":safe_conversions",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001074 ":socket",
1075 ":socket_address",
1076 ":socket_factory",
1077 ":socket_server",
Patrik Höglund3e113432017-12-15 14:40:10 +01001078 ":stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001079 ":threading",
Florent Castellidd837e22022-04-04 17:16:15 +02001080 ":timeutils",
Florent Castellid119b9e2022-04-14 13:23:51 +02001081 ":zero_memory",
Joachim Bauch58daf402017-12-21 22:00:34 +01001082 "../api:array_view",
Jonas Orelande62c2f22022-03-29 11:04:48 +02001083 "../api:field_trials_view",
Danil Chapovalov89313452019-11-29 12:56:43 +01001084 "../api:function_view",
Tommi86ee89f2021-04-20 16:58:01 +02001085 "../api:refcountedbase",
Mirko Bonadeid9708072019-01-25 20:26:48 +01001086 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 14:31:24 +01001087 "../api:sequence_checker",
Artem Titov9d777622020-09-18 18:23:08 +02001088 "../api/numerics",
Danil Chapovalov912b3b82019-11-22 15:52:40 +01001089 "../api/task_queue",
Jonas Orelandc06fe8b2022-03-28 14:58:26 +02001090 "../api/transport:field_trial_based_config",
Harald Alvestrand13799132020-03-09 19:39:36 +01001091 "../system_wrappers:field_trial",
Jonas Orelandc06fe8b2022-03-28 14:58:26 +02001092 "memory:always_valid_pointer",
Sebastian Janssone07864e2018-10-15 09:28:15 +02001093 "network:sent_packet",
Markus Handell18523c32020-07-08 17:55:58 +02001094 "synchronization:mutex",
Niels Möller23213d92019-01-22 11:01:24 +01001095 "system:file_wrapper",
Jonas Oreland71fda362020-03-20 16:11:56 +01001096 "system:inline",
Mirko Bonadei20e4c802020-11-23 11:07:42 +01001097 "system:no_unique_address",
Mirko Bonadei35214fc2019-09-23 14:54:28 +02001098 "system:rtc_export",
Markus Handellfbf4ad22020-05-26 18:43:55 +02001099 "task_utils:pending_task_safety_flag",
Tommi04482982020-10-05 12:43:53 +00001100 "task_utils:repeating_task",
Sebastian Janssonda7267a2020-03-03 10:48:05 +01001101 "task_utils:to_queued_task",
Artem Titova76af0c2018-07-23 17:38:12 +02001102 "third_party/base64",
Artem Titove41c4332018-07-25 15:04:28 +02001103 "third_party/sigslot",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001104 ]
1105 absl_deps = [
Steve Anton2acd1632019-03-25 13:48:30 -07001106 "//third_party/abseil-cpp/absl/algorithm:container",
Taylor Brandstetter7b69a442020-08-20 23:43:13 +00001107 "//third_party/abseil-cpp/absl/container:flat_hash_map",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001108 "//third_party/abseil-cpp/absl/memory",
Niels Möller3c7d5992018-10-19 15:29:54 +02001109 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +02001110 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001111 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001112 public_configs = []
1113
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001114 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001115 "async_invoker.cc",
1116 "async_invoker.h",
1117 "async_invoker_inl.h",
1118 "async_packet_socket.cc",
1119 "async_packet_socket.h",
Steve Anton10542f22019-01-11 09:11:00 -08001120 "async_tcp_socket.cc",
1121 "async_tcp_socket.h",
1122 "async_udp_socket.cc",
1123 "async_udp_socket.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001124 "crc32.cc",
1125 "crc32.h",
Steve Anton10542f22019-01-11 09:11:00 -08001126 "crypt_string.cc",
1127 "crypt_string.h",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +01001128 "data_rate_limiter.cc",
1129 "data_rate_limiter.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +01001130 "dscp.h",
Steve Anton10542f22019-01-11 09:11:00 -08001131 "file_rotating_stream.cc",
1132 "file_rotating_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001133 "helpers.cc",
1134 "helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -08001135 "http_common.cc",
1136 "http_common.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001137 "mdns_responder_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -08001138 "message_digest.cc",
1139 "message_digest.h",
Steve Anton10542f22019-01-11 09:11:00 -08001140 "net_helper.cc",
1141 "net_helper.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001142 "network.cc",
1143 "network.h",
henrikaf0dc5c52020-04-09 18:46:00 +02001144 "network_route.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001145 "network_route.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001146 "openssl.h",
Steve Anton10542f22019-01-11 09:11:00 -08001147 "openssl_adapter.cc",
1148 "openssl_adapter.h",
Steve Anton10542f22019-01-11 09:11:00 -08001149 "openssl_digest.cc",
1150 "openssl_digest.h",
Taylor Brandstetter165c6182020-12-10 16:23:03 -08001151 "openssl_key_pair.cc",
1152 "openssl_key_pair.h",
Steve Anton10542f22019-01-11 09:11:00 -08001153 "openssl_session_cache.cc",
1154 "openssl_session_cache.h",
1155 "openssl_stream_adapter.cc",
1156 "openssl_stream_adapter.h",
1157 "openssl_utility.cc",
1158 "openssl_utility.h",
Steve Anton10542f22019-01-11 09:11:00 -08001159 "proxy_info.cc",
1160 "proxy_info.h",
1161 "rtc_certificate.cc",
1162 "rtc_certificate.h",
1163 "rtc_certificate_generator.cc",
1164 "rtc_certificate_generator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001165 "sigslot_repeater.h",
Steve Anton10542f22019-01-11 09:11:00 -08001166 "socket_adapters.cc",
1167 "socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001168 "socket_address_pair.cc",
1169 "socket_address_pair.h",
Steve Anton10542f22019-01-11 09:11:00 -08001170 "ssl_adapter.cc",
1171 "ssl_adapter.h",
1172 "ssl_certificate.cc",
1173 "ssl_certificate.h",
1174 "ssl_fingerprint.cc",
1175 "ssl_fingerprint.h",
1176 "ssl_identity.cc",
1177 "ssl_identity.h",
1178 "ssl_stream_adapter.cc",
1179 "ssl_stream_adapter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001180 "stream.cc",
1181 "stream.h",
Amit Hilbuchdbb49df2019-01-23 14:54:24 -08001182 "unique_id_generator.cc",
1183 "unique_id_generator.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001184 ]
1185
Taylor Brandstetterc70bd182020-12-11 11:30:43 -08001186 # If we are building the SSL library ourselves, we know it's BoringSSL.
1187 if (rtc_build_ssl) {
Taylor Brandstetter165c6182020-12-10 16:23:03 -08001188 sources += [
1189 "boringssl_certificate.cc",
1190 "boringssl_certificate.h",
1191 "boringssl_identity.cc",
1192 "boringssl_identity.h",
1193 ]
1194 } else {
1195 sources += [
1196 "openssl_certificate.cc",
1197 "openssl_certificate.h",
1198 "openssl_identity.cc",
1199 "openssl_identity.h",
1200 ]
1201 }
1202
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001203 if (build_with_chromium) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001204 include_dirs = [ "../../boringssl/src/include" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001205 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001206 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001207 "log_sinks.cc",
1208 "log_sinks.h",
Steve Anton10542f22019-01-11 09:11:00 -08001209 "rolling_accumulator.h",
1210 "ssl_roots.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001211 ]
1212
Yves Gerey3dfb6802019-05-13 17:01:32 +02001213 deps += [ ":rtc_numerics" ]
1214
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001215 if (is_win) {
Steve Antonf3802842019-01-24 19:07:40 -08001216 sources += [ "win32_socket_init.h" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001217 }
1218 } # !build_with_chromium
1219
1220 if (rtc_build_ssl) {
1221 deps += [ "//third_party/boringssl" ]
Dan Minor9cdd8762018-01-16 10:40:39 -05001222 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001223 configs += [ ":external_ssl_library" ]
1224 }
1225
1226 if (is_android) {
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001227 deps += [ ":ifaddrs_android" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001228 }
1229
1230 if (is_ios || is_mac) {
Steve Anton10542f22019-01-11 09:11:00 -08001231 sources += [ "mac_ifaddrs_converter.cc" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001232 }
1233
Hidehiko Abef264e702020-09-10 18:10:11 +09001234 if (is_linux || is_chromeos) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001235 libs += [
1236 "dl",
1237 "rt",
1238 ]
1239 }
1240
Oleh Prypinb3f78de2019-07-18 22:25:48 +02001241 if (is_ios) {
Sylvain Defresnec7f0dff2020-07-03 10:19:30 +02001242 frameworks = [
Oleh Prypinb3f78de2019-07-18 22:25:48 +02001243 "CFNetwork.framework",
1244 "Foundation.framework",
1245 "Security.framework",
1246 "SystemConfiguration.framework",
1247 "UIKit.framework",
1248 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001249 }
1250
1251 if (is_win) {
Tommi16db7ff2020-09-26 11:57:26 +02001252 deps += [ ":win32" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001253 }
1254
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001255 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001256 sources += [
1257 "ifaddrs_converter.cc",
1258 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001259 ]
1260 }
1261
1262 if (is_nacl) {
Harald Alvestrand13799132020-03-09 19:39:36 +01001263 public_deps += # no-presubmit-check TODO(webrtc:8603)
1264 [ "//native_client_sdk/src/libraries/nacl_io" ]
1265
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001266 defines += [ "timezone=_timezone" ]
1267 sources -= [ "ifaddrs_converter.cc" ]
1268 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001269}
1270
1271rtc_source_set("gtest_prod") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +01001272 sources = [ "gtest_prod_util.h" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001273}
1274
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001275rtc_library("gunit_helpers") {
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001276 testonly = true
1277 sources = [
1278 "gunit.cc",
1279 "gunit.h",
1280 ]
1281 deps = [
1282 ":logging",
1283 ":rtc_base",
1284 ":rtc_base_tests_utils",
1285 ":stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001286 ":threading",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001287 "../test:test_support",
1288 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001289 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001290}
1291
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001292rtc_library("testclient") {
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001293 testonly = true
1294 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001295 "test_client.cc",
1296 "test_client.h",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001297 ]
1298 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001299 ":gunit_helpers",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001300 ":rtc_base",
1301 ":rtc_base_tests_utils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001302 ":threading",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001303 ":timeutils",
Markus Handell18523c32020-07-08 17:55:58 +02001304 "synchronization:mutex",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001305 ]
1306}
1307
Mirko Bonadei3d259352020-10-23 12:04:40 +02001308rtc_library("callback_list_unittests") {
Lahiru Ginnaliya Gamathige3e982802020-09-16 10:34:21 -07001309 testonly = true
1310
Mirko Bonadei3d259352020-10-23 12:04:40 +02001311 sources = [ "callback_list_unittest.cc" ]
Lahiru Ginnaliya Gamathige3e982802020-09-16 10:34:21 -07001312 deps = [
Mirko Bonadei3d259352020-10-23 12:04:40 +02001313 ":callback_list",
Lahiru Ginnaliya Gamathige3e982802020-09-16 10:34:21 -07001314 ":gunit_helpers",
1315 ":rtc_base",
1316 "../api:function_view",
1317 "../test:test_support",
1318 ]
1319}
1320
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001321rtc_library("rtc_base_tests_utils") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001322 testonly = true
1323 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001324 "cpu_time.cc",
1325 "cpu_time.h",
Steve Anton10542f22019-01-11 09:11:00 -08001326 "fake_clock.cc",
1327 "fake_clock.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001328 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 09:11:00 -08001329 "fake_network.h",
1330 "fake_ssl_identity.cc",
1331 "fake_ssl_identity.h",
1332 "firewall_socket_server.cc",
1333 "firewall_socket_server.h",
Niels Möllere7547d52018-11-01 09:33:08 +01001334 "memory_stream.cc",
1335 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001336 "memory_usage.cc",
1337 "memory_usage.h",
Steve Anton10542f22019-01-11 09:11:00 -08001338 "nat_server.cc",
1339 "nat_server.h",
1340 "nat_socket_factory.cc",
1341 "nat_socket_factory.h",
1342 "nat_types.cc",
1343 "nat_types.h",
1344 "proxy_server.cc",
1345 "proxy_server.h",
Niels Möller44153152018-12-17 14:04:05 +01001346 "server_socket_adapters.cc",
1347 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001348 "sigslot_tester.h",
Steve Anton10542f22019-01-11 09:11:00 -08001349 "socket_stream.cc",
1350 "socket_stream.h",
1351 "test_base64.h",
1352 "test_certificate_verifier.h",
1353 "test_echo_server.cc",
1354 "test_echo_server.h",
1355 "test_utils.cc",
1356 "test_utils.h",
1357 "virtual_socket_server.cc",
1358 "virtual_socket_server.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001359 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001360 deps = [
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001361 ":async_socket",
Florent Castelliceb7b362022-04-19 17:35:04 +02001362 ":byte_buffer",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001363 ":checks",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001364 ":ip_address",
Florent Castelliaa6d05d2022-04-14 13:13:56 +02001365 ":location",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001366 ":logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001367 ":macromagic",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001368 ":rtc_base",
Florent Castelli33d31fb2022-04-04 16:57:52 +02001369 ":rtc_event",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001370 ":socket",
1371 ":socket_address",
1372 ":socket_factory",
1373 ":socket_server",
Florent Castelli57aa81b2022-04-04 17:14:02 +02001374 ":stringutils",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001375 ":threading",
Florent Castellidd837e22022-04-04 17:16:15 +02001376 ":timeutils",
Sebastian Jansson5f83cf02018-05-08 14:52:22 +02001377 "../api/units:time_delta",
Sebastian Janssond624c392019-04-17 10:36:03 +02001378 "../api/units:timestamp",
Jonas Orelandc06fe8b2022-03-28 14:58:26 +02001379 "../test:scoped_key_value_config",
1380 "memory:always_valid_pointer",
Niels Möller13339482019-03-28 13:30:15 +01001381 "memory:fifo_buffer",
Markus Handell18523c32020-07-08 17:55:58 +02001382 "synchronization:mutex",
Niels Möllerc964d802021-03-25 09:31:26 +01001383 "task_utils:to_queued_task",
Artem Titove41c4332018-07-25 15:04:28 +02001384 "third_party/sigslot",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001385 ]
1386 absl_deps = [
Steve Anton2acd1632019-03-25 13:48:30 -07001387 "//third_party/abseil-cpp/absl/algorithm:container",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001388 "//third_party/abseil-cpp/absl/memory",
Ali Tofigh7fa90572022-03-17 15:47:49 +01001389 "//third_party/abseil-cpp/absl/strings",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001390 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001391}
1392
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001393rtc_library("task_queue_for_test") {
Tommida8781f2018-02-19 12:41:43 +01001394 testonly = true
1395
1396 sources = [
1397 "task_queue_for_test.cc",
1398 "task_queue_for_test.h",
1399 ]
1400 deps = [
1401 ":checks",
Florent Castelliaa6d05d2022-04-14 13:13:56 +02001402 ":location",
Florent Castelli4467ad72022-04-04 15:18:46 +02001403 ":macromagic",
Danil Chapovalovd26a9162019-03-19 18:08:37 +01001404 ":rtc_event",
Tommida8781f2018-02-19 12:41:43 +01001405 ":rtc_task_queue",
Danil Chapovaloveb90e6f2019-10-15 10:04:57 +02001406 "../api/task_queue",
Danil Chapovalovd26a9162019-03-19 18:08:37 +01001407 "../api/task_queue:default_task_queue_factory",
Danil Chapovalov1aa75812019-03-05 11:11:35 +01001408 "task_utils:to_queued_task",
Tommida8781f2018-02-19 12:41:43 +01001409 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +02001410 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Tommida8781f2018-02-19 12:41:43 +01001411}
1412
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001413if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +02001414 rtc_library("sigslot_unittest") {
Artem Titove41c4332018-07-25 15:04:28 +02001415 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +01001416 sources = [ "sigslot_unittest.cc" ]
Artem Titove41c4332018-07-25 15:04:28 +02001417 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001418 ":gunit_helpers",
Artem Titove41c4332018-07-25 15:04:28 +02001419 ":rtc_base",
1420 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 16:47:49 +01001421 "../test:test_support",
Markus Handell18523c32020-07-08 17:55:58 +02001422 "synchronization:mutex",
Artem Titove41c4332018-07-25 15:04:28 +02001423 "third_party/sigslot",
1424 ]
1425 }
1426
Karl Wiberg70026f92020-09-18 10:03:16 +02001427 rtc_library("untyped_function_unittest") {
Karl Wiberg78e9acd2020-09-15 11:06:34 +02001428 testonly = true
Karl Wiberg70026f92020-09-18 10:03:16 +02001429 sources = [ "untyped_function_unittest.cc" ]
Karl Wiberg78e9acd2020-09-15 11:06:34 +02001430 deps = [
Karl Wiberg70026f92020-09-18 10:03:16 +02001431 ":untyped_function",
Karl Wiberg78e9acd2020-09-15 11:06:34 +02001432 "../test:test_support",
1433 ]
1434 }
1435
Henrik Boström27c29362019-10-21 15:21:55 +02001436 rtc_library("rtc_operations_chain_unittests") {
1437 testonly = true
1438
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +01001439 sources = [ "operations_chain_unittest.cc" ]
Henrik Boström27c29362019-10-21 15:21:55 +02001440 deps = [
Henrik Boströme8b00a12020-08-25 17:11:20 +02001441 ":gunit_helpers",
Henrik Boström27c29362019-10-21 15:21:55 +02001442 ":rtc_base",
Henrik Boström27c29362019-10-21 15:21:55 +02001443 ":rtc_event",
1444 ":rtc_operations_chain",
Mirko Bonadeie5f4c6b2021-01-15 10:41:01 +01001445 ":threading",
Henrik Boström27c29362019-10-21 15:21:55 +02001446 "../test:test_support",
1447 ]
1448 }
1449
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001450 if (!build_with_chromium) {
1451 rtc_library("rtc_base_nonparallel_tests") {
1452 testonly = true
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001453
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001454 sources = [
1455 "cpu_time_unittest.cc",
1456 "file_rotating_stream_unittest.cc",
1457 "null_socket_server_unittest.cc",
1458 "physical_socket_server_unittest.cc",
1459 "socket_address_unittest.cc",
1460 "socket_unittest.cc",
1461 "socket_unittest.h",
Tommi16db7ff2020-09-26 11:57:26 +02001462 ]
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001463 deps = [
Florent Castellif9c59842022-04-19 17:07:23 +02001464 ":buffer",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001465 ":checks",
1466 ":gunit_helpers",
1467 ":ip_address",
Florent Castelliaa6d05d2022-04-14 13:13:56 +02001468 ":location",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001469 ":logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001470 ":macromagic",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001471 ":net_helpers",
1472 ":null_socket_server",
Florent Castelli45a05992022-04-14 12:18:28 +02001473 ":platform_thread",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001474 ":rtc_base",
1475 ":rtc_base_tests_utils",
1476 ":socket",
1477 ":socket_address",
1478 ":socket_server",
1479 ":testclient",
1480 ":threading",
Florent Castellidd837e22022-04-04 17:16:15 +02001481 ":timeutils",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001482 "../system_wrappers",
1483 "../test:fileutils",
1484 "../test:test_main",
1485 "../test:test_support",
1486 "third_party/sigslot",
1487 "//testing/gtest",
1488 ]
Ali Tofigh7fa90572022-03-17 15:47:49 +01001489 absl_deps = [
1490 "//third_party/abseil-cpp/absl/memory",
1491 "//third_party/abseil-cpp/absl/strings",
1492 ]
Tommi16db7ff2020-09-26 11:57:26 +02001493 }
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001494
1495 rtc_library("rtc_base_approved_unittests") {
1496 testonly = true
1497 sources = [
1498 "atomic_ops_unittest.cc",
1499 "base64_unittest.cc",
1500 "bit_buffer_unittest.cc",
Danil Chapovalov5af152c2021-08-31 15:27:51 +02001501 "bitstream_reader_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001502 "bounded_inline_vector_unittest.cc",
1503 "buffer_queue_unittest.cc",
1504 "buffer_unittest.cc",
1505 "byte_buffer_unittest.cc",
1506 "byte_order_unittest.cc",
1507 "checks_unittest.cc",
1508 "copy_on_write_buffer_unittest.cc",
1509 "deprecated/recursive_critical_section_unittest.cc",
1510 "event_tracer_unittest.cc",
1511 "event_unittest.cc",
1512 "logging_unittest.cc",
1513 "numerics/divide_round_unittest.cc",
1514 "numerics/histogram_percentile_counter_unittest.cc",
1515 "numerics/mod_ops_unittest.cc",
1516 "numerics/moving_max_counter_unittest.cc",
1517 "numerics/safe_compare_unittest.cc",
1518 "numerics/safe_minmax_unittest.cc",
1519 "numerics/sample_counter_unittest.cc",
1520 "one_time_event_unittest.cc",
1521 "platform_thread_unittest.cc",
1522 "random_unittest.cc",
1523 "rate_limiter_unittest.cc",
1524 "rate_statistics_unittest.cc",
1525 "rate_tracker_unittest.cc",
1526 "ref_counted_object_unittest.cc",
1527 "sanitizer_unittest.cc",
1528 "string_encode_unittest.cc",
1529 "string_to_number_unittest.cc",
1530 "string_utils_unittest.cc",
1531 "strings/string_builder_unittest.cc",
1532 "strings/string_format_unittest.cc",
Victor Boivieb9182302021-09-21 14:51:05 +02001533 "strong_alias_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001534 "swap_queue_unittest.cc",
1535 "thread_annotations_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001536 "time_utils_unittest.cc",
1537 "timestamp_aligner_unittest.cc",
1538 "virtual_socket_unittest.cc",
1539 "zero_memory_unittest.cc",
1540 ]
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001541 deps = [
Florent Castellibddfe022022-04-04 15:03:10 +02001542 ":atomicops",
Florent Castelli7f623b02022-04-14 13:34:56 +02001543 ":bit_buffer",
Danil Chapovalov5af152c2021-08-31 15:27:51 +02001544 ":bitstream_reader",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001545 ":bounded_inline_vector",
Florent Castellif9c59842022-04-19 17:07:23 +02001546 ":buffer",
Florent Castelli76063752022-04-19 17:14:26 +02001547 ":buffer_queue",
Florent Castelliceb7b362022-04-19 17:35:04 +02001548 ":byte_buffer",
Florent Castellia876a922022-04-19 17:18:36 +02001549 ":byte_order",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001550 ":checks",
Florent Castellied4aadc2022-04-19 17:40:46 +02001551 ":copy_on_write_buffer",
Niels Möller9233af32021-06-22 11:24:06 +02001552 ":criticalsection",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001553 ":divide_round",
Florent Castellia30aef32022-04-19 17:47:13 +02001554 ":event_tracer",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001555 ":gunit_helpers",
Florent Castelli17296422022-04-14 13:48:10 +02001556 ":histogram_percentile_counter",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001557 ":ip_address",
Florent Castelliaa6d05d2022-04-14 13:13:56 +02001558 ":location",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001559 ":logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001560 ":macromagic",
Florent Castelli31764092022-04-14 13:41:58 +02001561 ":mod_ops",
1562 ":moving_max_counter",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001563 ":null_socket_server",
Florent Castelli6b608592022-04-14 13:18:04 +02001564 ":one_time_event",
Florent Castelli45a05992022-04-14 12:18:28 +02001565 ":platform_thread",
Florent Castelli71337f32022-04-14 12:41:26 +02001566 ":random",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001567 ":rate_limiter",
Florent Castelli6bb1fd32022-04-19 15:58:39 +02001568 ":rate_statistics",
Florent Castelli58cc4682022-04-19 15:50:28 +02001569 ":rate_tracker",
Florent Castellif86f6f92022-04-05 02:54:12 +02001570 ":refcount",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001571 ":rtc_base",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001572 ":rtc_base_tests_utils",
Florent Castelli33d31fb2022-04-04 16:57:52 +02001573 ":rtc_event",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001574 ":rtc_numerics",
1575 ":rtc_task_queue",
1576 ":safe_compare",
1577 ":safe_minmax",
Florent Castelli83a36d42022-04-14 13:44:39 +02001578 ":sample_counter",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001579 ":sanitizer",
1580 ":socket",
1581 ":socket_address",
1582 ":socket_server",
1583 ":stringutils",
Florent Castellia6c10e32022-04-14 13:08:44 +02001584 ":strong_alias",
Florent Castellid119b9e2022-04-14 13:23:51 +02001585 ":swap_queue",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001586 ":testclient",
1587 ":threading",
Florent Castellib1dc4e42022-04-14 13:20:12 +02001588 ":timestamp_aligner",
Florent Castellidd837e22022-04-04 17:16:15 +02001589 ":timeutils",
Florent Castellid119b9e2022-04-14 13:23:51 +02001590 ":zero_memory",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001591 "../api:array_view",
1592 "../api:scoped_refptr",
1593 "../api/numerics",
1594 "../api/units:time_delta",
1595 "../system_wrappers",
1596 "../test:fileutils",
1597 "../test:test_main",
1598 "../test:test_support",
Nico Weber79bd4f12021-10-05 15:01:26 -04001599 "containers:flat_map",
Victor Boiviefd954fc2021-06-29 09:21:11 +02001600 "containers:unittests",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001601 "memory:unittests",
1602 "synchronization:mutex",
1603 "task_utils:to_queued_task",
1604 "third_party/base64",
1605 "third_party/sigslot",
1606 ]
1607 absl_deps = [
1608 "//third_party/abseil-cpp/absl/base:core_headers",
1609 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov5af152c2021-08-31 15:27:51 +02001610 "//third_party/abseil-cpp/absl/numeric:bits",
Ali Tofigh6364d082022-03-14 13:32:04 +01001611 "//third_party/abseil-cpp/absl/strings",
Markus Handellad5037b2021-05-07 15:02:36 +02001612 "//third_party/abseil-cpp/absl/types:optional",
Tommi16db7ff2020-09-26 11:57:26 +02001613 ]
Florent Castelli15a3c3f2022-04-27 10:33:27 +02001614
1615 if (is_win) {
1616 deps += [ "win:windows_version_unittest" ]
1617 }
Tommi16db7ff2020-09-26 11:57:26 +02001618 }
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001619
1620 rtc_library("rtc_task_queue_unittests") {
1621 testonly = true
1622
1623 sources = [ "task_queue_unittest.cc" ]
1624 deps = [
1625 ":gunit_helpers",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001626 ":rtc_base_tests_utils",
Florent Castelli33d31fb2022-04-04 16:57:52 +02001627 ":rtc_event",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001628 ":rtc_task_queue",
1629 ":task_queue_for_test",
Florent Castellidd837e22022-04-04 17:16:15 +02001630 ":timeutils",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001631 "../test:test_main",
1632 "../test:test_support",
1633 ]
1634 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
Diogo Real1dca9d52017-08-29 12:18:32 -07001635 }
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001636
1637 rtc_library("weak_ptr_unittests") {
1638 testonly = true
1639
1640 sources = [ "weak_ptr_unittest.cc" ]
1641 deps = [
1642 ":gunit_helpers",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001643 ":rtc_base_tests_utils",
1644 ":rtc_event",
1645 ":task_queue_for_test",
1646 ":weak_ptr",
1647 "../test:test_main",
1648 "../test:test_support",
1649 ]
1650 }
1651
1652 rtc_library("rtc_numerics_unittests") {
1653 testonly = true
1654
1655 sources = [
1656 "numerics/event_based_exponential_moving_average_unittest.cc",
1657 "numerics/exp_filter_unittest.cc",
1658 "numerics/moving_average_unittest.cc",
1659 "numerics/moving_median_filter_unittest.cc",
1660 "numerics/percentile_filter_unittest.cc",
1661 "numerics/running_statistics_unittest.cc",
1662 "numerics/sequence_number_util_unittest.cc",
1663 ]
1664 deps = [
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001665 ":rtc_numerics",
1666 "../test:test_main",
1667 "../test:test_support",
1668 ]
1669 absl_deps = [ "//third_party/abseil-cpp/absl/algorithm:container" ]
1670 }
1671
1672 rtc_library("rtc_json_unittests") {
1673 testonly = true
1674
1675 sources = [ "strings/json_unittest.cc" ]
1676 deps = [
1677 ":gunit_helpers",
1678 ":rtc_base_tests_utils",
1679 ":rtc_json",
1680 "../test:test_main",
1681 "../test:test_support",
1682 ]
1683 }
1684
1685 rtc_library("rtc_base_unittests") {
1686 testonly = true
1687 defines = []
1688
1689 sources = [
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001690 "crc32_unittest.cc",
1691 "data_rate_limiter_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001692 "fake_clock_unittest.cc",
1693 "helpers_unittest.cc",
1694 "ip_address_unittest.cc",
1695 "memory_usage_unittest.cc",
1696 "message_digest_unittest.cc",
1697 "nat_unittest.cc",
1698 "network_route_unittest.cc",
1699 "network_unittest.cc",
1700 "proxy_unittest.cc",
1701 "rolling_accumulator_unittest.cc",
1702 "rtc_certificate_generator_unittest.cc",
1703 "rtc_certificate_unittest.cc",
1704 "sigslot_tester_unittest.cc",
1705 "test_client_unittest.cc",
1706 "thread_unittest.cc",
1707 "unique_id_generator_unittest.cc",
1708 ]
1709 deps = [
Florent Castellibddfe022022-04-04 15:03:10 +02001710 ":atomicops",
Florent Castellif9c59842022-04-19 17:07:23 +02001711 ":buffer",
Florent Castelli76063752022-04-19 17:14:26 +02001712 ":buffer_queue",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001713 ":checks",
1714 ":gunit_helpers",
1715 ":ip_address",
Florent Castelli0af55ba2022-04-04 15:06:30 +02001716 ":logging",
Florent Castelli4467ad72022-04-04 15:18:46 +02001717 ":macromagic",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001718 ":net_helpers",
1719 ":null_socket_server",
Florent Castellif86f6f92022-04-05 02:54:12 +02001720 ":refcount",
Florent Castellib96902d2022-04-14 11:58:24 +02001721 ":rtc_base",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001722 ":rtc_base_tests_utils",
Florent Castelli33d31fb2022-04-04 16:57:52 +02001723 ":rtc_event",
Florent Castellie10a9f62022-04-04 17:04:37 +02001724 ":safe_conversions",
Niels Möllerd0b88792021-08-12 10:32:30 +02001725 ":socket",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001726 ":socket_address",
1727 ":socket_factory",
1728 ":socket_server",
1729 ":stringutils",
1730 ":testclient",
1731 ":threading",
Florent Castellidd837e22022-04-04 17:16:15 +02001732 ":timeutils",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001733 "../api:array_view",
1734 "../api/task_queue",
1735 "../api/task_queue:task_queue_test",
1736 "../test:field_trial",
1737 "../test:fileutils",
1738 "../test:rtc_expect_death",
Jonas Orelandc06fe8b2022-03-28 14:58:26 +02001739 "../test:scoped_key_value_config",
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001740 "../test:test_main",
1741 "../test:test_support",
1742 "memory:fifo_buffer",
1743 "synchronization:mutex",
1744 "task_utils:pending_task_safety_flag",
1745 "task_utils:to_queued_task",
1746 "third_party/sigslot",
1747 ]
1748 if (enable_google_benchmarks) {
1749 deps += [ "synchronization:synchronization_unittests" ]
1750 }
1751 if (is_win) {
1752 sources += [
1753 "win32_unittest.cc",
1754 "win32_window_unittest.cc",
1755 ]
1756 deps += [ ":win32" ]
1757 }
1758 if (is_posix || is_fuchsia) {
1759 sources += [
1760 "openssl_adapter_unittest.cc",
1761 "openssl_session_cache_unittest.cc",
1762 "openssl_utility_unittest.cc",
1763 "ssl_adapter_unittest.cc",
1764 "ssl_identity_unittest.cc",
1765 "ssl_stream_adapter_unittest.cc",
1766 ]
1767 }
1768 absl_deps = [
1769 "//third_party/abseil-cpp/absl/algorithm:container",
1770 "//third_party/abseil-cpp/absl/memory",
1771 "//third_party/abseil-cpp/absl/strings",
1772 "//third_party/abseil-cpp/absl/types:optional",
1773 ]
Florent Castellib96902d2022-04-14 11:58:24 +02001774
Andrey Logvine7c79fd2021-02-01 09:56:37 +00001775 if (build_with_chromium) {
1776 include_dirs = [ "../../boringssl/src/include" ]
1777 }
1778 if (rtc_build_ssl) {
1779 deps += [ "//third_party/boringssl" ]
1780 } else {
1781 configs += [ ":external_ssl_library" ]
1782 }
Diogo Real1dca9d52017-08-29 12:18:32 -07001783 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001784 }
1785}
1786
Henrik Kjellander73e21802017-06-20 08:38:58 +02001787if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +00001788 rtc_android_library("base_java") {
Sami Kalliomäki51f599b2019-07-03 14:13:08 +02001789 visibility = [ "*" ]
Natalie Chouinard65bbcab2019-12-23 14:02:25 -08001790 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001791 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 14:31:38 +02001792 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001793 "java/src/org/webrtc/Logging.java",
1794 "java/src/org/webrtc/Size.java",
1795 "java/src/org/webrtc/ThreadUtils.java",
1796 ]
Byoungchan Lee02334e02021-08-14 11:41:59 +09001797 deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
Henrik Kjellander73e21802017-06-20 08:38:58 +02001798 }
Jonas Orelandf7721fb2020-08-07 11:08:34 +02001799 java_cpp_enum("network_monitor_enums") {
1800 sources = [ "network_monitor.h" ]
Jonas Orelandfe4688e2020-08-07 14:08:33 +02001801 visibility = [ "*" ]
Jonas Orelandf7721fb2020-08-07 11:08:34 +02001802 }
Henrik Kjellander73e21802017-06-20 08:38:58 +02001803}