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")
|
2014-06-17 08:54:03 +00:00
|
|
|
import("build/webrtc.gni")
|
2015-07-30 12:45:18 +02:00
|
|
|
import("//third_party/protobuf/proto_library.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 = []
|
|
|
|
|
if (build_with_mozilla) {
|
|
|
|
|
defines += [ "WEBRTC_MOZILLA_BUILD" ]
|
|
|
|
|
}
|
|
|
|
|
if (build_with_chromium) {
|
2015-05-25 12:55:39 +02:00
|
|
|
defines = [ "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",
|
|
|
|
|
]
|
|
|
|
|
}
|
2015-06-29 14:34:58 -07:00
|
|
|
if (is_ios && rtc_use_objc_h264) {
|
|
|
|
|
defines += [ "WEBRTC_OBJC_H264" ]
|
|
|
|
|
}
|
2014-06-17 08:54:03 +00:00
|
|
|
if (is_linux) {
|
|
|
|
|
defines += [ "WEBRTC_LINUX" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_mac) {
|
|
|
|
|
defines += [ "WEBRTC_MAC" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
defines += [ "WEBRTC_WIN" ]
|
|
|
|
|
}
|
|
|
|
|
if (is_android) {
|
|
|
|
|
defines += [
|
|
|
|
|
"WEBRTC_LINUX",
|
|
|
|
|
"WEBRTC_ANDROID",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-07 17:36:10 +00:00
|
|
|
if (rtc_have_dbus_glib) {
|
2014-06-28 18:05:22 +00:00
|
|
|
pkg_config("dbus-glib") {
|
|
|
|
|
packages = [ "dbus-glib-1" ]
|
|
|
|
|
}
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config("common_config") {
|
2014-09-04 14:10:49 +00:00
|
|
|
cflags = []
|
|
|
|
|
cflags_cc = []
|
2014-09-07 17:36:10 +00:00
|
|
|
if (rtc_restrict_logging) {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines = [ "WEBRTC_RESTRICT_LOGGING" ]
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-07 17:36:10 +00:00
|
|
|
if (rtc_have_dbus_glib) {
|
2014-06-17 08:54:03 +00:00
|
|
|
defines += [ "HAVE_DBUS_GLIB" ]
|
2015-05-25 12:55:39 +02:00
|
|
|
|
2014-06-17 08:54:03 +00:00
|
|
|
# TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h>
|
|
|
|
|
# is still not found even if the execution of
|
|
|
|
|
# build/config/linux/pkg-config.py dbus-glib-1 returns correct include
|
|
|
|
|
# dirs on Linux.
|
|
|
|
|
all_dependent_configs = [ "dbus-glib" ]
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-09 19:15:33 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
defines += [ "LOGGING_INSIDE_WEBRTC" ]
|
|
|
|
|
} else {
|
2014-06-17 08:54:03 +00:00
|
|
|
if (is_posix) {
|
|
|
|
|
# -Wextra is currently disabled in Chromium"s common.gypi. Enable
|
|
|
|
|
# for targets that can handle it. For Android/arm64 right now
|
|
|
|
|
# there will be an "enumeral and non-enumeral type in conditional
|
|
|
|
|
# expression" warning in android_tools/ndk_experimental"s version
|
|
|
|
|
# of stlport.
|
|
|
|
|
# See: https://code.google.com/p/chromium/issues/detail?id=379699
|
2015-02-23 19:08:31 +00:00
|
|
|
if (current_cpu != "arm64" || !is_android) {
|
2014-06-17 08:54:03 +00:00
|
|
|
cflags = [
|
|
|
|
|
"-Wextra",
|
2015-05-25 12:55:39 +02:00
|
|
|
|
2014-06-17 08:54:03 +00:00
|
|
|
# We need to repeat some flags from Chromium"s common.gypi
|
|
|
|
|
# here that get overridden by -Wextra.
|
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
|
"-Wno-missing-field-initializers",
|
|
|
|
|
"-Wno-strict-overflow",
|
|
|
|
|
]
|
|
|
|
|
cflags_cc = [
|
|
|
|
|
"-Wnon-virtual-dtor",
|
2015-05-25 12:55:39 +02:00
|
|
|
|
2014-06-17 08:54:03 +00:00
|
|
|
# This is enabled for clang; enable for gcc as well.
|
|
|
|
|
"-Woverloaded-virtual",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_clang) {
|
|
|
|
|
cflags += [ "-Wthread-safety" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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" ]
|
|
|
|
|
} else if (arm_optionally_use_neon) {
|
|
|
|
|
defines += [ "WEBRTC_DETECT_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",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-12 07:56:21 +00:00
|
|
|
source_set("webrtc") {
|
2014-06-23 19:21:07 +00:00
|
|
|
sources = [
|
|
|
|
|
"call.h",
|
Revert of Move webrtc/audio/audio_sink.h to webrtc/ and fix some dependencies. (patchset #2 id:40001 of https://codereview.webrtc.org/1737593002/ )
Reason for revert:
Breaks GN in chromium.
Original issue's description:
> Move webrtc/audio/audio_sink.h to webrtc/ and fix some dependencies.
>
> webrtc/audio/audio_sink.h is used by voice engine, but webrtc/audio is
> depending on voice engine, resulting in a cyclic dependency (which we
> don't detect since we have that check turned off, see webrtc:4243).
>
> BUG=webrtc:4243, webrtc:5589
> R=pbos@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org
> TBR=tommi@webrtc.org
>
> Committed: https://crrev.com/99b345c4e50c59a776c56949c17da3f50992f1a2
> Cr-Commit-Position: refs/heads/master@{#11766}
TBR=solenberg@webrtc.org,pbos@webrtc.org,perkj@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4243, webrtc:5589
Review URL: https://codereview.webrtc.org/1739783002
Cr-Commit-Position: refs/heads/master@{#11769}
2016-02-25 08:36:42 -08:00
|
|
|
"config.h",
|
|
|
|
|
"frame_callback.h",
|
|
|
|
|
"transport.h",
|
2014-06-23 19:21:07 +00:00
|
|
|
]
|
|
|
|
|
|
2015-07-30 12:45:18 +02:00
|
|
|
defines = []
|
2014-09-28 17:37:22 +00:00
|
|
|
configs += [ ":common_config" ]
|
2015-05-25 12:55:39 +02:00
|
|
|
public_configs = [ ":common_inherited_config" ]
|
2014-07-13 09:02:54 +00:00
|
|
|
|
2014-06-17 08:54:03 +00:00
|
|
|
deps = [
|
Revert "Add GN Build file for rtc_sound target."
This reverts commit f054819e257a4f9cbb7fa82ba51dc2335f4359ec,
2d3747de9b7c3014e106d3766dc07cf5da3e1881 and
7ef0553c85c5b373535d7f6161e9a6d3b5b9a826.
It seems harder than expected to get a GN build for rtc_sound
and we lack sufficient trybot support for the case where
WebRTC is built as part of Chromium.
The Debug builds failed like this:
[6939/7454] SOLINK ./libcontent.so
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -B../../third_party/binutils/Linux_x64/Release/bin -fuse-ld=gold -Wl,--icf=all -pthread -m64 -Wl,--export-dynamic -o ./libcontent.so -Wl,-soname=libcontent.so @./libcontent.so.rsp && { readelf -d ./libcontent.so | grep SONAME ; nm -gD -f p ./libcontent.so | cut -f1-2 -d' '; } > ./libcontent.so.tmp && if ! cmp -s ./libcontent.so.tmp ./libcontent.so.TOC; then mv ./libcontent.so.tmp ./libcontent.so.TOC; fi
../../third_party/webrtc/sound/alsasoundsystem.cc:453: error: undefined reference to 'rtc::LateBindingSymbolTable::Load()'
../../third_party/webrtc/base/latebindingsymboltable.h.def:62: error: undefined reference to 'rtc::LateBindingSymbolTable::IsLoaded() const'
../../third_party/webrtc/base/latebindingsymboltable.h.def:62: error: undefined reference to 'rtc::LateBindingSymbolTable::IsLoaded() const'
../../third_party/webrtc/base/latebindingsymboltable.h.def:62: error: undefined reference to 'rtc::LateBindingSymbolTable::IsLoaded() const'
../../third_party/webrtc/base/latebindingsymboltable.h.def:62: error: undefined reference to 'rtc::LateBindingSymbolTable::IsLoaded() const'
../../third_party/webrtc/base/latebindingsymboltable.cc.def:63: error: undefined reference to 'rtc::LateBindingSymbolTable::LateBindingSymbolTable(rtc::LateBindingSymbolTable::TableInfo const*, void**)'
../../third_party/webrtc/base/latebindingsymboltable.cc.def:65: error: undefined reference to 'rtc::LateBindingSymbolTable::~LateBindingSymbolTable()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
BUG=webrtc:4160
TBR=tfarina@chromium.org
Review URL: https://codereview.webrtc.org/1407893005 .
Cr-Commit-Position: refs/heads/master@{#10411}
2015-10-26 17:39:11 +01:00
|
|
|
":webrtc_common",
|
2015-11-23 15:12:06 +01:00
|
|
|
"audio",
|
2015-01-21 20:22:33 +00:00
|
|
|
"base:rtc_base",
|
2015-09-25 13:58:30 +02:00
|
|
|
"call",
|
2014-06-23 19:21:07 +00:00
|
|
|
"common_audio",
|
|
|
|
|
"common_video",
|
|
|
|
|
"modules/audio_coding",
|
|
|
|
|
"modules/audio_conference_mixer",
|
|
|
|
|
"modules/audio_device",
|
|
|
|
|
"modules/audio_processing",
|
|
|
|
|
"modules/bitrate_controller",
|
|
|
|
|
"modules/desktop_capture",
|
|
|
|
|
"modules/media_file",
|
|
|
|
|
"modules/rtp_rtcp",
|
|
|
|
|
"modules/utility",
|
|
|
|
|
"modules/video_coding",
|
|
|
|
|
"modules/video_processing",
|
2014-06-21 14:25:16 +00:00
|
|
|
"system_wrappers",
|
2014-09-30 18:05:02 +00:00
|
|
|
"tools",
|
2014-06-23 19:21:07 +00:00
|
|
|
"video",
|
|
|
|
|
"voice_engine",
|
|
|
|
|
]
|
2015-02-11 07:47:00 +00:00
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
deps += [
|
2015-05-25 12:55:39 +02:00
|
|
|
"modules/video_capture",
|
|
|
|
|
"modules/video_render",
|
2015-02-11 07:47:00 +00:00
|
|
|
]
|
|
|
|
|
}
|
2015-07-30 12:45:18 +02:00
|
|
|
|
|
|
|
|
if (rtc_enable_protobuf) {
|
|
|
|
|
defines += [ "ENABLE_RTC_EVENT_LOG" ]
|
|
|
|
|
deps += [ ":rtc_event_log_proto" ]
|
|
|
|
|
}
|
2014-06-23 19:21:07 +00:00
|
|
|
}
|
|
|
|
|
|
2014-09-30 18:05:02 +00:00
|
|
|
if (!build_with_chromium) {
|
|
|
|
|
executable("webrtc_tests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
deps = [
|
|
|
|
|
":webrtc",
|
|
|
|
|
"modules/video_capture:video_capture_internal_impl",
|
2015-11-23 15:12:06 +01:00
|
|
|
"modules/video_render:video_render_internal_impl",
|
2014-09-30 18:05:02 +00:00
|
|
|
"test",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-23 19:21:07 +00:00
|
|
|
source_set("webrtc_common") {
|
|
|
|
|
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
|
|
|
"engine_configurations.h",
|
|
|
|
|
"typedefs.h",
|
2014-06-17 08:54:03 +00:00
|
|
|
]
|
2014-07-13 09:02:54 +00:00
|
|
|
|
2014-09-28 17:37:22 +00:00
|
|
|
configs += [ ":common_config" ]
|
|
|
|
|
public_configs = [ ":common_inherited_config" ]
|
2016-01-14 04:32:46 -08:00
|
|
|
|
|
|
|
|
if (is_clang && !is_nacl) {
|
|
|
|
|
# Suppress warnings from Chrome's Clang plugins.
|
|
|
|
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
|
|
|
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
|
|
|
|
}
|
2014-06-17 08:54:03 +00:00
|
|
|
}
|
2015-01-26 19:17:26 +00:00
|
|
|
|
2015-07-30 12:45:18 +02:00
|
|
|
if (rtc_enable_protobuf) {
|
|
|
|
|
proto_library("rtc_event_log_proto") {
|
|
|
|
|
sources = [
|
2015-09-25 13:58:30 +02:00
|
|
|
"call/rtc_event_log.proto",
|
2015-07-30 12:45:18 +02:00
|
|
|
]
|
2015-09-25 13:58:30 +02:00
|
|
|
proto_out_dir = "webrtc/call"
|
2015-07-30 12:45:18 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
source_set("rtc_event_log") {
|
|
|
|
|
sources = [
|
2015-09-25 13:58:30 +02:00
|
|
|
"call/rtc_event_log.cc",
|
|
|
|
|
"call/rtc_event_log.h",
|
2015-07-30 12:45:18 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
defines = []
|
|
|
|
|
configs += [ ":common_config" ]
|
|
|
|
|
public_configs = [ ":common_inherited_config" ]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":webrtc_common",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (rtc_enable_protobuf) {
|
|
|
|
|
defines += [ "ENABLE_RTC_EVENT_LOG" ]
|
|
|
|
|
deps += [ ":rtc_event_log_proto" ]
|
|
|
|
|
}
|
2015-09-02 14:22:40 -07:00
|
|
|
if (is_clang && !is_nacl) {
|
2015-07-30 12:45:18 +02:00
|
|
|
# Suppress warnings from Chrome's Clang plugins.
|
|
|
|
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
|
|
|
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-11-23 15:12:06 +01:00
|
|
|
|
2015-12-16 18:36:14 -08:00
|
|
|
if (use_libfuzzer || use_drfuzz) {
|
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
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|