blob: 1cd55f139159260472dbe165c687ec657f9672f8 [file] [log] [blame]
# 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.
import("//build/config/compiler/compiler.gni")
import("//build/config/ui.gni")
import("//build/toolchain/gcc_toolchain.gni")
import("//third_party/blink/public/public_features.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
if (current_cpu == "arm") {
import("//build/config/arm.gni")
}
declare_args() {
# If true, use PFFFT for WebAudio FFT support. Do not use for Mac because the
# FFT library there is much faster.
use_webaudio_pffft = target_os != "mac"
}
declare_args() {
# Format the generated files to improve the code readability. Apply clang-
# format, gn format, etc. to the generated files if possible.
blink_enable_generated_code_formatting = true
# How many symbols to include in the build of blink. This affects
# the performance of the build since the symbols are large and dealing with
# them is slow.
# 2 means regular build with symbols.
# 1 means minimal symbols, usually enough for backtraces only. Symbols with
# internal linkage (static functions or those in anonymous namespaces) may not
# appear when using this level.
# 0 means no symbols.
# -1 means auto-set according to debug/release and platform.
blink_symbol_level = -1
# If true, defaults image interpolation to low quality.
use_low_quality_image_interpolation = is_android
# If true, ffmpeg will be used for computing FFTs for WebAudio
use_webaudio_ffmpeg = !is_mac && !is_android && !use_webaudio_pffft
# If true, the new implementation (experimental) of Blink-V8 bindings
# (of IDL callback function) is used.
use_blink_v8_binding_new_idl_callback_function = true
# If true, the new implementation (experimental) of Blink-V8 bindings
# (of IDL callback interface) is used.
use_blink_v8_binding_new_idl_callback_interface = true
# If true, the new implementation (experimental) of Blink-V8 bindings
# (of IDL dictionary) is used.
use_blink_v8_binding_new_idl_dictionary = true
# If true, the new implementation (experimental) of Blink-V8 bindings
# (of IDL interface) is used.
use_blink_v8_binding_new_idl_interface = true
# If true, the new implementation (experimental) of Blink-V8 bindings
# (of IDL union) is used.
use_blink_v8_binding_new_idl_union = true
# If true, the experimental renderer extensions library will be used.
use_blink_extensions_chromeos = false
}
# feature_defines_list ---------------------------------------------------------
feature_defines_list = []
if (use_low_quality_image_interpolation) {
feature_defines_list += [ "WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION=1" ]
}
if (use_webaudio_ffmpeg) {
feature_defines_list += [ "WTF_USE_WEBAUDIO_FFMPEG=1" ]
}
if (use_webaudio_pffft) {
feature_defines_list += [ "WTF_USE_WEBAUDIO_PFFFT=1" ]
}
if (use_blink_v8_binding_new_idl_dictionary) {
feature_defines_list += [ "USE_BLINK_V8_BINDING_NEW_IDL_DICTIONARY" ]
}
if (use_blink_v8_binding_new_idl_interface) {
feature_defines_list += [ "USE_BLINK_V8_BINDING_NEW_IDL_INTERFACE" ]
}
if (use_blink_v8_binding_new_idl_union) {
feature_defines_list += [ "USE_BLINK_V8_BINDING_NEW_IDL_UNION" ]
}
if (blink_symbol_level == 2) {
blink_symbols_config = [ "//build/config/compiler:symbols" ]
} else if (blink_symbol_level == 1) {
blink_symbols_config = [ "//build/config/compiler:minimal_symbols" ]
} else if (blink_symbol_level == 0) {
assert(
!enable_resource_allowlist_generation,
"enable_resource_allowlist_generation=true requires blink_symbol_level >= 1")
blink_symbols_config = [ "//build/config/compiler:no_symbols" ]
} else {
blink_symbols_config = [ "//build/config/compiler:default_symbols" ]
}