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")
6 import("//third_party/WebKit/public/features.gni")
9 import("//build/config/android/config.gni")
11 if (current_cpu == "arm") {
12 import("//build/config/arm.gni")
14 # TODO(brettw) remove this once && early-out is checked in.
19 # Set to true to enable the clang plugin that checks the usage of the Blink
20 # garbage-collection infrastructure during compilation.
21 blink_gc_plugin = false
22 blink_gc_plugin_dump_graph = false
24 blink_asserts_always_on = false
27 # Whether Android ARM or x86 build uses OpenMAX DL FFT. Currently only
28 # supported on Android ARMv7+, ia32 or x64 without webview. When enabled, this
29 # will also enable WebAudio support on Android ARM, ia32 and x64. Default is
30 # enabled. Whether WebAudio is actually available depends on runtime settings
32 use_openmax_dl_fft = is_android &&
33 (current_cpu == "x86" ||
34 current_cpu == "x64" ||
35 (current_cpu == "arm" && arm_version >= 7) ||
36 current_cpu == "mipsel")
38 use_webaudio_ffmpeg = !is_mac && !is_android
40 # Set this to true to enable use of concatenated impulse responses for the HRTF
42 # TODO(brettw) do we need this or can we assume its always on?
43 use_concatenated_impulse_responses = true
45 # feature_defines_list ---------------------------------------------------------
47 feature_defines_list = [
48 "ENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0",
52 # TODO(GYP) this should also be set when release_valgrind_build is set,
53 # but we don't have that flag in the GN build yet.
54 feature_defines_list += [ "WTF_USE_DYNAMIC_ANNOTATIONS=1" ]
57 if (use_concatenated_impulse_responses) {
58 feature_defines_list += [ "WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1" ]
62 feature_defines_list += [
63 "ENABLE_INPUT_MULTIPLE_FIELDS_UI=1",
68 if (use_webaudio_ffmpeg) {
69 feature_defines_list += [ "WTF_USE_WEBAUDIO_FFMPEG=1" ]
72 if (use_openmax_dl_fft) {
73 feature_defines_list += [
74 "WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1",
75 # Enabling the FFT is enough to enable WebAudio support to
76 # allow most WebAudio features to work on Android.
81 if (use_default_render_theme) {
82 feature_defines_list += [ "WTF_USE_DEFAULT_RENDER_THEME=1" ]
85 feature_defines_list += [ "ENABLE_OILPAN=1" ]
87 if (blink_asserts_always_on) {
88 feature_defines_list += [ "ENABLE_ASSERT=1" ]
91 # feature_defines_string -------------------------------------------------------
93 # Convert the list to a space-separated string for passing to scripts.
94 # This would be the equivalent of passing '<(feature_defines)' in GYP.
95 feature_defines_string = exec_script(
96 "build/gn_list_to_space_separated_string.py",