2014-06-17 08:54:03 +00:00
|
|
|
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2014-06-28 18:05:22 +00:00
|
|
|
# TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330.
|
|
|
|
|
|
2014-06-17 08:54:03 +00:00
|
|
|
import("//build/config/linux/pkg_config.gni")
|
2015-11-23 15:12:06 +01:00
|
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
2017-01-24 06:58:22 -08:00
|
|
|
import("webrtc.gni")
|
2015-07-30 12:45:18 +02:00
|
|
|
import("//third_party/protobuf/proto_library.gni")
|
2016-09-16 07:22:17 -07:00
|
|
|
if (is_android) {
|
|
|
|
|
import("//build/config/android/config.gni")
|
|
|
|
|
import("//build/config/android/rules.gni")
|
|
|
|
|
}
|
2014-06-17 08:54:03 +00:00
|
|
|
|
|
|
|
|
# Contains the defines and includes in common.gypi that are duplicated both as
|
|
|
|
|
# target_defaults and direct_dependent_settings.
|
|
|
|
|
config("common_inherited_config") {
|
|
|
|
|
defines = []
|
2016-07-22 08:57:23 +02:00
|
|
|
cflags = []
|
|
|
|
|
ldflags = []
|
2014-06-17 08:54:03 +00:00
|
|
|
if (build_with_mozilla) {
|
|
|
|
|
defines += [ "WEBRTC_MOZILLA_BUILD" ]
|
|
|
|
|
}
|
|
|
|
|
if (build_with_chromium) {
|
2016-05-30 06:27:50 -07:00
|
|
|
defines = [
|
|
|
|
|
# TODO(kjellander): Cleanup unused ones and move defines closer to
|
|
|
|
|
# the source when webrtc:4256 is completed.
|
|
|
|
|
"FEATURE_ENABLE_VOICEMAIL",
|
|
|
|
|
"EXPAT_RELATIVE_PATH",
|
|
|
|
|
"GTEST_RELATIVE_PATH",
|
|
|
|
|
"NO_SOUND_SYSTEM",
|
|
|
|
|
"WEBRTC_CHROMIUM_BUILD",
|
|
|
|
|
]
|
2014-06-17 08:54:03 +00:00
|
|
|
include_dirs = [
|
2015-09-30 03:48:52 -07:00
|
|
|
# The overrides must be included first as that is the mechanism for
|
2014-06-17 08:54:03 +00:00
|
|
|
# selecting the override headers in Chromium.
|
2015-09-30 03:48:52 -07:00
|
|
|
"../webrtc_overrides",
|
2015-05-25 12:55:39 +02:00
|
|
|
|
2014-06-17 08:54:03 +00:00
|
|
|
# Allow includes to be prefixed with webrtc/ in case it is not an
|
|
|
|
|
# immediate subdirectory of the top-level.
|
|
|
|
|
"..",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (is_posix) {
|
|
|
|
|
defines += [ "WEBRTC_POSIX" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
defines += [
|
|
|
|
|
"WEBRTC_MAC",
|
|
|
|
|
"WEBRTC_IOS",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (is_linux) {
|
|
|
|
|
defines += [ "WEBRTC_LINUX" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_mac) {
|
|
|
|
|
defines += [ "WEBRTC_MAC" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
2016-05-30 06:27:50 -07:00
|
|
|
defines += [
|
|
|
|
|
"WEBRTC_WIN",
|
|
|
|
|
"_CRT_SECURE_NO_WARNINGS", # Suppress warnings about _vsnprinf
|
|
|
|
|
]
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
if (is_android) {
|
|
|
|
|
defines += [
|
|
|
|
|
"WEBRTC_LINUX",
|
|
|
|
|
"WEBRTC_ANDROID",
|
|
|
|
|
]
|
|
|
|
|
}
|
2016-05-30 06:27:50 -07:00
|
|
|
if (is_chromeos) {
|
|
|
|
|
defines += [ "CHROMEOS" ]
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-22 08:57:23 +02:00
|
|
|
if (rtc_sanitize_coverage != "") {
|
|
|
|
|
assert(is_clang, "sanitizer coverage requires clang")
|
|
|
|
|
cflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ]
|
|
|
|
|
ldflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ]
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-30 06:27:50 -07:00
|
|
|
# TODO(GYP): Support these in GN.
|
|
|
|
|
# if (is_bsd) {
|
|
|
|
|
# defines += [ "BSD" ]
|
|
|
|
|
# }
|
|
|
|
|
# if (is_openbsd) {
|
|
|
|
|
# defines += [ "OPENBSD" ]
|
|
|
|
|
# }
|
|
|
|
|
# if (is_freebsd) {
|
|
|
|
|
# defines += [ "FREEBSD" ]
|
|
|
|
|
# }
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("common_config") {
|
2014-09-04 14:10:49 +00:00
|
|
|
cflags = []
|
|
|
|
|
cflags_cc = []
|
2016-05-30 06:27:50 -07:00
|
|
|
defines = []
|
|
|
|
|
|
2017-04-07 00:59:12 -07:00
|
|
|
if (rtc_enable_protobuf) {
|
|
|
|
|
defines += [ "WEBRTC_ENABLE_PROTOBUF=1" ]
|
|
|
|
|
} else {
|
|
|
|
|
defines += [ "WEBRTC_ENABLE_PROTOBUF=0" ]
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-07 17:36:10 +00:00
|
|
|
if (rtc_restrict_logging) {
|
2016-05-30 06:27:50 -07:00
|
|
|
defines += [ "WEBRTC_RESTRICT_LOGGING" ]
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
2016-06-12 22:12:01 -07:00
|
|
|
if (rtc_include_internal_audio_device) {
|
|
|
|
|
defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ]
|
|
|
|
|
}
|
|
|
|
|
|
Reland of GN: Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc}
The only thing that differs from the previous attempt in
https://codereview.webrtc.org/1979933002/ is that none of
the new targets are not hooked up to the webrtc target in
webrtc/BUILD.gn, which should make it not break the
chromium.webrtc.fyi bots.
Add BUILD.gn files for webrtc/{api,media,libjingle,p2p,pc} in
preparation for removing src/third_party/libjingle in Chromium.
Changes between previous attempt and the one before that
(https://codereview.webrtc.org/1973313002) are:
* Added libstunprober target
* Adjusted warnings for Chromium's clang plugins
* webrtc/pc/externalhmac.{h,cc} added for Chromium builds.
BUG=webrtc:4256
NOTRY=True
NOPRESUBMIT=True
TBR=perkj@webrtc.org, tommi@webrtc.org
Review-Url: https://codereview.webrtc.org/2037983002
Cr-Commit-Position: refs/heads/master@{#13030}
2016-06-03 03:09:32 -07:00
|
|
|
if (rtc_relative_path) {
|
|
|
|
|
defines += [ "EXPAT_RELATIVE_PATH" ]
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-05 06:52:22 -07:00
|
|
|
if (!rtc_libvpx_build_vp9) {
|
|
|
|
|
defines += [ "RTC_DISABLE_VP9" ]
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-22 10:53:38 -08:00
|
|
|
if (rtc_enable_sctp) {
|
|
|
|
|
defines += [ "HAVE_SCTP" ]
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-03 22:09:25 -08:00
|
|
|
if (rtc_enable_external_auth) {
|
|
|
|
|
defines += [ "ENABLE_EXTERNAL_AUTH" ]
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-09 19:15:33 +00:00
|
|
|
if (build_with_chromium) {
|
2016-05-30 06:27:50 -07:00
|
|
|
defines += [
|
|
|
|
|
# NOTICE: Since common_inherited_config is used in public_configs for our
|
|
|
|
|
# targets, there's no point including the defines in that config here.
|
|
|
|
|
# TODO(kjellander): Cleanup unused ones and move defines closer to the
|
|
|
|
|
# source when webrtc:4256 is completed.
|
|
|
|
|
"HAVE_WEBRTC_VIDEO",
|
|
|
|
|
"HAVE_WEBRTC_VOICE",
|
|
|
|
|
"LOGGING_INSIDE_WEBRTC",
|
|
|
|
|
"USE_WEBRTC_DEV_BRANCH",
|
|
|
|
|
]
|
2014-09-09 19:15:33 +00:00
|
|
|
} else {
|
2014-06-17 08:54:03 +00:00
|
|
|
if (is_posix) {
|
2016-11-03 07:57:35 -07:00
|
|
|
# Enable more warnings: -Wextra is currently disabled in Chromium.
|
|
|
|
|
cflags = [
|
|
|
|
|
"-Wextra",
|
|
|
|
|
|
|
|
|
|
# Repeat some flags that get overridden by -Wextra.
|
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
|
"-Wno-missing-field-initializers",
|
|
|
|
|
"-Wno-strict-overflow",
|
|
|
|
|
]
|
|
|
|
|
cflags_cc = [
|
|
|
|
|
"-Wnon-virtual-dtor",
|
|
|
|
|
|
|
|
|
|
# This is enabled for clang; enable for gcc as well.
|
|
|
|
|
"-Woverloaded-virtual",
|
|
|
|
|
]
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_clang) {
|
2016-04-27 07:13:46 -07:00
|
|
|
cflags += [
|
|
|
|
|
"-Wimplicit-fallthrough",
|
|
|
|
|
"-Wthread-safety",
|
2016-05-10 23:28:10 -07:00
|
|
|
"-Winconsistent-missing-override",
|
2016-09-28 17:42:01 -07:00
|
|
|
"-Wundef",
|
2016-04-27 07:13:46 -07:00
|
|
|
]
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-23 19:08:31 +00:00
|
|
|
if (current_cpu == "arm64") {
|
2015-05-19 22:20:17 -07:00
|
|
|
defines += [ "WEBRTC_ARCH_ARM64" ]
|
|
|
|
|
defines += [ "WEBRTC_HAS_NEON" ]
|
2014-10-31 00:14:39 +00:00
|
|
|
}
|
|
|
|
|
|
2015-02-23 19:08:31 +00:00
|
|
|
if (current_cpu == "arm") {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines += [ "WEBRTC_ARCH_ARM" ]
|
2014-11-26 17:01:40 +00:00
|
|
|
if (arm_version >= 7) {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines += [ "WEBRTC_ARCH_ARM_V7" ]
|
|
|
|
|
if (arm_use_neon) {
|
2015-05-19 22:20:17 -07:00
|
|
|
defines += [ "WEBRTC_HAS_NEON" ]
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-23 19:08:31 +00:00
|
|
|
if (current_cpu == "mipsel") {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines += [ "MIPS32_LE" ]
|
2015-03-04 09:50:31 +00:00
|
|
|
if (mips_float_abi == "hard") {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines += [ "MIPS_FPU_LE" ]
|
|
|
|
|
}
|
2015-01-25 19:17:56 +00:00
|
|
|
if (mips_arch_variant == "r2") {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines += [ "MIPS32_R2_LE" ]
|
|
|
|
|
}
|
|
|
|
|
if (mips_dsp_rev == 1) {
|
|
|
|
|
defines += [ "MIPS_DSP_R1_LE" ]
|
|
|
|
|
} else if (mips_dsp_rev == 2) {
|
|
|
|
|
defines += [
|
|
|
|
|
"MIPS_DSP_R1_LE",
|
|
|
|
|
"MIPS_DSP_R2_LE",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-07 12:57:42 +02:00
|
|
|
if (is_android && !is_clang) {
|
2015-09-21 16:50:45 +02:00
|
|
|
# The Android NDK doesn"t provide optimized versions of these
|
|
|
|
|
# functions. Ensure they are disabled for all compilers.
|
2014-06-17 08:54:03 +00:00
|
|
|
cflags += [
|
|
|
|
|
"-fno-builtin-cos",
|
|
|
|
|
"-fno-builtin-sin",
|
|
|
|
|
"-fno-builtin-cosf",
|
|
|
|
|
"-fno-builtin-sinf",
|
|
|
|
|
]
|
|
|
|
|
}
|
2016-05-26 01:03:02 -07:00
|
|
|
|
2016-07-25 02:14:09 -07:00
|
|
|
if (use_libfuzzer || use_drfuzz || use_afl) {
|
2016-05-26 01:03:02 -07:00
|
|
|
# Used in Chromium's overrides to disable logging
|
|
|
|
|
defines += [ "WEBRTC_UNSAFE_FUZZER_MODE" ]
|
|
|
|
|
}
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
2016-06-08 01:14:15 -07:00
|
|
|
config("common_objc") {
|
2016-08-07 21:37:45 -07:00
|
|
|
libs = [ "Foundation.framework" ]
|
2016-06-08 01:14:15 -07:00
|
|
|
}
|
|
|
|
|
|
2017-04-25 23:42:15 -07:00
|
|
|
rtc_source_set("video_stream_api") {
|
|
|
|
|
sources = [
|
|
|
|
|
"video_receive_stream.h",
|
|
|
|
|
"video_send_stream.h",
|
|
|
|
|
]
|
2017-06-01 13:01:48 -07:00
|
|
|
deps = [
|
|
|
|
|
":webrtc_common",
|
|
|
|
|
"api:transport_api",
|
2017-07-10 05:58:42 -07:00
|
|
|
"base:rtc_base_approved",
|
2017-06-01 13:01:48 -07:00
|
|
|
"common_video:common_video",
|
|
|
|
|
]
|
2017-04-25 23:42:15 -07:00
|
|
|
}
|
|
|
|
|
|
2016-10-28 05:44:03 -07:00
|
|
|
if (!build_with_chromium) {
|
|
|
|
|
# Target to build all the WebRTC production code.
|
2016-09-27 12:13:13 -07:00
|
|
|
rtc_static_library("webrtc") {
|
2016-10-28 05:44:03 -07:00
|
|
|
# Only the root target should depend on this.
|
|
|
|
|
visibility = [ "//:default" ]
|
|
|
|
|
|
2017-06-08 02:21:17 -07:00
|
|
|
sources = []
|
2017-03-23 02:49:15 -07:00
|
|
|
complete_static_lib = true
|
2016-08-02 09:53:25 -04:00
|
|
|
defines = []
|
2015-02-11 07:47:00 +00:00
|
|
|
|
2016-08-02 09:53:25 -04:00
|
|
|
deps = [
|
|
|
|
|
":webrtc_common",
|
2016-10-28 05:44:03 -07:00
|
|
|
"api",
|
2016-11-28 07:02:13 -08:00
|
|
|
"api:transport_api",
|
2016-08-02 09:53:25 -04:00
|
|
|
"audio",
|
2017-07-10 05:58:42 -07:00
|
|
|
"base",
|
2016-08-02 09:53:25 -04:00
|
|
|
"call",
|
|
|
|
|
"common_audio",
|
|
|
|
|
"common_video",
|
2016-10-28 05:44:03 -07:00
|
|
|
"logging",
|
|
|
|
|
"media",
|
2016-08-02 09:53:25 -04:00
|
|
|
"modules",
|
2016-10-28 05:44:03 -07:00
|
|
|
"modules/video_capture:video_capture_internal_impl",
|
2017-02-25 18:15:09 -08:00
|
|
|
"ortc",
|
2016-10-28 05:44:03 -07:00
|
|
|
"p2p",
|
|
|
|
|
"pc",
|
2017-06-20 08:38:58 +02:00
|
|
|
"rtc_base",
|
2016-10-28 05:44:03 -07:00
|
|
|
"sdk",
|
2016-08-24 01:33:13 -07:00
|
|
|
"stats",
|
2017-04-25 02:26:32 -07:00
|
|
|
"system_wrappers:system_wrappers_default",
|
2016-08-02 09:53:25 -04:00
|
|
|
"video",
|
|
|
|
|
"voice_engine",
|
2016-06-10 01:56:57 -07:00
|
|
|
]
|
2015-07-30 12:45:18 +02:00
|
|
|
|
2016-08-02 09:53:25 -04:00
|
|
|
if (rtc_enable_protobuf) {
|
|
|
|
|
defines += [ "ENABLE_RTC_EVENT_LOG" ]
|
Moved RtcEventLog files from call/ to logging/
The RtcEventLog headers need to be accessible from any place which needs
logging, and the implementation needs access to data structures that are
logged.
After a discussion in the code review, we all agreed to move the RtcEventLog implementation into its own top level directory - which I called "logging/" in expectation that other types of logging may have similar requirements. The directory contains two main build targets - "rtc_event_log_api", which is just rtc_event_log.h, that has no external dependencies and can be used from anywhere, and "rtc_event_log_impl" which contains the rest of the implementation and has many dependencies (more in the future).
The "api" target can be referenced from anywhere, while the "impl" target is only needed at the place of instantiation (currently Call, soon to be moved to PeerConnection by https://codereview.webrtc.org/2353033005/).
This change allows using RtcEventLog in the p2p/ directory, so that we
can log STUN pings and ICE state transitions.
BUG=webrtc:6393
R=kjellander@webrtc.org, kwiberg@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org
Review URL: https://codereview.webrtc.org/2380683005 .
Cr-Commit-Position: refs/heads/master@{#14485}
2016-10-03 18:31:22 -07:00
|
|
|
deps += [ "logging:rtc_event_log_proto" ]
|
2016-08-02 09:53:25 -04:00
|
|
|
}
|
2015-07-30 12:45:18 +02:00
|
|
|
}
|
2016-10-28 05:44:03 -07:00
|
|
|
|
|
|
|
|
if (rtc_include_tests) {
|
|
|
|
|
# Target to build all the WebRTC tests (but not examples or tools).
|
|
|
|
|
# Executable in order to get a target that links all WebRTC code.
|
|
|
|
|
rtc_executable("webrtc_tests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
# Only the root target should depend on this.
|
|
|
|
|
visibility = [ "//:default" ]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":rtc_unittests",
|
|
|
|
|
":video_engine_tests",
|
|
|
|
|
":webrtc_nonparallel_tests",
|
|
|
|
|
":webrtc_perf_tests",
|
2017-07-10 05:58:42 -07:00
|
|
|
"base:rtc_base_tests_utils",
|
2016-10-28 05:44:03 -07:00
|
|
|
"common_audio:common_audio_unittests",
|
|
|
|
|
"common_video:common_video_unittests",
|
|
|
|
|
"media:rtc_media_unittests",
|
|
|
|
|
"modules:modules_tests",
|
|
|
|
|
"modules:modules_unittests",
|
|
|
|
|
"modules/audio_coding:audio_coding_tests",
|
|
|
|
|
"modules/audio_processing:audio_processing_tests",
|
2017-03-22 15:48:11 +01:00
|
|
|
"modules/remote_bitrate_estimator:bwe_simulations_tests",
|
2016-10-28 05:44:03 -07:00
|
|
|
"modules/rtp_rtcp:test_packet_masks_metrics",
|
|
|
|
|
"modules/video_capture:video_capture_internal_impl",
|
2017-02-20 23:56:39 -08:00
|
|
|
"modules/video_coding:plot_videoprocessor_integrationtest",
|
2017-02-22 23:45:38 -08:00
|
|
|
"ortc:ortc_unittests",
|
2017-01-23 04:56:25 -08:00
|
|
|
"pc:peerconnection_unittests",
|
2016-10-28 05:44:03 -07:00
|
|
|
"pc:rtc_pc_unittests",
|
|
|
|
|
"stats:rtc_stats_unittests",
|
|
|
|
|
"system_wrappers:system_wrappers_unittests",
|
|
|
|
|
"test",
|
|
|
|
|
"video:screenshare_loopback",
|
|
|
|
|
"video:video_loopback",
|
|
|
|
|
"voice_engine:voice_engine_unittests",
|
|
|
|
|
]
|
|
|
|
|
if (is_android) {
|
|
|
|
|
deps += [
|
|
|
|
|
":android_junit_tests",
|
2016-12-06 04:29:37 -08:00
|
|
|
"//webrtc/sdk/android:libjingle_peerconnection_android_unittest",
|
2016-10-28 05:44:03 -07:00
|
|
|
]
|
|
|
|
|
} else {
|
|
|
|
|
deps += [ "modules/video_capture:video_capture_tests" ]
|
|
|
|
|
}
|
|
|
|
|
if (!is_ios) {
|
2017-02-26 07:12:50 -08:00
|
|
|
deps += [
|
|
|
|
|
"modules/audio_device:audio_device_tests",
|
|
|
|
|
"voice_engine:voe_auto_test",
|
|
|
|
|
]
|
2016-10-28 05:44:03 -07:00
|
|
|
}
|
2017-02-08 00:28:09 -08:00
|
|
|
if (rtc_enable_protobuf) {
|
2017-03-30 04:01:30 -07:00
|
|
|
deps += [
|
|
|
|
|
"audio:low_bandwidth_audio_test",
|
|
|
|
|
"logging:rtc_event_log2rtp_dump",
|
|
|
|
|
]
|
2017-02-08 00:28:09 -08:00
|
|
|
}
|
2016-10-28 05:44:03 -07:00
|
|
|
}
|
|
|
|
|
}
|
2014-06-23 19:21:07 +00:00
|
|
|
}
|
|
|
|
|
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("webrtc_common") {
|
2017-06-01 13:01:48 -07:00
|
|
|
# TODO(mbonadei): Remove (bugs.webrtc.org/7745)
|
|
|
|
|
# Enabling GN check triggers cyclic dependency error:
|
|
|
|
|
# //webrtc:webrtc_common ->
|
|
|
|
|
# //webrtc/api:video_frame_api ->
|
|
|
|
|
# //webrtc/system_wrappers:system_wrappers ->
|
|
|
|
|
# //webrtc:webrtc_common
|
|
|
|
|
check_includes = false
|
2014-06-23 19:21:07 +00:00
|
|
|
sources = [
|
2015-02-26 13:59:22 +00:00
|
|
|
"common_types.cc",
|
2015-01-26 19:17:26 +00:00
|
|
|
"common_types.h",
|
2014-06-23 19:21:07 +00:00
|
|
|
"config.cc",
|
2015-05-25 12:55:39 +02:00
|
|
|
"config.h",
|
2015-01-26 19:17:26 +00:00
|
|
|
"typedefs.h",
|
2014-06-17 08:54:03 +00:00
|
|
|
]
|
2014-07-13 09:02:54 +00:00
|
|
|
|
2016-10-16 23:56:12 -07:00
|
|
|
if (!build_with_chromium && is_clang) {
|
|
|
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
2016-01-14 04:32:46 -08:00
|
|
|
}
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
2015-01-26 19:17:26 +00:00
|
|
|
|
2016-07-25 02:14:09 -07:00
|
|
|
if (use_libfuzzer || use_drfuzz || use_afl) {
|
2015-12-17 14:28:16 +01:00
|
|
|
# This target is only here for gn to discover fuzzer build targets under
|
|
|
|
|
# webrtc/test/fuzzers/.
|
|
|
|
|
group("webrtc_fuzzers_dummy") {
|
2015-11-23 15:12:06 +01:00
|
|
|
testonly = true
|
|
|
|
|
deps = [
|
2015-12-17 14:28:16 +01:00
|
|
|
"test/fuzzers:webrtc_fuzzer_main",
|
2015-11-23 15:12:06 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-06-03 15:57:02 +02:00
|
|
|
|
2016-06-06 23:04:31 +02:00
|
|
|
if (rtc_include_tests) {
|
2016-06-03 15:57:02 +02:00
|
|
|
config("rtc_unittests_config") {
|
|
|
|
|
# GN orders flags on a target before flags from configs. The default config
|
|
|
|
|
# adds -Wall, and this flag have to be after -Wall -- so they need to
|
|
|
|
|
# come from a config and can"t be on the target directly.
|
|
|
|
|
if (is_clang) {
|
|
|
|
|
cflags = [
|
|
|
|
|
"-Wno-sign-compare",
|
|
|
|
|
"-Wno-unused-const-variable",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-02 04:10:34 -07:00
|
|
|
rtc_test("rtc_unittests") {
|
2016-06-03 15:57:02 +02:00
|
|
|
testonly = true
|
2017-06-29 12:31:36 -07:00
|
|
|
sources = [
|
|
|
|
|
"config_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
|
2016-06-03 15:57:02 +02:00
|
|
|
deps = [
|
2017-06-29 12:31:36 -07:00
|
|
|
":webrtc_common",
|
2017-02-24 01:17:43 -08:00
|
|
|
"api:rtc_api_unittests",
|
2017-06-16 10:42:05 -07:00
|
|
|
"api/audio_codecs/test:audio_codecs_api_unittests",
|
2017-07-10 05:58:42 -07:00
|
|
|
"base:rtc_base_approved_unittests",
|
|
|
|
|
"base:rtc_base_tests_main",
|
|
|
|
|
"base:rtc_base_tests_utils",
|
|
|
|
|
"base:rtc_base_unittests",
|
|
|
|
|
"base:rtc_numerics_unittests",
|
|
|
|
|
"base:rtc_task_queue_unittests",
|
|
|
|
|
"base:sequenced_task_checker_unittests",
|
|
|
|
|
"base:weak_ptr_unittests",
|
2017-01-04 07:11:23 -08:00
|
|
|
"p2p:libstunprober_unittests",
|
|
|
|
|
"p2p:rtc_p2p_unittests",
|
2017-01-23 04:26:02 -08:00
|
|
|
"system_wrappers:metrics_default",
|
2016-06-03 15:57:02 +02:00
|
|
|
]
|
|
|
|
|
|
2016-09-19 14:42:02 -07:00
|
|
|
if (rtc_enable_protobuf) {
|
Moved RtcEventLog files from call/ to logging/
The RtcEventLog headers need to be accessible from any place which needs
logging, and the implementation needs access to data structures that are
logged.
After a discussion in the code review, we all agreed to move the RtcEventLog implementation into its own top level directory - which I called "logging/" in expectation that other types of logging may have similar requirements. The directory contains two main build targets - "rtc_event_log_api", which is just rtc_event_log.h, that has no external dependencies and can be used from anywhere, and "rtc_event_log_impl" which contains the rest of the implementation and has many dependencies (more in the future).
The "api" target can be referenced from anywhere, while the "impl" target is only needed at the place of instantiation (currently Call, soon to be moved to PeerConnection by https://codereview.webrtc.org/2353033005/).
This change allows using RtcEventLog in the p2p/ directory, so that we
can log STUN pings and ICE state transitions.
BUG=webrtc:6393
R=kjellander@webrtc.org, kwiberg@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org
Review URL: https://codereview.webrtc.org/2380683005 .
Cr-Commit-Position: refs/heads/master@{#14485}
2016-10-03 18:31:22 -07:00
|
|
|
deps += [ "logging:rtc_event_log_tests" ]
|
2016-09-19 14:42:02 -07:00
|
|
|
}
|
|
|
|
|
|
2016-06-03 15:57:02 +02:00
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ "//testing/android/native_test:native_test_support" ]
|
2016-08-15 02:29:11 -07:00
|
|
|
shard_timeout = 900
|
2016-06-03 15:57:02 +02:00
|
|
|
}
|
2016-06-08 01:14:15 -07:00
|
|
|
|
2016-11-09 07:44:27 -08:00
|
|
|
if (is_ios || is_mac) {
|
Reland of Split iOS sdk in to separate targets (patchset #1 id:1 of https://codereview.webrtc.org/2911053002/ )
Reason for revert:
Take three of relanding this after all internal issues have been resolved.
Original issue's description:
> Revert of Split iOS sdk in to separate targets (patchset #3 id:320001 of https://codereview.webrtc.org/2893843003/ )
>
> Reason for revert:
> Breaks downstream project.
>
> Original issue's description:
> > Reland of Split iOS sdk in to separate targets (patchset #1 id:1 of https://codereview.webrtc.org/2893593002/ )
> >
> > Reason for revert:
> > Take two of fixing downstream issues?
> >
> > Original issue's description:
> > > Revert of Split iOS sdk in to separate targets (patchset #1 id:1 of https://codereview.webrtc.org/2890733003/ )
> > >
> > > Reason for revert:
> > > Still problems with downstream projects
> > >
> > > Original issue's description:
> > > > Reland of Split iOS sdk in to separate targets (patchset #1 id:1 of https://codereview.webrtc.org/2890513002/ )
> > > >
> > > > Reason for revert:
> > > > Fixing downstream breakages
> > > >
> > > > Original issue's description:
> > > > > Revert of Split iOS sdk in to separate targets (patchset #13 id:280001 of https://codereview.webrtc.org/2862543002/ )
> > > > >
> > > > > Reason for revert:
> > > > > Breaking downstream projects.
> > > > >
> > > > > Original issue's description:
> > > > > > Split iOS sdk in to separate targets
> > > > > >
> > > > > > This CL splits the iOS sdk into separate static libraries for video,
> > > > > > audio, ui, common, and peerconnection-related code. This will in the
> > > > > > future make it easier to compile WebRTC without unneeded components.
> > > > > >
> > > > > > BUG=webrtc:4867
> > > > > >
> > > > > > Review-Url: https://codereview.webrtc.org/2862543002
> > > > > > Cr-Commit-Position: refs/heads/master@{#18166}
> > > > > > Committed: https://chromium.googlesource.com/external/webrtc/+/52c83fe7102f566cf35a7533092873d58b38f426
> > > > >
> > > > > TBR=magjed@webrtc.org,denicija@webrtc.org,tkchin@webrtc.org,henrika@webrtc.org,kthelgason@webrtc.org
> > > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > > NOPRESUBMIT=true
> > > > > NOTREECHECKS=true
> > > > > NOTRY=true
> > > > > BUG=webrtc:4867
> > > > >
> > > > > Review-Url: https://codereview.webrtc.org/2890513002
> > > > > Cr-Commit-Position: refs/heads/master@{#18170}
> > > > > Committed: https://chromium.googlesource.com/external/webrtc/+/9756238084707787f735e1294e896e462e459717
> > > >
> > > > TBR=magjed@webrtc.org,denicija@webrtc.org,tkchin@webrtc.org,henrika@webrtc.org,charujain@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=webrtc:4867
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2890733003
> > > > Cr-Commit-Position: refs/heads/master@{#18174}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/d51e042492bedd057bc0cac7828979d5c7369cea
> > >
> > > TBR=magjed@webrtc.org,denicija@webrtc.org,tkchin@webrtc.org,henrika@webrtc.org,charujain@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4867
> > >
> > > Review-Url: https://codereview.webrtc.org/2893593002
> > > Cr-Commit-Position: refs/heads/master@{#18182}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/37144b214e2baf62ecb262ab878dde8c59cdd6a3
> >
> > TBR=magjed@webrtc.org,denicija@webrtc.org,tkchin@webrtc.org,henrika@webrtc.org,charujain@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:4867
> >
> > Review-Url: https://codereview.webrtc.org/2893843003
> > Cr-Commit-Position: refs/heads/master@{#18303}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/580c3522d294c877adfe555048c675bd8d166657
>
> TBR=magjed@webrtc.org,denicija@webrtc.org,tkchin@webrtc.org,henrika@webrtc.org,charujain@webrtc.org,kthelgason@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4867
>
> Review-Url: https://codereview.webrtc.org/2911053002
> Cr-Commit-Position: refs/heads/master@{#18309}
> Committed: https://chromium.googlesource.com/external/webrtc/+/af5c05540cc8208f682cafe88c5c16a505479196
TBR=magjed@webrtc.org,denicija@webrtc.org,tkchin@webrtc.org,henrika@webrtc.org,charujain@webrtc.org,mbonadei@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4867
Review-Url: https://codereview.webrtc.org/2913753003
Cr-Commit-Position: refs/heads/master@{#18319}
2017-05-30 01:48:47 -07:00
|
|
|
deps += [ "sdk:objc_sdk_unittests" ]
|
2016-06-08 01:14:15 -07:00
|
|
|
}
|
2016-06-03 15:57:02 +02:00
|
|
|
}
|
2016-06-14 12:52:54 +02:00
|
|
|
|
|
|
|
|
# TODO(pbos): Rename test suite, this is no longer "just" for video targets.
|
2016-09-14 05:10:01 -07:00
|
|
|
video_engine_tests_resources = [
|
|
|
|
|
"//resources/foreman_cif_short.yuv",
|
|
|
|
|
"//resources/voice_engine/audio_long16.pcm",
|
|
|
|
|
]
|
2016-08-30 02:53:49 -07:00
|
|
|
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
bundle_data("video_engine_tests_bundle_data") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = video_engine_tests_resources
|
|
|
|
|
outputs = [
|
|
|
|
|
"{{bundle_resources_dir}}/{{source_file_part}}",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-02 04:10:34 -07:00
|
|
|
rtc_test("video_engine_tests") {
|
2016-06-14 12:52:54 +02:00
|
|
|
testonly = true
|
|
|
|
|
deps = [
|
|
|
|
|
"audio:audio_tests",
|
2017-07-10 05:58:42 -07:00
|
|
|
"base:rtc_base_tests_utils",
|
2017-05-31 09:12:25 -07:00
|
|
|
|
|
|
|
|
# TODO(eladalon): call_tests aren't actually video-specific, so we
|
|
|
|
|
# should move them to a more appropriate test suite.
|
2016-06-14 12:52:54 +02:00
|
|
|
"call:call_tests",
|
|
|
|
|
"modules/video_capture",
|
|
|
|
|
"test:test_common",
|
|
|
|
|
"test:test_main",
|
2017-02-06 02:21:11 -08:00
|
|
|
"test:video_test_common",
|
2016-06-14 12:52:54 +02:00
|
|
|
"video:video_tests",
|
|
|
|
|
]
|
2016-09-14 05:10:01 -07:00
|
|
|
data = video_engine_tests_resources
|
2016-10-16 23:56:12 -07:00
|
|
|
if (!build_with_chromium && is_clang) {
|
|
|
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
2016-06-14 12:52:54 +02:00
|
|
|
}
|
2016-08-15 02:29:11 -07:00
|
|
|
if (is_android) {
|
2016-08-18 00:41:59 -07:00
|
|
|
deps += [ "//testing/android/native_test:native_test_native_code" ]
|
2016-08-24 07:48:42 -07:00
|
|
|
shard_timeout = 900
|
|
|
|
|
}
|
2016-08-30 02:53:49 -07:00
|
|
|
if (is_ios) {
|
|
|
|
|
deps += [ ":video_engine_tests_bundle_data" ]
|
2016-08-15 02:29:11 -07:00
|
|
|
}
|
2016-06-14 12:52:54 +02:00
|
|
|
}
|
2016-06-27 19:31:39 +02:00
|
|
|
|
2016-09-14 05:10:01 -07:00
|
|
|
webrtc_perf_tests_resources = [
|
|
|
|
|
"//resources/audio_coding/speech_mono_16kHz.pcm",
|
2016-12-19 06:18:35 -08:00
|
|
|
"//resources/audio_coding/speech_mono_32_48kHz.pcm",
|
2016-09-14 05:10:01 -07:00
|
|
|
"//resources/audio_coding/testfile32kHz.pcm",
|
|
|
|
|
"//resources/ConferenceMotion_1280_720_50.yuv",
|
|
|
|
|
"//resources/difficult_photo_1850_1110.yuv",
|
|
|
|
|
"//resources/foreman_cif.yuv",
|
|
|
|
|
"//resources/google-wifi-3mbps.rx",
|
|
|
|
|
"//resources/paris_qcif.yuv",
|
|
|
|
|
"//resources/photo_1850_1110.yuv",
|
|
|
|
|
"//resources/presentation_1850_1110.yuv",
|
|
|
|
|
"//resources/verizon4g-downlink.rx",
|
|
|
|
|
"//resources/voice_engine/audio_long16.pcm",
|
|
|
|
|
"//resources/web_screenshot_1850_1110.yuv",
|
|
|
|
|
]
|
2016-08-30 02:53:49 -07:00
|
|
|
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
bundle_data("webrtc_perf_tests_bundle_data") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = webrtc_perf_tests_resources
|
|
|
|
|
outputs = [
|
|
|
|
|
"{{bundle_resources_dir}}/{{source_file_part}}",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-02 04:10:34 -07:00
|
|
|
rtc_test("webrtc_perf_tests") {
|
2016-07-27 08:14:32 -07:00
|
|
|
testonly = true
|
2016-09-05 01:35:44 -07:00
|
|
|
configs += [ ":rtc_unittests_config" ]
|
2016-08-31 08:22:09 -07:00
|
|
|
|
2016-07-27 08:14:32 -07:00
|
|
|
deps = [
|
2017-01-05 07:09:50 -08:00
|
|
|
"call:call_perf_tests",
|
|
|
|
|
"modules/audio_coding:audio_coding_perf_tests",
|
|
|
|
|
"modules/audio_processing:audio_processing_perf_tests",
|
|
|
|
|
"modules/remote_bitrate_estimator:remote_bitrate_estimator_perf_tests",
|
2016-07-27 08:14:32 -07:00
|
|
|
"test:test_main",
|
2017-01-05 07:09:50 -08:00
|
|
|
"video:video_full_stack_tests",
|
2016-07-27 08:14:32 -07:00
|
|
|
]
|
2016-09-13 21:42:39 -07:00
|
|
|
|
2016-09-14 05:10:01 -07:00
|
|
|
data = webrtc_perf_tests_resources
|
2016-07-27 08:14:32 -07:00
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ "//testing/android/native_test:native_test_native_code" ]
|
2016-08-15 02:29:11 -07:00
|
|
|
shard_timeout = 2700
|
2016-07-27 08:14:32 -07:00
|
|
|
}
|
2016-08-30 02:53:49 -07:00
|
|
|
if (is_ios) {
|
|
|
|
|
deps += [ ":webrtc_perf_tests_bundle_data" ]
|
|
|
|
|
}
|
2016-07-27 08:14:32 -07:00
|
|
|
}
|
|
|
|
|
|
2016-09-02 04:10:34 -07:00
|
|
|
rtc_test("webrtc_nonparallel_tests") {
|
2016-06-27 19:31:39 +02:00
|
|
|
testonly = true
|
|
|
|
|
deps = [
|
2017-07-10 05:58:42 -07:00
|
|
|
"base:rtc_base_nonparallel_tests",
|
2016-06-27 19:31:39 +02:00
|
|
|
]
|
|
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ "//testing/android/native_test:native_test_support" ]
|
2016-08-15 02:29:11 -07:00
|
|
|
shard_timeout = 900
|
2016-06-27 19:31:39 +02:00
|
|
|
}
|
|
|
|
|
}
|
2016-09-16 07:22:17 -07:00
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
|
junit_binary("android_junit_tests") {
|
2016-09-19 08:53:23 -07:00
|
|
|
java_files = [
|
2017-01-27 05:14:59 -08:00
|
|
|
"examples/androidjunit/src/org/appspot/apprtc/BluetoothManagerTest.java",
|
2016-09-19 08:53:23 -07:00
|
|
|
"examples/androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java",
|
|
|
|
|
"examples/androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java",
|
2017-01-27 05:14:59 -08:00
|
|
|
"sdk/android/tests/src/org/webrtc/CameraEnumerationTest.java",
|
2016-09-19 08:53:23 -07:00
|
|
|
]
|
2016-09-16 07:22:17 -07:00
|
|
|
|
|
|
|
|
deps = [
|
2016-09-30 00:20:06 -07:00
|
|
|
"//base:base_java_test_support",
|
2016-09-27 10:10:41 +02:00
|
|
|
"//webrtc/examples:AppRTCMobile_javalib",
|
2016-12-06 04:29:37 -08:00
|
|
|
"//webrtc/sdk/android:libjingle_peerconnection_java",
|
2016-09-16 07:22:17 -07:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-06-03 15:57:02 +02:00
|
|
|
}
|