1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
8 import("//build/config/android/config.gni")
10 # TODO(brettw) remove this once && early-out is checked in.
11 is_android_webview_build = false
13 if (cpu_arch == "arm") {
14 import("//build/config/arm.gni")
16 # TODO(brettw) remove this once && early-out is checked in.
21 # Enables the Oilpan garbage-collection infrastructure.
24 # Set to true to enable the clang plugin that checks the usage of the Blink
25 # garbage-collection infrastructure during compilation.
26 blink_gc_plugin = false
27 blink_gc_plugin_dump_graph = false
29 blink_asserts_always_on = false
32 use_default_render_theme = use_aura
34 # Whether Android ARM or x86 build uses OpenMAX DL FFT. Currently only
35 # supported on Android ARMv7+, ia32 or x64 without webview. When enabled, this
36 # will also enable WebAudio support on Android ARM, ia32 and x64. Default is
37 # enabled. Whether WebAudio is actually available depends on runtime settings
39 use_openmax_dl_fft = is_android && !is_android_webview_build &&
42 (cpu_arch == "arm" && arm_version >= 7))
44 use_webaudio_ffmpeg = !is_mac && !is_android
46 # Set this to true to enable use of concatenated impulse responses for the HRTF
48 # TODO(brettw) do we need this or can we assume its always on?
49 use_concatenated_impulse_responses = true
51 # feature_defines_list ---------------------------------------------------------
53 feature_defines_list = [
54 "ENABLE_OPENTYPE_VERTICAL=1"
58 # TODO(GYP) this should also be set when release_valgrind_build is set,
59 # but we don't have that flag in the GN build yet.
60 feature_defines_list += [ "WTF_USE_DYNAMIC_ANNOTATIONS=1" ]
63 if (use_concatenated_impulse_responses) {
64 feature_defines_list += [ "WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1" ]
68 feature_defines_list += [
69 "ENABLE_INPUT_MULTIPLE_FIELDS_UI=1",
74 if (use_webaudio_ffmpeg) {
75 feature_defines_list += [ "WTF_USE_WEBAUDIO_FFMPEG=1" ]
78 if (use_openmax_dl_fft) {
79 feature_defines_list += [
80 "WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1",
81 # Enabling the FFT is enough to enable WebAudio support to
82 # allow most WebAudio features to work on Android.
87 if (use_default_render_theme) {
88 feature_defines_list += [ "WTF_USE_DEFAULT_RENDER_THEME=1" ]
91 feature_defines_list += [ "ENABLE_OILPAN=1" ]
93 if (blink_asserts_always_on) {
94 feature_defines_list += [ "ENABLE_ASSERT=1" ]
97 # feature_defines_string -------------------------------------------------------
99 # Convert the list to a space-separated string for passing to scripts.
100 # This would be the equivalent of passing '<(feature_defines)' in GYP.
101 feature_defines_string = exec_script(
102 "build/gn_list_to_space_separated_string.py",
103 feature_defines_list,