2017-06-29 08:03:04 +02:00
|
|
|
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
2017-06-20 08:38:58 +02:00
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a BSD-style license
|
|
|
|
|
# that can be found in the LICENSE file in the root of the source
|
|
|
|
|
# tree. An additional intellectual property rights grant can be found
|
|
|
|
|
# in the file PATENTS. All contributing project authors may
|
|
|
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
import("//build/config/crypto.gni")
|
|
|
|
|
import("//build/config/ui.gni")
|
2021-01-29 10:34:55 +00:00
|
|
|
import("//third_party/google_benchmark/buildconfig.gni")
|
2017-06-20 08:38:58 +02:00
|
|
|
import("../webrtc.gni")
|
|
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
|
import("//build/config/android/config.gni")
|
|
|
|
|
import("//build/config/android/rules.gni")
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
config("threading_chromium_config") {
|
2019-05-21 07:26:37 +00:00
|
|
|
defines = [ "NO_MAIN_THREAD_WRAPPING" ]
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-16 10:40:39 -05:00
|
|
|
if (!rtc_build_ssl) {
|
2017-06-29 08:03:04 +02:00
|
|
|
config("external_ssl_library") {
|
|
|
|
|
assert(rtc_ssl_root != "",
|
|
|
|
|
"You must specify rtc_ssl_root when rtc_build_ssl==0.")
|
|
|
|
|
include_dirs = [ rtc_ssl_root ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-17 13:49:46 +02:00
|
|
|
rtc_source_set("protobuf_utils") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "protobuf_utils.h" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
if (rtc_enable_protobuf) {
|
2018-08-13 15:04:25 +02:00
|
|
|
public_configs = [ "//third_party/protobuf:protobuf_config" ]
|
2020-01-21 12:10:10 +01:00
|
|
|
deps = [ "//third_party/protobuf:protobuf_lite" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-17 13:49:46 +02:00
|
|
|
rtc_source_set("compile_assert_c") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "compile_assert_c.h" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
2019-10-19 12:03:23 +02:00
|
|
|
rtc_source_set("ignore_wundef") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "ignore_wundef.h" ]
|
2019-10-19 12:03:23 +02:00
|
|
|
}
|
|
|
|
|
|
2020-09-18 10:03:16 +02:00
|
|
|
rtc_source_set("untyped_function") {
|
|
|
|
|
sources = [ "untyped_function.h" ]
|
2020-09-11 16:09:46 +02:00
|
|
|
deps = [ "system:assume" ]
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-23 12:04:40 +02:00
|
|
|
rtc_source_set("callback_list") {
|
2020-09-11 16:09:46 +02:00
|
|
|
sources = [
|
2020-10-23 12:04:40 +02:00
|
|
|
"callback_list.cc",
|
|
|
|
|
"callback_list.h",
|
2020-09-11 16:09:46 +02:00
|
|
|
]
|
|
|
|
|
deps = [
|
2020-11-11 11:48:04 +01:00
|
|
|
":checks",
|
2020-09-18 10:03:16 +02:00
|
|
|
":untyped_function",
|
2020-09-11 16:09:46 +02:00
|
|
|
"../api:function_view",
|
|
|
|
|
"system:assume",
|
Optimize RoboCaller::AddReceiver() for code size
Essentially, instead of having the inlined UntypedFunction::Create(f)
return an UntypedFunction which is then passed as an argument to
non-inlined RoboCallerReceivers::AddReceiverImpl(), we let
UntypedFunction::PrepareArgs(f) return a few different kinds of
trivial structs (depending on what sort of type f has) which are
passed as arguments to non-inlined RoboCallerReceivers::AddReceiver()
(which then converts them to UntypedFunction by calling
UntypedFunction::Create()). These structs are smaller than
UntypedFunction and optimized for argument passing, so many fewer
instructions are needed.
Example code:
struct Foo {
void Receive(int, float, int, float);
void TestAddLambdaReceiver();
webrtc::RoboCaller<int, float, int, float> rc;
};
void Foo::TestAddLambdaReceiver() {
rc.AddReceiver([this](int a, float b, int c, float d){
Receive(a, b, c, d);});
}
On arm32, we get before this CL:
Foo::TestAddLambdaReceiver():
push {r11, lr}
mov r11, sp
sub sp, sp, #24
ldr r1, .LCPI0_0
mov r2, #0
stm sp, {r0, r2}
add r1, pc, r1
str r2, [sp, #20]
str r1, [sp, #16]
mov r1, sp
bl RoboCallerReceivers::AddReceiverImpl
mov sp, r11
pop {r11, pc}
.LCPI0_0:
.long CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>
CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>:
ldr r0, [r0]
b Foo::Receive(int, float, int, float)
After this CL:
Foo::TestAddLambdaReceiver():
ldr r3, .LCPI0_0
mov r2, r0
add r3, pc, r3
b RoboCallerReceivers::AddReceiver<1u>
.LCPI0_0:
.long CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>
CallInlineStorage<Foo::TestAddLambdaReceiver()::$_0>:
ldr r0, [r0]
b Foo::Receive(int, float, int, float)
(Symbol names abbreviated so that they'll fit on one line.)
So a reduction from 64 to 28 bytes. The improvements on arm64 and
x86_64 are similar.
Bug: webrtc:11943
Change-Id: I93fbba083be0235051c3279d3e3f6852a4a9fdad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185960
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32244}
2020-09-29 13:55:13 +02:00
|
|
|
"system:inline",
|
2020-09-11 16:09:46 +02:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-10 15:51:03 +02:00
|
|
|
# The subset of rtc_base approved for use outside of libjingle.
|
2018-11-05 12:55:18 +01:00
|
|
|
# TODO(bugs.webrtc.org/9838): Create small and focused build targets and remove
|
2018-10-10 15:51:03 +02:00
|
|
|
# the old concept of rtc_base and rtc_base_approved.
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_base_approved") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2018-10-10 15:51:03 +02:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":safe_compare",
|
|
|
|
|
":type_traits",
|
|
|
|
|
"../api:array_view",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../api:scoped_refptr",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2018-10-10 15:51:03 +02:00
|
|
|
"system:arch",
|
2020-11-23 11:07:42 +01:00
|
|
|
"system:no_unique_address",
|
2019-09-23 14:54:28 +02:00
|
|
|
"system:rtc_export",
|
2018-10-10 15:51:03 +02:00
|
|
|
"third_party/base64",
|
|
|
|
|
]
|
2021-01-14 16:15:31 +01:00
|
|
|
absl_deps = [
|
|
|
|
|
"//third_party/abseil-cpp/absl/base:core_headers",
|
|
|
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
|
|
|
]
|
2019-03-29 13:34:46 +01:00
|
|
|
public_deps = [] # no-presubmit-check TODO(webrtc:8603)
|
2018-10-10 15:51:03 +02:00
|
|
|
|
|
|
|
|
sources = [
|
2019-01-11 09:11:00 -08:00
|
|
|
"bit_buffer.cc",
|
|
|
|
|
"bit_buffer.h",
|
2018-10-10 15:51:03 +02:00
|
|
|
"buffer.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"buffer_queue.cc",
|
|
|
|
|
"buffer_queue.h",
|
|
|
|
|
"byte_buffer.cc",
|
|
|
|
|
"byte_buffer.h",
|
|
|
|
|
"byte_order.h",
|
|
|
|
|
"copy_on_write_buffer.cc",
|
|
|
|
|
"copy_on_write_buffer.h",
|
2018-10-10 15:51:03 +02:00
|
|
|
"event_tracer.cc",
|
|
|
|
|
"event_tracer.h",
|
|
|
|
|
"location.cc",
|
|
|
|
|
"location.h",
|
|
|
|
|
"numerics/histogram_percentile_counter.cc",
|
|
|
|
|
"numerics/histogram_percentile_counter.h",
|
|
|
|
|
"numerics/mod_ops.h",
|
|
|
|
|
"numerics/moving_max_counter.h",
|
|
|
|
|
"numerics/sample_counter.cc",
|
|
|
|
|
"numerics/sample_counter.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"one_time_event.h",
|
2018-10-10 15:51:03 +02:00
|
|
|
"race_checker.cc",
|
|
|
|
|
"race_checker.h",
|
|
|
|
|
"random.cc",
|
|
|
|
|
"random.h",
|
|
|
|
|
"rate_statistics.cc",
|
|
|
|
|
"rate_statistics.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"rate_tracker.cc",
|
|
|
|
|
"rate_tracker.h",
|
2018-10-10 15:51:03 +02:00
|
|
|
"swap_queue.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"timestamp_aligner.cc",
|
|
|
|
|
"timestamp_aligner.h",
|
2018-10-10 15:51:03 +02:00
|
|
|
"trace_event.h",
|
|
|
|
|
"zero_memory.cc",
|
|
|
|
|
"zero_memory.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [
|
2020-10-29 11:30:10 -07:00
|
|
|
"win/get_activation_factory.cc",
|
|
|
|
|
"win/get_activation_factory.h",
|
|
|
|
|
"win/hstring.cc",
|
|
|
|
|
"win/hstring.h",
|
|
|
|
|
"win/scoped_com_initializer.cc",
|
|
|
|
|
"win/scoped_com_initializer.h",
|
2018-10-10 15:51:03 +02:00
|
|
|
"win/windows_version.cc",
|
|
|
|
|
"win/windows_version.h",
|
|
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
data_deps = [ "//build/win:runtime_libs" ]
|
2018-10-10 15:51:03 +02:00
|
|
|
}
|
|
|
|
|
|
2021-01-27 09:40:21 -08:00
|
|
|
# These files add a dependency on the Win10 SDK v10.0.10240.
|
|
|
|
|
if (rtc_enable_win_wgc) {
|
|
|
|
|
sources += [
|
|
|
|
|
"win/create_direct3d_device.cc",
|
|
|
|
|
"win/create_direct3d_device.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-10 15:51:03 +02:00
|
|
|
if (is_nacl) {
|
2020-03-09 19:39:36 +01:00
|
|
|
public_deps += # no-presubmit-check TODO(webrtc:8603)
|
|
|
|
|
[ "//native_client_sdk/src/libraries/nacl_io" ]
|
2018-10-10 15:51:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
|
libs = [ "log" ]
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-29 13:34:46 +01:00
|
|
|
public_deps += [ # no-presubmit-check TODO(webrtc:8603)
|
2018-03-19 11:12:48 +01:00
|
|
|
":atomicops",
|
|
|
|
|
":criticalsection",
|
|
|
|
|
":logging",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":platform_thread",
|
|
|
|
|
":platform_thread_types",
|
|
|
|
|
":refcount",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":safe_conversions",
|
|
|
|
|
":stringutils",
|
|
|
|
|
":timeutils",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2017-09-11 03:43:34 -07:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-19 11:12:48 +01:00
|
|
|
rtc_source_set("macromagic") {
|
|
|
|
|
sources = [
|
|
|
|
|
"arraysize.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"constructor_magic.h",
|
2018-03-19 11:12:48 +01:00
|
|
|
"format_macros.h",
|
|
|
|
|
"thread_annotations.h",
|
|
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
deps = [ "system:arch" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("platform_thread_types") {
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
|
|
|
|
"platform_thread_types.cc",
|
|
|
|
|
"platform_thread_types.h",
|
|
|
|
|
]
|
2020-05-17 14:51:10 +02:00
|
|
|
deps = [ ":macromagic" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("refcount") {
|
2018-08-09 09:47:12 +02:00
|
|
|
visibility = [ "*" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
2019-01-11 09:11:00 -08:00
|
|
|
"ref_count.h",
|
|
|
|
|
"ref_counted_object.h",
|
|
|
|
|
"ref_counter.h",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
deps = [ ":macromagic" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("criticalsection") {
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
2020-07-16 16:16:09 +02:00
|
|
|
"deprecated/recursive_critical_section.cc",
|
|
|
|
|
"deprecated/recursive_critical_section.h",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":atomicops",
|
|
|
|
|
":checks",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":platform_thread_types",
|
2020-06-04 00:41:20 +02:00
|
|
|
"synchronization:yield",
|
2018-07-25 16:05:48 +02:00
|
|
|
"system:unused",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("platform_thread") {
|
2018-03-19 11:12:48 +01:00
|
|
|
visibility = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_task_queue_libevent",
|
2018-11-23 09:07:50 -05:00
|
|
|
":rtc_task_queue_stdlib",
|
2020-09-18 18:23:08 +02:00
|
|
|
":rtc_task_queue_win",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2020-06-09 17:34:41 +02:00
|
|
|
"synchronization:mutex",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
sources = [
|
|
|
|
|
"platform_thread.cc",
|
|
|
|
|
"platform_thread.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":atomicops",
|
|
|
|
|
":checks",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":platform_thread_types",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":timeutils",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
2021-04-20 17:41:54 +02:00
|
|
|
absl_deps = [
|
|
|
|
|
"//third_party/abseil-cpp/absl/memory",
|
|
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
|
|
|
]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_event") {
|
2018-03-19 11:12:48 +01:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
sources = [
|
|
|
|
|
"../../webrtc_overrides/rtc_base/event.cc",
|
|
|
|
|
"../../webrtc_overrides/rtc_base/event.h",
|
|
|
|
|
]
|
2019-03-24 19:12:40 +01:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
2019-11-12 20:11:48 +01:00
|
|
|
"system:rtc_export", # Only Chromium's rtc::Event use RTC_EXPORT.
|
2019-03-24 19:12:40 +01:00
|
|
|
"//base", # Dependency on chromium's waitable_event.
|
|
|
|
|
]
|
2018-03-19 11:12:48 +01:00
|
|
|
} else {
|
|
|
|
|
sources = [
|
|
|
|
|
"event.cc",
|
|
|
|
|
"event.h",
|
|
|
|
|
]
|
2019-03-24 19:12:40 +01:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
"synchronization:yield_policy",
|
|
|
|
|
"system:warn_current_thread_is_deadlocked",
|
|
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("logging") {
|
2018-08-09 10:54:40 +02:00
|
|
|
visibility = [ "*" ]
|
2018-10-09 15:09:51 +02:00
|
|
|
libs = []
|
2018-03-19 11:12:48 +01:00
|
|
|
deps = [
|
2018-10-23 12:03:01 +02:00
|
|
|
":checks",
|
2018-03-19 11:12:48 +01:00
|
|
|
":criticalsection",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":platform_thread_types",
|
|
|
|
|
":stringutils",
|
|
|
|
|
":timeutils",
|
2020-06-10 15:40:42 +02:00
|
|
|
"synchronization:mutex",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [
|
2019-10-11 17:18:29 +02:00
|
|
|
"//third_party/abseil-cpp/absl/base:core_headers",
|
2019-05-20 18:34:07 +02:00
|
|
|
"//third_party/abseil-cpp/absl/meta:type_traits",
|
2018-09-12 15:32:47 +02:00
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
# Dependency on chromium's logging (in //base).
|
2019-03-21 13:35:10 +01:00
|
|
|
deps += [ "//base" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
|
|
|
|
"../../webrtc_overrides/rtc_base/logging.cc",
|
|
|
|
|
"../../webrtc_overrides/rtc_base/logging.h",
|
|
|
|
|
]
|
|
|
|
|
} else {
|
2018-09-06 13:45:44 +02:00
|
|
|
configs += [
|
|
|
|
|
"..:no_exit_time_destructors",
|
|
|
|
|
"..:no_global_constructors",
|
|
|
|
|
]
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
|
|
|
|
"logging.cc",
|
|
|
|
|
"logging.h",
|
|
|
|
|
]
|
2018-05-23 23:20:38 +02:00
|
|
|
deps += [ "system:inline" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
|
2018-10-09 16:45:14 +02:00
|
|
|
if (is_mac) {
|
2020-07-03 10:19:30 +02:00
|
|
|
frameworks = [ "Foundation.framework" ]
|
2018-10-09 16:45:14 +02:00
|
|
|
}
|
|
|
|
|
|
2018-10-09 15:09:51 +02:00
|
|
|
if (is_android) {
|
|
|
|
|
libs += [ "log" ]
|
|
|
|
|
}
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("atomicops") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "atomic_ops.h" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("checks") {
|
2018-08-09 10:54:40 +02:00
|
|
|
# TODO(bugs.webrtc.org/9607): This should not be public.
|
|
|
|
|
visibility = [ "*" ]
|
2018-10-09 15:09:51 +02:00
|
|
|
libs = []
|
2017-12-13 16:05:42 +01:00
|
|
|
sources = [
|
|
|
|
|
"checks.cc",
|
|
|
|
|
"checks.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":safe_compare",
|
2018-06-14 13:14:22 +02:00
|
|
|
"system:inline",
|
2019-09-23 14:54:28 +02:00
|
|
|
"system:rtc_export",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [
|
2019-05-20 18:34:07 +02:00
|
|
|
"//third_party/abseil-cpp/absl/meta:type_traits",
|
2019-03-11 10:31:22 +01:00
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
2018-10-09 15:09:51 +02:00
|
|
|
if (is_android) {
|
|
|
|
|
libs += [ "log" ]
|
|
|
|
|
}
|
2017-12-13 16:05:42 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rate_limiter") {
|
2017-12-13 16:05:42 +01:00
|
|
|
sources = [
|
2017-12-15 14:40:10 +01:00
|
|
|
"rate_limiter.cc",
|
|
|
|
|
"rate_limiter.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
"../system_wrappers",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
2017-12-13 16:05:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("sanitizer") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "sanitizer.h" ]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ]
|
2017-12-13 16:05:42 +01:00
|
|
|
}
|
|
|
|
|
|
2020-03-02 20:23:41 +01:00
|
|
|
rtc_source_set("bounded_inline_vector") {
|
|
|
|
|
public = [ "bounded_inline_vector.h" ]
|
|
|
|
|
sources = [ "bounded_inline_vector_impl.h" ]
|
|
|
|
|
deps = [ ":checks" ]
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-18 15:48:23 +02:00
|
|
|
rtc_source_set("divide_round") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "numerics/divide_round.h" ]
|
2019-09-18 15:48:23 +02:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":safe_compare",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-13 16:05:42 +01:00
|
|
|
rtc_source_set("safe_compare") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "numerics/safe_compare.h" ]
|
|
|
|
|
deps = [ ":type_traits" ]
|
2017-12-13 16:05:42 +01:00
|
|
|
}
|
|
|
|
|
|
2018-03-07 14:18:56 +01:00
|
|
|
rtc_source_set("safe_minmax") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "numerics/safe_minmax.h" ]
|
2018-03-07 14:18:56 +01:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":safe_compare",
|
|
|
|
|
":type_traits",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-19 11:12:48 +01:00
|
|
|
rtc_source_set("safe_conversions") {
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/safe_conversions.h",
|
|
|
|
|
"numerics/safe_conversions_impl.h",
|
|
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
deps = [ ":checks" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("timeutils") {
|
2018-08-09 10:54:40 +02:00
|
|
|
visibility = [ "*" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
2021-02-15 13:29:45 +01:00
|
|
|
"system_time.cc",
|
|
|
|
|
"system_time.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"time_utils.cc",
|
|
|
|
|
"time_utils.h",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":safe_conversions",
|
2018-09-06 13:41:30 +02:00
|
|
|
":stringutils",
|
2019-09-23 14:54:28 +02:00
|
|
|
"system:rtc_export",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
2021-02-25 10:10:08 +01:00
|
|
|
if (rtc_exclude_system_time) {
|
|
|
|
|
defines = [ "WEBRTC_EXCLUDE_SYSTEM_TIME" ]
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-18 13:50:20 -07:00
|
|
|
libs = []
|
|
|
|
|
if (is_win) {
|
|
|
|
|
libs += [ "winmm.lib" ]
|
|
|
|
|
}
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("stringutils") {
|
2017-12-13 16:05:42 +01:00
|
|
|
sources = [
|
2019-01-11 09:11:00 -08:00
|
|
|
"string_encode.cc",
|
|
|
|
|
"string_encode.h",
|
2018-07-05 11:59:48 +02:00
|
|
|
"string_to_number.cc",
|
|
|
|
|
"string_to_number.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"string_utils.cc",
|
|
|
|
|
"string_utils.h",
|
2018-03-08 15:03:23 +01:00
|
|
|
"strings/string_builder.cc",
|
Adding a new string utility class: SimpleStringBuilder.
This is a fairly minimalistic string building class that
can be used instead of stringstream, which is discouraged
but tempting to use due to its convenient interface and
familiarity for anyone using our logging macros.
As a starter, I'm changing the string building code in
ReceiveStatisticsProxy and SendStatisticsProxy from using
stringstream and using SimpleStringBuilder instead.
In the case of SimpleStringBuilder, there's a single allocation,
it's done on the stack (fast), and minimal code is required for
each concatenation. The developer is responsible for ensuring
that the buffer size is adequate but the class won't overflow
the buffer. In dcheck-enabled builds, a check will go off if
we run out of buffer space.
As part of using SimpleStringBuilder for a small part of
rtc::LogMessage, a few more changes were made:
- SimpleStringBuilder is used for formatting errors instead of ostringstream.
- A new 'noop' state has been introduced for log messages that will be dropped.
- Use a static (singleton) noop ostream object for noop logging messages
instead of building up an actual ostringstream object that will be dropped.
- Add a LogMessageForTest class for better state inspection/testing.
- Fix benign bug in LogTest.Perf, change the test to not use File IO and
always enable it.
- Ensure that minimal work is done for noop messages.
- Remove dependency on rtc::Thread.
- Add tests for the extra_ field, correctly parsed paths and noop handling.
Bug: webrtc:8529, webrtc:4364, webrtc:8933
Change-Id: Ifa258c135135945e4560d9e24315f7d96f784acb
Reviewed-on: https://webrtc-review.googlesource.com/55520
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22203}
2018-02-27 13:51:08 +01:00
|
|
|
"strings/string_builder.h",
|
2020-04-09 18:46:00 +02:00
|
|
|
"strings/string_format.cc",
|
|
|
|
|
"strings/string_format.h",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-15 14:40:10 +01:00
|
|
|
":checks",
|
2018-07-05 11:59:48 +02:00
|
|
|
":macromagic",
|
2018-03-08 15:03:23 +01:00
|
|
|
":safe_minmax",
|
|
|
|
|
"../api:array_view",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [
|
2019-03-21 13:35:10 +01:00
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
2018-07-05 11:59:48 +02:00
|
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
2017-12-15 14:40:10 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("audio_format_to_string") {
|
2018-04-03 12:22:07 +02:00
|
|
|
sources = [
|
|
|
|
|
"strings/audio_format_to_string.cc",
|
|
|
|
|
"strings/audio_format_to_string.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":stringutils",
|
|
|
|
|
"../api/audio_codecs:audio_codecs_api",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-15 14:40:10 +01:00
|
|
|
rtc_source_set("type_traits") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "type_traits.h" ]
|
2017-12-15 14:40:10 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_task_queue") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-09-19 08:28:00 -07:00
|
|
|
sources = [
|
2019-03-05 19:58:28 +01:00
|
|
|
"task_queue.cc",
|
2017-09-19 08:28:00 -07:00
|
|
|
"task_queue.h",
|
|
|
|
|
]
|
2017-08-25 05:00:11 -07:00
|
|
|
deps = [
|
2018-03-19 11:12:48 +01:00
|
|
|
":macromagic",
|
2019-01-14 14:29:18 +01:00
|
|
|
"../api/task_queue",
|
Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > This reverts commit b49520bfc08f5c5832dda1d642125f0bb898f974.
> >
> > Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.
> >
> > Original change's description:
> > > Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> > >
> > > This reverts commit 588f4642d1a29f7beaf28265dbd08728191b4c52.
> > >
> > > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> > > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> > > [...]
> > >
> > > Original change's description:
> > > > Reland "Export symbols needed by the Chromium component build (part 1)."
> > > >
> > > > This reverts commit 2ea9af227517556136fd629dd2663c0d75d77c7b.
> > > >
> > > > Reason for revert: The problem will be fixed by
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > > >
> > > > Original change's description:
> > > > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > > >
> > > > > This reverts commit 9e24dcff167c4eb3555bf0ce6eaba090c10fbe53.
> > > > >
> > > > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > > >
> > > > > Original change's description:
> > > > > > Export symbols needed by the Chromium component build (part 1).
> > > > > >
> > > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > > > mean these symbols are part of the public API (please continue to refer
> > > > > > to [1] for info about what is considered public WebRTC API).
> > > > > >
> > > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > > >
> > > > > > Bug: webrtc:9419
> > > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > > > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#24969}
> > > > >
> > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > > >
> > > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:9419
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#24974}
> > > >
> > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > >
> > > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: webrtc:9419
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24980}
> > >
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > >
> > > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24983}
> >
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:9419
> > Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104602
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25049}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 10:50:45 +02:00
|
|
|
"system:rtc_export",
|
2019-03-01 14:58:44 +01:00
|
|
|
"task_utils:to_queued_task",
|
2017-08-25 05:00:11 -07:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
|
2019-03-05 19:58:28 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-21 15:21:55 +02:00
|
|
|
rtc_source_set("rtc_operations_chain") {
|
|
|
|
|
visibility = [ "*" ]
|
|
|
|
|
sources = [
|
|
|
|
|
"operations_chain.cc",
|
|
|
|
|
"operations_chain.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":refcount",
|
|
|
|
|
"../api:scoped_refptr",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2020-11-23 11:07:42 +01:00
|
|
|
"system:no_unique_address",
|
2019-10-21 15:21:55 +02:00
|
|
|
]
|
2020-08-25 10:20:11 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
2019-10-21 15:21:55 +02:00
|
|
|
}
|
|
|
|
|
|
2018-03-19 11:12:48 +01:00
|
|
|
if (rtc_enable_libevent) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_task_queue_libevent") {
|
2019-03-05 19:58:28 +01:00
|
|
|
visibility = [ "../api/task_queue:default_task_queue_factory" ]
|
2017-08-25 05:00:11 -07:00
|
|
|
sources = [
|
2017-10-19 12:38:09 +02:00
|
|
|
"task_queue_libevent.cc",
|
2019-02-12 10:44:38 +01:00
|
|
|
"task_queue_libevent.h",
|
2017-08-25 05:00:11 -07:00
|
|
|
]
|
2018-03-19 11:12:48 +01:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":criticalsection",
|
|
|
|
|
":logging",
|
2018-10-05 15:39:24 +02:00
|
|
|
":macromagic",
|
2018-03-19 11:12:48 +01:00
|
|
|
":platform_thread",
|
2018-10-05 15:39:24 +02:00
|
|
|
":platform_thread_types",
|
2018-03-19 11:12:48 +01:00
|
|
|
":safe_conversions",
|
|
|
|
|
":timeutils",
|
2019-02-12 10:44:38 +01:00
|
|
|
"../api/task_queue",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [
|
2020-01-09 11:03:25 -08:00
|
|
|
"//third_party/abseil-cpp/absl/container:inlined_vector",
|
2019-02-12 10:44:38 +01:00
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
if (rtc_build_libevent) {
|
|
|
|
|
deps += [ "//base/third_party/libevent" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_mac || is_ios) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_task_queue_gcd") {
|
2019-03-05 19:58:28 +01:00
|
|
|
visibility = [ "../api/task_queue:default_task_queue_factory" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
|
|
|
|
"task_queue_gcd.cc",
|
2019-02-19 20:20:16 +01:00
|
|
|
"task_queue_gcd.h",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":logging",
|
2019-02-19 20:20:16 +01:00
|
|
|
"../api/task_queue",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2020-03-16 18:00:59 +03:00
|
|
|
"system:gcd_helpers",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_task_queue_win") {
|
2019-03-05 19:58:28 +01:00
|
|
|
visibility = [ "../api/task_queue:default_task_queue_factory" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
sources = [
|
|
|
|
|
"task_queue_win.cc",
|
2019-02-20 18:13:09 +01:00
|
|
|
"task_queue_win.h",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":criticalsection",
|
|
|
|
|
":logging",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":platform_thread",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":safe_conversions",
|
|
|
|
|
":timeutils",
|
2019-02-20 18:13:09 +01:00
|
|
|
"../api/task_queue",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2018-03-19 11:12:48 +01:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
2018-03-19 11:12:48 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_task_queue_stdlib") {
|
2018-11-23 09:07:50 -05:00
|
|
|
sources = [
|
|
|
|
|
"task_queue_stdlib.cc",
|
2019-02-21 11:13:58 +01:00
|
|
|
"task_queue_stdlib.h",
|
2018-11-23 09:07:50 -05:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":criticalsection",
|
|
|
|
|
":logging",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":platform_thread",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":safe_conversions",
|
|
|
|
|
":timeutils",
|
2019-02-21 11:13:58 +01:00
|
|
|
"../api/task_queue",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2018-11-23 09:07:50 -05:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
2018-11-23 09:07:50 -05:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("weak_ptr") {
|
2017-06-29 08:03:04 +02:00
|
|
|
sources = [
|
|
|
|
|
"weak_ptr.cc",
|
|
|
|
|
"weak_ptr.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2018-03-19 11:12:48 +01:00
|
|
|
":refcount",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../api:scoped_refptr",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2020-11-23 11:07:42 +01:00
|
|
|
"system:no_unique_address",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_numerics") {
|
2017-06-29 08:03:04 +02:00
|
|
|
sources = [
|
2019-11-25 13:00:15 +01:00
|
|
|
"numerics/event_based_exponential_moving_average.cc",
|
|
|
|
|
"numerics/event_based_exponential_moving_average.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"numerics/exp_filter.cc",
|
|
|
|
|
"numerics/exp_filter.h",
|
2019-04-10 17:18:48 +02:00
|
|
|
"numerics/math_utils.h",
|
2018-11-05 12:55:18 +01:00
|
|
|
"numerics/moving_average.cc",
|
|
|
|
|
"numerics/moving_average.h",
|
2017-11-01 14:01:00 +01:00
|
|
|
"numerics/moving_median_filter.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"numerics/percentile_filter.h",
|
2019-04-10 17:18:48 +02:00
|
|
|
"numerics/running_statistics.h",
|
2017-10-25 13:07:09 +02:00
|
|
|
"numerics/sequence_number_util.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base_approved",
|
2020-09-18 18:23:08 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_library("rtc_stats_counters") {
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/event_rate_counter.cc",
|
|
|
|
|
"numerics/event_rate_counter.h",
|
|
|
|
|
"numerics/sample_stats.cc",
|
|
|
|
|
"numerics/sample_stats.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
"../api/numerics",
|
2019-12-02 07:19:55 +01:00
|
|
|
"../api/units:data_rate",
|
|
|
|
|
"../api/units:time_delta",
|
2019-09-11 11:45:40 +02:00
|
|
|
"../api/units:timestamp",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
2020-09-18 18:23:08 +02:00
|
|
|
absl_deps = []
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
2019-07-12 13:29:30 +02:00
|
|
|
config("rtc_json_suppressions") {
|
2019-06-27 11:24:25 +02:00
|
|
|
if (!is_win || is_clang) {
|
2019-07-12 13:29:30 +02:00
|
|
|
cflags_cc = [
|
|
|
|
|
# TODO(bugs.webrtc.org/10770): Update jsoncpp API usage and remove
|
|
|
|
|
# -Wno-deprecated-declarations.
|
|
|
|
|
"-Wno-deprecated-declarations",
|
|
|
|
|
|
2019-07-12 21:47:47 +02:00
|
|
|
# TODO(bugs.webrtc.org/10814): Remove -Wno-undef as soon as it get
|
2019-07-12 13:29:30 +02:00
|
|
|
# removed upstream.
|
|
|
|
|
"-Wno-undef",
|
|
|
|
|
]
|
2019-06-27 11:24:25 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_json") {
|
2019-07-12 13:29:30 +02:00
|
|
|
public_configs = [ ":rtc_json_suppressions" ]
|
2019-10-25 10:45:58 +02:00
|
|
|
poisonous = [ "rtc_json" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
defines = []
|
|
|
|
|
sources = [
|
2018-10-02 16:25:59 +02:00
|
|
|
"strings/json.cc",
|
|
|
|
|
"strings/json.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
deps = [ ":stringutils" ]
|
2018-01-26 16:50:02 +01:00
|
|
|
all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
if (rtc_build_json) {
|
2020-03-09 19:39:36 +01:00
|
|
|
public_deps = # no-presubmit-check TODO(webrtc:8603)
|
|
|
|
|
[ "//third_party/jsoncpp" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
} else {
|
|
|
|
|
include_dirs = [ "$rtc_jsoncpp_root" ]
|
|
|
|
|
|
|
|
|
|
# When defined changes the include path for json.h to where it is
|
|
|
|
|
# expected to be when building json outside of the standalone build.
|
|
|
|
|
defines += [ "WEBRTC_EXTERNAL_JSON" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("net_helpers") {
|
|
|
|
|
sources = [
|
|
|
|
|
"net_helpers.cc",
|
|
|
|
|
"net_helpers.h",
|
|
|
|
|
]
|
|
|
|
|
deps = []
|
|
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ ":ifaddrs_android" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
deps += [ ":win32" ]
|
|
|
|
|
}
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("async_resolver_interface") {
|
2019-02-11 00:43:43 +01:00
|
|
|
visibility = [ "*" ]
|
2021-01-15 10:41:01 +01:00
|
|
|
sources = [
|
|
|
|
|
"async_resolver_interface.cc",
|
|
|
|
|
"async_resolver_interface.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":socket_address",
|
|
|
|
|
"system:rtc_export",
|
|
|
|
|
"third_party/sigslot",
|
|
|
|
|
]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("ip_address") {
|
2019-02-11 00:43:43 +01:00
|
|
|
visibility = [ "*" ]
|
2021-01-15 10:41:01 +01:00
|
|
|
sources = [
|
|
|
|
|
"ip_address.cc",
|
|
|
|
|
"ip_address.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":net_helpers",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":stringutils",
|
|
|
|
|
"system:rtc_export",
|
|
|
|
|
]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
deps += [ ":win32" ]
|
|
|
|
|
}
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("socket_address") {
|
2019-02-11 00:43:43 +01:00
|
|
|
visibility = [ "*" ]
|
2021-01-15 10:41:01 +01:00
|
|
|
sources = [
|
|
|
|
|
"socket_address.cc",
|
|
|
|
|
"socket_address.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":ip_address",
|
|
|
|
|
":logging",
|
|
|
|
|
":net_helpers",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":safe_conversions",
|
|
|
|
|
":stringutils",
|
|
|
|
|
"system:rtc_export",
|
|
|
|
|
]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
deps += [ ":win32" ]
|
|
|
|
|
}
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("null_socket_server") {
|
|
|
|
|
sources = [
|
|
|
|
|
"null_socket_server.cc",
|
|
|
|
|
"null_socket_server.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":async_socket",
|
|
|
|
|
":checks",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":socket",
|
|
|
|
|
":socket_server",
|
|
|
|
|
"system:rtc_export",
|
|
|
|
|
]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2019-01-22 17:54:34 +01:00
|
|
|
rtc_source_set("socket_server") {
|
2021-01-15 10:41:01 +01:00
|
|
|
sources = [ "socket_server.h" ]
|
|
|
|
|
deps = [ ":socket_factory" ]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("threading") {
|
2019-02-11 00:43:43 +01:00
|
|
|
visibility = [ "*" ]
|
2021-01-15 10:41:01 +01:00
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
public_configs = [ ":threading_chromium_config" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"async_resolver.cc",
|
|
|
|
|
"async_resolver.h",
|
|
|
|
|
"internal/default_socket_server.cc",
|
|
|
|
|
"internal/default_socket_server.h",
|
|
|
|
|
"message_handler.cc",
|
|
|
|
|
"message_handler.h",
|
|
|
|
|
"network_monitor.cc",
|
|
|
|
|
"network_monitor.h",
|
|
|
|
|
"network_monitor_factory.cc",
|
|
|
|
|
"network_monitor_factory.h",
|
|
|
|
|
"physical_socket_server.cc",
|
|
|
|
|
"physical_socket_server.h",
|
|
|
|
|
"thread.cc",
|
|
|
|
|
"thread.h",
|
|
|
|
|
"thread_message.h",
|
|
|
|
|
]
|
|
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/algorithm:container" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":async_resolver_interface",
|
|
|
|
|
":atomicops",
|
|
|
|
|
":checks",
|
|
|
|
|
":criticalsection",
|
|
|
|
|
":ip_address",
|
|
|
|
|
":logging",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":network_constants",
|
|
|
|
|
":null_socket_server",
|
|
|
|
|
":platform_thread_types",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":socket_address",
|
|
|
|
|
":socket_server",
|
|
|
|
|
":timeutils",
|
|
|
|
|
"../api:function_view",
|
2021-04-21 10:22:34 +02:00
|
|
|
"../api:refcountedbase",
|
2021-01-15 10:41:01 +01:00
|
|
|
"../api:scoped_refptr",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2021-01-15 10:41:01 +01:00
|
|
|
"../api/task_queue",
|
2021-02-09 14:44:48 +01:00
|
|
|
"synchronization:mutex",
|
2021-01-15 10:41:01 +01:00
|
|
|
"system:no_unique_address",
|
|
|
|
|
"system:rtc_export",
|
|
|
|
|
"task_utils:pending_task_safety_flag",
|
|
|
|
|
"task_utils:to_queued_task",
|
|
|
|
|
"third_party/sigslot",
|
|
|
|
|
]
|
|
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ ":ifaddrs_android" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
deps += [ ":win32" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_mac || is_ios) {
|
|
|
|
|
deps += [ "system:cocoa_threading" ]
|
|
|
|
|
}
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2019-01-22 17:54:34 +01:00
|
|
|
rtc_source_set("socket_factory") {
|
2021-01-15 10:41:01 +01:00
|
|
|
sources = [ "socket_factory.h" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":async_socket",
|
|
|
|
|
":socket",
|
|
|
|
|
]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("async_socket") {
|
|
|
|
|
sources = [
|
|
|
|
|
"async_socket.cc",
|
|
|
|
|
"async_socket.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":socket",
|
|
|
|
|
":socket_address",
|
|
|
|
|
"third_party/sigslot",
|
|
|
|
|
]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("socket") {
|
|
|
|
|
sources = [
|
|
|
|
|
"socket.cc",
|
|
|
|
|
"socket.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":macromagic",
|
|
|
|
|
":socket_address",
|
|
|
|
|
]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
deps += [ ":win32" ]
|
|
|
|
|
}
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("network_constants") {
|
2021-01-15 10:41:01 +01:00
|
|
|
sources = [
|
|
|
|
|
"network_constants.cc",
|
|
|
|
|
"network_constants.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [ ":checks" ]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_android) {
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("ifaddrs_android") {
|
|
|
|
|
sources = [
|
|
|
|
|
"ifaddrs_android.cc",
|
|
|
|
|
"ifaddrs_android.h",
|
|
|
|
|
]
|
|
|
|
|
libs = [
|
|
|
|
|
"log",
|
|
|
|
|
"GLESv2",
|
|
|
|
|
]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
2021-01-15 10:41:01 +01:00
|
|
|
rtc_library("win32") {
|
2020-09-26 11:57:26 +02:00
|
|
|
sources = [
|
|
|
|
|
"win32.cc",
|
|
|
|
|
"win32.h",
|
|
|
|
|
"win32_window.cc",
|
|
|
|
|
"win32_window.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":macromagic",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
libs = [
|
|
|
|
|
"crypt32.lib",
|
|
|
|
|
"iphlpapi.lib",
|
|
|
|
|
"secur32.lib",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
defines = [ "_CRT_NONSTDC_NO_DEPRECATE" ]
|
2018-12-06 14:50:45 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_base") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
cflags = []
|
|
|
|
|
cflags_cc = []
|
|
|
|
|
libs = []
|
|
|
|
|
defines = []
|
|
|
|
|
deps = [
|
2021-01-15 10:41:01 +01:00
|
|
|
":async_resolver_interface",
|
|
|
|
|
":async_socket",
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2021-01-15 10:41:01 +01:00
|
|
|
":ip_address",
|
|
|
|
|
":network_constants",
|
|
|
|
|
":null_socket_server",
|
2020-05-26 18:43:55 +02:00
|
|
|
":rtc_task_queue",
|
2021-01-15 10:41:01 +01:00
|
|
|
":socket",
|
|
|
|
|
":socket_address",
|
|
|
|
|
":socket_factory",
|
|
|
|
|
":socket_server",
|
2017-12-15 14:40:10 +01:00
|
|
|
":stringutils",
|
2021-01-15 10:41:01 +01:00
|
|
|
":threading",
|
2017-12-21 22:00:34 +01:00
|
|
|
"../api:array_view",
|
2019-11-29 12:56:43 +01:00
|
|
|
"../api:function_view",
|
2021-04-20 16:58:01 +02:00
|
|
|
"../api:refcountedbase",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../api:scoped_refptr",
|
2021-02-10 14:31:24 +01:00
|
|
|
"../api:sequence_checker",
|
2020-09-18 18:23:08 +02:00
|
|
|
"../api/numerics",
|
2019-11-22 15:52:40 +01:00
|
|
|
"../api/task_queue",
|
2020-03-09 19:39:36 +01:00
|
|
|
"../system_wrappers:field_trial",
|
2018-10-15 09:28:15 +02:00
|
|
|
"network:sent_packet",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2019-01-22 11:01:24 +01:00
|
|
|
"system:file_wrapper",
|
2020-03-20 16:11:56 +01:00
|
|
|
"system:inline",
|
2020-11-23 11:07:42 +01:00
|
|
|
"system:no_unique_address",
|
2019-09-23 14:54:28 +02:00
|
|
|
"system:rtc_export",
|
2020-05-26 18:43:55 +02:00
|
|
|
"task_utils:pending_task_safety_flag",
|
2020-10-05 12:43:53 +00:00
|
|
|
"task_utils:repeating_task",
|
2020-03-03 10:48:05 +01:00
|
|
|
"task_utils:to_queued_task",
|
2018-07-23 17:38:12 +02:00
|
|
|
"third_party/base64",
|
2018-07-25 15:04:28 +02:00
|
|
|
"third_party/sigslot",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [
|
2019-03-25 13:48:30 -07:00
|
|
|
"//third_party/abseil-cpp/absl/algorithm:container",
|
2020-08-20 23:43:13 +00:00
|
|
|
"//third_party/abseil-cpp/absl/container:flat_hash_map",
|
Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.
This CL was generated by the following script:
git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
git cl format
Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.
Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 11:40:33 +02:00
|
|
|
"//third_party/abseil-cpp/absl/memory",
|
2018-10-19 15:29:54 +02:00
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
2018-06-21 11:48:25 +02:00
|
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
public_deps = [ ":rtc_base_approved" ] # no-presubmit-check TODO(webrtc:8603)
|
2017-06-29 08:03:04 +02:00
|
|
|
public_configs = []
|
|
|
|
|
|
|
|
|
|
sources = [
|
2019-01-11 09:11:00 -08:00
|
|
|
"async_invoker.cc",
|
|
|
|
|
"async_invoker.h",
|
|
|
|
|
"async_invoker_inl.h",
|
|
|
|
|
"async_packet_socket.cc",
|
|
|
|
|
"async_packet_socket.h",
|
|
|
|
|
"async_tcp_socket.cc",
|
|
|
|
|
"async_tcp_socket.h",
|
|
|
|
|
"async_udp_socket.cc",
|
|
|
|
|
"async_udp_socket.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"crc32.cc",
|
|
|
|
|
"crc32.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"crypt_string.cc",
|
|
|
|
|
"crypt_string.h",
|
2018-02-28 16:04:26 +01:00
|
|
|
"data_rate_limiter.cc",
|
|
|
|
|
"data_rate_limiter.h",
|
2017-12-19 11:50:21 +01:00
|
|
|
"dscp.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"file_rotating_stream.cc",
|
|
|
|
|
"file_rotating_stream.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"helpers.cc",
|
|
|
|
|
"helpers.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"http_common.cc",
|
|
|
|
|
"http_common.h",
|
2018-09-12 22:51:55 -07:00
|
|
|
"mdns_responder_interface.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"message_digest.cc",
|
|
|
|
|
"message_digest.h",
|
|
|
|
|
"net_helper.cc",
|
|
|
|
|
"net_helper.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"network.cc",
|
|
|
|
|
"network.h",
|
2020-04-09 18:46:00 +02:00
|
|
|
"network_route.cc",
|
2019-01-11 09:11:00 -08:00
|
|
|
"network_route.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"openssl.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"openssl_adapter.cc",
|
|
|
|
|
"openssl_adapter.h",
|
|
|
|
|
"openssl_digest.cc",
|
|
|
|
|
"openssl_digest.h",
|
2020-12-10 16:23:03 -08:00
|
|
|
"openssl_key_pair.cc",
|
|
|
|
|
"openssl_key_pair.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"openssl_session_cache.cc",
|
|
|
|
|
"openssl_session_cache.h",
|
|
|
|
|
"openssl_stream_adapter.cc",
|
|
|
|
|
"openssl_stream_adapter.h",
|
|
|
|
|
"openssl_utility.cc",
|
|
|
|
|
"openssl_utility.h",
|
|
|
|
|
"proxy_info.cc",
|
|
|
|
|
"proxy_info.h",
|
|
|
|
|
"rtc_certificate.cc",
|
|
|
|
|
"rtc_certificate.h",
|
|
|
|
|
"rtc_certificate_generator.cc",
|
|
|
|
|
"rtc_certificate_generator.h",
|
|
|
|
|
"sigslot_repeater.h",
|
|
|
|
|
"socket_adapters.cc",
|
|
|
|
|
"socket_adapters.h",
|
|
|
|
|
"socket_address_pair.cc",
|
|
|
|
|
"socket_address_pair.h",
|
|
|
|
|
"ssl_adapter.cc",
|
|
|
|
|
"ssl_adapter.h",
|
|
|
|
|
"ssl_certificate.cc",
|
|
|
|
|
"ssl_certificate.h",
|
|
|
|
|
"ssl_fingerprint.cc",
|
|
|
|
|
"ssl_fingerprint.h",
|
|
|
|
|
"ssl_identity.cc",
|
|
|
|
|
"ssl_identity.h",
|
|
|
|
|
"ssl_stream_adapter.cc",
|
|
|
|
|
"ssl_stream_adapter.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"stream.cc",
|
|
|
|
|
"stream.h",
|
2019-01-23 14:54:24 -08:00
|
|
|
"unique_id_generator.cc",
|
|
|
|
|
"unique_id_generator.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
|
2020-12-11 11:30:43 -08:00
|
|
|
# If we are building the SSL library ourselves, we know it's BoringSSL.
|
|
|
|
|
if (rtc_build_ssl) {
|
2020-12-10 16:23:03 -08:00
|
|
|
sources += [
|
|
|
|
|
"boringssl_certificate.cc",
|
|
|
|
|
"boringssl_certificate.h",
|
|
|
|
|
"boringssl_identity.cc",
|
|
|
|
|
"boringssl_identity.h",
|
|
|
|
|
]
|
|
|
|
|
} else {
|
|
|
|
|
sources += [
|
|
|
|
|
"openssl_certificate.cc",
|
|
|
|
|
"openssl_certificate.h",
|
|
|
|
|
"openssl_identity.cc",
|
|
|
|
|
"openssl_identity.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
include_dirs = [ "../../boringssl/src/include" ]
|
|
|
|
|
} else {
|
|
|
|
|
sources += [
|
2019-01-11 09:11:00 -08:00
|
|
|
"log_sinks.cc",
|
|
|
|
|
"log_sinks.h",
|
|
|
|
|
"rolling_accumulator.h",
|
|
|
|
|
"ssl_roots.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
|
2019-05-13 17:01:32 +02:00
|
|
|
deps += [ ":rtc_numerics" ]
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
if (is_win) {
|
2019-01-24 19:07:40 -08:00
|
|
|
sources += [ "win32_socket_init.h" ]
|
2018-11-22 20:10:11 -05:00
|
|
|
if (current_os != "winuwp") {
|
|
|
|
|
sources += [
|
2019-01-11 09:11:00 -08:00
|
|
|
"win32_socket_server.cc",
|
|
|
|
|
"win32_socket_server.h",
|
2018-11-22 20:10:11 -05:00
|
|
|
]
|
|
|
|
|
}
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
} # !build_with_chromium
|
|
|
|
|
|
|
|
|
|
if (rtc_build_ssl) {
|
|
|
|
|
deps += [ "//third_party/boringssl" ]
|
2018-01-16 10:40:39 -05:00
|
|
|
} else {
|
2017-06-29 08:03:04 +02:00
|
|
|
configs += [ ":external_ssl_library" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_android) {
|
2021-01-15 10:41:01 +01:00
|
|
|
deps += [ ":ifaddrs_android" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_ios || is_mac) {
|
2019-01-11 09:11:00 -08:00
|
|
|
sources += [ "mac_ifaddrs_converter.cc" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
2020-09-10 18:10:11 +09:00
|
|
|
if (is_linux || is_chromeos) {
|
2017-06-29 08:03:04 +02:00
|
|
|
libs += [
|
|
|
|
|
"dl",
|
|
|
|
|
"rt",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-18 22:25:48 +02:00
|
|
|
if (is_ios) {
|
2020-07-03 10:19:30 +02:00
|
|
|
frameworks = [
|
2019-07-18 22:25:48 +02:00
|
|
|
"CFNetwork.framework",
|
|
|
|
|
"Foundation.framework",
|
|
|
|
|
"Security.framework",
|
|
|
|
|
"SystemConfiguration.framework",
|
|
|
|
|
"UIKit.framework",
|
|
|
|
|
]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
2020-09-26 11:57:26 +02:00
|
|
|
deps += [ ":win32" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
2018-03-30 10:38:06 -07:00
|
|
|
if (is_posix || is_fuchsia) {
|
2017-06-29 08:03:04 +02:00
|
|
|
sources += [
|
|
|
|
|
"ifaddrs_converter.cc",
|
|
|
|
|
"ifaddrs_converter.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_nacl) {
|
2020-03-09 19:39:36 +01:00
|
|
|
public_deps += # no-presubmit-check TODO(webrtc:8603)
|
|
|
|
|
[ "//native_client_sdk/src/libraries/nacl_io" ]
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
defines += [ "timezone=_timezone" ]
|
|
|
|
|
sources -= [ "ifaddrs_converter.cc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("gtest_prod") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "gtest_prod_util.h" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("gunit_helpers") {
|
2018-11-23 13:15:08 +01:00
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"gunit.cc",
|
|
|
|
|
"gunit.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":logging",
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":stringutils",
|
2021-01-15 10:41:01 +01:00
|
|
|
":threading",
|
2018-11-23 13:15:08 +01:00
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
2018-11-23 13:15:08 +01:00
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("testclient") {
|
2018-11-23 13:15:08 +01:00
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
2019-01-11 09:11:00 -08:00
|
|
|
"test_client.cc",
|
|
|
|
|
"test_client.h",
|
2018-11-23 13:15:08 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":criticalsection",
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_tests_utils",
|
2021-01-15 10:41:01 +01:00
|
|
|
":threading",
|
2018-11-23 13:15:08 +01:00
|
|
|
":timeutils",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2018-11-23 13:15:08 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-23 12:04:40 +02:00
|
|
|
rtc_library("callback_list_unittests") {
|
2020-09-16 10:34:21 -07:00
|
|
|
testonly = true
|
|
|
|
|
|
2020-10-23 12:04:40 +02:00
|
|
|
sources = [ "callback_list_unittest.cc" ]
|
2020-09-16 10:34:21 -07:00
|
|
|
deps = [
|
2020-10-23 12:04:40 +02:00
|
|
|
":callback_list",
|
2020-09-16 10:34:21 -07:00
|
|
|
":gunit_helpers",
|
|
|
|
|
":rtc_base",
|
|
|
|
|
"../api:function_view",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("rtc_base_tests_utils") {
|
2017-06-29 08:03:04 +02:00
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"cpu_time.cc",
|
|
|
|
|
"cpu_time.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"fake_clock.cc",
|
|
|
|
|
"fake_clock.h",
|
2018-09-12 22:51:55 -07:00
|
|
|
"fake_mdns_responder.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"fake_network.h",
|
|
|
|
|
"fake_ssl_identity.cc",
|
|
|
|
|
"fake_ssl_identity.h",
|
|
|
|
|
"firewall_socket_server.cc",
|
|
|
|
|
"firewall_socket_server.h",
|
2018-11-01 09:33:08 +01:00
|
|
|
"memory_stream.cc",
|
|
|
|
|
"memory_stream.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"memory_usage.cc",
|
|
|
|
|
"memory_usage.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"nat_server.cc",
|
|
|
|
|
"nat_server.h",
|
|
|
|
|
"nat_socket_factory.cc",
|
|
|
|
|
"nat_socket_factory.h",
|
|
|
|
|
"nat_types.cc",
|
|
|
|
|
"nat_types.h",
|
|
|
|
|
"proxy_server.cc",
|
|
|
|
|
"proxy_server.h",
|
2018-12-17 14:04:05 +01:00
|
|
|
"server_socket_adapters.cc",
|
|
|
|
|
"server_socket_adapters.h",
|
2019-01-11 09:11:00 -08:00
|
|
|
"sigslot_tester.h",
|
|
|
|
|
"socket_stream.cc",
|
|
|
|
|
"socket_stream.h",
|
|
|
|
|
"test_base64.h",
|
|
|
|
|
"test_certificate_verifier.h",
|
|
|
|
|
"test_echo_server.cc",
|
|
|
|
|
"test_echo_server.h",
|
|
|
|
|
"test_utils.cc",
|
|
|
|
|
"test_utils.h",
|
|
|
|
|
"virtual_socket_server.cc",
|
|
|
|
|
"virtual_socket_server.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
deps = [
|
2021-01-15 10:41:01 +01:00
|
|
|
":async_socket",
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2021-01-15 10:41:01 +01:00
|
|
|
":ip_address",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base",
|
2021-01-15 10:41:01 +01:00
|
|
|
":socket",
|
|
|
|
|
":socket_address",
|
|
|
|
|
":socket_factory",
|
|
|
|
|
":socket_server",
|
|
|
|
|
":threading",
|
2018-05-08 14:52:22 +02:00
|
|
|
"../api/units:time_delta",
|
2019-04-17 10:36:03 +02:00
|
|
|
"../api/units:timestamp",
|
2019-03-28 13:30:15 +01:00
|
|
|
"memory:fifo_buffer",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2021-03-25 09:31:26 +01:00
|
|
|
"task_utils:to_queued_task",
|
2018-07-25 15:04:28 +02:00
|
|
|
"third_party/sigslot",
|
2020-06-05 14:30:41 +02:00
|
|
|
]
|
|
|
|
|
absl_deps = [
|
2019-03-25 13:48:30 -07:00
|
|
|
"//third_party/abseil-cpp/absl/algorithm:container",
|
Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.
This CL was generated by the following script:
git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
git cl format
Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.
Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 11:40:33 +02:00
|
|
|
"//third_party/abseil-cpp/absl/memory",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("task_queue_for_test") {
|
2018-02-19 12:41:43 +01:00
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"task_queue_for_test.cc",
|
|
|
|
|
"task_queue_for_test.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
2019-10-15 10:04:57 +02:00
|
|
|
":rtc_base_approved",
|
2019-03-19 18:08:37 +01:00
|
|
|
":rtc_event",
|
2018-02-19 12:41:43 +01:00
|
|
|
":rtc_task_queue",
|
2019-10-15 10:04:57 +02:00
|
|
|
"../api/task_queue",
|
2019-03-19 18:08:37 +01:00
|
|
|
"../api/task_queue:default_task_queue_factory",
|
2019-03-05 11:11:35 +01:00
|
|
|
"task_utils:to_queued_task",
|
2018-02-19 12:41:43 +01:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
2018-02-19 12:41:43 +01:00
|
|
|
}
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
if (rtc_include_tests) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("sigslot_unittest") {
|
2018-07-25 15:04:28 +02:00
|
|
|
testonly = true
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "sigslot_unittest.cc" ]
|
2018-07-25 15:04:28 +02:00
|
|
|
deps = [
|
2018-11-23 13:15:08 +01:00
|
|
|
":gunit_helpers",
|
2018-07-25 15:04:28 +02:00
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_tests_utils",
|
2018-11-28 16:47:49 +01:00
|
|
|
"../test:test_support",
|
2020-07-08 17:55:58 +02:00
|
|
|
"synchronization:mutex",
|
2018-07-25 15:04:28 +02:00
|
|
|
"third_party/sigslot",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-18 10:03:16 +02:00
|
|
|
rtc_library("untyped_function_unittest") {
|
2020-09-15 11:06:34 +02:00
|
|
|
testonly = true
|
2020-09-18 10:03:16 +02:00
|
|
|
sources = [ "untyped_function_unittest.cc" ]
|
2020-09-15 11:06:34 +02:00
|
|
|
deps = [
|
2020-09-18 10:03:16 +02:00
|
|
|
":untyped_function",
|
2020-09-15 11:06:34 +02:00
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-21 15:21:55 +02:00
|
|
|
rtc_library("rtc_operations_chain_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "operations_chain_unittest.cc" ]
|
2019-10-21 15:21:55 +02:00
|
|
|
deps = [
|
2020-08-25 17:11:20 +02:00
|
|
|
":gunit_helpers",
|
2019-10-21 15:21:55 +02:00
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":rtc_operations_chain",
|
2021-01-15 10:41:01 +01:00
|
|
|
":threading",
|
2019-10-21 15:21:55 +02:00
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
if (!build_with_chromium) {
|
|
|
|
|
rtc_library("rtc_base_nonparallel_tests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"cpu_time_unittest.cc",
|
|
|
|
|
"file_rotating_stream_unittest.cc",
|
|
|
|
|
"null_socket_server_unittest.cc",
|
|
|
|
|
"physical_socket_server_unittest.cc",
|
|
|
|
|
"socket_address_unittest.cc",
|
|
|
|
|
"socket_unittest.cc",
|
|
|
|
|
"socket_unittest.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":async_socket",
|
|
|
|
|
":checks",
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":ip_address",
|
|
|
|
|
":net_helpers",
|
|
|
|
|
":null_socket_server",
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":socket",
|
|
|
|
|
":socket_address",
|
|
|
|
|
":socket_server",
|
|
|
|
|
":testclient",
|
|
|
|
|
":threading",
|
|
|
|
|
"../system_wrappers",
|
|
|
|
|
"../test:fileutils",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
"third_party/sigslot",
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
|
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [ "win32_socket_server_unittest.cc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-06-29 08:03:04 +02:00
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
rtc_library("rtc_base_approved_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"atomic_ops_unittest.cc",
|
|
|
|
|
"base64_unittest.cc",
|
|
|
|
|
"bit_buffer_unittest.cc",
|
|
|
|
|
"bounded_inline_vector_unittest.cc",
|
|
|
|
|
"buffer_queue_unittest.cc",
|
|
|
|
|
"buffer_unittest.cc",
|
|
|
|
|
"byte_buffer_unittest.cc",
|
|
|
|
|
"byte_order_unittest.cc",
|
|
|
|
|
"checks_unittest.cc",
|
|
|
|
|
"copy_on_write_buffer_unittest.cc",
|
|
|
|
|
"deprecated/recursive_critical_section_unittest.cc",
|
|
|
|
|
"event_tracer_unittest.cc",
|
|
|
|
|
"event_unittest.cc",
|
|
|
|
|
"logging_unittest.cc",
|
|
|
|
|
"numerics/divide_round_unittest.cc",
|
|
|
|
|
"numerics/histogram_percentile_counter_unittest.cc",
|
|
|
|
|
"numerics/mod_ops_unittest.cc",
|
|
|
|
|
"numerics/moving_max_counter_unittest.cc",
|
|
|
|
|
"numerics/safe_compare_unittest.cc",
|
|
|
|
|
"numerics/safe_minmax_unittest.cc",
|
|
|
|
|
"numerics/sample_counter_unittest.cc",
|
|
|
|
|
"one_time_event_unittest.cc",
|
|
|
|
|
"platform_thread_unittest.cc",
|
|
|
|
|
"random_unittest.cc",
|
|
|
|
|
"rate_limiter_unittest.cc",
|
|
|
|
|
"rate_statistics_unittest.cc",
|
|
|
|
|
"rate_tracker_unittest.cc",
|
|
|
|
|
"ref_counted_object_unittest.cc",
|
|
|
|
|
"sanitizer_unittest.cc",
|
|
|
|
|
"string_encode_unittest.cc",
|
|
|
|
|
"string_to_number_unittest.cc",
|
|
|
|
|
"string_utils_unittest.cc",
|
|
|
|
|
"strings/string_builder_unittest.cc",
|
|
|
|
|
"strings/string_format_unittest.cc",
|
|
|
|
|
"swap_queue_unittest.cc",
|
|
|
|
|
"thread_annotations_unittest.cc",
|
|
|
|
|
"time_utils_unittest.cc",
|
|
|
|
|
"timestamp_aligner_unittest.cc",
|
|
|
|
|
"virtual_socket_unittest.cc",
|
|
|
|
|
"zero_memory_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [ "win/windows_version_unittest.cc" ]
|
|
|
|
|
}
|
|
|
|
|
deps = [
|
|
|
|
|
":async_socket",
|
|
|
|
|
":bounded_inline_vector",
|
|
|
|
|
":checks",
|
|
|
|
|
":divide_round",
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":ip_address",
|
|
|
|
|
":null_socket_server",
|
|
|
|
|
":rate_limiter",
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_numerics",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":safe_compare",
|
|
|
|
|
":safe_minmax",
|
|
|
|
|
":sanitizer",
|
|
|
|
|
":socket",
|
|
|
|
|
":socket_address",
|
|
|
|
|
":socket_server",
|
|
|
|
|
":stringutils",
|
|
|
|
|
":testclient",
|
|
|
|
|
":threading",
|
|
|
|
|
"../api:array_view",
|
|
|
|
|
"../api:scoped_refptr",
|
|
|
|
|
"../api/numerics",
|
|
|
|
|
"../api/units:time_delta",
|
|
|
|
|
"../system_wrappers",
|
|
|
|
|
"../test:fileutils",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
"memory:unittests",
|
|
|
|
|
"synchronization:mutex",
|
|
|
|
|
"task_utils:to_queued_task",
|
|
|
|
|
"third_party/base64",
|
|
|
|
|
"third_party/sigslot",
|
|
|
|
|
]
|
|
|
|
|
absl_deps = [
|
|
|
|
|
"//third_party/abseil-cpp/absl/base:core_headers",
|
|
|
|
|
"//third_party/abseil-cpp/absl/memory",
|
|
|
|
|
]
|
|
|
|
|
}
|
2017-06-29 08:03:04 +02:00
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
rtc_library("rtc_task_queue_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [ "task_queue_unittest.cc" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":task_queue_for_test",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
|
|
|
|
|
}
|
2017-06-29 08:03:04 +02:00
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
rtc_library("weak_ptr_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [ "weak_ptr_unittest.cc" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_event",
|
|
|
|
|
":task_queue_for_test",
|
|
|
|
|
":weak_ptr",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
2018-10-02 16:25:59 +02:00
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
rtc_library("rtc_numerics_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/event_based_exponential_moving_average_unittest.cc",
|
|
|
|
|
"numerics/exp_filter_unittest.cc",
|
|
|
|
|
"numerics/moving_average_unittest.cc",
|
|
|
|
|
"numerics/moving_median_filter_unittest.cc",
|
|
|
|
|
"numerics/percentile_filter_unittest.cc",
|
|
|
|
|
"numerics/running_statistics_unittest.cc",
|
|
|
|
|
"numerics/sequence_number_util_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_numerics",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/algorithm:container" ]
|
|
|
|
|
}
|
2018-10-02 16:25:59 +02:00
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
rtc_library("rtc_json_unittests") {
|
|
|
|
|
testonly = true
|
2017-06-29 08:03:04 +02:00
|
|
|
|
2021-02-01 09:56:37 +00:00
|
|
|
sources = [ "strings/json_unittest.cc" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_json",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
2020-09-26 11:57:26 +02:00
|
|
|
]
|
|
|
|
|
}
|
2021-02-01 09:56:37 +00:00
|
|
|
|
|
|
|
|
rtc_library("rtc_base_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
defines = []
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"crc32_unittest.cc",
|
|
|
|
|
"data_rate_limiter_unittest.cc",
|
|
|
|
|
"fake_clock_unittest.cc",
|
|
|
|
|
"helpers_unittest.cc",
|
|
|
|
|
"ip_address_unittest.cc",
|
|
|
|
|
"memory_usage_unittest.cc",
|
|
|
|
|
"message_digest_unittest.cc",
|
|
|
|
|
"nat_unittest.cc",
|
|
|
|
|
"network_route_unittest.cc",
|
|
|
|
|
"network_unittest.cc",
|
|
|
|
|
"proxy_unittest.cc",
|
|
|
|
|
"rolling_accumulator_unittest.cc",
|
|
|
|
|
"rtc_certificate_generator_unittest.cc",
|
|
|
|
|
"rtc_certificate_unittest.cc",
|
|
|
|
|
"sigslot_tester_unittest.cc",
|
|
|
|
|
"test_client_unittest.cc",
|
|
|
|
|
"thread_unittest.cc",
|
|
|
|
|
"unique_id_generator_unittest.cc",
|
2020-09-26 11:57:26 +02:00
|
|
|
]
|
2021-02-01 09:56:37 +00:00
|
|
|
deps = [
|
|
|
|
|
":async_socket",
|
|
|
|
|
":checks",
|
|
|
|
|
":gunit_helpers",
|
|
|
|
|
":ip_address",
|
|
|
|
|
":net_helpers",
|
|
|
|
|
":null_socket_server",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":socket_address",
|
|
|
|
|
":socket_factory",
|
|
|
|
|
":socket_server",
|
|
|
|
|
":stringutils",
|
|
|
|
|
":testclient",
|
|
|
|
|
":threading",
|
|
|
|
|
"../api:array_view",
|
|
|
|
|
"../api/task_queue",
|
|
|
|
|
"../api/task_queue:task_queue_test",
|
|
|
|
|
"../test:field_trial",
|
|
|
|
|
"../test:fileutils",
|
|
|
|
|
"../test:rtc_expect_death",
|
|
|
|
|
"../test:test_main",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
"memory:fifo_buffer",
|
|
|
|
|
"synchronization:mutex",
|
|
|
|
|
"task_utils:pending_task_safety_flag",
|
|
|
|
|
"task_utils:to_queued_task",
|
|
|
|
|
"third_party/sigslot",
|
|
|
|
|
]
|
|
|
|
|
if (enable_google_benchmarks) {
|
|
|
|
|
deps += [ "synchronization:synchronization_unittests" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [
|
|
|
|
|
"win32_unittest.cc",
|
|
|
|
|
"win32_window_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps += [ ":win32" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_posix || is_fuchsia) {
|
|
|
|
|
sources += [
|
|
|
|
|
"openssl_adapter_unittest.cc",
|
|
|
|
|
"openssl_session_cache_unittest.cc",
|
|
|
|
|
"openssl_utility_unittest.cc",
|
|
|
|
|
"ssl_adapter_unittest.cc",
|
|
|
|
|
"ssl_identity_unittest.cc",
|
|
|
|
|
"ssl_stream_adapter_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
absl_deps = [
|
|
|
|
|
"//third_party/abseil-cpp/absl/algorithm:container",
|
|
|
|
|
"//third_party/abseil-cpp/absl/memory",
|
|
|
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
|
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
|
|
|
]
|
|
|
|
|
public_deps = [ ":rtc_base" ] # no-presubmit-check TODO(webrtc:8603)
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
include_dirs = [ "../../boringssl/src/include" ]
|
|
|
|
|
}
|
|
|
|
|
if (rtc_build_ssl) {
|
|
|
|
|
deps += [ "//third_party/boringssl" ]
|
|
|
|
|
} else {
|
|
|
|
|
configs += [ ":external_ssl_library" ]
|
|
|
|
|
}
|
2017-08-29 12:18:32 -07:00
|
|
|
}
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-20 08:38:58 +02:00
|
|
|
if (is_android) {
|
2017-11-07 15:36:33 +00:00
|
|
|
rtc_android_library("base_java") {
|
2019-07-03 14:13:08 +02:00
|
|
|
visibility = [ "*" ]
|
2019-12-23 14:02:25 -08:00
|
|
|
sources = [
|
2017-06-29 08:03:04 +02:00
|
|
|
"java/src/org/webrtc/ContextUtils.java",
|
2018-06-21 14:31:38 +02:00
|
|
|
"java/src/org/webrtc/Loggable.java",
|
2017-06-29 08:03:04 +02:00
|
|
|
"java/src/org/webrtc/Logging.java",
|
|
|
|
|
"java/src/org/webrtc/Size.java",
|
|
|
|
|
"java/src/org/webrtc/ThreadUtils.java",
|
|
|
|
|
]
|
2018-12-10 12:30:46 +01:00
|
|
|
deps = [
|
2019-03-06 09:18:57 -05:00
|
|
|
"//third_party/android_deps:com_android_support_support_annotations_java",
|
2018-12-10 12:30:46 +01:00
|
|
|
]
|
2017-06-20 08:38:58 +02:00
|
|
|
}
|
2020-08-07 11:08:34 +02:00
|
|
|
java_cpp_enum("network_monitor_enums") {
|
|
|
|
|
sources = [ "network_monitor.h" ]
|
2020-08-07 14:08:33 +02:00
|
|
|
visibility = [ "*" ]
|
2020-08-07 11:08:34 +02:00
|
|
|
}
|
2017-06-20 08:38:58 +02:00
|
|
|
}
|