# 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() { # 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 blink_optimize_size_only = false # 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, webgl2-compute context will be supported. support_webgl2_compute_context = !is_android # If true, the new implementation (experimental) of Blink-V8 bindings # (of IDL callback function) is used. use_blink_v8_binding_new_idl_callback_function = false # If true, the new implementation (experimental) of Blink-V8 bindings # (of IDL callback interface) is used. use_blink_v8_binding_new_idl_callback_interface = false # If true, the new implementation (experimental) of Blink-V8 bindings # (of IDL dictionary) is used. use_blink_v8_binding_new_idl_dictionary = false # If true, the new implementation (experimental) of Blink-V8 bindings # (of IDL interface) is used. use_blink_v8_binding_new_idl_interface = true } # 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 (support_webgl2_compute_context) { feature_defines_list += [ "SUPPORT_WEBGL2_COMPUTE_CONTEXT=1" ] } if (use_webaudio_pffft) { feature_defines_list += [ "WTF_USE_WEBAUDIO_PFFFT=1" ] } if (use_blink_v8_binding_new_idl_callback_function) { feature_defines_list += [ "USE_BLINK_V8_BINDING_NEW_IDL_CALLBACK_FUNCTION" ] } 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 (blink_symbol_level == 0) { if (is_debug) { blink_optimize_size_only = true } } 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" ] } if (blink_optimize_size_only) { blink_optimization_config = [ "//build/config/compiler:optimize_size_only" ] } else { blink_optimization_config = [ "//build/config/compiler:default_optimization" ] }