OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file contains Chrome-feature-related build flags (see ui.gni for | 5 # This file contains Chrome-feature-related build flags (see ui.gni for |
6 # UI-related ones). These should theoretically be moved to the build files of | 6 # UI-related ones). These should theoretically be moved to the build files of |
7 # the features themselves. | 7 # the features themselves. |
8 # | 8 # |
9 # However, today we have many "bad" dependencies on some of these flags from, | 9 # However, today we have many "bad" dependencies on some of these flags from, |
10 # e.g. base, so they need to be global to match the GYP configuration. Also, | 10 # e.g. base, so they need to be global to match the GYP configuration. Also, |
11 # anything that needs a grit define must be in either this file or ui.gni. | 11 # anything that needs a grit define must be in either this file or ui.gni. |
12 # | 12 # |
13 # PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't | 13 # PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't |
14 # required. See the declare_args block of BUILDCONFIG.gn for advice on how | 14 # required. See the declare_args block of BUILDCONFIG.gn for advice on how |
15 # to set up feature flags. | 15 # to set up feature flags. |
16 | 16 |
17 import("//build/config/chrome_build.gni") | 17 import("//build/config/chrome_build.gni") |
18 import("//build/config/chromecast_build.gni") | 18 import("//build/config/chromecast_build.gni") |
19 import("//build/config/headless_build.gni") | |
19 if (is_android) { | 20 if (is_android) { |
20 import("//build/config/android/config.gni") | 21 import("//build/config/android/config.gni") |
21 } | 22 } |
22 | 23 |
23 declare_args() { | 24 declare_args() { |
24 # Multicast DNS. | 25 # Multicast DNS. |
25 enable_mdns = is_win || is_linux | 26 enable_mdns = is_win || is_linux |
26 | 27 |
27 enable_plugins = (!is_android && !is_ios) || is_chromecast | 28 enable_plugins = ((!is_android && !is_ios) || is_chromecast) && !is_headless |
28 enable_pdf = !is_android && !is_ios && !is_chromecast | 29 enable_pdf = !is_android && !is_ios && !is_chromecast && !is_headless |
jam
2015/10/26 17:05:31
it's not clear to me why this should be the cast;
Sami
2015/10/26 18:09:06
I suppose you're right. I was thinking NPAPI proba
| |
29 | 30 |
30 # Enables Native Client support. | 31 # Enables Native Client support. |
31 # TODO(GYP): Get NaCl linking on other platforms. | 32 # TODO(GYP): Get NaCl linking on other platforms. |
32 # Also, see if we can always get rid of enable_nacl_untrusted and | 33 # Also, see if we can always get rid of enable_nacl_untrusted and |
33 # enable_pnacl and always build them if enable_nacl is true. | 34 # enable_pnacl and always build them if enable_nacl is true. |
34 # The "is_nacl" part of the condition is needed to ensure that | 35 # The "is_nacl" part of the condition is needed to ensure that |
35 # the untrusted code is built properly; arguably it should be | 36 # the untrusted code is built properly; arguably it should be |
36 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but | 37 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but |
37 # this will go away when Mac and Win are working and we can just use | 38 # this will go away when Mac and Win are working and we can just use |
38 # the commented out logic. | 39 # the commented out logic. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 enable_app_list = !is_ios && !is_android | 80 enable_app_list = !is_ios && !is_android |
80 | 81 |
81 enable_supervised_users = !is_ios | 82 enable_supervised_users = !is_ios |
82 | 83 |
83 enable_autofill_dialog = !is_ios | 84 enable_autofill_dialog = !is_ios |
84 | 85 |
85 enable_google_now = !is_ios && !is_android | 86 enable_google_now = !is_ios && !is_android |
86 | 87 |
87 enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos) | 88 enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos) |
88 | 89 |
89 enable_remoting = !is_ios && !is_android && !is_chromecast | 90 enable_remoting = !is_ios && !is_android && !is_chromecast && !is_headless |
90 | 91 |
91 # Enable hole punching for the protected video. | 92 # Enable hole punching for the protected video. |
92 enable_video_hole = is_android | 93 enable_video_hole = is_android |
93 | 94 |
94 # Enables browser side Content Decryption Modules. Required for embedders | 95 # Enables browser side Content Decryption Modules. Required for embedders |
95 # (e.g. Android and ChromeCast) that use a browser side CDM. | 96 # (e.g. Android and ChromeCast) that use a browser side CDM. |
96 enable_browser_cdms = is_android || is_chromecast | 97 enable_browser_cdms = is_android || is_chromecast |
97 | 98 |
98 # Hangout services is an extension that adds extra features to Hangouts. | 99 # Hangout services is an extension that adds extra features to Hangouts. |
99 # For official GYP builds, this flag is set. | 100 # For official GYP builds, this flag is set. |
(...skipping 18 matching lines...) Expand all Loading... | |
118 } | 119 } |
119 | 120 |
120 # Additional dependent variables ----------------------------------------------- | 121 # Additional dependent variables ----------------------------------------------- |
121 | 122 |
122 # Set the version of CLD. | 123 # Set the version of CLD. |
123 # 1: (DEPRECATED! See http://crbug.com/528305 for info) Use only CLD1. | 124 # 1: (DEPRECATED! See http://crbug.com/528305 for info) Use only CLD1. |
124 # 2: Use only CLD2. | 125 # 2: Use only CLD2. |
125 cld_version = 2 | 126 cld_version = 2 |
126 | 127 |
127 # libudev usage. This currently only affects the content layer. | 128 # libudev usage. This currently only affects the content layer. |
128 use_udev = is_linux && !is_chromecast | 129 use_udev = is_linux && !is_chromecast && !is_headless |
129 | 130 |
130 # Enable the spell checker. | 131 # Enable the spell checker. |
131 enable_spellcheck = !is_ios | 132 enable_spellcheck = !is_ios |
132 | 133 |
133 # Use the operating system's spellchecker rather than hunspell. | 134 # Use the operating system's spellchecker rather than hunspell. |
134 use_browser_spellchecker = is_android || is_mac | 135 use_browser_spellchecker = is_android || is_mac |
135 | 136 |
136 # Enable basic printing support and UI. | 137 # Enable basic printing support and UI. |
137 enable_basic_printing = !is_chromeos && !is_chromecast && !is_ios | 138 enable_basic_printing = |
139 !is_chromeos && !is_chromecast && !is_ios && !is_headless | |
138 | 140 |
139 # Enable printing with print preview. It does not imply | 141 # Enable printing with print preview. It does not imply |
140 # enable_basic_printing. It's possible to build Chrome with preview only. | 142 # enable_basic_printing. It's possible to build Chrome with preview only. |
141 enable_print_preview = !is_android && !is_chromecast && !is_ios | 143 enable_print_preview = !is_android && !is_chromecast && !is_ios && !is_headless |
142 | 144 |
143 # Enables the use of CDMs in pepper plugins. | 145 # Enables the use of CDMs in pepper plugins. |
144 enable_pepper_cdms = | 146 enable_pepper_cdms = |
145 enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast | 147 enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast |
146 | 148 |
147 # The seccomp-bpf sandbox is only supported on three architectures | 149 # The seccomp-bpf sandbox is only supported on three architectures |
148 # currently. | 150 # currently. |
149 # Do not disable seccomp_bpf anywhere without talking to | 151 # Do not disable seccomp_bpf anywhere without talking to |
150 # security@chromium.org! | 152 # security@chromium.org! |
151 use_seccomp_bpf = (is_linux || is_android) && | 153 use_seccomp_bpf = (is_linux || is_android) && |
152 (current_cpu == "x86" || current_cpu == "x64" || | 154 (current_cpu == "x86" || current_cpu == "x64" || |
153 current_cpu == "arm" || current_cpu == "mipsel") | 155 current_cpu == "arm" || current_cpu == "mipsel") |
154 | 156 |
155 # Enable notifications everywhere except iOS. | 157 # Enable notifications everywhere except iOS. |
156 enable_notifications = !is_ios | 158 enable_notifications = !is_ios |
157 | 159 |
158 # TODO(brettw) this should be moved to net and only dependents get this define. | 160 # TODO(brettw) this should be moved to net and only dependents get this define. |
159 disable_ftp_support = is_ios | 161 disable_ftp_support = is_ios |
160 | 162 |
161 enable_web_speech = !is_android && !is_ios | 163 enable_web_speech = !is_android && !is_ios |
162 | 164 |
163 use_dbus = is_linux && !is_chromecast | 165 use_dbus = is_linux && !is_chromecast && !is_headless |
164 | 166 |
165 enable_extensions = !is_android && !is_ios | 167 enable_extensions = !is_android && !is_ios |
166 | 168 |
167 enable_task_manager = !is_ios && !is_android | 169 enable_task_manager = !is_ios && !is_android |
168 | 170 |
169 use_cups = (is_desktop_linux || is_mac) && !is_chromecast | 171 use_cups = (is_desktop_linux || is_mac) && !is_chromecast && !is_headless |
170 | 172 |
171 enable_themes = !is_android && !is_ios | 173 enable_themes = !is_android && !is_ios |
172 | 174 |
173 # TODO(scottmg) remove this when we've fixed printing. | 175 # TODO(scottmg) remove this when we've fixed printing. |
174 win_pdf_metafile_for_printing = true | 176 win_pdf_metafile_for_printing = true |
175 | 177 |
176 # Whether we are using the rlz library or not. Platforms like Android send | 178 # Whether we are using the rlz library or not. Platforms like Android send |
177 # rlz codes for searches but do not use the library. | 179 # rlz codes for searches but do not use the library. |
178 enable_rlz_support = is_win || is_mac || is_ios || is_chromeos | 180 enable_rlz_support = is_win || is_mac || is_ios || is_chromeos |
179 enable_rlz = is_chrome_branded && enable_rlz_support | 181 enable_rlz = is_chrome_branded && enable_rlz_support |
180 | 182 |
181 enable_settings_app = enable_app_list && !is_chromeos | 183 enable_settings_app = enable_app_list && !is_chromeos |
182 | 184 |
183 enable_service_discovery = enable_mdns || is_mac | 185 enable_service_discovery = enable_mdns || is_mac |
184 | 186 |
185 enable_wifi_bootstrapping = is_win || is_mac | 187 enable_wifi_bootstrapping = is_win || is_mac |
186 | 188 |
187 # Image loader extension is enabled on ChromeOS only. | 189 # Image loader extension is enabled on ChromeOS only. |
188 enable_image_loader_extension = is_chromeos | 190 enable_image_loader_extension = is_chromeos |
189 | 191 |
190 # Chrome OS: whether to also build the upcoming version of | 192 # Chrome OS: whether to also build the upcoming version of |
191 # ChromeVox, which can then be enabled via a command-line switch. | 193 # ChromeVox, which can then be enabled via a command-line switch. |
192 enable_chromevox_next = false | 194 enable_chromevox_next = false |
193 | 195 |
194 # Use brlapi from brltty for braille display support. | 196 # Use brlapi from brltty for braille display support. |
195 use_brlapi = is_chromeos | 197 use_brlapi = is_chromeos |
196 | 198 |
197 # Option controlling the use of GConf (the classic GNOME configuration | 199 # Option controlling the use of GConf (the classic GNOME configuration |
198 # system). | 200 # system). |
199 use_gconf = is_linux && !is_chromeos && !is_chromecast | 201 use_gconf = is_linux && !is_chromeos && !is_chromecast && !is_headless |
200 | 202 |
201 # Whether to back up data before sync. | 203 # Whether to back up data before sync. |
202 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) | 204 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) |
203 | 205 |
204 # Enable WebVR support by default on Android | 206 # Enable WebVR support by default on Android |
205 # Still requires command line flag to access API | 207 # Still requires command line flag to access API |
206 enable_webvr = is_android | 208 enable_webvr = is_android |
209 | |
210 use_gio = is_desktop_linux && !is_headless | |
OLD | NEW |