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")
|
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")
|
|
|
|
|
}
|
2017-06-29 08:03:04 +02:00
|
|
|
if (is_win) {
|
|
|
|
|
import("//build/config/clang/clang.gni")
|
|
|
|
|
}
|
2017-06-20 08:38:58 +02:00
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
group("base") {
|
|
|
|
|
public_deps = [
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":sequenced_task_checker",
|
|
|
|
|
":weak_ptr",
|
|
|
|
|
]
|
2017-06-20 08:38:58 +02:00
|
|
|
if (is_android) {
|
|
|
|
|
public_deps += [ ":base_java" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
config("rtc_base_chromium_config") {
|
|
|
|
|
defines = [ "NO_MAIN_THREAD_WRAPPING" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("rtc_base_all_dependent_config") {
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
libs = [
|
|
|
|
|
"CFNetwork.framework",
|
2018-02-03 12:24:24 -08:00
|
|
|
"Foundation.framework",
|
2017-06-29 08:03:04 +02:00
|
|
|
"Security.framework",
|
|
|
|
|
"SystemConfiguration.framework",
|
|
|
|
|
"UIKit.framework",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (is_mac) {
|
|
|
|
|
libs = [
|
|
|
|
|
"Cocoa.framework",
|
|
|
|
|
"Foundation.framework",
|
|
|
|
|
"IOKit.framework",
|
|
|
|
|
"Security.framework",
|
|
|
|
|
"SystemConfiguration.framework",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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 ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
source_set("protobuf_utils") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
sources = [
|
|
|
|
|
"protobuf_utils.h",
|
|
|
|
|
]
|
|
|
|
|
if (rtc_enable_protobuf) {
|
|
|
|
|
public_deps = [
|
|
|
|
|
"//third_party/protobuf:protobuf_lite",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
source_set("compile_assert_c") {
|
|
|
|
|
sources = [
|
|
|
|
|
"compile_assert_c.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-11 03:43:34 -07:00
|
|
|
rtc_source_set("rtc_base_approved") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-09-11 03:43:34 -07:00
|
|
|
public_deps = [
|
|
|
|
|
":rtc_base_approved_generic",
|
|
|
|
|
]
|
|
|
|
|
if (is_mac && !build_with_chromium) {
|
|
|
|
|
public_deps += [ ":rtc_base_approved_objc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-13 16:05:42 +01:00
|
|
|
rtc_source_set("checks") {
|
|
|
|
|
sources = [
|
|
|
|
|
"checks.cc",
|
|
|
|
|
"checks.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":safe_compare",
|
2017-12-15 14:40:10 +01:00
|
|
|
"..:typedefs",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-15 14:40:10 +01:00
|
|
|
rtc_source_set("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",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("sanitizer") {
|
|
|
|
|
sources = [
|
|
|
|
|
"sanitizer.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("safe_compare") {
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/safe_compare.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":type_traits",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-07 14:18:56 +01:00
|
|
|
rtc_source_set("safe_minmax") {
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/safe_minmax.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":safe_compare",
|
|
|
|
|
":type_traits",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-15 14:40:10 +01:00
|
|
|
rtc_source_set("stringutils") {
|
2017-12-13 16:05:42 +01:00
|
|
|
sources = [
|
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",
|
2017-12-15 14:40:10 +01:00
|
|
|
"stringutils.cc",
|
|
|
|
|
"stringutils.h",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-15 14:40:10 +01:00
|
|
|
":checks",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("type_traits") {
|
|
|
|
|
sources = [
|
|
|
|
|
"type_traits.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("deprecation") {
|
|
|
|
|
sources = [
|
|
|
|
|
"deprecation.h",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
# The subset of rtc_base approved for use outside of libjingle.
|
2017-09-11 03:43:34 -07:00
|
|
|
rtc_source_set("rtc_base_approved_generic") {
|
|
|
|
|
visibility = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_approved_objc",
|
2017-12-01 18:56:43 +01:00
|
|
|
":weak_ptr_unittests",
|
2017-09-11 03:43:34 -07:00
|
|
|
]
|
|
|
|
|
|
2017-12-13 16:05:42 +01:00
|
|
|
cflags = []
|
2017-06-29 08:03:04 +02:00
|
|
|
defines = []
|
|
|
|
|
libs = []
|
2017-12-13 16:05:42 +01:00
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":safe_compare",
|
2017-12-15 14:40:10 +01:00
|
|
|
":stringutils",
|
2017-12-13 16:05:42 +01:00
|
|
|
":type_traits",
|
2017-12-15 14:40:10 +01:00
|
|
|
"../:typedefs",
|
2017-12-13 16:05:42 +01:00
|
|
|
]
|
2017-06-29 08:03:04 +02:00
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"arraysize.h",
|
|
|
|
|
"atomicops.h",
|
|
|
|
|
"base64.cc",
|
|
|
|
|
"base64.h",
|
|
|
|
|
"basictypes.h",
|
|
|
|
|
"bind.h",
|
|
|
|
|
"bitbuffer.cc",
|
|
|
|
|
"bitbuffer.h",
|
2017-10-20 10:37:47 +02:00
|
|
|
"bitrateallocationstrategy.cc",
|
|
|
|
|
"bitrateallocationstrategy.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"buffer.h",
|
|
|
|
|
"bufferqueue.cc",
|
|
|
|
|
"bufferqueue.h",
|
|
|
|
|
"bytebuffer.cc",
|
|
|
|
|
"bytebuffer.h",
|
|
|
|
|
"byteorder.h",
|
|
|
|
|
"constructormagic.h",
|
|
|
|
|
"copyonwritebuffer.cc",
|
|
|
|
|
"copyonwritebuffer.h",
|
|
|
|
|
"criticalsection.cc",
|
|
|
|
|
"criticalsection.h",
|
|
|
|
|
"event_tracer.cc",
|
|
|
|
|
"event_tracer.h",
|
|
|
|
|
"file.cc",
|
|
|
|
|
"file.h",
|
|
|
|
|
"flags.cc",
|
|
|
|
|
"flags.h",
|
|
|
|
|
"format_macros.h",
|
|
|
|
|
"function_view.h",
|
|
|
|
|
"ignore_wundef.h",
|
|
|
|
|
"location.cc",
|
|
|
|
|
"location.h",
|
2017-11-22 12:25:14 +01:00
|
|
|
"numerics/histogram_percentile_counter.cc",
|
|
|
|
|
"numerics/histogram_percentile_counter.h",
|
|
|
|
|
"numerics/mod_ops.h",
|
|
|
|
|
"numerics/moving_max_counter.h",
|
2017-11-22 10:42:26 +01:00
|
|
|
"numerics/safe_conversions.h",
|
|
|
|
|
"numerics/safe_conversions_impl.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"onetimeevent.h",
|
|
|
|
|
"pathutils.cc",
|
|
|
|
|
"pathutils.h",
|
|
|
|
|
"platform_file.cc",
|
|
|
|
|
"platform_file.h",
|
|
|
|
|
"platform_thread.cc",
|
|
|
|
|
"platform_thread.h",
|
2018-02-17 11:46:14 +01:00
|
|
|
"platform_thread_types.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"platform_thread_types.h",
|
|
|
|
|
"ptr_util.h",
|
|
|
|
|
"race_checker.cc",
|
|
|
|
|
"race_checker.h",
|
|
|
|
|
"random.cc",
|
|
|
|
|
"random.h",
|
|
|
|
|
"rate_statistics.cc",
|
|
|
|
|
"rate_statistics.h",
|
|
|
|
|
"ratetracker.cc",
|
|
|
|
|
"ratetracker.h",
|
|
|
|
|
"refcount.h",
|
|
|
|
|
"refcountedobject.h",
|
2017-10-23 11:22:30 +02:00
|
|
|
"refcounter.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"scoped_ref_ptr.h",
|
|
|
|
|
"string_to_number.cc",
|
|
|
|
|
"string_to_number.h",
|
|
|
|
|
"stringencode.cc",
|
|
|
|
|
"stringencode.h",
|
|
|
|
|
"stringize_macros.h",
|
|
|
|
|
"swap_queue.h",
|
|
|
|
|
"template_util.h",
|
|
|
|
|
"thread_annotations.h",
|
|
|
|
|
"thread_checker.h",
|
|
|
|
|
"thread_checker_impl.cc",
|
|
|
|
|
"thread_checker_impl.h",
|
|
|
|
|
"timestampaligner.cc",
|
|
|
|
|
"timestampaligner.h",
|
|
|
|
|
"timeutils.cc",
|
|
|
|
|
"timeutils.h",
|
|
|
|
|
"trace_event.h",
|
2018-03-07 20:02:26 +01:00
|
|
|
"zero_memory.cc",
|
|
|
|
|
"zero_memory.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
|
2017-12-13 16:05:42 +01:00
|
|
|
deps += [
|
|
|
|
|
"..:webrtc_common",
|
|
|
|
|
"../api:array_view",
|
|
|
|
|
"../api:optional",
|
|
|
|
|
]
|
2017-06-29 08:03:04 +02:00
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
|
libs += [ "log" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_posix) {
|
|
|
|
|
sources += [ "file_posix.cc" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [ "file_win.cc" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
# Dependency on chromium's logging (in //base).
|
|
|
|
|
deps += [ "//base:base" ]
|
|
|
|
|
sources += [
|
2017-11-26 18:22:52 +01:00
|
|
|
"../../webrtc_overrides/rtc_base/event.cc",
|
|
|
|
|
"../../webrtc_overrides/rtc_base/event.h",
|
2017-09-15 06:47:31 +02:00
|
|
|
"../../webrtc_overrides/rtc_base/logging.cc",
|
|
|
|
|
"../../webrtc_overrides/rtc_base/logging.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
} else {
|
|
|
|
|
sources += [
|
2017-11-26 18:22:52 +01:00
|
|
|
"event.cc",
|
|
|
|
|
"event.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"logging.cc",
|
|
|
|
|
"logging.h",
|
|
|
|
|
]
|
2018-02-27 15:30:29 +01:00
|
|
|
|
|
|
|
|
# logging.h needs the deprecation header while downstream projects are
|
|
|
|
|
# removing code that depends on logging implementation details.
|
|
|
|
|
deps += [ ":deprecation" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
if (is_component_build && is_win) {
|
|
|
|
|
# Copy the VS runtime DLLs into the isolate so that they don't have to be
|
|
|
|
|
# preinstalled on the target machine. The debug runtimes have a "d" at
|
|
|
|
|
# the end.
|
|
|
|
|
# This is a copy of https://codereview.chromium.org/1783973002.
|
|
|
|
|
# TODO(ehmaldonado): We'd like Chromium to make this changes easier to use,
|
|
|
|
|
# so we don't have to copy their changes and risk breakages.
|
|
|
|
|
# See http://crbug.com/653569
|
|
|
|
|
if (is_debug) {
|
|
|
|
|
vcrt_suffix = "d"
|
|
|
|
|
} else {
|
|
|
|
|
vcrt_suffix = ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# These runtime files are copied to the output directory by the
|
|
|
|
|
# vs_toolchain script that runs as part of toolchain configuration.
|
|
|
|
|
data = [
|
|
|
|
|
"$root_out_dir/msvcp140${vcrt_suffix}.dll",
|
|
|
|
|
"$root_out_dir/vccorlib140${vcrt_suffix}.dll",
|
|
|
|
|
"$root_out_dir/vcruntime140${vcrt_suffix}.dll",
|
|
|
|
|
|
|
|
|
|
# Universal Windows 10 CRT files
|
|
|
|
|
"$root_out_dir/api-ms-win-core-console-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-datetime-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-debug-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-errorhandling-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-file-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-file-l1-2-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-file-l2-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-handle-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-heap-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-interlocked-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-libraryloader-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-localization-l1-2-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-memory-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-namedpipe-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-processenvironment-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-processthreads-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-processthreads-l1-1-1.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-profile-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-rtlsupport-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-string-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-synch-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-synch-l1-2-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-sysinfo-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-timezone-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-core-util-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-conio-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-convert-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-environment-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-filesystem-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-heap-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-locale-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-math-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-multibyte-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-private-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-process-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-runtime-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-stdio-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-string-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-time-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/api-ms-win-crt-utility-l1-1-0.dll",
|
|
|
|
|
"$root_out_dir/ucrtbase${vcrt_suffix}.dll",
|
|
|
|
|
]
|
|
|
|
|
if (is_asan) {
|
|
|
|
|
if (current_cpu == "x64") {
|
|
|
|
|
data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-x86_64.dll" ]
|
|
|
|
|
} else {
|
|
|
|
|
data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-i386.dll" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (is_nacl) {
|
|
|
|
|
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-11 03:43:34 -07:00
|
|
|
if (is_mac && !build_with_chromium) {
|
|
|
|
|
config("rtc_base_approved_objc_all_dependent_config") {
|
|
|
|
|
visibility = [ ":rtc_base_approved_objc" ]
|
|
|
|
|
libs = [ "Foundation.framework" ] # needed for logging_mac.mm
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_base_approved_objc") {
|
|
|
|
|
visibility = [ ":rtc_base_approved" ]
|
|
|
|
|
all_dependent_configs = [ ":rtc_base_approved_objc_all_dependent_config" ]
|
|
|
|
|
sources = [
|
|
|
|
|
"logging_mac.mm",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base_approved_generic",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-25 05:00:11 -07:00
|
|
|
rtc_source_set("rtc_task_queue") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-08-27 23:40:10 -07:00
|
|
|
deps = [
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base_approved",
|
2017-08-27 23:40:10 -07:00
|
|
|
]
|
|
|
|
|
public_deps = [
|
2017-08-25 05:00:11 -07:00
|
|
|
":rtc_task_queue_api",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
|
2017-08-25 05:00:11 -07:00
|
|
|
if (rtc_link_task_queue_impl) {
|
2017-08-27 23:40:10 -07:00
|
|
|
deps += [ ":rtc_task_queue_impl" ]
|
2017-08-25 05:00:11 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# WebRTC targets must not directly depend on rtc_task_queue_api or
|
|
|
|
|
# rtc_task_queue_impl. Instead, depend on rtc_task_queue.
|
|
|
|
|
# The build flag |rtc_link_task_queue_impl| decides if WebRTC targets will link
|
|
|
|
|
# to the default implemenation in rtc_task_queue_impl or if an externally
|
|
|
|
|
# provided implementation should be used. An external implementation should
|
|
|
|
|
# depend on rtc_task_queue_api.
|
|
|
|
|
rtc_source_set("rtc_task_queue_api") {
|
2017-09-19 08:28:00 -07:00
|
|
|
sources = [
|
|
|
|
|
"task_queue.h",
|
|
|
|
|
]
|
2017-08-25 05:00:11 -07:00
|
|
|
deps = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_task_queue_impl") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-08-25 05:00:11 -07:00
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-08-25 05:00:11 -07:00
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_task_queue_api",
|
|
|
|
|
]
|
2017-10-19 12:38:09 +02:00
|
|
|
if (rtc_build_libevent) {
|
|
|
|
|
deps += [ "//base/third_party/libevent" ]
|
|
|
|
|
}
|
|
|
|
|
if (rtc_enable_libevent) {
|
2017-08-25 05:00:11 -07:00
|
|
|
sources = [
|
2017-10-19 12:38:09 +02:00
|
|
|
"task_queue_libevent.cc",
|
|
|
|
|
"task_queue_posix.cc",
|
|
|
|
|
"task_queue_posix.h",
|
2017-08-25 05:00:11 -07:00
|
|
|
]
|
|
|
|
|
} else {
|
2017-10-19 12:38:09 +02:00
|
|
|
if (is_mac || is_ios) {
|
2017-09-27 10:53:21 +02:00
|
|
|
sources = [
|
2017-10-19 12:38:09 +02:00
|
|
|
"task_queue_gcd.cc",
|
2017-10-03 08:01:07 +00:00
|
|
|
"task_queue_posix.cc",
|
|
|
|
|
"task_queue_posix.h",
|
2017-09-27 10:53:21 +02:00
|
|
|
]
|
2017-10-19 12:38:09 +02:00
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources = [
|
|
|
|
|
"task_queue_win.cc",
|
|
|
|
|
]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_static_library("sequenced_task_checker") {
|
|
|
|
|
sources = [
|
|
|
|
|
"sequenced_task_checker.h",
|
|
|
|
|
"sequenced_task_checker_impl.cc",
|
|
|
|
|
"sequenced_task_checker_impl.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-08-27 23:40:10 -07:00
|
|
|
":rtc_base_approved",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_task_queue",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_static_library("weak_ptr") {
|
|
|
|
|
sources = [
|
|
|
|
|
"weak_ptr.cc",
|
|
|
|
|
"weak_ptr.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":sequenced_task_checker",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_static_library("rtc_numerics") {
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/exp_filter.cc",
|
|
|
|
|
"numerics/exp_filter.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",
|
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",
|
2017-12-13 16:05:42 +01:00
|
|
|
":safe_compare",
|
2017-10-25 13:07:09 +02:00
|
|
|
"../api:optional",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("rtc_base_warnings_config") {
|
|
|
|
|
if (is_win && is_clang) {
|
|
|
|
|
cflags = [
|
|
|
|
|
# Disable warnings failing when compiling with Clang on Windows.
|
|
|
|
|
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
|
|
|
|
|
"-Wno-sign-compare",
|
|
|
|
|
"-Wno-missing-braces",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_json") {
|
|
|
|
|
defines = []
|
|
|
|
|
sources = [
|
|
|
|
|
"json.cc",
|
|
|
|
|
"json.h",
|
|
|
|
|
]
|
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) {
|
|
|
|
|
public_deps = [
|
|
|
|
|
"//third_party/jsoncpp",
|
|
|
|
|
]
|
|
|
|
|
} 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" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-05 05:17:02 -07:00
|
|
|
rtc_static_library("rtc_base") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2018-01-15 10:20:00 -05:00
|
|
|
public_deps = []
|
|
|
|
|
if (!build_with_mozilla) {
|
|
|
|
|
public_deps += [ ":rtc_base_generic" ]
|
|
|
|
|
}
|
2017-09-07 07:36:28 -07:00
|
|
|
if (is_win) {
|
|
|
|
|
sources = [
|
|
|
|
|
"noop.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (is_ios || is_mac) {
|
|
|
|
|
sources = [
|
|
|
|
|
"noop.mm",
|
|
|
|
|
]
|
|
|
|
|
public_deps += [ ":rtc_base_objc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_ios || is_mac) {
|
|
|
|
|
rtc_source_set("rtc_base_objc") {
|
|
|
|
|
sources = [
|
|
|
|
|
"thread_darwin.mm",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base_generic",
|
|
|
|
|
]
|
|
|
|
|
visibility = [ ":rtc_base" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_static_library("rtc_base_generic") {
|
2017-06-29 08:03:04 +02:00
|
|
|
cflags = []
|
|
|
|
|
cflags_cc = []
|
|
|
|
|
libs = []
|
|
|
|
|
defines = []
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-12-15 14:40:10 +01:00
|
|
|
":stringutils",
|
2017-06-29 08:03:04 +02:00
|
|
|
"..:webrtc_common",
|
2017-12-21 22:00:34 +01:00
|
|
|
"../api:array_view",
|
2017-09-05 08:43:13 -07:00
|
|
|
"../api:optional",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
public_deps = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
]
|
|
|
|
|
public_configs = []
|
|
|
|
|
|
|
|
|
|
all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"asyncinvoker-inl.h",
|
|
|
|
|
"asyncinvoker.cc",
|
|
|
|
|
"asyncinvoker.h",
|
|
|
|
|
"asyncpacketsocket.cc",
|
|
|
|
|
"asyncpacketsocket.h",
|
|
|
|
|
"asyncresolverinterface.cc",
|
|
|
|
|
"asyncresolverinterface.h",
|
|
|
|
|
"asyncsocket.cc",
|
|
|
|
|
"asyncsocket.h",
|
|
|
|
|
"asynctcpsocket.cc",
|
|
|
|
|
"asynctcpsocket.h",
|
|
|
|
|
"asyncudpsocket.cc",
|
|
|
|
|
"asyncudpsocket.h",
|
|
|
|
|
"crc32.cc",
|
|
|
|
|
"crc32.h",
|
|
|
|
|
"cryptstring.cc",
|
|
|
|
|
"cryptstring.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",
|
2017-06-29 08:03:04 +02:00
|
|
|
"filerotatingstream.cc",
|
|
|
|
|
"filerotatingstream.h",
|
|
|
|
|
"fileutils.cc",
|
|
|
|
|
"fileutils.h",
|
|
|
|
|
"gunit_prod.h",
|
|
|
|
|
"helpers.cc",
|
|
|
|
|
"helpers.h",
|
|
|
|
|
"httpcommon-inl.h",
|
|
|
|
|
"httpcommon.cc",
|
|
|
|
|
"httpcommon.h",
|
|
|
|
|
"ipaddress.cc",
|
|
|
|
|
"ipaddress.h",
|
2017-12-19 11:50:21 +01:00
|
|
|
"keep_ref_until_done.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"messagedigest.cc",
|
|
|
|
|
"messagedigest.h",
|
|
|
|
|
"messagehandler.cc",
|
|
|
|
|
"messagehandler.h",
|
|
|
|
|
"messagequeue.cc",
|
|
|
|
|
"messagequeue.h",
|
2017-11-13 13:26:07 -08:00
|
|
|
"nethelper.cc",
|
|
|
|
|
"nethelper.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"nethelpers.cc",
|
|
|
|
|
"nethelpers.h",
|
|
|
|
|
"network.cc",
|
|
|
|
|
"network.h",
|
2017-10-05 14:53:33 +02:00
|
|
|
"network_constants.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"networkmonitor.cc",
|
|
|
|
|
"networkmonitor.h",
|
2017-12-19 11:50:21 +01:00
|
|
|
"networkroute.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"nullsocketserver.cc",
|
|
|
|
|
"nullsocketserver.h",
|
|
|
|
|
"openssl.h",
|
|
|
|
|
"openssladapter.cc",
|
|
|
|
|
"openssladapter.h",
|
|
|
|
|
"openssldigest.cc",
|
|
|
|
|
"openssldigest.h",
|
|
|
|
|
"opensslidentity.cc",
|
|
|
|
|
"opensslidentity.h",
|
|
|
|
|
"opensslstreamadapter.cc",
|
|
|
|
|
"opensslstreamadapter.h",
|
|
|
|
|
"physicalsocketserver.cc",
|
|
|
|
|
"physicalsocketserver.h",
|
|
|
|
|
"proxyinfo.cc",
|
|
|
|
|
"proxyinfo.h",
|
|
|
|
|
"ratelimiter.h",
|
|
|
|
|
"rtccertificate.cc",
|
|
|
|
|
"rtccertificate.h",
|
|
|
|
|
"rtccertificategenerator.cc",
|
|
|
|
|
"rtccertificategenerator.h",
|
2017-07-11 16:56:05 -07:00
|
|
|
"signalthread.cc",
|
|
|
|
|
"signalthread.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"sigslot.cc",
|
|
|
|
|
"sigslot.h",
|
2017-10-05 09:13:55 -07:00
|
|
|
"sigslotrepeater.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"socket.h",
|
|
|
|
|
"socketadapters.cc",
|
|
|
|
|
"socketadapters.h",
|
|
|
|
|
"socketaddress.cc",
|
|
|
|
|
"socketaddress.h",
|
|
|
|
|
"socketaddresspair.cc",
|
|
|
|
|
"socketaddresspair.h",
|
|
|
|
|
"socketfactory.h",
|
|
|
|
|
"socketserver.h",
|
|
|
|
|
"socketstream.cc",
|
|
|
|
|
"socketstream.h",
|
|
|
|
|
"ssladapter.cc",
|
|
|
|
|
"ssladapter.h",
|
|
|
|
|
"sslfingerprint.cc",
|
|
|
|
|
"sslfingerprint.h",
|
|
|
|
|
"sslidentity.cc",
|
|
|
|
|
"sslidentity.h",
|
|
|
|
|
"sslstreamadapter.cc",
|
|
|
|
|
"sslstreamadapter.h",
|
|
|
|
|
"stream.cc",
|
|
|
|
|
"stream.h",
|
|
|
|
|
"thread.cc",
|
|
|
|
|
"thread.h",
|
|
|
|
|
]
|
|
|
|
|
|
2017-09-07 07:36:28 -07:00
|
|
|
visibility = [
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_objc",
|
|
|
|
|
]
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
# TODO(henrike): issue 3307, make rtc_base build with the Chromium default
|
|
|
|
|
# compiler settings.
|
|
|
|
|
suppressed_configs += [ "//build/config/compiler:chromium_code" ]
|
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
|
if (!is_win) {
|
|
|
|
|
cflags += [ "-Wno-uninitialized" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
if (is_win) {
|
2017-09-15 06:47:31 +02:00
|
|
|
sources += [ "../../webrtc_overrides/rtc_base/win32socketinit.cc" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
include_dirs = [ "../../boringssl/src/include" ]
|
|
|
|
|
public_configs += [ ":rtc_base_chromium_config" ]
|
|
|
|
|
} else {
|
|
|
|
|
configs += [ ":rtc_base_warnings_config" ]
|
|
|
|
|
sources += [
|
|
|
|
|
"callback.h",
|
|
|
|
|
"logsinks.cc",
|
|
|
|
|
"logsinks.h",
|
2017-11-22 12:25:14 +01:00
|
|
|
"numerics/mathutils.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"optionsfile.cc",
|
|
|
|
|
"optionsfile.h",
|
|
|
|
|
"rollingaccumulator.h",
|
|
|
|
|
"sslroots.h",
|
|
|
|
|
"transformadapter.cc",
|
|
|
|
|
"transformadapter.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [
|
|
|
|
|
"win32socketinit.cc",
|
|
|
|
|
"win32socketinit.h",
|
|
|
|
|
"win32socketserver.cc",
|
|
|
|
|
"win32socketserver.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
} # !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) {
|
|
|
|
|
sources += [
|
|
|
|
|
"ifaddrs-android.cc",
|
|
|
|
|
"ifaddrs-android.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
libs += [
|
|
|
|
|
"log",
|
|
|
|
|
"GLESv2",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_ios || is_mac) {
|
2017-09-07 07:36:28 -07:00
|
|
|
sources += [ "macifaddrs_converter.cc" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
}
|
|
|
|
|
|
2017-12-20 21:25:47 +01:00
|
|
|
if (rtc_use_x11) {
|
2017-06-29 08:03:04 +02:00
|
|
|
libs += [
|
|
|
|
|
"dl",
|
|
|
|
|
"rt",
|
|
|
|
|
"Xext",
|
|
|
|
|
"X11",
|
|
|
|
|
"Xcomposite",
|
|
|
|
|
"Xrender",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_linux) {
|
|
|
|
|
libs += [
|
|
|
|
|
"dl",
|
|
|
|
|
"rt",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_mac) {
|
|
|
|
|
sources += [
|
|
|
|
|
"macutils.cc",
|
|
|
|
|
"macutils.h",
|
|
|
|
|
]
|
|
|
|
|
libs += [
|
|
|
|
|
# For ProcessInformationCopyDictionary in unixfilesystem.cc.
|
|
|
|
|
"ApplicationServices.framework",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [
|
|
|
|
|
"win32.cc",
|
|
|
|
|
"win32.h",
|
|
|
|
|
"win32filesystem.cc",
|
|
|
|
|
"win32filesystem.h",
|
|
|
|
|
"win32window.cc",
|
|
|
|
|
"win32window.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
libs += [
|
|
|
|
|
"crypt32.lib",
|
|
|
|
|
"iphlpapi.lib",
|
|
|
|
|
"secur32.lib",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
cflags += [
|
|
|
|
|
# Suppress warnings about WIN32_LEAN_AND_MEAN.
|
|
|
|
|
"/wd4005",
|
|
|
|
|
"/wd4703",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_posix) {
|
|
|
|
|
sources += [
|
|
|
|
|
"ifaddrs_converter.cc",
|
|
|
|
|
"ifaddrs_converter.h",
|
|
|
|
|
"unixfilesystem.cc",
|
|
|
|
|
"unixfilesystem.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_nacl) {
|
|
|
|
|
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
|
|
|
|
|
defines += [ "timezone=_timezone" ]
|
|
|
|
|
sources -= [ "ifaddrs_converter.cc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("gtest_prod") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
sources = [
|
|
|
|
|
"gtest_prod_util.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("rtc_base_tests_utils_exported_config") {
|
|
|
|
|
defines = [ "GTEST_RELATIVE_PATH" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("rtc_base_tests_utils_warnings_config") {
|
|
|
|
|
if (is_win && is_clang) {
|
|
|
|
|
cflags = [
|
|
|
|
|
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
|
|
|
|
|
"-Wno-reorder",
|
|
|
|
|
"-Wno-sign-compare",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_base_tests_utils") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
# Also use this as a convenient dumping ground for misc files that are
|
|
|
|
|
# included by multiple targets below.
|
|
|
|
|
"cpu_time.cc",
|
|
|
|
|
"cpu_time.h",
|
|
|
|
|
"fakeclock.cc",
|
|
|
|
|
"fakeclock.h",
|
|
|
|
|
"fakenetwork.h",
|
2017-10-24 10:08:26 -07:00
|
|
|
"fakesslidentity.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"fakesslidentity.h",
|
|
|
|
|
"firewallsocketserver.cc",
|
|
|
|
|
"firewallsocketserver.h",
|
2018-01-22 10:21:56 -08:00
|
|
|
"gunit.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"gunit.h",
|
2017-12-15 16:04:21 +01:00
|
|
|
"httpbase.cc",
|
|
|
|
|
"httpbase.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"httpserver.cc",
|
|
|
|
|
"httpserver.h",
|
|
|
|
|
"memory_usage.cc",
|
|
|
|
|
"memory_usage.h",
|
|
|
|
|
"natserver.cc",
|
|
|
|
|
"natserver.h",
|
|
|
|
|
"natsocketfactory.cc",
|
|
|
|
|
"natsocketfactory.h",
|
|
|
|
|
"nattypes.cc",
|
|
|
|
|
"nattypes.h",
|
|
|
|
|
"proxyserver.cc",
|
|
|
|
|
"proxyserver.h",
|
2017-09-15 09:04:28 +02:00
|
|
|
"refcount.h",
|
2017-06-29 08:03:04 +02:00
|
|
|
"sigslottester.h",
|
|
|
|
|
"sigslottester.h.pump",
|
|
|
|
|
"testbase64.h",
|
|
|
|
|
"testclient.cc",
|
|
|
|
|
"testclient.h",
|
2017-10-24 10:08:26 -07:00
|
|
|
"testechoserver.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"testechoserver.h",
|
2017-10-24 10:08:26 -07:00
|
|
|
"testutils.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"testutils.h",
|
|
|
|
|
"timedelta.h",
|
|
|
|
|
"virtualsocketserver.cc",
|
|
|
|
|
"virtualsocketserver.h",
|
|
|
|
|
]
|
|
|
|
|
configs += [ ":rtc_base_tests_utils_warnings_config" ]
|
|
|
|
|
public_configs = [ ":rtc_base_tests_utils_exported_config" ]
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base",
|
2017-12-15 14:40:10 +01:00
|
|
|
":stringutils",
|
2017-06-29 08:03:04 +02:00
|
|
|
"../test:field_trial",
|
|
|
|
|
"../test:test_support",
|
2018-02-05 10:33:35 +01:00
|
|
|
"system:fallthrough",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
public_deps = [
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-19 12:41:43 +01:00
|
|
|
rtc_source_set("rtc_task_queue_for_test") {
|
|
|
|
|
visibility = [ "*" ]
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"task_queue_for_test.cc",
|
|
|
|
|
"task_queue_for_test.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":checks",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-29 08:03:04 +02:00
|
|
|
if (rtc_include_tests) {
|
|
|
|
|
rtc_source_set("rtc_base_tests_main") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"unittest_main.cc",
|
|
|
|
|
]
|
|
|
|
|
public_configs = [ ":rtc_base_tests_utils_exported_config" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_utils",
|
2018-01-31 17:23:40 +01:00
|
|
|
"../system_wrappers:field_trial_default",
|
2017-06-29 08:03:04 +02:00
|
|
|
"../test:field_trial",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
public_deps = [
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_base_nonparallel_tests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"cpu_time_unittest.cc",
|
|
|
|
|
"filerotatingstream_unittest.cc",
|
|
|
|
|
"nullsocketserver_unittest.cc",
|
|
|
|
|
"physicalsocketserver_unittest.cc",
|
|
|
|
|
"socket_unittest.cc",
|
|
|
|
|
"socket_unittest.h",
|
|
|
|
|
"socketaddress_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
"../system_wrappers:system_wrappers",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [ "win32socketserver_unittest.cc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_base_approved_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"atomicops_unittest.cc",
|
|
|
|
|
"base64_unittest.cc",
|
|
|
|
|
"basictypes_unittest.cc",
|
|
|
|
|
"bind_unittest.cc",
|
|
|
|
|
"bitbuffer_unittest.cc",
|
2017-11-22 17:22:35 +01:00
|
|
|
"bitrateallocationstrategy_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"buffer_unittest.cc",
|
|
|
|
|
"bufferqueue_unittest.cc",
|
|
|
|
|
"bytebuffer_unittest.cc",
|
|
|
|
|
"byteorder_unittest.cc",
|
|
|
|
|
"copyonwritebuffer_unittest.cc",
|
|
|
|
|
"criticalsection_unittest.cc",
|
|
|
|
|
"event_tracer_unittest.cc",
|
|
|
|
|
"event_unittest.cc",
|
|
|
|
|
"file_unittest.cc",
|
|
|
|
|
"function_view_unittest.cc",
|
|
|
|
|
"logging_unittest.cc",
|
2017-11-22 12:25:14 +01:00
|
|
|
"numerics/histogram_percentile_counter_unittest.cc",
|
|
|
|
|
"numerics/mod_ops_unittest.cc",
|
|
|
|
|
"numerics/moving_max_counter_unittest.cc",
|
2017-11-22 10:42:26 +01:00
|
|
|
"numerics/safe_compare_unittest.cc",
|
|
|
|
|
"numerics/safe_minmax_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"onetimeevent_unittest.cc",
|
|
|
|
|
"pathutils_unittest.cc",
|
|
|
|
|
"platform_thread_unittest.cc",
|
|
|
|
|
"random_unittest.cc",
|
|
|
|
|
"rate_limiter_unittest.cc",
|
|
|
|
|
"rate_statistics_unittest.cc",
|
|
|
|
|
"ratetracker_unittest.cc",
|
|
|
|
|
"refcountedobject_unittest.cc",
|
|
|
|
|
"string_to_number_unittest.cc",
|
|
|
|
|
"stringencode_unittest.cc",
|
|
|
|
|
"stringize_macros_unittest.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_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"stringutils_unittest.cc",
|
|
|
|
|
"swap_queue_unittest.cc",
|
|
|
|
|
"thread_annotations_unittest.cc",
|
|
|
|
|
"thread_checker_unittest.cc",
|
|
|
|
|
"timestampaligner_unittest.cc",
|
|
|
|
|
"timeutils_unittest.cc",
|
|
|
|
|
"virtualsocket_unittest.cc",
|
2018-03-07 20:02:26 +01:00
|
|
|
"zero_memory_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
|
|
|
|
":rate_limiter",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base",
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_task_queue",
|
2017-12-13 16:05:42 +01:00
|
|
|
":safe_compare",
|
2018-03-07 14:18:56 +01:00
|
|
|
":safe_minmax",
|
2017-12-15 14:40:10 +01:00
|
|
|
":stringutils",
|
2017-09-04 05:43:17 -07:00
|
|
|
"../api:array_view",
|
2017-06-29 08:03:04 +02:00
|
|
|
"../system_wrappers:system_wrappers",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_task_queue_unittests") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-06-29 08:03:04 +02:00
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"task_queue_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2017-08-27 23:40:10 -07:00
|
|
|
":rtc_base_approved",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_task_queue",
|
2018-02-13 19:47:50 +01:00
|
|
|
":rtc_task_queue_for_test",
|
2017-06-29 08:03:04 +02:00
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("sequenced_task_checker_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"sequenced_task_checker_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":sequenced_task_checker",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("weak_ptr_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"weak_ptr_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2017-12-01 18:56:43 +01:00
|
|
|
":rtc_base_approved_generic",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_base_tests_utils",
|
|
|
|
|
":rtc_task_queue",
|
|
|
|
|
":weak_ptr",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rtc_source_set("rtc_numerics_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"numerics/exp_filter_unittest.cc",
|
2017-11-01 14:01:00 +01:00
|
|
|
"numerics/moving_median_filter_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"numerics/percentile_filter_unittest.cc",
|
2017-10-25 13:07:09 +02:00
|
|
|
"numerics/sequence_number_util_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_base_approved",
|
|
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_numerics",
|
|
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("rtc_base_unittests_config") {
|
|
|
|
|
if (is_clang) {
|
|
|
|
|
cflags = [ "-Wno-unused-const-variable" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
rtc_source_set("rtc_base_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"callback_unittest.cc",
|
|
|
|
|
"crc32_unittest.cc",
|
2018-02-28 16:04:26 +01:00
|
|
|
"data_rate_limiter_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"helpers_unittest.cc",
|
|
|
|
|
"httpbase_unittest.cc",
|
|
|
|
|
"httpcommon_unittest.cc",
|
|
|
|
|
"httpserver_unittest.cc",
|
|
|
|
|
"ipaddress_unittest.cc",
|
|
|
|
|
"memory_usage_unittest.cc",
|
|
|
|
|
"messagedigest_unittest.cc",
|
|
|
|
|
"messagequeue_unittest.cc",
|
|
|
|
|
"nat_unittest.cc",
|
|
|
|
|
"network_unittest.cc",
|
|
|
|
|
"optionsfile_unittest.cc",
|
|
|
|
|
"proxy_unittest.cc",
|
|
|
|
|
"ptr_util_unittest.cc",
|
|
|
|
|
"rollingaccumulator_unittest.cc",
|
|
|
|
|
"rtccertificate_unittest.cc",
|
|
|
|
|
"rtccertificategenerator_unittest.cc",
|
2017-07-11 16:56:05 -07:00
|
|
|
"signalthread_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"sigslot_unittest.cc",
|
|
|
|
|
"sigslottester_unittest.cc",
|
|
|
|
|
"stream_unittest.cc",
|
|
|
|
|
"testclient_unittest.cc",
|
|
|
|
|
"thread_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [
|
|
|
|
|
"win32_unittest.cc",
|
|
|
|
|
"win32window_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (is_posix) {
|
|
|
|
|
sources += [
|
2017-08-29 12:18:32 -07:00
|
|
|
"openssladapter_unittest.cc",
|
2017-06-29 08:03:04 +02:00
|
|
|
"ssladapter_unittest.cc",
|
|
|
|
|
"sslidentity_unittest.cc",
|
|
|
|
|
"sslstreamadapter_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
deps = [
|
2017-12-13 16:05:42 +01:00
|
|
|
":checks",
|
2017-06-29 08:03:04 +02:00
|
|
|
":rtc_base_tests_main",
|
|
|
|
|
":rtc_base_tests_utils",
|
2017-12-15 14:40:10 +01:00
|
|
|
":stringutils",
|
2017-12-21 22:00:34 +01:00
|
|
|
"../api:array_view",
|
2017-09-05 08:43:13 -07:00
|
|
|
"../api:optional",
|
2017-06-29 08:03:04 +02:00
|
|
|
"../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
public_deps = [
|
|
|
|
|
":rtc_base",
|
|
|
|
|
]
|
|
|
|
|
configs += [ ":rtc_base_unittests_config" ]
|
2017-08-29 12:18:32 -07:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
include_dirs = [ "../../boringssl/src/include" ]
|
|
|
|
|
}
|
|
|
|
|
if (rtc_build_ssl) {
|
|
|
|
|
deps += [ "//third_party/boringssl" ]
|
|
|
|
|
} else {
|
|
|
|
|
configs += [ ":external_ssl_library" ]
|
|
|
|
|
}
|
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") {
|
2017-06-29 08:03:04 +02:00
|
|
|
java_files = [
|
|
|
|
|
"java/src/org/webrtc/ContextUtils.java",
|
|
|
|
|
"java/src/org/webrtc/Logging.java",
|
|
|
|
|
"java/src/org/webrtc/Size.java",
|
|
|
|
|
"java/src/org/webrtc/ThreadUtils.java",
|
|
|
|
|
]
|
2017-06-20 08:38:58 +02:00
|
|
|
}
|
|
|
|
|
}
|