Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / config.gni
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.
4
5 import("//build/config/ui.gni")
6
7 if (is_android) {
8   import("//build/config/android/config.gni")
9 } else {
10   # TODO(brettw) remove this once && early-out is checked in.
11   is_android_webview_build = false
12 }
13 if (cpu_arch == "arm") {
14   import("//build/config/arm.gni")
15 } else {
16   # TODO(brettw) remove this once && early-out is checked in.
17   arm_version = 0
18 }
19
20 declare_args() {
21   # Enables the Oilpan garbage-collection infrastructure.
22   enable_oilpan = false
23
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
28
29   blink_asserts_always_on = false
30 }
31
32 use_default_render_theme = use_aura
33
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
38 # and flags.
39 use_openmax_dl_fft = is_android && !is_android_webview_build &&
40   (cpu_arch == "x86" ||
41    cpu_arch == "x64" ||
42    (cpu_arch == "arm" && arm_version > 7))
43
44 use_webaudio_ffmpeg = !is_mac && !is_android
45
46 # Set this to true to enable use of concatenated impulse responses for the HRTF
47 # panner in WebAudio.
48 # TODO(brettw) do we need this or can we assume its always on?
49 use_concatenated_impulse_responses = true
50
51 # feature_defines_list ---------------------------------------------------------
52
53 feature_defines_list = [
54   "ENABLE_CUSTOM_SCHEME_HANDLER=0",
55   "ENABLE_SVG_FONTS=1",
56 ]
57
58 if (is_debug) {
59   # TODO(GYP) this should also be set when release_valgrind_build is set,
60   # but we don't have that flag in the GN build yet.
61   feature_defines_list += [ "WTF_USE_DYNAMIC_ANNOTATIONS=1" ]
62 }
63
64 if (use_concatenated_impulse_responses) {
65   feature_defines_list += [ "WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1" ]
66 }
67
68 if (!is_android) {
69   feature_defines_list += [
70     "ENABLE_INPUT_MULTIPLE_FIELDS_UI=1",
71     "ENABLE_WEB_AUDIO=1",
72   ]
73 }
74
75 if (use_webaudio_ffmpeg) {
76   feature_defines_list += [ "WTF_USE_WEBAUDIO_FFMPEG=1" ]
77 }
78
79 if (use_openmax_dl_fft) {
80   feature_defines_list += [
81     "WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1",
82     # Enabling the FFT is enough to enable WebAudio support to
83     # allow most WebAudio features to work on Android.
84     "ENABLE_WEB_AUDIO=1",
85   ]
86 }
87
88 if (!is_mac) {
89   # Mac OS X has not implemented support for ENABLE(OPENTYPE_VERTICAL) yet.
90   feature_defines_list += [ "ENABLE_OPENTYPE_VERTICAL=1" ]
91 }
92
93 if (use_default_render_theme) {
94   feature_defines_list += [ "WTF_USE_DEFAULT_RENDER_THEME=1" ]
95 }
96 if (enable_oilpan) {
97   feature_defines_list += [ "ENABLE_OILPAN=1" ]
98 }
99 if (blink_asserts_always_on) {
100   feature_defines_list += [ "ENABLE_ASSERT=1" ]
101 }
102
103 # feature_defines_string -------------------------------------------------------
104
105 # Convert the list to a space-separated string for passing to scripts.
106 # This would be the equivalent of passing '<(feature_defines)' in GYP.
107 feature_defines_string = exec_script(
108     "build/gn_list_to_space_separated_string.py",
109     feature_defines_list,
110     "trim string")