chromium-src-build/config/features.gni

208 строки
7.4 KiB
Plaintext

# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file contains Chrome-feature-related build flags (see ui.gni for
# UI-related ones). These should theoretically be moved to the build files of
# the features themselves.
#
# However, today we have many "bad" dependencies on some of these flags from,
# e.g. base, so they need to be global to match the GYP configuration. Also,
# anything that needs a grit define must be in either this file or ui.gni.
#
# PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't
# required. See the declare_args block of BUILDCONFIG.gn for advice on how
# to set up feature flags.
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
declare_args() {
# Multicast DNS.
enable_mdns = is_win || is_linux
enable_plugins = (!is_android && !is_ios) || is_chromecast
enable_pdf = !is_android && !is_ios && !is_chromecast
# Enables Native Client support.
# TODO(GYP): Get NaCl linking on other platforms.
# Also, see if we can always get rid of enable_nacl_untrusted and
# enable_pnacl and always build them if enable_nacl is true.
# The "is_nacl" part of the condition is needed to ensure that
# the untrusted code is built properly; arguably it should be
# guarded by "is_nacl" directly rather than enable_nacl_untrusted, but
# this will go away when Mac and Win are working and we can just use
# the commented out logic.
# Eventually we want this to be:
# enable_nacl = !is_ios && !is_android && !is_chromecast
enable_nacl = ((is_linux && !is_chromeos) || is_nacl) &&
current_cpu != "mipsel" && !is_chromecast
enable_nacl_untrusted = enable_nacl
enable_pnacl = enable_nacl_untrusted
# If debug_devtools is set to true, JavaScript files for DevTools are stored
# as is and loaded from disk. Otherwise, a concatenated file is stored in
# resources.pak. It is still possible to load JS files from disk by passing
# --debug-devtools cmdline switch.
debug_devtools = false
# Enables WebRTC.
# TODO(GYP) make mac and android work.
enable_webrtc = !is_ios && !is_mac && !is_android
# Enables the Media Router.
enable_media_router = !is_ios
# Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3.
# Android OS includes support for proprietary codecs regardless of building
# Chromium or Google Chrome. We also ship Google Chrome and Chromecast with
# proprietary codecs.
proprietary_codecs = is_android || is_chrome_branded || is_chromecast
# TODO(GYP) This should be enabled on ios as well.
enable_configuration_policy = !is_ios
# Enables support for background apps.
enable_background = !is_ios && !is_android
enable_captive_portal_detection = !is_android && !is_ios
# Enables use of the session service, which is enabled by default.
# Android stores them separately on the Java side.
enable_session_service = !is_android && !is_ios
enable_plugin_installation = is_win || is_mac
enable_app_list = !is_ios && !is_android
enable_supervised_users = !is_ios
enable_autofill_dialog = !is_ios
enable_google_now = !is_ios && !is_android
enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos)
enable_remoting = !is_ios && !is_android && !is_chromecast
# Enable hole punching for the protected video.
enable_video_hole = is_android
# Enables browser side Content Decryption Modules. Required for embedders
# (e.g. Android and ChromeCast) that use a browser side CDM.
enable_browser_cdms = is_android || is_chromecast
# Hangout services is an extension that adds extra features to Hangouts.
# For official GYP builds, this flag is set.
enable_hangout_services_extension = false
# Variable safe_browsing is used to control the build time configuration
# for safe browsing feature. Safe browsing can be compiled in 4 different
# levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
# reporting features for use with Data Saver on Mobile, and 3 enables
# extended mobile protection via an external API.
if (is_android) {
safe_browsing_mode = 3
} else if (is_ios) {
safe_browsing_mode = 0
} else {
safe_browsing_mode = 1
}
# Set to true make a build that disables activation of field trial tests
# specified in testing/variations/fieldtrial_testing_config_*.json.
# Note: this setting is ignored if is_chrome_branded.
fieldtrial_testing_like_official_build = is_chrome_branded
}
# Additional dependent variables -----------------------------------------------
# Set the version of CLD.
# 1: (DEPRECATED! See http://crbug.com/528305 for info) Use only CLD1.
# 2: Use only CLD2.
cld_version = 2
# libudev usage. This currently only affects the content layer.
use_udev = is_linux && !is_chromecast
# Enable the spell checker.
enable_spellcheck = !is_ios
# Use the operating system's spellchecker rather than hunspell.
use_browser_spellchecker = is_android || is_mac
# Enable basic printing support and UI.
enable_basic_printing = !is_chromeos && !is_chromecast && !is_ios
# Enable printing with print preview. It does not imply
# enable_basic_printing. It's possible to build Chrome with preview only.
enable_print_preview = !is_android && !is_chromecast && !is_ios
# Enables the use of CDMs in pepper plugins.
enable_pepper_cdms =
enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast
# The seccomp-bpf sandbox is only supported on three architectures
# currently.
# Do not disable seccomp_bpf anywhere without talking to
# security@chromium.org!
use_seccomp_bpf = (is_linux || is_android) &&
(current_cpu == "x86" || current_cpu == "x64" ||
current_cpu == "arm" || current_cpu == "mipsel")
# Enable notifications everywhere except iOS.
enable_notifications = !is_ios
# TODO(brettw) this should be moved to net and only dependents get this define.
disable_ftp_support = is_ios
enable_web_speech = !is_android && !is_ios
use_dbus = is_linux && !is_chromecast
enable_extensions = !is_android && !is_ios
enable_task_manager = !is_ios && !is_android
use_cups = (is_desktop_linux || is_mac) && !is_chromecast
enable_themes = !is_android && !is_ios
# TODO(scottmg) remove this when we've fixed printing.
win_pdf_metafile_for_printing = true
# Whether we are using the rlz library or not. Platforms like Android send
# rlz codes for searches but do not use the library.
enable_rlz_support = is_win || is_mac || is_ios || is_chromeos
enable_rlz = is_chrome_branded && enable_rlz_support
enable_settings_app = enable_app_list && !is_chromeos
enable_service_discovery = enable_mdns || is_mac
enable_wifi_bootstrapping = is_win || is_mac
# Image loader extension is enabled on ChromeOS only.
enable_image_loader_extension = is_chromeos
# Chrome OS: whether to also build the upcoming version of
# ChromeVox, which can then be enabled via a command-line switch.
enable_chromevox_next = false
# Use brlapi from brltty for braille display support.
use_brlapi = is_chromeos
# Option controlling the use of GConf (the classic GNOME configuration
# system).
use_gconf = is_linux && !is_chromeos && !is_chromecast
# Whether to back up data before sync.
enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos)
# Enable WebVR support by default on Android
# Still requires command line flag to access API
enable_webvr = is_android