Chrome does not detect NEON instruction set at runtime in WebRTC code starting with M50, which is now in Stable. Remove support for runtime detection for simplicity. The only remaining piece of Chrome that will continue to depend on runtime detection is /net, where devices with _broken_ neon support are also detected, and it is not configurable via GYP/GN. BUG=522035 NOPRESUBMIT=true Review-Url: https://codereview.webrtc.org/1955413003 Cr-Commit-Position: refs/heads/master@{#12778}
125 lines
4.4 KiB
Plaintext
125 lines
4.4 KiB
Plaintext
# 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.
|
|
|
|
import("//build/config/arm.gni")
|
|
import("//build/config/features.gni")
|
|
import("//build/config/mips.gni")
|
|
import("//build_overrides/webrtc.gni")
|
|
|
|
declare_args() {
|
|
# Disable this to avoid building the Opus audio codec.
|
|
rtc_include_opus = true
|
|
|
|
# Used to specify an external Jsoncpp include path when not compiling the
|
|
# 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. rtc_build_ssl == 0).
|
|
rtc_ssl_root = ""
|
|
|
|
# Selects fixed-point code where possible.
|
|
rtc_prefer_fixed_point = false
|
|
|
|
# Enable data logging. Produces text files with data logged within engines
|
|
# which can be easily parsed for offline processing.
|
|
rtc_enable_data_logging = false
|
|
|
|
# Enables the use of protocol buffers for debug recordings.
|
|
rtc_enable_protobuf = true
|
|
|
|
# Disable these to not build components which can be externally provided.
|
|
rtc_build_expat = true
|
|
rtc_build_json = true
|
|
rtc_build_libvpx = true
|
|
rtc_build_libyuv = true
|
|
rtc_build_openmax_dl = true
|
|
rtc_build_opus = true
|
|
rtc_build_ssl = true
|
|
|
|
# Disable by default.
|
|
rtc_have_dbus_glib = false
|
|
|
|
# Enable to use the Mozilla internal settings.
|
|
build_with_mozilla = false
|
|
|
|
rtc_enable_android_opensl = false
|
|
|
|
# Link-Time Optimizations.
|
|
# Executes code generation at link-time instead of compile-time.
|
|
# https://gcc.gnu.org/wiki/LinkTimeOptimization
|
|
rtc_use_lto = false
|
|
|
|
rtc_include_tests = false
|
|
rtc_restrict_logging = true
|
|
|
|
# Enable libevent task queues on platforms that support it.
|
|
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 (is_ios) {
|
|
rtc_enable_protobuf = false
|
|
}
|
|
|
|
if (current_cpu == "arm" || current_cpu == "arm64") {
|
|
rtc_prefer_fixed_point = true
|
|
}
|
|
|
|
# TODO(ljubomir): Unset rtc_use_openmax_dl for mips64el once mips64el gets
|
|
# supported in GN (since openmax_dl is not supported for mips64el).
|
|
if (!is_ios && (current_cpu != "arm" || arm_version >= 7)) {
|
|
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"
|
|
|
|
# Enable this to use HW H.264 encoder/decoder on iOS PeerConnections.
|
|
# Enabling this may break interop with Android clients that support H264.
|
|
rtc_use_objc_h264 = false
|
|
|
|
# Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported on
|
|
# all platforms except Android and iOS. Because FFmpeg can be built
|
|
# with/without H.264 support, |ffmpeg_branding| has to separately be set to a
|
|
# value that includes H.264, for example "Chrome". If FFmpeg is built without
|
|
# H.264, compilation succeeds but |H264DecoderImpl| fails to initialize. See
|
|
# also: |rtc_initialize_ffmpeg|.
|
|
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
|
|
# http://www.openh264.org, https://www.ffmpeg.org/
|
|
rtc_use_h264 = proprietary_codecs && !is_android && !is_ios
|
|
|
|
# FFmpeg must be initialized for |H264DecoderImpl| to work. This can be done
|
|
# by WebRTC during |H264DecoderImpl::InitDecode| or externally. FFmpeg must
|
|
# only be initialized once. Projects that initialize FFmpeg externally, such
|
|
# as Chromium, must turn this flag off so that WebRTC does not also
|
|
# initialize.
|
|
rtc_initialize_ffmpeg = !build_with_chromium
|
|
}
|
|
|
|
# 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() {
|
|
# Include the iLBC audio codec?
|
|
rtc_include_ilbc = !(build_with_chromium || build_with_mozilla)
|
|
}
|
|
|
|
# Make it possible to provide custom locations for some libraries (move these
|
|
# up into declare_args should we need to actually use them for the GN build).
|
|
rtc_libvpx_dir = "//third_party/libvpx"
|
|
rtc_libyuv_dir = "//third_party/libyuv"
|
|
rtc_opus_dir = "//third_party/opus"
|