Remove outdated list style types
[chromium-blink-merge.git] / third_party / WebKit / Source / config.gni
blob596b6c4ea1597b25efdd47ec8579ebb96a2360cb
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")
8 if (is_android) {
9   import("//build/config/android/config.gni")
11 if (current_cpu == "arm") {
12   import("//build/config/arm.gni")
13 } else {
14   # TODO(brettw) remove this once && early-out is checked in.
15   arm_version = 0
18 declare_args() {
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
31 # and flags.
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
41 # panner in WebAudio.
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",
51 if (is_debug) {
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" ]
61 if (!is_android) {
62   feature_defines_list += [
63     "ENABLE_INPUT_MULTIPLE_FIELDS_UI=1",
64     "ENABLE_WEB_AUDIO=1",
65   ]
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.
77     "ENABLE_WEB_AUDIO=1",
78   ]
81 if (use_default_render_theme) {
82   feature_defines_list += [ "WTF_USE_DEFAULT_RENDER_THEME=1" ]
84 if (enable_oilpan) {
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",
97     feature_defines_list,
98     "trim string")