GN: Prefix WebRTC specific variables with "rtc_"
BUG=3441 TESTED=Trybots + Running GN in a Chromium checkout with src/third_party/webrtc symlinked to the WebRTC checkout with this CL applied, both with the default GN settings and using: --args="os=\"android\" cpu_arch=\"arm\"" R=brettw@chromium.org Review URL: https://webrtc-codereview.appspot.com/27379004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7095 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f68cf93e1b
commit
6d08ca6379
@ -57,13 +57,13 @@ config("common_inherited_config") {
|
||||
"WEBRTC_LINUX",
|
||||
"WEBRTC_ANDROID",
|
||||
]
|
||||
if (enable_android_opensl) {
|
||||
if (rtc_enable_android_opensl) {
|
||||
defines += [ "WEBRTC_ANDROID_OPENSLES" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (have_dbus_glib) {
|
||||
if (rtc_have_dbus_glib) {
|
||||
pkg_config("dbus-glib") {
|
||||
packages = [ "dbus-glib-1" ]
|
||||
}
|
||||
@ -72,11 +72,11 @@ if (have_dbus_glib) {
|
||||
config("common_config") {
|
||||
cflags = []
|
||||
cflags_cc = []
|
||||
if (restrict_webrtc_logging) {
|
||||
if (rtc_restrict_logging) {
|
||||
defines = [ "WEBRTC_RESTRICT_LOGGING" ]
|
||||
}
|
||||
|
||||
if (have_dbus_glib) {
|
||||
if (rtc_have_dbus_glib) {
|
||||
defines += [ "HAVE_DBUS_GLIB" ]
|
||||
# TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h>
|
||||
# is still not found even if the execution of
|
||||
@ -85,7 +85,7 @@ config("common_config") {
|
||||
all_dependent_configs = [ "dbus-glib" ]
|
||||
}
|
||||
|
||||
if (enable_video) {
|
||||
if (rtc_enable_video) {
|
||||
defines += [ "WEBRTC_MODULE_UTILITY_VIDEO" ]
|
||||
}
|
||||
|
||||
|
@ -102,11 +102,11 @@ if (is_linux && !build_with_chromium) {
|
||||
}
|
||||
}
|
||||
|
||||
if (build_ssl == 0) {
|
||||
if (rtc_build_ssl == 0) {
|
||||
config("external_ssl_library") {
|
||||
assert(webrtc_ssl_root != "",
|
||||
"You must specify webrtc_ssl_root when build_ssl==0.")
|
||||
include_dirs = [ webrtc_ssl_root ]
|
||||
assert(rtc_ssl_root != "",
|
||||
"You must specify rtc_ssl_root when rtc_build_ssl==0.")
|
||||
include_dirs = [ rtc_ssl_root ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,10 +425,10 @@ static_library("webrtc_base") {
|
||||
"win32socketserver.h",
|
||||
]
|
||||
}
|
||||
if (build_json) {
|
||||
if (rtc_build_json) {
|
||||
deps += [ "//third_party/jsoncpp" ]
|
||||
} else {
|
||||
include_dirs += [ webrtc_jsoncpp_root ]
|
||||
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.
|
||||
@ -451,7 +451,7 @@ static_library("webrtc_base") {
|
||||
|
||||
if (use_openssl) {
|
||||
direct_dependent_configs += [ ":openssl_config" ]
|
||||
if (build_ssl) {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ "//third_party/boringssl" ]
|
||||
} else {
|
||||
configs += [ "external_ssl_library" ]
|
||||
@ -479,7 +479,7 @@ static_library("webrtc_base") {
|
||||
if (is_ios) {
|
||||
all_dependent_configs += [ ":ios_config" ]
|
||||
|
||||
if (build_ssl) {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ "//net/third_party/nss/ssl:libssl" ]
|
||||
} else {
|
||||
configs += [ "external_ssl_library" ]
|
||||
@ -507,7 +507,7 @@ static_library("webrtc_base") {
|
||||
"dl",
|
||||
"rt",
|
||||
]
|
||||
if (build_ssl) {
|
||||
if (rtc_build_ssl) {
|
||||
configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
|
||||
}
|
||||
}
|
||||
@ -600,7 +600,7 @@ static_library("webrtc_base") {
|
||||
}
|
||||
|
||||
if (is_mac || is_ios || is_win) {
|
||||
if (build_ssl) {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [
|
||||
"//net/third_party/nss/ssl:libssl",
|
||||
"//third_party/nss:nspr",
|
||||
@ -615,7 +615,7 @@ static_library("webrtc_base") {
|
||||
if (build_with_chromium) {
|
||||
deps += [ "//crypto:platform" ]
|
||||
} else {
|
||||
if (build_ssl) {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ ":linux_system_ssl" ]
|
||||
} else {
|
||||
configs += [ "external_ssl_library" ]
|
||||
|
@ -15,40 +15,40 @@ declare_args() {
|
||||
build_with_libjingle = true
|
||||
|
||||
# Disable this to avoid building the Opus audio codec.
|
||||
include_opus = true
|
||||
rtc_include_opus = true
|
||||
|
||||
# Used to specify an external Jsoncpp include path when not compiling the
|
||||
# library that comes with WebRTC (i.e. build_json == 0).
|
||||
webrtc_jsoncpp_root = "//third_party/jsoncpp/source/include"
|
||||
# library that comes with WebRTC (i.e. rtc_build_json == 0).
|
||||
rtc_jsoncpp_root = "//third_party/jsoncpp/source/include"
|
||||
|
||||
# Used to specify an external OpenSSL include path when not compiling the
|
||||
# library that comes with WebRTC (i.e. build_ssl == 0).
|
||||
webrtc_ssl_root = ""
|
||||
# library that comes with WebRTC (i.e. rtc_build_ssl == 0).
|
||||
rtc_ssl_root = ""
|
||||
|
||||
# Adds video support to dependencies shared by voice and video engine.
|
||||
# This should normally be enabled; the intended use is to disable only
|
||||
# when building voice engine exclusively.
|
||||
enable_video = true
|
||||
rtc_enable_video = true
|
||||
|
||||
# Selects fixed-point code where possible.
|
||||
prefer_fixed_point = false
|
||||
rtc_prefer_fixed_point = false
|
||||
|
||||
# Enable data logging. Produces text files with data logged within engines
|
||||
# which can be easily parsed for offline processing.
|
||||
enable_data_logging = false
|
||||
rtc_enable_data_logging = false
|
||||
|
||||
# Enables the use of protocol buffers for debug recordings.
|
||||
enable_protobuf = true
|
||||
rtc_enable_protobuf = true
|
||||
|
||||
# Disable these to not build components which can be externally provided.
|
||||
build_json = true
|
||||
build_libjpeg = true
|
||||
build_libyuv = true
|
||||
build_libvpx = true
|
||||
build_ssl = true
|
||||
rtc_build_json = true
|
||||
rtc_build_libjpeg = true
|
||||
rtc_build_libyuv = true
|
||||
rtc_build_libvpx = true
|
||||
rtc_build_ssl = true
|
||||
|
||||
# Disable by default.
|
||||
have_dbus_glib = false
|
||||
rtc_have_dbus_glib = false
|
||||
|
||||
# Enable to use the Mozilla internal settings.
|
||||
build_with_mozilla = false
|
||||
@ -59,26 +59,26 @@ declare_args() {
|
||||
mips_dsp_rev = 0
|
||||
mips_fpu = true
|
||||
|
||||
enable_android_opensl = true
|
||||
rtc_enable_android_opensl = true
|
||||
|
||||
# Link-Time Optimizations.
|
||||
# Executes code generation at link-time instead of compile-time.
|
||||
# https://gcc.gnu.org/wiki/LinkTimeOptimization
|
||||
use_lto = false
|
||||
rtc_use_lto = false
|
||||
|
||||
if (build_with_chromium) {
|
||||
# Exclude pulse audio on Chromium since its prerequisites don't require
|
||||
# pulse audio.
|
||||
include_pulse_audio = false
|
||||
rtc_include_pulse_audio = false
|
||||
|
||||
# Exclude internal ADM since Chromium uses its own IO handling.
|
||||
include_internal_audio_device = false
|
||||
rtc_include_internal_audio_device = false
|
||||
|
||||
# Exclude internal VCM in Chromium build.
|
||||
include_internal_video_capture = false
|
||||
rtc_include_internal_video_capture = false
|
||||
|
||||
# Exclude internal video render module in Chromium build.
|
||||
include_internal_video_render = false
|
||||
rtc_include_internal_video_render = false
|
||||
} else {
|
||||
# Settings for the standalone (not-in-Chromium) build.
|
||||
|
||||
@ -87,31 +87,31 @@ declare_args() {
|
||||
# http://code.google.com/p/webrtc/issues/detail?id=163
|
||||
clang_use_chrome_plugins = false
|
||||
|
||||
include_pulse_audio = true
|
||||
include_internal_audio_device = true
|
||||
include_internal_video_capture = true
|
||||
include_internal_video_render = true
|
||||
rtc_include_pulse_audio = true
|
||||
rtc_include_internal_audio_device = true
|
||||
rtc_include_internal_video_capture = true
|
||||
rtc_include_internal_video_render = true
|
||||
}
|
||||
|
||||
if (build_with_libjingle) {
|
||||
include_tests = false
|
||||
restrict_webrtc_logging = true
|
||||
rtc_include_tests = false
|
||||
rtc_restrict_logging = true
|
||||
} else {
|
||||
include_tests = true
|
||||
restrict_webrtc_logging = false
|
||||
rtc_include_tests = true
|
||||
rtc_restrict_logging = false
|
||||
}
|
||||
|
||||
if (is_ios) {
|
||||
build_libjpeg = false
|
||||
enable_protobuf = false
|
||||
rtc_build_libjpeg = false
|
||||
rtc_enable_protobuf = false
|
||||
}
|
||||
|
||||
if (cpu_arch == "arm") {
|
||||
prefer_fixed_point = true
|
||||
rtc_prefer_fixed_point = true
|
||||
}
|
||||
|
||||
# WebRTC builds ARM v7 Neon instruction set optimized code for both iOS and
|
||||
# Android, which is why we currently cannot use the variables in
|
||||
# //build/config/arm.gni (since it disables Neon for Android).
|
||||
build_armv7_neon = (cpu_arch == "arm" && arm_version == 7)
|
||||
rtc_build_armv7_neon = (cpu_arch == "arm" && arm_version == 7)
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ if (cpu_arch == "x86" || cpu_arch == "x64") {
|
||||
}
|
||||
}
|
||||
|
||||
if (build_armv7_neon) {
|
||||
if (rtc_build_armv7_neon) {
|
||||
source_set("common_audio_neon") {
|
||||
sources = [
|
||||
"fir_filter_neon.cc",
|
||||
@ -199,7 +199,7 @@ if (build_armv7_neon) {
|
||||
]
|
||||
|
||||
# Disable LTO in audio_processing_neon target due to compiler bug.
|
||||
if (use_lto) {
|
||||
if (rtc_use_lto) {
|
||||
cflags -= [
|
||||
"-flto",
|
||||
"-ffat-lto-objects",
|
||||
|
@ -42,7 +42,7 @@ source_set("common_video") {
|
||||
|
||||
deps = [ "../system_wrappers" ]
|
||||
|
||||
if (build_libyuv) {
|
||||
if (rtc_build_libyuv) {
|
||||
deps += [ "//third_party/libyuv" ]
|
||||
} else {
|
||||
# Need to add a directory normally exported by libyuv.
|
||||
|
@ -102,7 +102,7 @@ source_set("audio_coding") {
|
||||
"../../system_wrappers",
|
||||
]
|
||||
|
||||
if (include_opus) {
|
||||
if (rtc_include_opus) {
|
||||
defines += [ "WEBRTC_CODEC_OPUS" ]
|
||||
deps += [ ":webrtc_opus" ]
|
||||
}
|
||||
@ -453,7 +453,7 @@ source_set("isacfix") {
|
||||
"../../system_wrappers",
|
||||
]
|
||||
|
||||
if (build_armv7_neon) {
|
||||
if (rtc_build_armv7_neon) {
|
||||
deps += [ ":isac_neon" ]
|
||||
|
||||
# Enable compilation for the ARM v7 Neon instruction set. This is needed
|
||||
@ -497,7 +497,7 @@ source_set("isacfix") {
|
||||
}
|
||||
}
|
||||
|
||||
if (build_armv7_neon) {
|
||||
if (rtc_build_armv7_neon) {
|
||||
sources += [
|
||||
"codecs/isac/fix/source/lattice_c.c",
|
||||
"codecs/isac/fix/source/pitch_estimator_c.c",
|
||||
@ -505,7 +505,7 @@ source_set("isacfix") {
|
||||
}
|
||||
}
|
||||
|
||||
if (build_armv7_neon) {
|
||||
if (rtc_build_armv7_neon) {
|
||||
source_set("isac_neon") {
|
||||
sources = [
|
||||
"codecs/isac/fix/source/entropy_coding_neon.c",
|
||||
@ -521,7 +521,7 @@ if (build_armv7_neon) {
|
||||
]
|
||||
|
||||
# Disable LTO in audio_processing_neon target due to compiler bug.
|
||||
if (use_lto) {
|
||||
if (rtc_use_lto) {
|
||||
cflags -= [
|
||||
"-flto",
|
||||
"-ffat-lto-objects",
|
||||
|
@ -55,7 +55,7 @@ source_set("audio_device") {
|
||||
if (is_android) {
|
||||
include_dirs += [ "android" ]
|
||||
}
|
||||
if (include_internal_audio_device) {
|
||||
if (rtc_include_internal_audio_device) {
|
||||
sources += [
|
||||
"linux/alsasymboltable_linux.cc",
|
||||
"linux/alsasymboltable_linux.h",
|
||||
@ -118,7 +118,7 @@ source_set("audio_device") {
|
||||
"X11",
|
||||
]
|
||||
|
||||
if (include_pulse_audio) {
|
||||
if (rtc_include_pulse_audio) {
|
||||
sources += [
|
||||
"linux/audio_device_pulse_linux.cc",
|
||||
"linux/audio_device_pulse_linux.h",
|
||||
|
@ -89,12 +89,12 @@ source_set("audio_processing") {
|
||||
defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
|
||||
}
|
||||
|
||||
if (enable_protobuf) {
|
||||
if (rtc_enable_protobuf) {
|
||||
defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
|
||||
deps += [ ":audioproc_debug_proto" ]
|
||||
}
|
||||
|
||||
if (prefer_fixed_point) {
|
||||
if (rtc_prefer_fixed_point) {
|
||||
defines += [ "WEBRTC_NS_FIXED" ]
|
||||
sources += [
|
||||
"ns/include/noise_suppression_x.h",
|
||||
@ -124,7 +124,7 @@ source_set("audio_processing") {
|
||||
deps += [ ":audio_processing_sse2" ]
|
||||
}
|
||||
|
||||
if (build_armv7_neon) {
|
||||
if (rtc_build_armv7_neon) {
|
||||
deps += [ ":audio_processing_neon" ]
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ source_set("audio_processing") {
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_protobuf) {
|
||||
if (rtc_enable_protobuf) {
|
||||
proto_library("audioproc_debug_proto") {
|
||||
sources = [ "debug.proto" ]
|
||||
|
||||
@ -180,7 +180,7 @@ if (cpu_arch == "x86" || cpu_arch == "x64") {
|
||||
}
|
||||
}
|
||||
|
||||
if (build_armv7_neon) {
|
||||
if (rtc_build_armv7_neon) {
|
||||
source_set("audio_processing_neon") {
|
||||
sources = [
|
||||
"aec/aec_core_neon.c",
|
||||
@ -217,7 +217,7 @@ if (build_armv7_neon) {
|
||||
]
|
||||
|
||||
# Disable LTO in audio_processing_neon target due to compiler bug.
|
||||
if (use_lto) {
|
||||
if (rtc_use_lto) {
|
||||
cflags -= [
|
||||
"-flto",
|
||||
"-ffat-lto-objects",
|
||||
|
@ -42,7 +42,7 @@ source_set("utility") {
|
||||
"../audio_coding",
|
||||
"../media_file",
|
||||
]
|
||||
if (enable_video) {
|
||||
if (rtc_enable_video) {
|
||||
sources += [
|
||||
"source/frame_scaler.cc",
|
||||
"source/video_coder.cc",
|
||||
|
@ -35,7 +35,7 @@ source_set("video_capture") {
|
||||
libs = []
|
||||
deps = []
|
||||
|
||||
if (include_internal_video_capture) {
|
||||
if (rtc_include_internal_video_capture) {
|
||||
if (is_linux) {
|
||||
sources += [
|
||||
"linux/device_info_linux.cc",
|
||||
|
@ -137,7 +137,7 @@ source_set("webrtc_vp8") {
|
||||
"../../common_video",
|
||||
"../../system_wrappers",
|
||||
]
|
||||
# if (build_libvpx) {
|
||||
# if (rtc_build_libvpx) {
|
||||
# deps += [
|
||||
# "//third_party/libvpx",
|
||||
# ]
|
||||
|
@ -35,7 +35,7 @@ source_set("video_render") {
|
||||
libs = []
|
||||
deps = []
|
||||
|
||||
if (include_internal_video_render) {
|
||||
if (rtc_include_internal_video_render) {
|
||||
defines += [ "WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER" ]
|
||||
|
||||
if (is_linux) {
|
||||
|
@ -119,7 +119,7 @@ static_library("system_wrappers") {
|
||||
":system_wrappers_inherited_config",
|
||||
]
|
||||
|
||||
if (enable_data_logging) {
|
||||
if (rtc_enable_data_logging) {
|
||||
sources += [ "source/data_log.cc" ]
|
||||
} else {
|
||||
sources += [ "source/data_log_no_op.cc" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user