Bug 1376873 - Update build files from tip of webrtc.org; r=ng

This is a cherrypick and rebase of the build system changes in commit
9c6861308021b1f05fbf17538778ee7177e6d312. These landed on webrtc.org after 64
was branched.

MozReview-Commit-ID: JQKeXWdlkq6

Differential Revision: https://phabricator.services.mozilla.com/D7422

--HG--
extra : rebase_source : b66aef30518f8d26bb8dc8a62fcb504119479c85
This commit is contained in:
Dan Minor 2018-01-22 09:31:06 -05:00
Родитель 32220f4a83
Коммит b12b1c76d7
17 изменённых файлов: 203 добавлений и 75 удалений

Просмотреть файл

@ -9,7 +9,9 @@
import("//build/config/linux/pkg_config.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("webrtc.gni")
import("//third_party/protobuf/proto_library.gni")
if (!build_with_mozilla) {
import("//third_party/protobuf/proto_library.gni")
}
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
@ -94,6 +96,10 @@ config("common_inherited_config") {
"WEBRTC_LINUX",
"WEBRTC_ANDROID",
]
if (build_with_mozilla) {
defines += [ "WEBRTC_ANDROID_OPENSLES" ]
}
}
if (is_chromeos) {
defines += [ "CHROMEOS" ]
@ -268,27 +274,38 @@ if (!build_with_chromium) {
deps = [
":webrtc_common",
"api",
"api:transport_api",
"audio",
"call",
"common_audio",
"common_video",
"logging",
"media",
"modules",
"modules/video_capture:video_capture_internal_impl",
"ortc",
"p2p",
"pc",
"rtc_base",
"sdk",
"stats",
"system_wrappers:system_wrappers_default",
"video",
"voice_engine",
]
if (build_with_mozilla) {
deps += [
"api:video_frame_api",
"system_wrappers:field_trial_default",
"system_wrappers:metrics_default",
]
} else {
deps += [
"api",
"logging",
"p2p",
"pc",
"stats",
]
}
if (rtc_enable_protobuf) {
defines += [ "ENABLE_RTC_EVENT_LOG" ]
deps += [ "logging:rtc_event_log_proto" ]

Просмотреть файл

@ -13,9 +13,11 @@ if (is_android) {
}
group("api") {
public_deps = [
":libjingle_peerconnection_api",
]
public_deps = []
if (!build_with_mozilla) {
public_deps += [ ":libjingle_peerconnection_api" ]
}
}
rtc_source_set("call_api") {
@ -336,7 +338,6 @@ if (rtc_include_tests) {
"fakemetricsobserver.h",
]
deps = [
":libjingle_peerconnection_api",
"../api:peerconnection_and_implicit_call_api",
"../media:rtc_media_base",
"../rtc_base:rtc_base_approved",
@ -345,6 +346,9 @@ if (rtc_include_tests) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
if (!build_with_mozilla) {
deps += [ ":libjingle_peerconnection_api" ]
}
}
rtc_source_set("rtc_api_unittests") {

Просмотреть файл

@ -11,7 +11,6 @@ import("../webrtc.gni")
rtc_source_set("call_interfaces") {
sources = [
"audio_receive_stream.h",
"audio_send_stream.cc",
"audio_send_stream.h",
"audio_state.h",
"call.h",
@ -20,6 +19,9 @@ rtc_source_set("call_interfaces") {
"syncable.cc",
"syncable.h",
]
if (!build_with_mozilla) {
sources += [ "audio_send_stream.cc" ]
}
deps = [
":rtp_interfaces",
":video_stream_api",

Просмотреть файл

@ -7,7 +7,9 @@
# be found in the AUTHORS file in the root of the source tree.
import("../webrtc.gni")
import("//third_party/protobuf/proto_library.gni")
if (!build_with_mozilla) {
import("//third_party/protobuf/proto_library.gni")
}
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")

Просмотреть файл

@ -10,10 +10,13 @@ import("//build/config/linux/pkg_config.gni")
import("../webrtc.gni")
group("media") {
public_deps = [
":rtc_media",
":rtc_media_base",
]
public_deps = []
if (!build_with_mozilla) {
public_deps += [
":rtc_media",
":rtc_media_base",
]
}
}
config("rtc_media_defines_config") {
@ -120,7 +123,6 @@ rtc_static_library("rtc_media_base") {
"../call:call_interfaces",
"../call:video_stream_api",
"../modules/audio_processing:audio_processing_statistics",
"../p2p",
"../rtc_base:rtc_base",
"../rtc_base:rtc_base_approved",
"../system_wrappers:field_trial_api",
@ -128,6 +130,10 @@ rtc_static_library("rtc_media_base") {
public_deps += [ ":rtc_h264_profile_id" ]
if (!build_with_mozilla) {
deps += [ "../p2p" ]
}
if (is_nacl) {
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
}

Просмотреть файл

@ -255,11 +255,14 @@ if (rtc_include_tests) {
"remote_bitrate_estimator:remote_bitrate_estimator_unittests",
"rtp_rtcp:rtp_rtcp_unittests",
"utility:utility_unittests",
"video_capture",
"video_coding:video_coding_unittests",
"video_processing:video_processing_unittests",
]
if (!build_with_mozilla) {
deps += [ "video_capture" ]
}
data = modules_unittests_resources
if (is_android) {

Просмотреть файл

@ -9,7 +9,9 @@
import("../../webrtc.gni")
import("audio_coding.gni")
import("//build/config/arm.gni")
import("//third_party/protobuf/proto_library.gni")
if (!build_with_mozilla) {
import("//third_party/protobuf/proto_library.gni")
}
audio_codec_deps = [
":cng",
@ -808,7 +810,7 @@ rtc_static_library("webrtc_opus") {
if (rtc_build_opus) {
public_deps += [ rtc_opus_dir ]
} else if (build_with_mozilla) {
include_dirs = [ getenv("DIST") + "/include/opus" ]
include_dirs = [ "/media/libopus/include" ]
}
}

Просмотреть файл

@ -123,6 +123,13 @@ rtc_source_set("audio_device_generic") {
"include/audio_device_defines.h",
]
if (build_with_mozilla) {
sources += [
"opensl/single_rw_fifo.cc",
"opensl/single_rw_fifo.h",
]
}
include_dirs = []
if (is_linux) {
include_dirs += [ "linux" ]
@ -173,6 +180,14 @@ rtc_source_set("audio_device_generic") {
"log",
"OpenSLES",
]
if (build_with_mozilla) {
include_dirs += [
"/config/external/nspr",
"/nsprpub/lib/ds",
"/nsprpub/pr/include",
]
}
}
if (rtc_use_dummy_audio_file_devices) {
defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]

Просмотреть файл

@ -7,8 +7,10 @@
# be found in the AUTHORS file in the root of the source tree.
import("//build/config/arm.gni")
import("//third_party/protobuf/proto_library.gni")
import("../../webrtc.gni")
if (!build_with_mozilla) {
import("//third_party/protobuf/proto_library.gni")
}
declare_args() {
# Disables the usual mode where we trust the reported system delay

Просмотреть файл

@ -61,6 +61,10 @@ rtc_static_library("congestion_controller") {
"../rtp_rtcp",
"../utility",
]
if (!build_with_mozilla) {
deps += [ "../../rtc_base:rtc_base" ]
}
}
if (rtc_include_tests) {

Просмотреть файл

@ -28,8 +28,11 @@ rtc_static_library("primitives") {
deps = [
"../..:webrtc_common",
"../../rtc_base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
]
if (!build_with_mozilla) {
deps += [ "../../rtc_base:rtc_base" ] # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
}
}
if (rtc_include_tests) {
@ -287,6 +290,16 @@ rtc_static_library("desktop_capture_generic") {
"window_finder_win.h",
]
if (build_with_mozilla) {
sources += [
"app_capturer_win.cc",
"desktop_device_info.cc",
"desktop_device_info.h",
"win/desktop_device_info_win.cc",
"win/win_shared.cc",
]
}
if (use_x11) {
sources += [
"mouse_cursor_monitor_x11.cc",
@ -306,6 +319,17 @@ rtc_static_library("desktop_capture_generic") {
"x11/x_server_pixel_buffer.h",
]
configs += [ "//build/config/linux:x11" ]
if (build_with_mozilla) {
sources += [
"app_capturer_x11.cc",
"app_capturer_x11.h",
"x11/desktop_device_info_x11.cc",
"x11/desktop_device_info_x11.h",
"x11/shared_x_util.cc",
"x11/shared_x_util.h",
]
}
}
if (!is_win && !is_mac && !use_x11) {
@ -329,9 +353,14 @@ rtc_static_library("desktop_capture_generic") {
"../../api:refcountedbase",
"../../rtc_base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
"../../system_wrappers",
"//third_party/libyuv",
]
if (build_with_mozilla) {
deps += [ "../../rtc_base:rtc_base_approved" ]
} else {
deps += [ "//third_party/libyuv" ]
}
if (use_desktop_capture_differ_sse2) {
deps += [ ":desktop_capture_differ_sse2" ]
}

Просмотреть файл

@ -158,7 +158,16 @@ if (!build_with_chromium) {
libs = [ "Strmiids.lib" ]
deps += [ "//third_party/winsdk_samples" ]
if (build_with_mozilla) {
sources += [
"windows/BaseFilter.cpp",
"windows/BaseInputPin.cpp",
"windows/BasePin.cpp",
"windows/MediaType.cpp",
]
} else {
deps += [ "//third_party/winsdk_samples" ]
}
}
if (is_ios || is_mac) {
deps += [ ":video_capture_internal_impl_objc" ]
@ -170,6 +179,19 @@ if (!build_with_chromium) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
if (build_with_mozilla && is_android) {
include_dirs = [
"/config/external/nspr",
"/nsprpub/lib/ds",
"/nsprpub/pr/include",
]
sources = [
"android/device_info_android.cc",
"android/video_capture_android.cc",
]
}
}
if (!is_android && rtc_include_tests) {

Просмотреть файл

@ -211,7 +211,6 @@ rtc_static_library("webrtc_h264") {
]
deps += [
"../../common_video",
"../../media:rtc_media_base",
"//third_party/ffmpeg:ffmpeg",
"//third_party/openh264:encoder",
]
@ -363,6 +362,10 @@ if (rtc_include_tests) {
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
if (!build_with_mozilla) {
deps += [ "../../media:rtc_media_base" ]
}
}
rtc_source_set("simulcast_test_utility") {

Просмотреть файл

@ -55,7 +55,7 @@ config("rtc_base_all_dependent_config") {
}
}
if (!rtc_build_ssl) {
if (!rtc_build_ssl && !build_with_mozilla) {
config("external_ssl_library") {
assert(rtc_ssl_root != "",
"You must specify rtc_ssl_root when rtc_build_ssl==0.")
@ -445,9 +445,11 @@ rtc_source_set("rtc_json") {
}
rtc_static_library("rtc_base") {
public_deps = [
":rtc_base_generic",
]
public_deps = []
if (!build_with_mozilla) {
public_deps += [ ":rtc_base_generic" ]
}
if (is_win) {
sources = [
"noop.cc",
@ -634,7 +636,7 @@ rtc_static_library("rtc_base_generic") {
if (rtc_build_ssl) {
deps += [ "//third_party/boringssl" ]
} else {
} else if (!build_with_mozilla) {
configs += [ ":external_ssl_library" ]
}

Просмотреть файл

@ -63,7 +63,15 @@ rtc_static_library("system_wrappers") {
if (is_android) {
defines += [ "WEBRTC_THREAD_RR" ]
deps += [ ":cpu_features_android" ]
if (build_with_mozilla) {
include_dirs = [
"/config/external/nspr",
"/nsprpub/lib/ds",
"/nsprpub/pr/include",
]
} else {
deps += [ ":cpu_features_android" ]
}
libs += [ "log" ]
}
@ -167,7 +175,7 @@ group("system_wrappers_default") {
]
}
if (is_android) {
if (is_android && !build_with_mozilla) {
rtc_static_library("cpu_features_android") {
sources = [
"source/cpu_features_android.c",

Просмотреть файл

@ -68,7 +68,6 @@ rtc_static_library("video") {
"../call:rtp_receiver",
"../common_video",
"../logging:rtc_event_log_api",
"../media:rtc_media_base",
"../modules:module_api",
"../modules/bitrate_controller",
"../modules/congestion_controller",
@ -88,6 +87,10 @@ rtc_static_library("video") {
"../system_wrappers",
"../voice_engine",
]
if (!build_with_mozilla) {
deps += [ "../media:rtc_media_base" ]
}
}
if (rtc_include_tests) {
@ -307,5 +310,8 @@ if (rtc_include_tests) {
if (rtc_use_h264) {
defines += [ "WEBRTC_USE_H264" ]
}
if (!build_with_mozilla) {
deps += [ "../media:rtc_media_base" ]
}
}
}

Просмотреть файл

@ -5,14 +5,12 @@
# 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.
import("//build/config/arm.gni")
import("//build/config/features.gni")
import("//build/config/mips.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//build_overrides/build.gni")
import("//testing/test.gni")
if (!build_with_chromium && is_component_build) {
print("The Gn argument `is_component_build` is currently " +
@ -57,9 +55,6 @@ declare_args() {
# Selects fixed-point code where possible.
rtc_prefer_fixed_point = false
# Enables the use of protocol buffers for debug recordings.
rtc_enable_protobuf = true
# Disable the code for the intelligibility enhancer by default.
rtc_enable_intelligibility_enhancer = false
@ -74,20 +69,6 @@ declare_args() {
# Set this to true to enable BWE test logging.
rtc_enable_bwe_test_logging = false
# Set this to disable building with support for SCTP data channels.
rtc_enable_sctp = true
# Disable these to not build components which can be externally provided.
rtc_build_json = true
rtc_build_libsrtp = true
rtc_build_libvpx = true
rtc_libvpx_build_vp9 = true
rtc_build_libyuv = true
rtc_build_openmax_dl = true
rtc_build_opus = true
rtc_build_ssl = true
rtc_build_usrsctp = true
# Enable to use the Mozilla internal settings.
build_with_mozilla = false
@ -110,28 +91,10 @@ declare_args() {
# use an external implementation.
rtc_link_task_queue_impl = true
# Enable libevent task queues on platforms that support it.
# rtc_link_task_queue_impl must be set to true for this to
# have an effect.
if (is_win || is_mac || is_ios || is_nacl) {
rtc_enable_libevent = false
rtc_build_libevent = false
} else {
rtc_enable_libevent = true
rtc_build_libevent = true
}
if (current_cpu == "arm" || current_cpu == "arm64") {
rtc_prefer_fixed_point = true
}
if (!is_ios && (current_cpu != "arm" || arm_version >= 7) &&
current_cpu != "mips64el") {
rtc_use_openmax_dl = true
} else {
rtc_use_openmax_dl = false
}
# Determines whether NEON code will be built.
rtc_build_with_neon =
(current_cpu == "arm" && arm_use_neon) || current_cpu == "arm64"
@ -166,17 +129,55 @@ declare_args() {
# as Chromium, must turn this flag off so that WebRTC does not also
# initialize.
rtc_initialize_ffmpeg = !build_with_chromium
}
# Build sources requiring GTK. NOTICE: This is not present in Chrome OS
# build environments, even if available for Chromium builds.
rtc_use_gtk = !build_with_chromium
if (!build_with_mozilla) {
import("//testing/test.gni")
}
# A second declare_args block, so that declarations within it can
# depend on the possibly overridden variables in the first
# declare_args block.
declare_args() {
rtc_restrict_logging = build_with_chromium
# Enables the use of protocol buffers for debug recordings.
rtc_enable_protobuf = !build_with_mozilla
# Set this to disable building with support for SCTP data channels.
rtc_enable_sctp = !build_with_mozilla
# Disable these to not build components which can be externally provided.
rtc_build_json = !build_with_mozilla
rtc_build_libsrtp = !build_with_mozilla
rtc_build_libvpx = !build_with_mozilla
rtc_libvpx_build_vp9 = !build_with_mozilla
rtc_build_openmax_dl = !build_with_mozilla
rtc_build_opus = !build_with_mozilla
rtc_build_ssl = !build_with_mozilla
rtc_build_usrsctp = !build_with_mozilla
# Enable libevent task queues on platforms that support it.
# rtc_link_task_queue_impl must be set to true for this to
# have an effect.
if (is_win || is_mac || is_ios || is_nacl) {
rtc_enable_libevent = false
rtc_build_libevent = false
} else {
rtc_enable_libevent = true
rtc_build_libevent = !build_with_mozilla
}
if (!is_ios && (current_cpu != "arm" || arm_version >= 7) &&
current_cpu != "mips64el" && !build_with_mozilla) {
rtc_use_openmax_dl = true
} else {
rtc_use_openmax_dl = false
}
# Build sources requiring GTK. NOTICE: This is not present in Chrome OS
# build environments, even if available for Chromium builds.
rtc_use_gtk = !build_with_chromium && !build_with_mozilla
rtc_restrict_logging = build_with_chromium || build_with_mozilla
# Excluded in Chromium since its prerequisites don't require Pulse Audio.
rtc_include_pulse_audio = !build_with_chromium
@ -186,7 +187,7 @@ declare_args() {
rtc_include_internal_audio_device = !build_with_chromium
# Include tests in standalone checkout.
rtc_include_tests = !build_with_chromium
rtc_include_tests = !build_with_chromium && !build_with_mozilla
}
# Make it possible to provide custom locations for some libraries (move these