blob: 5c15346b9748eb7d1a914f9da9df547c89e8ec5a [file] [log] [blame]
[email protected]ed329be2012-01-03 22:02:161# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]21642ab2009-09-15 23:52:145# IMPORTANT:
6# Please don't directly include this file if you are building via gyp_chromium,
7# since gyp_chromium is automatically forcing its inclusion.
[email protected]2f80c312009-02-25 21:26:558{
[email protected]e72e55b2011-01-06 22:19:309 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
[email protected]2f80c312009-02-25 21:26:5511 'variables': {
[email protected]e14a9f92009-08-05 19:26:0712 # Putting a variables dict inside another variables dict looks kind of
[email protected]e72e55b2011-01-06 22:19:3013 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
[email protected]e14a9f92009-08-05 19:26:0714 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
[email protected]9a8175892012-03-20 02:11:5816 # dict that operate on these variables.
[email protected]e14a9f92009-08-05 19:26:0717 'variables': {
[email protected]e72e55b2011-01-06 22:19:3018 'variables': {
[email protected]bb6aba32011-01-07 19:04:4319 'variables': {
[email protected]8796d922012-08-07 01:23:1120 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
23
[email protected]24641702014-07-03 17:20:1524 # Whether we're building the cast (chromecast) shell
25 'chromecast%': 0,
26
[email protected]8796d922012-08-07 01:23:1127 # Whether or not we are using the Aura windowing framework.
28 'use_aura%': 0,
29
30 # Whether or not we are building the Ash shell.
31 'use_ash%': 0,
[email protected]c335f4802013-04-06 04:51:2132
[email protected]2a76009b2013-08-07 21:02:3133 # Whether or not we are using CRAS, the ChromeOS Audio Server.
34 'use_cras%': 0,
35
[email protected]ff78e4e2013-05-03 19:19:1536 # Use a raw surface abstraction.
37 'use_ozone%': 0,
[email protected]02968b82013-11-14 02:42:4338
39 # Configure the build for small devices. See crbug.com/318413
40 'embedded%': 0,
[email protected]1731cd42014-03-26 19:10:0241
42 'conditions': [
43 # Compute the architecture that we're building on.
Robert Sesek602b4bf2014-11-20 18:37:0044 ['OS=="win" or OS=="ios"', {
[email protected]1731cd42014-03-26 19:10:0245 'host_arch%': 'ia32',
46 }, {
[email protected]d2f389242014-06-06 09:56:4447 'host_arch%': '<!pymod_do_main(detect_host_arch)',
[email protected]1731cd42014-03-26 19:10:0248 }],
49 ],
[email protected]8796d922012-08-07 01:23:1150 },
51 # Copy conditionally-set variables out one scope.
52 'chromeos%': '<(chromeos)',
[email protected]24641702014-07-03 17:20:1553 'chromecast%': '<(chromecast)',
[email protected]8796d922012-08-07 01:23:1154 'use_aura%': '<(use_aura)',
55 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:3156 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:1557 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:4358 'embedded%': '<(embedded)',
[email protected]1731cd42014-03-26 19:10:0259 'host_arch%': '<(host_arch)',
[email protected]e72e55b2011-01-06 22:19:3060
[email protected]3fa441d2011-09-18 17:28:5061 # Whether we are using Views Toolkit
62 'toolkit_views%': 0,
63
bedupont65ce5acc2014-11-04 16:30:4164 # Use the PCI lib to collect GPU information.
65 'use_libpci%': 1,
66
[email protected]e1b2d732014-03-28 16:20:3267 # Use OpenSSL instead of NSS as the underlying SSL and crypto
68 # implementation. Certificate verification will in most cases be
69 # handled by the OS. If OpenSSL's struct X509 is used to represent
70 # certificates, use_openssl_certs must be set.
[email protected]e0b85a52011-10-06 03:30:4271 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2772
[email protected]e1b2d732014-03-28 16:20:3273 # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*.
74 'use_openssl_certs%': 0,
75
[email protected]7ddea9802012-02-22 23:08:0576 # Disable viewport meta tag by default.
77 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2478
79 # Enable HiDPI support.
80 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4081
[email protected]f1f362b42012-05-15 17:46:5882 # Override buildtype to select the desired build flavor.
83 # Dev - everyday build for development/testing
84 # Official - release build (generally implies additional processing)
85 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
86 # conversion is done), some of the things which are now controlled by
87 # 'branding', such as symbol generation, will need to be refactored
88 # based on 'buildtype' (i.e. we don't care about saving symbols for
89 # non-Official # builds).
90 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1191
[email protected]e2aaaac2013-05-08 07:20:0992 # Override branding to select the desired branding flavor.
93 'branding%': 'Chromium',
94
[email protected]8796d922012-08-07 01:23:1195 'conditions': [
[email protected]2d0505202013-09-16 00:22:5296 # ChromeOS and Windows use Aura and Ash.
[email protected]15119302014-05-20 19:23:5897 ['chromeos==1 or OS=="win" or OS=="linux"', {
[email protected]8796d922012-08-07 01:23:1198 'use_ash%': 1,
[email protected]978a2ae2013-09-13 04:28:0199 'use_aura%': 1,
[email protected]8796d922012-08-07 01:23:11100 }],
[email protected]020648aa2013-06-08 17:16:47101
gunsch407189f2014-09-11 22:03:41102 ['chromecast==1 and OS!="android"', {
[email protected]24641702014-07-03 17:20:15103 'embedded%': 1,
104 'use_ozone%': 1,
105 }],
106
[email protected]02968b82013-11-14 02:42:43107 # Ozone uses Aura.
108 ['use_ozone==1', {
109 'use_aura%': 1,
110 }],
111
[email protected]7ed44342013-09-30 08:36:13112 # Whether we're a traditional desktop unix.
113 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
114 'desktop_linux%': 1,
115 }, {
116 'desktop_linux%': 0,
117 }],
118
[email protected]02968b82013-11-14 02:42:43119 # Embedded implies ozone.
120 ['embedded==1', {
121 'use_ozone%': 1,
122 }],
[email protected]e71a3622013-12-04 07:32:41123
[email protected]1731cd42014-03-26 19:10:02124 ['OS=="android"', {
125 'target_arch%': 'arm',
126 }, {
127 # Default architecture we're building for is the architecture we're
128 # building on, and possibly sub-architecture (for iOS builds).
129 'target_arch%': '<(host_arch)',
130 }],
[email protected]8796d922012-08-07 01:23:11131 ],
[email protected]bb6aba32011-01-07 19:04:43132 },
133 # Copy conditionally-set variables out one scope.
134 'chromeos%': '<(chromeos)',
[email protected]24641702014-07-03 17:20:15135 'chromecast%': '<(chromecast)',
[email protected]7ed44342013-09-30 08:36:13136 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58137 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16138 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31139 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15140 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:43141 'embedded%': '<(embedded)',
bedupont65ce5acc2014-11-04 16:30:41142 'use_libpci%': '<(use_libpci)',
[email protected]e0b85a52011-10-06 03:30:42143 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:32144 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]7ddea9802012-02-22 23:08:05145 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24146 'enable_hidpi%': '<(enable_hidpi)',
[email protected]f1f362b42012-05-15 17:46:58147 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09148 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22149 'host_arch%': '<(host_arch)',
[email protected]1731cd42014-03-26 19:10:02150 'target_arch%': '<(target_arch)',
[email protected]94cdbf42012-12-11 19:49:22151
[email protected]ce2cad72014-02-13 18:17:35152 'target_subarch%': '',
[email protected]f1f362b42012-05-15 17:46:58153
newtd5366cb2014-10-21 03:27:16154 # The channel to build on Android: stable, beta, dev, canary, or
155 # default. "default" should be used on non-official builds.
156 'android_channel%': 'default',
157
[email protected]d999c3cb2013-03-12 10:22:36158 # This is set when building the Android WebView inside the Android
159 # build system, using the 'android' gyp backend. The WebView code is
160 # still built when this is unset, but builds using the normal chromium
161 # build system.
162 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53163
[email protected]967767d2014-07-16 05:46:24164 # This is set when building the Android WebView in ninja for the
165 # telemetry bot.
166 'android_webview_telemetry_build%': 0,
167
[email protected]7d6763422013-04-26 12:06:54168 # Set ARM architecture version.
169 'arm_version%': 7,
170
[email protected]89dcd662013-12-12 23:06:50171 # Use aurax11 for clipboard implementation. This is true on linux_aura.
172 'use_clipboard_aurax11%': 0,
173
[email protected]e71a3622013-12-04 07:32:41174 # goma settings.
175 # 1 to use goma.
176 # If no gomadir is set, it uses the default gomadir.
177 'use_goma%': 0,
178 'gomadir%': '',
179
[email protected]1731cd42014-03-26 19:10:02180 # The system root for cross-compiles. Default: none.
181 'sysroot%': '',
182 'chroot_cmd%': '',
183
[email protected]03df8362014-06-04 00:17:11184 # The system libdir used for this ABI.
185 'system_libdir%': 'lib',
186
petarjc8a5da742014-08-27 14:33:36187 # Default MIPS arch variant. This is set in the conditions block
188 # below for MIPS targets.
189 'mips_arch_variant%': '',
190
[email protected]e72e55b2011-01-06 22:19:30191 'conditions': [
[email protected]2c858a82013-10-05 01:01:32192 # Ash needs Aura.
193 ['use_aura==0', {
194 'use_ash%': 0,
195 }],
196
[email protected]ab2017e2012-02-07 01:54:50197 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35198 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43199 'toolkit_views%': 1,
200 }, {
201 'toolkit_views%': 0,
202 }],
[email protected]1efbaaa2012-04-24 02:43:24203
[email protected]02968b82013-11-14 02:42:43204 # Embedded builds use aura without ash or views.
205 ['embedded==1', {
206 'use_aura%': 1,
207 'use_ash%': 0,
208 'toolkit_views%': 0,
209 }],
210
[email protected]d2b16e32014-03-06 22:10:49211 # Enable HiDPI on Mac OS, Chrome OS and Windows.
212 ['OS=="mac" or chromeos==1 or OS=="win"', {
[email protected]1efbaaa2012-04-24 02:43:24213 'enable_hidpi%': 1,
214 }],
[email protected]219c7312012-05-10 20:32:40215
davidben71c13e62014-09-12 15:11:09216 # Enable the OpenSSL backend on Mac OS.
217 ['OS=="mac"', {
218 'use_openssl%': 1,
219 }],
220
[email protected]b11c0cc02014-06-28 05:36:50221 # Enable App Launcher everywhere but mobile.
222 ['OS!="ios" and OS!="android"', {
[email protected]dc4e8b82012-11-15 03:58:16223 'enable_app_list%': 1,
224 }, {
225 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09226 }],
227
[email protected]cb800562012-11-20 22:36:07228 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26229 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07230 }, {
231 'use_default_render_theme%': 0,
232 }],
[email protected]02968b82013-11-14 02:42:43233
234 ['use_ozone==1', {
235 'use_ozone_evdev%': 1,
236 }, {
237 'use_ozone_evdev%': 0,
[email protected]e71a3622013-12-04 07:32:41238 }],
239
240 # Set default gomadir.
241 ['OS=="win"', {
242 'gomadir': 'c:\\goma\\goma-win',
[email protected]91b91292014-01-18 23:54:41243 }, {
[email protected]e71a3622013-12-04 07:32:41244 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
245 }],
[email protected]ce2cad72014-02-13 18:17:35246
247 # Set the default "target_subarch" on iOS. Valid values are "arm32",
248 # "arm64" and "both" (meaning a fat binary).
249 #
250 # TODO(sdefresne): change the default from "arm32" to "both" for
251 # "target_subarch" once http://crbug.com/339477 is fixed.
252 #
253 # TODO(sdefresne): set the "target_arch" to "arm" once compilation
254 # of skia has been fixed for simulator. http://crbug.com/342377
255 ['OS=="ios"', {
256 'target_subarch%': 'arm32',
257 }],
petarjc8a5da742014-08-27 14:33:36258
259 # Set arch variants for MIPS platforms.
260 ['target_arch=="mips64el"', {
261 'conditions': [
262 ['OS=="android"', {
263 'mips_arch_variant%': 'r6',
264 }, {
265 'mips_arch_variant%': 'r2',
266 }],
267 ],
268 }],
269
270 ['target_arch=="mipsel"', {
271 'mips_arch_variant%': 'r1',
272 }],
[email protected]e72e55b2011-01-06 22:19:30273 ],
274 },
275
276 # Copy conditionally-set variables out one scope.
277 'chromeos%': '<(chromeos)',
[email protected]24641702014-07-03 17:20:15278 'chromecast%': '<(chromecast)',
[email protected]e72e55b2011-01-06 22:19:30279 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22280 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:35281 'target_subarch%': '<(target_subarch)',
petarjc8a5da742014-08-27 14:33:36282 'mips_arch_variant%': '<(mips_arch_variant)',
[email protected]bb6aba32011-01-07 19:04:43283 'toolkit_views%': '<(toolkit_views)',
[email protected]d628ab412013-09-07 03:26:37284 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58285 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16286 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31287 'use_cras%': '<(use_cras)',
bedupont65ce5acc2014-11-04 16:30:41288 'use_libpci%': '<(use_libpci)',
[email protected]ff78e4e2013-05-03 19:19:15289 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:48290 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:50291 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]02968b82013-11-14 02:42:43292 'embedded%': '<(embedded)',
[email protected]e0b85a52011-10-06 03:30:42293 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:32294 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]7ddea9802012-02-22 23:08:05295 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24296 'enable_hidpi%': '<(enable_hidpi)',
newtd5366cb2014-10-21 03:27:16297 'android_channel%': '<(android_channel)',
[email protected]d999c3cb2013-03-12 10:22:36298 'android_webview_build%': '<(android_webview_build)',
[email protected]967767d2014-07-16 05:46:24299 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)',
[email protected]e71a3622013-12-04 07:32:41300 'use_goma%': '<(use_goma)',
301 'gomadir%': '<(gomadir)',
[email protected]dc4e8b82012-11-15 03:58:16302 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07303 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22304 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09305 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54306 'arm_version%': '<(arm_version)',
[email protected]1731cd42014-03-26 19:10:02307 'sysroot%': '<(sysroot)',
308 'chroot_cmd%': '<(chroot_cmd)',
[email protected]03df8362014-06-04 00:17:11309 'system_libdir%': '<(system_libdir)',
[email protected]e14a9f92009-08-05 19:26:07310
[email protected]c86fd472013-04-02 19:42:30311 # Set to 1 to enable fast builds. Set to 2 for even faster builds
312 # (it disables debug info for fastest compilation - only for use
313 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30314 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49315
sebmarchand153e1b82014-10-31 20:25:52316 # Set to 1 to not store any build metadata, e.g. ifdef out all __DATE__
317 # and __TIME__. Set to 0 to reenable the use of these macros in the code
318 # base. See http://crbug.com/314403.
319 'dont_embed_build_metadata%': 1,
[email protected]b9e9992a2014-06-12 21:01:19320
[email protected]c73363762014-04-16 21:11:46321 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
322 # This is useful for parallel compilation tools which can't support /Zi.
323 # Only used on Windows.
324 'win_z7%' : 0,
325
[email protected]1a1505512014-03-10 18:23:38326 # Set to 1 to enable dcheck in release.
[email protected]20960e072011-09-20 20:59:01327 'dcheck_always_on%': 0,
328
[email protected]a1e87422013-07-09 21:47:01329 # Set to 1 to make a build that disables unshipped tracing events.
330 # Note: this setting is ignored if buildtype=="Official".
331 'tracing_like_official_build%': 0,
332
[email protected]77a848262013-02-22 11:17:25333 # Disable image loader component extension by default.
334 'image_loader_extension%': 0,
335
[email protected]7d6763422013-04-26 12:06:54336 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30337 'arm_neon%': 1,
338
[email protected]7d6763422013-04-26 12:06:54339 # Detect NEON support at run-time.
340 'arm_neon_optional%': 0,
341
[email protected]e72e55b2011-01-06 22:19:30342 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03343 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30344
[email protected]d9113542012-07-18 17:11:28345 # Use system libjpeg. Note that the system's libjepg will be used even if
346 # use_libjpeg_turbo is set.
347 'use_system_libjpeg%': 0,
348
[email protected]aa5e01fc2013-03-06 14:06:17349 # By default, component is set to static_library and it can be overriden
350 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53351 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30352
brucedawson4b6961d2014-10-28 22:18:04353 # /analyze is off by default on Windows because it is very slow and noisy.
354 # Enable with GYP_DEFINES=win_analyze=1
355 'win_analyze%': 0,
356
[email protected]bb6aba32011-01-07 19:04:43357 # Set to select the Title Case versions of strings in GRD files.
joleksya91e8682014-09-10 13:48:41358 'use_titlecase_in_grd%': 0,
[email protected]63692212010-09-16 00:22:21359
[email protected]98da0042011-02-02 00:10:27360 # Use translations provided by volunteers at launchpad.net. This
361 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19362 'use_third_party_translations%': 0,
363
[email protected]9a425422011-01-11 00:53:18364 # Remoting compilation is enabled by default. Set to 0 to disable.
365 'remoting%': 1,
366
[email protected]1ec68c42011-06-01 13:56:25367 # Configuration policy is enabled by default. Set to 0 to disable.
368 'configuration_policy%': 1,
369
[email protected]6c521fed2012-11-29 17:00:03370 # Variable safe_browsing is used to control the build time configuration
371 # for safe browsing feature. Safe browsing can be compiled in 3 different
372 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
373 # reporting features without enabling phishing and malware detection. This
374 # is useful to integrate a third party phishing/malware detection to
375 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56376 'safe_browsing%': 1,
377
[email protected]418653fdf2014-07-02 07:38:21378 # Web speech is enabled by default. Set to 0 to disable.
379 'enable_web_speech%': 1,
[email protected]9eb100e2011-10-14 05:08:22380
[email protected]7cce3232011-10-28 10:41:57381 # Notifications are compiled in by default. Set to 0 to disable.
382 'notifications%' : 1,
383
[email protected]970fd4e2012-12-19 11:09:37384 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
385 # regular builds and 1 for ASan builds.
386 'mac_want_real_dsym%': 'default',
387
[email protected]5d451ad2011-02-11 16:43:46388 # If this is set, the clang plugins used on the buildbot will be used.
389 # Run tools/clang/scripts/update.sh to make sure they are compiled.
390 # This causes 'clang_chrome_plugins_flags' to be set.
391 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08392 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46393
[email protected]2e82fa52012-11-27 23:41:44394 # Enable building with ASAN (Clang's -fsanitize=address option).
395 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06396 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
397 'asan%': 0,
fdegans96244bb72014-10-27 16:57:44398 'asan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/asan/blacklist.txt',
[email protected]544a18ed2014-01-17 21:01:36399 # Enable coverage gathering instrumentation in ASan. This flag also
[email protected]a030ab62014-06-23 17:14:15400 # controls coverage granularity (1 for function-level coverage, 2 for
401 # block-level coverage).
[email protected]20a127f2014-01-16 03:25:03402 'asan_coverage%': 0,
earthdok78507b92014-10-23 14:00:13403 # Enable intra-object-overflow detection in ASan (experimental).
404 'asan_field_padding%': 0,
[email protected]92799b632011-08-15 14:33:06405
[email protected]1b9654122014-04-28 12:11:15406 # Enable Chromium overrides of the default configurations for various
407 # dynamic tools (like ASan).
glider7dbed1572014-09-23 16:38:11408 'use_sanitizer_options%': 0,
[email protected]1b9654122014-04-28 12:11:15409
[email protected]1612e552014-02-15 04:49:18410 # Enable building with SyzyAsan.
411 # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
412 'syzyasan%': 0,
413
[email protected]062522a2013-06-13 15:49:55414 # Enable building with LSan (Clang's -fsanitize=leak option).
415 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
416 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
417 'lsan%': 0,
418
[email protected]7fd639a2014-05-30 23:59:01419 # Enable building with TSan (Clang's -fsanitize=thread option).
[email protected]927a9d672012-11-09 11:28:20420 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12421 # See http://clang.llvm.org/docs/ThreadSanitizer.html
422 'tsan%': 0,
fdegans96244bb72014-10-27 16:57:44423 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12424
[email protected]7fd639a2014-05-30 23:59:01425 # Enable building with MSan (Clang's -fsanitize=memory option).
[email protected]a10ddd2d2013-02-26 20:06:59426 # MemorySanitizer only works with clang, but msan=1 implies clang=1
427 # See http://clang.llvm.org/docs/MemorySanitizer.html
428 'msan%': 0,
fdegans96244bb72014-10-27 16:57:44429 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
[email protected]a030ab62014-06-23 17:14:15430 # Track where uninitialized memory originates from. From fastest to
431 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2
432 # - track the chain of stores leading from allocation site to use site.
433 'msan_track_origins%': 1,
[email protected]a10ddd2d2013-02-26 20:06:59434
[email protected]7fd639a2014-05-30 23:59:01435 # Enable building with UBSan (Clang's -fsanitize=undefined option).
436 # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
437 # See http://clang.llvm.org/docs/UsersManual.html
438 'ubsan%': 0,
439
[email protected]22e15542014-07-18 23:09:24440 # Enable building with UBsan's vptr (Clang's -fsanitize=vptr option).
[email protected]0dbe7af92014-06-26 23:31:40441 # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1
442 'ubsan_vptr%': 0,
fdegans96244bb72014-10-27 16:57:44443 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt',
[email protected]0dbe7af92014-06-26 23:31:40444
[email protected]c8103a42013-11-12 13:41:30445 # Use the dynamic libraries instrumented by one of the sanitizers
446 # instead of the standard system libraries.
447 'use_instrumented_libraries%': 0,
448
[email protected]22b3f531e2013-12-20 13:07:28449 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
450 # stdlibc++ as standard library. This is intended to use for instrumented
451 # builds.
452 'use_custom_libcxx%': 0,
453
[email protected]480c6672014-08-04 11:28:06454 # Use system libc++ instead of the default C++ library, usually libstdc++.
455 # This is intended for iOS builds only.
456 'use_system_libcxx%': 0,
457
[email protected]7ce58b22012-09-26 05:17:25458 # Use a modified version of Clang to intercept allocated types and sizes
459 # for allocated objects. clang_type_profiler=1 implies clang=1.
460 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
461 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
462 'clang_type_profiler%': 0,
463
[email protected]8a6abd12012-05-16 10:04:44464 # Set to true to instrument the code with function call logger.
465 # See src/third_party/cygprofile/cyg-profile.cc for details.
466 'order_profiling%': 0,
467
[email protected]00b0a7f2012-01-25 15:30:46468 # Use the provided profiled order file to link Chrome image with it.
469 # This makes Chrome faster by better using CPU cache when executing code.
470 # This is known as PGO (profile guided optimization).
471 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
472 'order_text_section%' : "",
473
[email protected]1ad5a7b2011-06-24 03:15:13474 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
475 # libraries on linux x86-64 and arm, plus ASLR.
476 'linux_fpic%': 1,
477
[email protected]bd7b6fe2012-03-05 21:02:40478 # Whether one-click signin is enabled or not.
479 'enable_one_click_signin%': 0,
480
[email protected]b56a9e02014-06-20 09:57:04481 # Whether to back up data before sync.
482 'enable_pre_sync_backup%': 0,
483
[email protected]6a3cd37e2012-04-17 17:13:34484 # Enable Chrome browser extensions
485 'enable_extensions%': 1,
486
[email protected]6ee43a72012-12-07 22:44:40487 # Enable Google Now.
[email protected]9a5bb052014-04-17 16:50:56488 'enable_google_now%': 1,
[email protected]6ee43a72012-12-07 22:44:40489
vitalybuka93eea402014-11-05 23:47:15490 # Enable basic printing support and UI.
491 'enable_basic_printing%': 1,
492
493 # Enable printing with print preview. It does not imply
494 # enable_basic_printing. It's possible to build Chrome with preview only.
495 'enable_print_preview%': 1,
[email protected]658677f2012-06-09 06:04:02496
[email protected]3b5e88d2013-09-06 11:03:06497 # Set the version of CLD.
498 # 0: Don't specify the version. This option is for the Finch testing.
499 # 1: Use only CLD1.
500 # 2: Use only CLD2.
[email protected]d8ef2362013-10-22 02:10:00501 'cld_version%': 2,
[email protected]3b5e88d2013-09-06 11:03:06502
[email protected]61753f22014-03-19 12:10:59503 # For CLD2, the size of the tables that should be included in the build
[email protected]e5a7a2a2014-03-27 16:16:03504 # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data
505 # tool explicitly.
[email protected]61753f22014-03-19 12:10:59506 # See third_party/cld_2/cld_2.gyp for more information.
507 # 0: Small tables, lower accuracy
[email protected]61753f22014-03-19 12:10:59508 # 2: Large tables, high accuracy
509 'cld2_table_size%': 2,
510
[email protected]c6ce08072013-07-31 07:48:53511 # Enable spell checker.
512 'enable_spellcheck%': 1,
513
[email protected]dda90ae2011-07-19 22:07:48514 # Webrtc compilation is enabled by default. Set to 0 to disable.
515 'enable_webrtc%': 1,
516
[email protected]cdb756ef2012-04-05 18:34:53517 # Enables use of the session service, which is enabled by default.
518 # Support for disabling depends on the platform.
519 'enable_session_service%': 1,
520
[email protected]6b40bb582012-03-15 20:50:38521 # Enables theme support, which is enabled by default. Support for
522 # disabling depends on the platform.
523 'enable_themes%': 1,
524
[email protected]57e67ac2013-02-22 03:37:22525 # Enables autofill dialog and associated features; disabled by default.
526 'enable_autofill_dialog%' : 0,
527
[email protected]d3340bf512014-05-22 22:27:58528 # Defaults Wallet integration in Autofill dialog to use production
529 # servers. Unofficial builds won't have the proper API keys.
530 'enable_prod_wallet_service%': 0,
531
[email protected]0acdd772012-04-05 22:53:00532 # Enables support for background apps.
533 'enable_background%': 1,
534
[email protected]44879ed2012-04-06 01:11:02535 # Enable the task manager by default.
536 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45537
[email protected]1a43cc572014-03-07 22:36:32538 # Enables used resource whitelist generation; disabled by default.
539 'enable_resource_whitelist_generation%': 0,
540
[email protected]02494ec2014-05-07 15:05:29541 # Enable FILE support by default.
542 'disable_file_support%': 0,
543
[email protected]9bfe0ab2012-08-30 13:18:11544 # Enable FTP support by default.
545 'disable_ftp_support%': 0,
546
[email protected]847aaab82014-05-07 14:05:46547 # Use native android functions in place of ICU. Not supported by most
548 # components.
549 'use_icu_alternatives_on_android%': 0,
550
[email protected]9061bee82012-01-16 11:45:17551 # Use of precompiled headers on Windows.
552 #
[email protected]9061bee82012-01-16 11:45:17553 # This variable may be explicitly set to 1 (enabled) or 0
554 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
555 # This setting will override the default.
556 #
[email protected]c3340fb32012-12-20 20:45:39557 # See
[email protected]9061bee82012-01-16 11:45:17558 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
559 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16560 'chromium_win_pch%': 0,
561
[email protected]acad4962014-08-04 19:05:02562 # Clang stuff.
563 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]3bb37e62012-04-19 03:40:08564 # Set this to true when building with Clang.
565 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]acad4962014-08-04 19:05:02566 # If this is set, clang is used as both host and target compiler in
567 # cross-compile builds.
[email protected]3bb37e62012-04-19 03:40:08568 'clang%': 0,
569
Nico Weberd4daea02014-11-25 01:55:21570 # Use experimental lld linker instead of the platform's default linker.
571 'use_lld%': 0,
572
[email protected]18e0f39b2012-01-17 16:47:34573 # Enable plug-in installation by default.
574 'enable_plugin_installation%': 1,
575
[email protected]62424a52012-03-18 03:09:50576 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42577 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35578 # Chrome UI.
579 # TODO(asvitkine): Enable this on all platforms and delete this flag.
580 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50581 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35582
[email protected]a9318c72012-03-01 01:29:47583 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
584 # with one of those tools.
585 'build_for_tool%': '',
586
[email protected]37138132013-01-17 23:08:52587 # If no directory is specified then a temporary directory will be used.
588 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47589 # True if isolate should fail if the isolate files refer to files
590 # that are missing.
jam6d2b3cd02014-09-18 19:08:48591 'test_isolation_fail_on_missing': 1,
[email protected]01971642012-03-07 14:39:56592
[email protected]49ae3e52012-04-12 09:50:12593 'wix_path%': '<(DEPTH)/third_party/wix',
594
[email protected]0850e842013-01-19 03:44:31595 # Managed users are enabled by default.
596 'enable_managed_users%': 1,
597
[email protected]1591c44d2013-07-15 13:28:43598 # Platform natively supports discardable memory.
599 'native_discardable_memory%': 0,
600
601 # Platform sends memory pressure signals natively.
602 'native_memory_pressure_signals%': 0,
603
[email protected]199def22013-02-21 17:52:29604 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25605 'spdy_proxy_auth_value%' : '',
[email protected]5e131c9f2013-07-10 19:21:05606 'enable_mdns%' : 0,
[email protected]2188c8d2014-03-21 00:58:56607 'enable_service_discovery%': 0,
[email protected]4b202ae2014-05-23 07:45:36608 'enable_wifi_bootstrapping%': 0,
[email protected]754a2002014-02-14 16:40:34609 'enable_hangout_services_extension%': 0,
[email protected]199def22013-02-21 17:52:29610
[email protected]877090c2014-03-19 15:25:54611 # Enable the Syzygy optimization step.
612 'syzygy_optimize%': 0,
613
[email protected]145eacd2014-05-09 23:18:16614 # Enable hole punching for the protected video.
615 'video_hole%': 0,
616
japhet46789a82014-09-10 03:06:46617 # Temporary hack to allow us to unify blink's definitions of load
618 # completion. blink uses a crazy set of constraints to determine load
619 # completion, but only actually requires them for layout tests. However,
620 # we need to maintain all the old behaviors while the plumbing is put in
621 # place on both sides of the repo boundary.
622 'enable_load_completion_hacks%': 1,
623
[email protected]3bdb0992014-05-16 21:30:51624 # Automatically select platforms under ozone. Turn this off to
625 # build only explicitly selected platforms.
626 'ozone_auto_platforms%': 1,
627
torneed51a582014-08-28 18:28:17628 # If this is set clang is used as host compiler, but not as target
629 # compiler. Always do this by default.
630 'host_clang%': 1,
631
fdegansd7a59f92014-10-23 11:49:54632 # Variables to control Link-Time Optimizations (LTO).
633 # Note: the variables must *not* be enabled at the same time.
634 # In this case LTO would 'merge' the optimization flags
635 # at link-time which would lead to all code be optimized with -O2.
636 # Enable LTO on the code compiled with -Os.
637 # See crbug.com/407544
638 'use_lto%': 0,
639 # Enable LTO on code compiled with -O2.
640 'use_lto_o2%': 0,
641
[email protected]bb6aba32011-01-07 19:04:43642 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34643 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37644 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34645 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37646 }, {
647 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34648 }],
649
[email protected]df9167b2011-11-14 19:15:25650 # A flag for BSD platforms
651 ['OS=="freebsd" or OS=="openbsd"', {
652 'os_bsd%': 1,
653 }, {
654 'os_bsd%': 0,
655 }],
656
[email protected]c329adf82011-10-05 14:34:57657 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42658 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57659 'use_nss%': 1,
660 }, {
661 'use_nss%': 0,
662 }],
[email protected]e0b85a52011-10-06 03:30:42663
[email protected]e1b2d732014-03-28 16:20:32664 # When OpenSSL is used for SSL and crypto on Unix-like systems, use
665 # OpenSSL's certificate definition.
666 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', {
667 'use_openssl_certs%': 1,
668 }, {
669 'use_openssl_certs%': 0,
670 }],
671
[email protected]49513e02013-11-20 08:36:40672 # libudev usage. This currently only affects the content layer.
[email protected]048ab5f2013-11-22 01:42:47673 ['OS=="linux" and embedded==0', {
[email protected]49513e02013-11-20 08:36:40674 'use_udev%': 1,
675 }, {
676 'use_udev%': 0,
677 }],
678
[email protected]c335f4802013-04-06 04:51:21679 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54680 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34681 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37682 }, {
[email protected]c49ab0c2011-05-18 17:25:37683 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34684 }],
[email protected]9a8175892012-03-20 02:11:58685
[email protected]02968b82013-11-14 02:42:43686 # Flags to use glib.
[email protected]559d8f4f2014-04-23 18:28:51687 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]c335f4802013-04-06 04:51:21688 'use_glib%': 0,
689 }, {
690 'use_glib%': 1,
[email protected]02968b82013-11-14 02:42:43691 }],
692
[email protected]928362a2013-11-19 20:17:16693 # Flags to use pango and cairo.
[email protected]02968b82013-11-14 02:42:43694 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
695 'use_pango%': 0,
[email protected]928362a2013-11-19 20:17:16696 'use_cairo%': 0,
[email protected]02968b82013-11-14 02:42:43697 }, {
[email protected]26bade892013-05-23 21:44:15698 'use_pango%': 1,
[email protected]928362a2013-11-19 20:17:16699 'use_cairo%': 1,
[email protected]c335f4802013-04-06 04:51:21700 }],
701
[email protected]61955d92013-11-13 20:44:52702 # DBus usage.
[email protected]02968b82013-11-14 02:42:43703 ['OS=="linux" and embedded==0', {
[email protected]61955d92013-11-13 20:44:52704 'use_dbus%': 1,
705 }, {
706 'use_dbus%': 0,
707 }],
708
[email protected]efadeacf2011-10-27 19:01:00709 # We always use skia text rendering in Aura on Windows, since GDI
710 # doesn't agree with our BackingStore.
711 # TODO(beng): remove once skia text rendering is on by default.
712 ['use_aura==1 and OS=="win"', {
713 'enable_skia_text%': 1,
714 }],
[email protected]9edeb712011-09-20 21:20:33715
[email protected]63692212010-09-16 00:22:21716 # A flag to enable or disable our compile-time dependency
717 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
718 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49719 # for Linux distributions and for Aura.
[email protected]8370a622014-02-19 08:12:29720 ['OS!="linux" or chromeos==1', {
[email protected]63692212010-09-16 00:22:21721 'use_gnome_keyring%': 0,
722 }, {
723 'use_gnome_keyring%': 1,
724 }],
[email protected]0afe5212010-10-01 18:56:11725
[email protected]ce67da1b62014-04-17 19:20:23726 ['OS=="mac" or OS=="ios"', {
727 # Mac and iOS want Title Case strings
joleksya91e8682014-09-10 13:48:41728 'use_titlecase_in_grd%': 1,
[email protected]bb6aba32011-01-07 19:04:43729 }],
730
[email protected]ff9300872014-01-22 11:09:32731 # Enable loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06732 ['chromeos==1', {
[email protected]77a848262013-02-22 11:17:25733 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50734 }, {
[email protected]77a848262013-02-22 11:17:25735 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51736 }],
[email protected]7de46352011-09-12 15:39:19737
[email protected]c79d1972013-02-06 18:47:29738 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01739 'enable_one_click_signin%': 1,
[email protected]b56a9e02014-06-20 09:57:04740 'enable_pre_sync_backup%': 1,
[email protected]e4b66bf2012-05-29 20:39:51741 }],
742
[email protected]da1c8d692011-09-20 20:35:01743 ['OS=="android"', {
[email protected]55e02302012-08-21 00:50:46744 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40745 'enable_google_now%': 0,
andrewhaydenfe3b6162014-11-11 20:24:46746 'cld_version%': 1,
[email protected]c6ce08072013-07-31 07:48:53747 'enable_spellcheck%': 0,
[email protected]55e02302012-08-21 00:50:46748 'enable_themes%': 0,
[email protected]48de0fc2012-08-02 11:03:58749 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54750 'arm_neon%': 0,
751 'arm_neon_optional%': 1,
[email protected]1591c44d2013-07-15 13:28:43752 'native_discardable_memory%': 1,
753 'native_memory_pressure_signals%': 1,
vitalybuka93eea402014-11-05 23:47:15754 'enable_basic_printing%': 1,
755 'enable_print_preview%': 0,
[email protected]25b8cb32014-01-30 11:04:29756 'enable_task_manager%':0,
[email protected]145eacd2014-05-09 23:18:16757 'video_hole%': 1,
[email protected]b25f0032013-08-19 22:26:25758 }],
[email protected]b25f0032013-08-19 22:26:25759
[email protected]0d841b7d2013-08-20 20:22:22760 # Android OS includes support for proprietary codecs regardless of
[email protected]24641702014-07-03 17:20:15761 # building Chromium or Google Chrome. We also ship Google Chrome and
762 # Chromecast with proprietary codecs.
763 ['OS=="android" or branding=="Chrome" or chromecast==1', {
[email protected]0d841b7d2013-08-20 20:22:22764 'proprietary_codecs%': 1,
[email protected]d80a06192013-08-23 23:33:41765 }, {
766 'proprietary_codecs%': 0,
[email protected]0d841b7d2013-08-20 20:22:22767 }],
768
[email protected]85f29582013-12-16 18:02:04769 ['OS=="mac" or OS=="ios"', {
[email protected]cef6c76f2013-10-30 16:33:30770 'native_discardable_memory%': 1,
771 'native_memory_pressure_signals%': 1,
772 }],
773
[email protected]8f5999e2013-08-10 18:27:05774 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
775 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]d3340bf512014-05-22 22:27:58776 'enable_autofill_dialog%': 1,
777
778 'conditions': [
779 ['buildtype=="Official"', {
780 'enable_prod_wallet_service%': 1,
781 }],
782 ]
[email protected]57e67ac2013-02-22 03:37:22783 }],
784
[email protected]f96d63b2014-04-01 19:22:44785 ['OS=="android"', {
[email protected]118347052013-01-12 08:35:43786 'enable_webrtc%': 1,
787 }],
788
[email protected]0d16f292012-07-02 22:10:48789 ['OS=="ios"', {
[email protected]9bfe0ab2012-08-30 13:18:11790 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24791 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40792 'enable_google_now%': 0,
droger83d79402014-11-18 21:15:48793 'cld_version%': 2,
794 'cld2_table_size%': 0,
vitalybuka93eea402014-11-05 23:47:15795 'enable_basic_printing%': 0,
796 'enable_print_preview%': 0,
[email protected]3c6aa862012-11-05 17:11:44797 'enable_session_service%': 0,
oshima66a9f962014-11-07 20:01:16798 'enable_spellcheck%': 0,
[email protected]c4ac4d12012-09-12 12:02:24799 'enable_themes%': 0,
800 'enable_webrtc%': 0,
801 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48802 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44803 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31804 'enable_managed_users%': 0,
[email protected]25b8cb32014-01-30 11:04:29805 'enable_task_manager%': 0,
sdefresne7da3d882014-09-19 15:59:23806 'use_system_libcxx%': 1,
the_jkffdda022014-10-03 11:36:19807 'support_pre_M6_history_database%': 0,
[email protected]0d16f292012-07-02 22:10:48808 }],
809
[email protected]839d5172011-10-13 17:18:11810 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27811 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01812 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33813 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11814 }, {
[email protected]1ee7c56c2011-10-19 14:51:33815 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11816 }],
[email protected]9061bee82012-01-16 11:45:17817
[email protected]c3340fb32012-12-20 20:45:39818 # Turn precompiled headers on by default.
819 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17820 'chromium_win_pch%': 1
821 }],
[email protected]18e0f39b2012-01-17 16:47:34822
[email protected]321dd1b2014-06-02 21:51:04823 ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', {
[email protected]18e0f39b2012-01-17 16:47:34824 'enable_plugin_installation%': 0,
825 }, {
826 'enable_plugin_installation%': 1,
827 }],
[email protected]b07806c12012-02-03 22:44:59828
[email protected]50d3c4a42014-04-22 08:29:14829 # Whether PPAPI is enabled.
[email protected]693f63c2014-01-17 06:52:19830 ['OS=="android" or OS=="ios" or embedded==1', {
[email protected]6d17f6392012-12-05 05:24:54831 'enable_plugins%': 0,
832 }, {
833 'enable_plugins%': 1,
834 }],
835
[email protected]f0a58322014-04-16 09:50:23836 # linux_use_bundled_gold: whether to use the gold linker binary checked
837 # into third_party/binutils. Force this off via GYP_DEFINES when you
838 # are using a custom toolchain and need to control -B in ldflags.
noms277720162014-08-26 15:21:08839 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
840 # for component=static_library builds.
841 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]f0a58322014-04-16 09:50:23842 'linux_use_bundled_gold%': 1,
[email protected]be239492012-02-09 19:00:17843 }, {
[email protected]f0a58322014-04-16 09:50:23844 'linux_use_bundled_gold%': 0,
845 }],
846
847 # linux_use_bundled_binutils: whether to use the binary binutils
848 # checked into third_party/binutils. These are not multi-arch so cannot
849 # be used except on x86 and x86-64 (the only two architectures which
noms277720162014-08-26 15:21:08850 # are currently checke in). Force this off via GYP_DEFINES when you
[email protected]f0a58322014-04-16 09:50:23851 # are using a custom toolchain and need to control -B in cflags.
852 ['OS=="linux" and (target_arch=="x64")', {
853 'linux_use_bundled_binutils%': 1,
854 }, {
855 'linux_use_bundled_binutils%': 0,
[email protected]d1d90a42013-03-26 12:01:34856 }],
857
858 # linux_use_gold_flags: whether to use build flags that rely on gold.
[email protected]fd6d17c2014-04-29 22:01:49859 # On by default for x64 Linux.
860 ['OS=="linux" and target_arch=="x64"', {
[email protected]d1d90a42013-03-26 12:01:34861 'linux_use_gold_flags%': 1,
862 }, {
[email protected]8d726a42012-02-09 03:49:00863 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59864 }],
[email protected]2e22e2f2012-03-15 21:53:10865
[email protected]9dbbabd2014-04-30 23:42:32866 # linux_use_debug_fission: whether to use split DWARF debug info
867 # files. This can reduce link time significantly, but is incompatible
868 # with some utilities such as icecc and ccache. Requires gold and
869 # gcc >= 4.8 or clang.
870 # http://gcc.gnu.org/wiki/DebugFission
871 ['OS=="linux" and target_arch=="x64"', {
872 'linux_use_debug_fission%': 1,
873 }, {
874 'linux_use_debug_fission%': 0,
875 }],
876
[email protected]a95d5302012-11-03 00:02:19877 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32878 'enable_captive_portal_detection%': 0,
879 }, {
880 'enable_captive_portal_detection%': 1,
881 }],
882
[email protected]3bd47e022012-03-22 04:19:12883 # Enable Skia UI text drawing incrementally on different platforms.
884 # http://crbug.com/105550
885 #
886 # On Aura, this allows per-tile painting to be used in the browser
887 # compositor.
[email protected]04b67b62013-09-14 01:32:17888 ['OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12889 'use_canvas_skia%': 1,
890 }],
[email protected]adb44342012-07-23 13:36:12891
[email protected]0753ea42012-08-30 20:15:44892 ['chromeos==1', {
vitalybukae6f4a712014-11-06 04:02:29893 'enable_basic_printing%': 0,
894 'enable_print_preview%': 1,
[email protected]0753ea42012-08-30 20:15:44895 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
896 'use_libjpeg_turbo%': 0,
897 }],
898
[email protected]5be161f2013-06-18 11:09:33899 # Do not enable the Settings App on ChromeOS.
900 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12901 'enable_settings_app%': 1,
902 }, {
903 'enable_settings_app%': 0,
904 }],
[email protected]94cdbf42012-12-11 19:49:22905
906 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
907 # Set some defaults for arm/linux chrome builds
[email protected]2fa89ef2014-05-07 18:45:59908 'use_allocator%': 'none',
[email protected]84b00d12f2012-12-14 01:53:43909 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22910 # incorrect results when passed to pkg-config
sbc41d0e082014-10-22 20:39:29911 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22912 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46913
[email protected]42972b62013-08-28 05:46:42914 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
[email protected]e2aaaac2013-05-08 07:20:09915 'conditions': [
916 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43917 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09918 }],
919 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43920 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09921 }],
922 ],
[email protected]42972b62013-08-28 05:46:42923 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e2aaaac2013-05-08 07:20:09924
[email protected]59e85f472013-06-28 18:20:44925 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07926 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28927 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46928 }],
[email protected]5b38a522013-03-20 17:00:47929
930 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01931 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47932 # e.g. base_unittests_run runs the target base_unittests. The test
[email protected]10d8ac32013-10-31 13:34:31933 # target always calls tools/swarming_client/isolate.py. See the script's
maruel82147542014-10-01 13:21:42934 # --help for more information. Meant to be overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01935 # TODO(maruel): Remove the conditions as more configurations are
936 # supported.
[email protected]e51e35652013-12-19 02:39:08937 ['OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47938 'test_isolation_mode%': 'check',
939 }, {
940 'test_isolation_mode%': 'noop',
941 }],
[email protected]9d5cb982014-06-24 23:37:20942 # Whether Android build uses OpenMAX DL FFT.
943 ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32" or target_arch=="x64" or target_arch=="arm64" or target_arch=="mipsel")', {
944 # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel.
[email protected]353fa4a2014-05-02 17:36:22945 # When enabled, this will also enable WebAudio support on
[email protected]9d5cb982014-06-24 23:37:20946 # Android for these architectures. Default is enabled. Whether
[email protected]353fa4a2014-05-02 17:36:22947 # WebAudio is actually available depends on runtime settings
948 # and flags.
[email protected]330f3a32013-04-23 05:47:58949 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53950 }, {
951 'use_openmax_dl_fft%': 0,
952 }],
[email protected]5e131c9f2013-07-10 19:21:05953 ['OS=="win" or OS=="linux"', {
954 'enable_mdns%' : 1,
[email protected]2abbc1a2013-08-07 22:09:06955 }],
956
957 # Turns on compiler optimizations in V8 in Debug build, except
958 # on android_clang, where we're hitting a weird linker error.
959 # TODO(dpranke): http://crbug.com/266155 .
960 ['OS=="android"', {
[email protected]6268e01b42013-10-19 22:44:19961 'v8_optimized_debug%': 1,
[email protected]2abbc1a2013-08-07 22:09:06962 }, {
[email protected]6268e01b42013-10-19 22:44:19963 'v8_optimized_debug%': 2,
[email protected]2abbc1a2013-08-07 22:09:06964 }],
[email protected]02968b82013-11-14 02:42:43965
966 # Disable various features by default on embedded.
967 ['embedded==1', {
968 'remoting%': 0,
vitalybuka93eea402014-11-05 23:47:15969 'enable_basic_printing%': 0,
970 'enable_print_preview%': 0,
[email protected]02968b82013-11-14 02:42:43971 }],
[email protected]b390dd7d2014-03-20 14:49:41972
[email protected]7ef66c62014-03-20 18:20:00973 # By default, use ICU data file (icudtl.dat) on all platforms
[email protected]24641702014-07-03 17:20:15974 # except when building Android WebView or Chromecast.
[email protected]7ef66c62014-03-20 18:20:00975 # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium).
[email protected]7cd31432014-05-10 12:16:52976 # Set the data reduction proxy origin for Android Webview.
[email protected]967767d2014-07-16 05:46:24977 ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0', {
[email protected]7ef66c62014-03-20 18:20:00978 'icu_use_data_file_flag%' : 1,
979 }, {
980 'icu_use_data_file_flag%' : 0,
981 }],
[email protected]4b202ae2014-05-23 07:45:36982 ['OS=="win" or OS=="mac"', {
983 'enable_wifi_bootstrapping%' : 1,
984 }],
[email protected]91464ea2014-07-18 05:32:11985
986 # Path to sas.dll, which provides the SendSAS function.
987 # http://msdn.microsoft.com/en-us/library/windows/desktop/dd979761(v=vs.85).aspx
988 ['target_arch=="x64"', {
989 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/amd64',
990 }, {
991 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
992 }],
mlamouri23668752014-08-28 20:56:45993
994 # Turn on JNI generation optimizations on non-WebView builds.
995 ['OS=="android" and android_webview_build==0', {
996 'optimize_jni_generation%': 1,
997 }, {
998 'optimize_jni_generation%': 0,
999 }],
baixo3a3c88a2014-10-28 11:52:211000
1001 # TODO(baixo): Enable v8_use_external_startup_data
1002 # http://crbug.com/421063
baixo6f00b0f42014-11-28 19:19:291003 ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0 and chromeos==0 and (OS=="android" or OS=="linux" or OS=="mac")', {
baixoad3eeae2014-11-19 12:56:401004 'v8_use_external_startup_data': 1,
baixo3a3c88a2014-10-28 11:52:211005 }, {
1006 'v8_use_external_startup_data': 0,
1007 }],
[email protected]b3f23ba2010-04-26 22:58:171008 ],
[email protected]2b113652012-09-17 17:01:391009
[email protected]a3a720f2013-04-25 19:35:421010 # Set this to 1 to enable use of concatenated impulse responses
1011 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:261012 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:421013
[email protected]f2817cf2013-05-16 11:39:541014 # You can set the variable 'use_official_google_api_keys' to 1
1015 # to use the Google-internal file containing official API keys
1016 # for Google Chrome even in a developer build. Setting this
1017 # variable explicitly to 1 will cause your build to fail if the
1018 # internal file is missing.
[email protected]2b113652012-09-17 17:01:391019 #
[email protected]f2817cf2013-05-16 11:39:541020 # The variable is documented here, but not handled in this file;
1021 # see //google_apis/determine_use_official_keys.gypi for the
1022 # implementation.
[email protected]2b113652012-09-17 17:01:391023 #
[email protected]f2817cf2013-05-16 11:39:541024 # Set the variable to 0 to not use the internal file, even when
1025 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:391026 #
[email protected]f2817cf2013-05-16 11:39:541027 # Leave it unset in your include.gypi to have the variable
1028 # implicitly set to 1 if you have
1029 # src/google_apis/internal/google_chrome_api_keys.h in your
1030 # checkout, and implicitly set to 0 if not.
1031 #
1032 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:391033 # was explicitly set to 1, i.e. they always use official keys,
1034 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:541035 #
1036 # NOTE: You MUST NOT explicitly set the variable to 2 in your
1037 # include.gypi or by other means. Due to subtleties of GYP, this
1038 # is not the same as leaving the variable unset, even though its
1039 # default value in
1040 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:391041
1042 # Set these to bake the specified API keys and OAuth client
1043 # IDs/secrets into your build.
1044 #
1045 # If you create a build without values baked in, you can instead
1046 # set environment variables to provide the keys at runtime (see
1047 # src/google_apis/google_api_keys.h for details). Features that
1048 # require server-side APIs may fail to work if no keys are
1049 # provided.
1050 #
1051 # Note that if you are building an official build or if
1052 # use_official_google_api_keys has been set to 1 (explicitly or
1053 # implicitly), these values will be ignored and the official
1054 # keys will be used instead.
1055 'google_api_key%': '',
1056 'google_default_client_id%': '',
1057 'google_default_client_secret%': '',
[email protected]d33d2222014-06-04 15:39:581058 # Native Client is enabled by default.
1059 'disable_nacl%': '0',
the_jkffdda022014-10-03 11:36:191060
1061 # Set to 1 to support old history files
1062 'support_pre_M6_history_database%': '1',
[email protected]e14a9f92009-08-05 19:26:071063 },
1064
[email protected]e72e55b2011-01-06 22:19:301065 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:071066 'branding%': '<(branding)',
1067 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:271068 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:351069 'target_subarch%': '<(target_subarch)',
petarjc8a5da742014-08-27 14:33:361070 'mips_arch_variant%': '<(mips_arch_variant)',
[email protected]cf185b32010-01-12 04:29:591071 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:441072 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:331073 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:581074 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:161075 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:311076 'use_cras%': '<(use_cras)',
bedupont65ce5acc2014-11-04 16:30:411077 'use_libpci%': '<(use_libpci)',
[email protected]e0b85a52011-10-06 03:30:421078 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:321079 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]c329adf82011-10-05 14:34:571080 'use_nss%': '<(use_nss)',
[email protected]49513e02013-11-20 08:36:401081 'use_udev%': '<(use_udev)',
[email protected]df9167b2011-11-14 19:15:251082 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:341083 'os_posix%': '<(os_posix)',
[email protected]61955d92013-11-13 20:44:521084 'use_dbus%': '<(use_dbus)',
[email protected]258dca42011-09-21 00:17:191085 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:151086 'use_pango%': '<(use_pango)',
[email protected]928362a2013-11-19 20:17:161087 'use_cairo%': '<(use_cairo)',
[email protected]ff78e4e2013-05-03 19:19:151088 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:481089 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:501090 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]d628ab412013-09-07 03:26:371091 'desktop_linux%': '<(desktop_linux)',
[email protected]79e2336c2011-05-12 18:18:341092 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:211093 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:111094 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:441095 'chromeos%': '<(chromeos)',
[email protected]24641702014-07-03 17:20:151096 'chromecast%': '<(chromecast)',
[email protected]7ddea9802012-02-22 23:08:051097 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:241098 'enable_hidpi%': '<(enable_hidpi)',
[email protected]77a848262013-02-22 11:17:251099 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:541100 'fastbuild%': '<(fastbuild)',
[email protected]19677402014-06-18 13:10:041101 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)',
[email protected]c73363762014-04-16 21:11:461102 'win_z7%': '<(win_z7)',
[email protected]20960e072011-09-20 20:59:011103 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a1e87422013-07-09 21:47:011104 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]7d6763422013-04-26 12:06:541105 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:431106 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:541107 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:231108 'sysroot%': '<(sysroot)',
[email protected]a23d7142014-02-14 16:58:451109 'chroot_cmd%': '<(chroot_cmd)',
[email protected]945361a2011-09-30 04:38:431110 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:521111 'component%': '<(component)',
brucedawson4b6961d2014-10-28 22:18:041112 'win_analyze%': '<(win_analyze)',
[email protected]1a43cc572014-03-07 22:36:321113 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)',
joleksya91e8682014-09-10 13:48:411114 'use_titlecase_in_grd%': '<(use_titlecase_in_grd)',
[email protected]9e94cca2011-02-04 17:38:171115 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:181116 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:401117 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]b56a9e02014-06-20 09:57:041118 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)',
[email protected]dda90ae2011-07-19 22:07:481119 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:161120 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:251121 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:561122 'safe_browsing%': '<(safe_browsing)',
[email protected]418653fdf2014-07-02 07:38:211123 'enable_web_speech%': '<(enable_web_speech)',
[email protected]7cce3232011-10-28 10:41:571124 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:461125 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:371126 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:061127 'asan%': '<(asan)',
earthdok78507b92014-10-23 14:00:131128 'asan_blacklist%': '<(asan_blacklist)',
[email protected]20a127f2014-01-16 03:25:031129 'asan_coverage%': '<(asan_coverage)',
earthdok78507b92014-10-23 14:00:131130 'asan_field_padding%': '<(asan_field_padding)',
[email protected]1b9654122014-04-28 12:11:151131 'use_sanitizer_options%': '<(use_sanitizer_options)',
[email protected]1612e552014-02-15 04:49:181132 'syzyasan%': '<(syzyasan)',
[email protected]877090c2014-03-19 15:25:541133 'syzygy_optimize%': '<(syzygy_optimize)',
[email protected]062522a2013-06-13 15:49:551134 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:591135 'msan%': '<(msan)',
[email protected]190d4ce62014-01-17 20:24:531136 'msan_blacklist%': '<(msan_blacklist)',
[email protected]a030ab62014-06-23 17:14:151137 'msan_track_origins%': '<(msan_track_origins)',
[email protected]c9a829272012-07-04 07:51:121138 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:161139 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7fd639a2014-05-30 23:59:011140 'ubsan%': '<(ubsan)',
[email protected]0dbe7af92014-06-26 23:31:401141 'ubsan_vptr%': '<(ubsan_vptr)',
1142 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)',
[email protected]c8103a42013-11-12 13:41:301143 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
[email protected]22b3f531e2013-12-20 13:07:281144 'use_custom_libcxx%': '<(use_custom_libcxx)',
[email protected]480c6672014-08-04 11:28:061145 'use_system_libcxx%': '<(use_system_libcxx)',
[email protected]7ce58b22012-09-26 05:17:251146 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:441147 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:461148 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:341149 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:341150 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:541151 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:531152 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:381153 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:221154 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]d3340bf512014-05-22 22:27:581155 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)',
[email protected]0acdd772012-04-05 22:53:001156 'enable_background%': '<(enable_background)',
[email protected]f0a58322014-04-16 09:50:231157 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)',
1158 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)',
[email protected]8d726a42012-02-09 03:49:001159 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9dbbabd2014-04-30 23:42:321160 'linux_use_debug_fission%': '<(linux_use_debug_fission)',
[email protected]62424a52012-03-18 03:09:501161 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:331162 'test_isolation_mode%': '<(test_isolation_mode)',
1163 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:471164 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
vitalybuka93eea402014-11-05 23:47:151165 'enable_basic_printing%': '<(enable_basic_printing)',
1166 'enable_print_preview%': '<(enable_print_preview)',
[email protected]c6ce08072013-07-31 07:48:531167 'enable_spellcheck%': '<(enable_spellcheck)',
[email protected]6ee43a72012-12-07 22:44:401168 'enable_google_now%': '<(enable_google_now)',
[email protected]3b5e88d2013-09-06 11:03:061169 'cld_version%': '<(cld_version)',
[email protected]61753f22014-03-19 12:10:591170 'cld2_table_size%': '<(cld2_table_size)',
[email protected]e6026962012-06-14 21:28:321171 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]02494ec2014-05-07 15:05:291172 'disable_file_support%': '<(disable_file_support)',
[email protected]9bfe0ab2012-08-30 13:18:111173 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]847aaab82014-05-07 14:05:461174 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)',
[email protected]44879ed2012-04-06 01:11:021175 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:061176 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:121177 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:441178 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:121179 'use_system_libjpeg%': '<(use_system_libjpeg)',
newtd5366cb2014-10-21 03:27:161180 'android_channel%': '<(android_channel)',
[email protected]d999c3cb2013-03-12 10:22:361181 'android_webview_build%': '<(android_webview_build)',
[email protected]967767d2014-07-16 05:46:241182 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)',
[email protected]7ef66c62014-03-20 18:20:001183 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)',
[email protected]5660f192013-04-02 16:55:461184 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:071185 'create_standalone_apk%': 1,
[email protected]dc4e8b82012-11-15 03:58:161186 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:071187 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:161188 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:391189 'google_api_key%': '<(google_api_key)',
1190 'google_default_client_id%': '<(google_default_client_id)',
1191 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:311192 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:431193 'native_discardable_memory%': '<(native_discardable_memory)',
1194 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]199def22013-02-21 17:52:291195 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:251196 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]5e131c9f2013-07-10 19:21:051197 'enable_mdns%' : '<(enable_mdns)',
[email protected]2188c8d2014-03-21 00:58:561198 'enable_service_discovery%' : '<(enable_service_discovery)',
[email protected]4b202ae2014-05-23 07:45:361199 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)',
[email protected]754a2002014-02-14 16:40:341200 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)',
[email protected]6268e01b42013-10-19 22:44:191201 'v8_optimized_debug%': '<(v8_optimized_debug)',
[email protected]d80a06192013-08-23 23:33:411202 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]e71a3622013-12-04 07:32:411203 'use_goma%': '<(use_goma)',
1204 'gomadir%': '<(gomadir)',
fdegansd7a59f92014-10-23 11:49:541205 'use_lto%': '<(use_lto)',
1206 'use_lto_o2%': '<(use_lto_o2)',
[email protected]145eacd2014-05-09 23:18:161207 'video_hole%': '<(video_hole)',
japhet46789a82014-09-10 03:06:461208 'enable_load_completion_hacks%': '<(enable_load_completion_hacks)',
the_jkffdda022014-10-03 11:36:191209 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)',
baixo3a3c88a2014-10-28 11:52:211210 'v8_use_external_startup_data': '<(v8_use_external_startup_data)',
[email protected]01971642012-03-07 14:39:561211
Sadrul Habib Chowdhuryec96ebf2014-09-05 19:13:341212 # Whether or not we are building the Athena shell.
1213 'use_athena%': '0',
1214
[email protected]2f325672012-10-31 23:29:371215 # Use system protobuf instead of bundled one.
1216 'use_system_protobuf%': 0,
1217
[email protected]371e1092011-10-12 20:37:361218 # Use system yasm instead of bundled one.
1219 'use_system_yasm%': 0,
1220
[email protected]ea02e962013-04-26 11:18:161221 # Use system ICU instead of bundled one.
1222 'use_system_icu%' : 0,
1223
[email protected]cd00bd862012-02-29 00:40:361224 # Default to enabled PIE; this is important for ASLR but we may need to be
1225 # able to turn it off for various reasons.
1226 'linux_disable_pie%': 0,
1227
[email protected]caa95c82009-11-23 22:39:321228 # The release channel that this build targets. This is used to restrict
1229 # channel-specific build options, like which installer packages to create.
1230 # The default is 'all', which does no channel-specific filtering.
1231 'channel%': 'all',
1232
[email protected]b3fb8092009-03-12 19:09:241233 # Override chromium_mac_pch and set it to 0 to suppress the use of
1234 # precompiled headers on the Mac. Prefix header injection may still be
1235 # used, but prefix headers will not be precompiled. This is useful when
1236 # using distcc to distribute a build to compile slaves that don't
1237 # share the same compiler executable as the system driving the compilation,
1238 # because precompiled headers rely on pointers into a specific compiler
1239 # executable's image. Setting this to 0 is needed to use an experimental
1240 # Linux-Mac cross compiler distcc farm.
1241 'chromium_mac_pch%': 1,
1242
[email protected]27b687ec42012-03-26 22:22:151243 # The default value for mac_strip in target_defaults. This cannot be
1244 # set there, per the comment about variable% in a target_defaults.
[email protected]70d0f782013-11-14 06:22:291245 'mac_strip_release%': 0,
[email protected]27b687ec42012-03-26 22:22:151246
[email protected]c0a12772013-08-22 00:08:311247 # Set to 1 to enable java code coverage. Instruments classes during build
1248 # to produce .ec files during runtime.
1249 'emma_coverage%': 0,
1250
[email protected]9662d922013-10-04 22:02:441251 # EMMA filter string consisting of a list of inclusion/exclusion patterns
1252 # separated with whitespace and/or comma. Only has effect if
1253 # 'emma_coverage=1'.
1254 'emma_filter%': '',
1255
[email protected]22860352013-12-11 03:02:101256 # Set to 1 to enable running Android lint on java/class files.
[email protected]2faf2bf2014-08-06 19:12:241257 'android_lint%': 1,
[email protected]22860352013-12-11 03:02:101258
[email protected]7477ea6f2009-12-22 23:28:151259 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:471260 # environment variable, the libcmt shim it uses sometimes gets in
1261 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
1262 # 'win_use_allocator_shim': 0,
1263 # 'win_release_RuntimeLibrary': 2
1264 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
cpu962a1412014-11-25 02:25:171265 'win_use_allocator_shim%': 0, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:111266
[email protected]e5b2eaa2009-04-14 01:39:121267 # TODO(bradnelson): eliminate this when possible.
1268 # To allow local gyp files to prevent release.vsprops from being included.
1269 # Yes(1) means include release.vsprops.
1270 # Once all vsprops settings are migrated into gyp, this can go away.
1271 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:231272
[email protected]cbd5fd52009-08-26 00:14:271273 # TODO(bradnelson): eliminate this when possible.
1274 # To allow local gyp files to override additional linker options for msvs.
1275 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:191276 'msvs_use_common_linker_extras%': 1,
1277
[email protected]1ffb6502009-06-02 07:46:241278 # TODO(sgk): eliminate this if possible.
1279 # It would be nicer to support this via a setting in 'target_defaults'
1280 # in chrome/app/locales/locales.gypi overriding the setting in the
1281 # 'Debug' configuration in the 'target_defaults' dict below,
1282 # but that doesn't work as we'd like.
1283 'msvs_debug_link_incremental%': '2',
1284
[email protected]1f790ef2011-01-11 20:45:361285 # Needed for some of the largest modules.
1286 'msvs_debug_link_nonincremental%': '1',
1287
[email protected]6f390be2012-08-16 18:57:101288 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:061289 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:261290 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:061291
[email protected]1ff64292013-07-18 20:37:151292 # Experimental setting to break chrome.dll into multiple pieces based on
1293 # process type.
1294 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:021295
[email protected]72589062014-03-14 16:48:301296 # Experimental setting to optimize Chrome's DLLs with PGO.
1297 'chrome_pgo_phase%': '0',
1298
scottmga6675a5f2014-11-15 01:37:471299 # Whether the VS xtree header has been patched to disable warning 4702. If
1300 # it has, then we don't need to disable 4702 (unreachable code warning).
1301 # The patch is preapplied to the internal toolchain and hence all bots.
1302 'msvs_xtree_patched%': '<!pymod_do_main(win_is_xtree_patched)',
1303
[email protected]3bb37e62012-04-19 03:40:081304 # Clang stuff.
1305 'clang%': '<(clang)',
[email protected]acad4962014-08-04 19:05:021306 'host_clang%': '<(host_clang)',
1307 'make_clang_dir%': '<(make_clang_dir)',
Nico Weberd4daea02014-11-25 01:55:211308 'use_lld%': '<(use_lld)',
[email protected]58680ce2010-09-18 00:09:151309
[email protected]d04384ab2014-03-13 20:46:011310 # Control which version of clang to use when building for iOS. If set to
1311 # '1', uses the version of clang that ships with Xcode. If set to '0', uses
1312 # the version of clang that ships with the Chromium source. This variable
1313 # is automatically set to '1' when using the Xcode generator.
[email protected]ce2cad72014-02-13 18:17:351314 'clang_xcode%': 0,
1315
[email protected]5e781232011-01-28 02:57:591316 # These two variables can be set in GYP_DEFINES while running
1317 # |gclient runhooks| to let clang run a plugin in every compilation.
1318 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1319 # Example:
[email protected]93120fe2011-02-03 20:46:421320 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
[email protected]5e781232011-01-28 02:57:591321
1322 'clang_load%': '',
1323 'clang_add_plugin%': '',
1324
[email protected]c9cc9442013-12-28 21:27:441325 # Tell ld64 to write map files describing binary layout. Useful
1326 # for looking at what contributes to binary size, e.g. with
1327 # https://github.com/nico/bloat
1328 'mac_write_linker_maps%': 0,
1329
[email protected]da1c8d692011-09-20 20:35:011330 # The default type of gtest.
1331 'gtest_target_type%': 'executable',
1332
[email protected]7664ab32011-02-01 23:35:251333 # Enable sampling based profiler.
1334 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1335 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:581336 # Profile without optimizing out stack frames when profiling==1.
1337 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:251338
[email protected]36532f332010-08-25 00:22:011339 # And if we want to dump symbols for Breakpad-enabled builds.
[email protected]8ebfecb2013-11-14 05:30:311340 'linux_dump_symbols%': 0,
[email protected]36532f332010-08-25 00:22:011341 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:031342 'linux_strip_binary%': 0,
[email protected]2578ea12014-01-17 06:02:511343 # If we want stack unwind support for backtrace().
1344 'debug_unwind_tables%': 1,
1345 'release_unwind_tables%': 1,
[email protected]05cb6962009-10-01 23:29:031346
[email protected]8d949f1a02014-04-10 14:01:571347 # Override where to find binutils
1348 'binutils_version%': 0,
1349 'binutils_dir%': '',
1350
[email protected]46ce5b562010-06-16 18:39:531351 # Enable TCMalloc.
[email protected]2fa89ef2014-05-07 18:45:591352 # Default of 'use_allocator' is set to 'none' if OS=='android' later.
1353 'use_allocator%': 'tcmalloc',
[email protected]01699e22009-11-11 19:24:241354
[email protected]556c5d72010-06-10 05:45:011355 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1356 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:351357 # Set to 1 to link against gsettings APIs instead of using dlopen().
1358 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:011359
[email protected]a63e8d22013-03-23 16:17:081360 # Enable use of OpenMAX DL FFT routines.
1361 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341362
[email protected]9821d0d2010-04-16 22:40:371363 # Enable new NPDevice API.
1364 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501365
[email protected]e72e55b2011-01-06 22:19:301366 # .gyp files or targets should set chromium_code to 1 if they build
1367 # Chromium-specific code, as opposed to external code. This variable is
1368 # used to control such things as the set of warnings to enable, and
1369 # whether warnings are treated as errors.
1370 'chromium_code%': 0,
1371
[email protected]41300ff2014-04-07 08:17:251372 # Disable fatal linker warnings, similarly to how we make it possible
1373 # to disable -Werror (e.g. for different toolchain versions).
1374 'disable_fatal_linker_warnings%': 0,
1375
[email protected]8d726a42012-02-09 03:49:001376 'release_valgrind_build%': 0,
1377
[email protected]b1eb341c2011-11-09 18:46:071378 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1379 'enable_wexit_time_destructors%': 0,
1380
[email protected]d69acbc2014-02-10 21:14:461381 # Build libpeerconnection as a static library by default.
1382 'libpeer_target_type%': 'static_library',
1383
[email protected]9e1149d72012-07-24 01:27:171384 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1385 'internal_gles2_conform_tests%': 0,
1386
ullysses.a.eoffffbb37e2014-10-01 01:07:591387 # Set to 1 to compile with the Khronos GL-CTS conformance tests.
1388 'internal_khronos_glcts_tests%': 0,
1389
[email protected]5c18edd2013-11-19 22:04:111390 # Set to 1 to compile the filter fuzzer.
1391 'internal_filter_fuzzer%': 0,
1392
[email protected]e72e55b2011-01-06 22:19:301393 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1394 # so Cocoa is happy (http://crbug.com/20441).
1395 'locales': [
1396 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1397 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1398 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411399 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301400 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1401 'vi', 'zh-CN', 'zh-TW',
1402 ],
1403
[email protected]cc0322d2011-07-24 09:29:191404 # Pseudo locales are special locales which are used for testing and
1405 # debugging. They don't get copied to the final app. For more info,
1406 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1407 'pseudo_locales': [
1408 'fake-bidi',
1409 ],
1410
[email protected]bb6aba32011-01-07 19:04:431411 'grit_defines': [],
1412
[email protected]bd3bd442011-03-28 07:58:511413 # If debug_devtools is set to 1, JavaScript files for DevTools are
1414 # stored as is and loaded from disk. Otherwise, a concatenated file
1415 # is stored in resources.pak. It is still possible to load JS files
1416 # from disk by passing --debug-devtools cmdline switch.
1417 'debug_devtools%': 0,
1418
[email protected]464750f2011-10-24 23:16:181419 # The Java Bridge is not compiled in by default.
1420 'java_bridge%': 0,
1421
[email protected]1e013672012-06-29 22:12:201422 # Code signing for iOS binaries. The bots need to be able to disable this.
1423 'chromium_ios_signing%': 1,
1424
[email protected]33e1c372011-12-14 16:32:071425 # This flag is only used when disable_nacl==0 and disables all those
1426 # subcomponents which would require the installation of a native_client
1427 # untrusted toolchain.
1428 'disable_nacl_untrusted%': 0,
1429
[email protected]407dfa632011-12-23 11:59:351430 # Disable Dart by default.
1431 'enable_dart%': 0,
1432
[email protected]d33d2222014-06-04 15:39:581433 # Copy out the setting of disable_nacl.
1434 'disable_nacl%': '<(disable_nacl)',
[email protected]836285f22012-04-03 16:19:261435
[email protected]1e40ba002013-03-07 22:07:331436 # Portable Native Client is enabled by default.
1437 'disable_pnacl%': 0,
1438
[email protected]fa9d4e262012-08-21 04:39:001439 # Whether to build full debug version for Debug configuration on Android.
1440 # Compared to full debug version, the default Debug configuration on Android
1441 # has no full v8 debug, has size optimization and linker gc section, so that
1442 # we can build a debug version with acceptable size and performance.
1443 'android_full_debug%': 0,
1444
[email protected]65885272012-10-05 23:55:501445 # Sets the default version name and code for Android app, by default we
1446 # do a developer build.
1447 'android_app_version_name%': 'Developer Build',
aruslanad6082262014-10-13 18:53:121448 'android_app_version_code%': 1,
[email protected]65885272012-10-05 23:55:501449
[email protected]014d1ff12013-07-02 01:52:331450 # Contains data about the attached devices for gyp_managed_install.
1451 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1452
[email protected]dd0ef2f2014-04-16 21:52:491453 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")',
1454 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")',
[email protected]49ae3e52012-04-12 09:50:121455
[email protected]1f8d9402012-07-06 22:47:561456 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1457 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051458
[email protected]fd6d8822012-12-08 06:56:111459 # Whether we are using the rlz library or not. Platforms like Android send
1460 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221461 'enable_rlz%': 0,
1462
[email protected]3b4038e2013-07-28 08:59:541463 # Turns on the i18n support in V8.
1464 'v8_enable_i18n_support': 1,
1465
[email protected]6a694912014-01-17 14:17:401466 # Compile d8 for the host toolset.
1467 'v8_toolset_for_d8': 'host',
1468
[email protected]2c14260f2013-09-11 11:48:221469 # Use brlapi from brltty for braille display support.
1470 'use_brlapi%': 0,
1471
[email protected]c66b5aa2013-09-12 13:29:411472 # Relative path to icu.gyp from this file.
1473 'icu_gyp_path': '../third_party/icu/icu.gyp',
1474
[email protected]8c64e282013-11-28 16:05:141475 # IPC fuzzer is disabled by default.
1476 'enable_ipc_fuzzer%': 0,
1477
[email protected]1eec679e2013-12-13 22:10:271478 # Force disable libstdc++ debug mode.
1479 'disable_glibcxx_debug%': 0,
1480
[email protected]8063669f2014-04-01 01:50:291481 # Set to 1 to compile with MSE support for MPEG2 TS
1482 'enable_mpeg2ts_stream_parser%': 0,
1483
[email protected]ec13bd72014-04-16 19:04:301484 # Support ChromeOS touchpad gestures with ozone.
1485 'use_evdev_gestures%': 0,
1486
[email protected]3bdb0992014-05-16 21:30:511487 # Default ozone platform (if no --ozone-platform flag).
1488 'ozone_platform%': "",
1489
1490 # Ozone platforms to include in the build.
1491 'ozone_platform_caca%': 0,
1492 'ozone_platform_dri%': 0,
1493 'ozone_platform_egltest%': 0,
[email protected]26ce20d52014-05-29 17:22:501494 'ozone_platform_gbm%': 0,
[email protected]3bdb0992014-05-16 21:30:511495 'ozone_platform_ozonex%': 0,
1496 'ozone_platform_test%': 0,
1497
andresantosof15013412014-11-13 02:14:561498 # Whether the browser is non-native (using Views Toolkit) on Mac.
1499 'mac_views_browser%': 0,
1500
derat77f15bd2014-11-13 00:04:161501 # Experiment: http://crbug.com/426914
1502 'envoy%': 0,
1503
[email protected]912c55c2009-07-31 23:33:551504 'conditions': [
sebmarchand153e1b82014-10-31 20:25:521505 ['buildtype=="Official"', {
1506 # Continue to embed build meta data in Official builds, basically the
1507 # time it was built.
1508 # TODO(maruel): This decision should be revisited because having an
1509 # official deterministic build has high value too but MSVC toolset can't
1510 # generate anything deterministic with WPO enabled AFAIK.
1511 'dont_embed_build_metadata%': 0,
1512 }],
[email protected]877090c2014-03-19 15:25:541513 # Enable the Syzygy optimization step for the official builds.
1514 ['OS=="win" and buildtype=="Official" and syzyasan!=1', {
1515 'syzygy_optimize%': 1,
1516 }, {
1517 'syzygy_optimize%': 0,
1518 }],
[email protected]9c233692014-04-09 20:20:451519 # Get binutils version so we can enable debug fission if we can.
1520 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1521 'conditions': [
1522 # compiler_version doesn't work with clang
1523 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so
1524 # compiler_version works with clang.
1525 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1526 # that it takes effect here.
[email protected]0dbe7af92014-06-26 23:31:401527 ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan==0 and ubsan_vptr==0', {
[email protected]707ad51b2014-04-23 08:20:161528 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)',
[email protected]9c233692014-04-09 20:20:451529 }],
1530 # On Android we know the binutils version in the toolchain.
1531 ['OS=="android"', {
1532 'binutils_version%': 222,
1533 }],
noms277720162014-08-26 15:21:081534 ['host_arch=="x64"', {
1535 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1536 }],
1537 ['host_arch=="ia32"', {
1538 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
1539 }],
[email protected]9c233692014-04-09 20:20:451540 # Our version of binutils in third_party/binutils
[email protected]f0a58322014-04-16 09:50:231541 ['linux_use_bundled_binutils==1', {
[email protected]9c233692014-04-09 20:20:451542 'binutils_version%': 224,
[email protected]9c233692014-04-09 20:20:451543 }],
1544 ],
1545 }, {
1546 'binutils_version%': 0,
1547 }],
[email protected]5f683172013-04-27 01:53:191548 # The version of GCC in use, set later in platforms that use GCC and have
1549 # not explicitly chosen to build with clang. Currently, this means all
1550 # platforms except Windows, Mac and iOS.
1551 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1552 # it takes effect here.
[email protected]0dbe7af92014-06-26 23:31:401553 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan_vptr==0', {
[email protected]ffa01d22014-01-14 00:14:491554 'conditions': [
fdegans6b767132014-09-09 10:09:291555 ['OS=="android" and android_webview_build==0', {
1556 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)',
1557 # We directly set the gcc version since we know what we use.
1558 'gcc_version%': 49,
[email protected]ffa01d22014-01-14 00:14:491559 }],
fdegans6b767132014-09-09 10:09:291560 ['OS=="android" and android_webview_build==1', {
torneed51a582014-08-28 18:28:171561 # Android WebView uses a hermetic clang toolchain for host builds.
1562 'host_gcc_version%': 0,
fdegans6b767132014-09-09 10:09:291563 # Android WebView uses the GCC toolchain from the Android build.
1564 'gcc_version%': 48,
1565 }],
1566 ['OS!="android"', {
[email protected]313fcf632014-05-27 13:58:591567 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)',
fdegans6b767132014-09-09 10:09:291568 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)',
[email protected]313fcf632014-05-27 13:58:591569 }],
[email protected]ffa01d22014-01-14 00:14:491570 ],
[email protected]5f683172013-04-27 01:53:191571 }, {
[email protected]707ad51b2014-04-23 08:20:161572 'host_gcc_version%': 0,
[email protected]5f683172013-04-27 01:53:191573 'gcc_version%': 0,
1574 }],
[email protected]dd0ef2f2014-04-16 21:52:491575 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', {
[email protected]1f8d9402012-07-06 22:47:561576 'windows_sdk_path%': '<(windows_sdk_default_path)',
1577 }, {
scottmga6675a5f2014-11-15 01:37:471578 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.1',
[email protected]1f8d9402012-07-06 22:47:561579 }],
[email protected]dd0ef2f2014-04-16 21:52:491580 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', {
[email protected]1f8d9402012-07-06 22:47:561581 'directx_sdk_path%': '<(directx_sdk_default_path)',
1582 }, {
1583 'directx_sdk_path%': '$(DXSDK_DIR)',
1584 }],
[email protected]54184ce72012-10-18 07:11:261585 ['OS=="win"', {
1586 'windows_driver_kit_path%': '$(WDK_DIR)',
1587 }],
[email protected]1e013672012-06-29 22:12:201588 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]cbd5fd52009-08-26 00:14:271589 'conditions': [
petarjc8a5da742014-08-27 14:33:361590 ['target_arch=="mipsel" or target_arch=="mips64el"', {
[email protected]eb5f1672013-01-31 07:56:461591 'werror%': '',
1592 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461593 'nacl_untrusted_build%': 0,
[email protected]2fa89ef2014-05-07 18:45:591594 'use_allocator%': 'none',
[email protected]59e85f472013-06-28 18:20:441595 }],
1596 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461597 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281598 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461599 }],
[email protected]4c9cc6c2009-10-01 18:54:571600 # All Chrome builds have breakpad symbols, but only process the
1601 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081602 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571603 'linux_dump_symbols%': 1,
[email protected]2578ea12014-01-17 06:02:511604
1605 # Omit unwind support in official release builds to save space. We
1606 # can use breakpad for these builds.
1607 'release_unwind_tables%': 0,
noms277720162014-08-26 15:21:081608
1609 'conditions': [
1610 # For official builds, use a 64-bit linker to avoid running out
1611 # of address space. The buildbots should have a 64-bit kernel
1612 # and a 64-bit libc installed.
1613 ['host_arch=="ia32" and target_arch=="ia32"', {
1614 'linux_use_bundled_gold%': '1',
1615 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1616 }],
1617 ],
[email protected]4c9cc6c2009-10-01 18:54:571618 }],
[email protected]cbd5fd52009-08-26 00:14:271619 ],
[email protected]1e013672012-06-29 22:12:201620 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481621 ['OS=="ios"', {
1622 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191623 'enable_background%': 0,
[email protected]7ef66c62014-03-20 18:20:001624 'icu_use_data_file_flag%': 1,
[email protected]418653fdf2014-07-02 07:38:211625 'enable_web_speech%': 0,
[email protected]4e3996f92012-07-17 10:41:131626 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471627 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411628 'locales==': [
[email protected]47cf7a32013-09-03 22:16:391629 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
[email protected]27a1d6b2014-07-23 17:14:531630 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms',
1631 'nb', 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr',
1632 'uk', 'vi', 'zh-CN', 'zh-TW',
[email protected]b6fbd6742013-03-15 11:15:411633 ],
[email protected]57871bc2012-08-20 16:28:121634
[email protected]523f128d2013-08-06 17:36:111635 # iOS SDK and deployment target support. The |ios_sdk| value is left
1636 # blank so that when it is set in the project files it will be the
1637 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1638 # causes Xcode to spit out a warning for every single project file for
1639 # not using the "current" SDK.
[email protected]2c261532012-10-06 00:46:291640 'ios_sdk%': '',
1641 'ios_sdk_path%': '',
[email protected]7c613ee92014-08-14 21:22:311642 'ios_deployment_target%': '7.0',
[email protected]fcd634182012-10-09 10:50:321643
1644 'conditions': [
1645 # ios_product_name is set to the name of the .app bundle as it should
1646 # appear on disk.
1647 ['branding=="Chrome"', {
1648 'ios_product_name%': 'Chrome',
1649 }, { # else: branding!="Chrome"
1650 'ios_product_name%': 'Chromium',
1651 }],
1652 ['branding=="Chrome" and buildtype=="Official"', {
1653 'ios_breakpad%': 1,
1654 }, { # else: branding!="Chrome" or buildtype!="Official"
1655 'ios_breakpad%': 0,
1656 }],
1657 ],
1658 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011659 ['OS=="android"', {
1660 # Location of Android NDK.
1661 'variables': {
1662 'variables': {
[email protected]1ffa4b62014-02-19 18:20:221663 # Unfortunately we have to use absolute paths to the SDK/NDK because
1664 # they're passed to ant which uses a different relative path from
1665 # gyp.
1666 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1667 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1668 'android_host_arch%': '<!(uname -m)',
1669 # Android API-level of the SDK used for compilation.
aurimas1030b8f2014-10-18 01:11:491670 'android_sdk_version%': '21',
fdegans27660a32014-10-24 13:00:181671 'android_sdk_build_tools_version%': '21.0.1',
[email protected]1ffa4b62014-02-19 18:20:221672 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
[email protected]da1c8d692011-09-20 20:35:011673 },
[email protected]5061d152013-01-16 17:45:571674 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011675 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571676 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041677 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221678 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]625eb032014-02-13 21:48:251679 'host_os%': '<(host_os)',
[email protected]5061d152013-01-16 17:45:571680
[email protected]e20a8ad2013-03-18 15:05:041681 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]aeaf01212014-02-19 00:52:521682 # Android SDK build tools (e.g. dx, aapt, aidl)
1683 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)',
[email protected]5061d152013-01-16 17:45:571684
[email protected]5cfec2b2013-03-05 20:54:331685 # Android API level 14 is ICS (Android 4.0) which is the minimum
1686 # platform requirement for Chrome on Android, we use it for native
1687 # code compilation.
[email protected]5061d152013-01-16 17:45:571688 'conditions': [
1689 ['target_arch == "ia32"', {
1690 'android_app_abi%': 'x86',
1691 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331692 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]bda44542014-04-29 08:54:161693 'android_ndk_lib_dir%': 'usr/lib',
fdegans6b767132014-09-09 10:09:291694 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]5061d152013-01-16 17:45:571695 }],
[email protected]be0090f22014-03-18 17:43:481696 ['target_arch == "x64"', {
1697 'android_app_abi%': 'x86_64',
[email protected]84b50a582014-07-17 23:45:371698 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver',
fdegans27660a32014-10-24 13:00:181699 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-x86_64',
[email protected]bda44542014-04-29 08:54:161700 'android_ndk_lib_dir%': 'usr/lib64',
[email protected]84b50a582014-07-17 23:45:371701 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]be0090f22014-03-18 17:43:481702 }],
[email protected]5061d152013-01-16 17:45:571703 ['target_arch=="arm"', {
1704 'conditions': [
[email protected]7d6763422013-04-26 12:06:541705 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571706 'android_app_abi%': 'armeabi',
1707 }, {
1708 'android_app_abi%': 'armeabi-v7a',
1709 }],
1710 ],
1711 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331712 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]bda44542014-04-29 08:54:161713 'android_ndk_lib_dir%': 'usr/lib',
fdegans6b767132014-09-09 10:09:291714 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]5061d152013-01-16 17:45:571715 }],
[email protected]7a2f984a2014-03-20 18:35:491716 ['target_arch == "arm64"', {
[email protected]fa846092014-03-25 04:01:001717 'android_app_abi%': 'arm64-v8a',
[email protected]84b50a582014-07-17 23:45:371718 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver',
fdegans27660a32014-10-24 13:00:181719 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-arm64',
[email protected]bda44542014-04-29 08:54:161720 'android_ndk_lib_dir%': 'usr/lib',
[email protected]84b50a582014-07-17 23:45:371721 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]7a2f984a2014-03-20 18:35:491722 }],
[email protected]23eea4a42013-04-27 04:10:261723 ['target_arch == "mipsel"', {
1724 'android_app_abi%': 'mips',
1725 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1726 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]bda44542014-04-29 08:54:161727 'android_ndk_lib_dir%': 'usr/lib',
fdegans6b767132014-09-09 10:09:291728 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]23eea4a42013-04-27 04:10:261729 }],
petarjc8a5da742014-08-27 14:33:361730 ['target_arch == "mips64el"', {
1731 'android_app_abi%': 'mips64',
1732 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64/gdbserver/gdbserver',
fdegans27660a32014-10-24 13:00:181733 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-mips64',
petarjc8a5da742014-08-27 14:33:361734 'android_ndk_lib_dir%': 'usr/lib64',
1735 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
1736 'gcc_version%': 49,
1737 }],
[email protected]5061d152013-01-16 17:45:571738 ],
[email protected]da1c8d692011-09-20 20:35:011739 },
[email protected]5061d152013-01-16 17:45:571740 # Copy conditionally-set variables out one scope.
1741 'android_app_abi%': '<(android_app_abi)',
1742 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011743 'android_ndk_root%': '<(android_ndk_root)',
[email protected]941c6ab2014-03-24 04:07:341744 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571745 'android_sdk_root%': '<(android_sdk_root)',
1746 'android_sdk_version%': '<(android_sdk_version)',
1747 'android_toolchain%': '<(android_toolchain)',
1748
[email protected]da1c8d692011-09-20 20:35:011749 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
[email protected]bda44542014-04-29 08:54:161750 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)',
[email protected]6bfda61f2013-08-09 06:48:181751 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]e20a8ad2013-03-18 15:05:041752 'android_sdk%': '<(android_sdk)',
1753 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011754
[email protected]225ec632013-04-03 18:20:221755 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221756 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221757 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]625eb032014-02-13 21:48:251758 'host_os%': '<(host_os)',
[email protected]225ec632013-04-03 18:20:221759
[email protected]8ecd30e2014-07-04 19:58:341760 # Location of the "objcopy" binary, used by both gyp and scripts.
1761 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)',
1762
[email protected]c0f76312012-08-16 13:52:041763 # Location of the "strip" binary, used by both gyp and scripts.
1764 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1765
[email protected]225ec632013-04-03 18:20:221766 # Location of the "readelf" binary.
1767 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1768
[email protected]d8621ce2013-02-22 00:37:331769 # Determines whether we should optimize JNI generation at the cost of
1770 # breaking assumptions in the build system that when inputs have changed
1771 # the outputs should always change as well. This is meant purely for
1772 # developer builds, to avoid spurious re-linking of native files.
mlamouri23668752014-08-28 20:56:451773 'optimize_jni_generation%': '<(optimize_jni_generation)',
[email protected]d8621ce2013-02-22 00:37:331774
[email protected]da1c8d692011-09-20 20:35:011775 # Always uses openssl.
1776 'use_openssl%': 1,
[email protected]e1b2d732014-03-28 16:20:321777 'use_openssl_certs%': 1,
[email protected]da1c8d692011-09-20 20:35:011778
1779 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]9c8eb982014-07-09 07:51:501780 'safe_browsing%': 1,
[email protected]418653fdf2014-07-02 07:38:211781 'enable_web_speech%': 0,
[email protected]464750f2011-10-24 23:16:181782 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581783 'build_ffmpegsumo%': 0,
[email protected]2fa89ef2014-05-07 18:45:591784 'use_allocator%': 'none',
[email protected]658677f2012-06-09 06:04:021785
[email protected]ad17e342012-07-17 20:45:481786 # Disable Native Client.
1787 'disable_nacl%': 1,
1788
[email protected]58242012012-04-12 16:14:311789 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001790 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111791
[email protected]cdb756ef2012-04-05 18:34:531792 # Sessions are store separately in the Java side.
1793 'enable_session_service%': 0,
1794
[email protected]ad17e342012-07-17 20:45:481795 'p2p_apis%' : 0,
1796
[email protected]48de0fc2012-08-02 11:03:581797 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011798
1799 # Uses system APIs for decoding audio and video.
1800 'use_libffmpeg%': '0',
1801
torne3bc122f2014-10-18 11:10:171802 # TODO(torne): Remove this unsupported option once all the places that
1803 # test it have been updated.
1804 'use_system_stlport%': 0,
[email protected]adb44342012-07-23 13:36:121805
[email protected]da1c8d692011-09-20 20:35:011806 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361807 'android_webview_build%': '<(android_webview_build)',
[email protected]71b4fc32014-08-11 11:27:121808
1809 # Default android linker script for shared library exports.
1810 'android_linker_script%': '<(SHARED_INTERMEDIATE_DIR)/android_exports.lst',
[email protected]da1c8d692011-09-20 20:35:011811 }], # OS=="android"
[email protected]24641702014-07-03 17:20:151812 ['embedded==1', {
1813 'use_system_fontconfig%': 0,
1814 }, {
1815 'use_system_fontconfig%': 1,
1816 }],
1817 ['chromecast==1', {
[email protected]bef141592014-08-15 04:28:011818 'enable_mpeg2ts_stream_parser%': 1,
[email protected]24641702014-07-03 17:20:151819 'ffmpeg_branding%': 'Chrome',
1820 'ozone_platform_ozonex%': 1,
gunschb50a4e3f2014-09-17 04:05:281821 'use_playready%': 0,
[email protected]24641702014-07-03 17:20:151822 'conditions': [
1823 ['target_arch=="arm"', {
1824 'arm_arch%': '',
1825 'arm_tune%': 'cortex-a9',
1826 'arm_thumb%': 1,
[email protected]24641702014-07-03 17:20:151827 'video_hole%': 1,
1828 }],
1829 ],
1830 }],
hjd46eac8f2014-09-09 15:42:311831 ['android_webview_build==1', {
[email protected]b3139552013-05-30 14:16:121832 # When building the WebView in the Android tree, jarjar will remap all
1833 # the class names, so the JNI generator needs to know this.
1834 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1835 }],
[email protected]b9b8f9cf2014-07-17 04:42:261836 ['OS=="linux" and target_arch!="mipsel"', {
[email protected]5b61a7b2014-07-10 07:36:381837 # TODO(thakis): This is here to measure perf for a while.
1838 'clang%': 1,
1839 }], # OS=="mac"
[email protected]e14a9f92009-08-05 19:26:071840 ['OS=="mac"', {
[email protected]70d0f782013-11-14 06:22:291841 'conditions': [
1842 # All Chrome builds have breakpad symbols, but only process the
1843 # symbols from official builds.
1844 ['(branding=="Chrome" and buildtype=="Official")', {
1845 'mac_strip_release%': 1,
1846 }],
[email protected]22860352013-12-11 03:02:101847 ],
[email protected]296bc452013-05-13 21:29:471848 }], # OS=="mac"
1849 ['OS=="mac" or OS=="ios"', {
[email protected]d04384ab2014-03-13 20:46:011850 'clang%': 1,
1851
[email protected]2c261532012-10-06 00:46:291852 'variables': {
1853 # Mac OS X SDK and deployment target support. The SDK identifies
1854 # the version of the system headers that will be used, and
1855 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1856 # macro. "Maximum allowed" refers to the operating system version
1857 # whose APIs are available in the headers. The deployment target
1858 # identifies the minimum system version that the built products are
1859 # expected to function on. It corresponds to the
1860 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1861 # macros are available, #include <AvailabilityMacros.h>. Additional
1862 # documentation on these macros is available at
1863 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1864 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1865 # deployment target to 10.6. Other projects, such as O3D, may
1866 # override these defaults.
1867
1868 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1869 # about that is at least the specified version. In official builds,
1870 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1871 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1872 # path to the SDK; when set to a non-empty string, SDK detection
1873 # based on mac_sdk_min will be bypassed entirely.
lliabraa3a721cde2014-10-16 16:46:481874 'conditions': [
1875 ['OS=="ios"', {
1876 'mac_sdk_min%': '10.8',
1877 }, { # else OS!="ios"
1878 'mac_sdk_min%': '10.6',
1879 }],
1880 ],
[email protected]2c261532012-10-06 00:46:291881 'mac_sdk_path%': '',
1882
1883 'mac_deployment_target%': '10.6',
1884 },
1885
1886 'mac_sdk_min': '<(mac_sdk_min)',
1887 'mac_sdk_path': '<(mac_sdk_path)',
1888 'mac_deployment_target': '<(mac_deployment_target)',
1889
[email protected]794fb4782011-12-14 19:10:561890 # Compile in Breakpad support by default so that it can be
1891 # tested, even if it is not enabled by default at runtime.
1892 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071893 'conditions': [
1894 # mac_product_name is set to the name of the .app bundle as it should
1895 # appear on disk. This duplicates data from
1896 # chrome/app/theme/chromium/BRANDING and
1897 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1898 # these names into the build system.
1899 ['branding=="Chrome"', {
1900 'mac_product_name%': 'Google Chrome',
1901 }, { # else: branding!="Chrome"
1902 'mac_product_name%': 'Chromium',
1903 }],
lliabraa3a721cde2014-10-16 16:46:481904 # Official mac builds require a specific OS X SDK, but iOS and
1905 # non-official mac builds do not.
lliabraa0c127e92014-10-16 17:16:311906 ['branding=="Chrome" and buildtype=="Official" and OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291907 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
lliabraa3a721cde2014-10-16 16:46:481908 }, {
1909 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
1910 }],
1911 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:561912 # Enable uploading crash dumps.
1913 'mac_breakpad_uploads%': 1,
1914 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071915 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561916 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071917 'mac_keystone%': 1,
1918 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:561919 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071920 'mac_breakpad%': 0,
1921 'mac_keystone%': 0,
1922 }],
1923 ],
[email protected]296bc452013-05-13 21:29:471924 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551925 ['OS=="win"', {
1926 'conditions': [
[email protected]a7a15f32013-08-06 06:09:431927 # This is the architecture convention used in WinSDK paths.
1928 ['target_arch=="ia32"', {
1929 'winsdk_arch%': 'x86',
1930 },{
1931 'winsdk_arch%': '<(target_arch)',
1932 }],
[email protected]8974e042010-06-21 18:06:521933 ['component=="shared_library"', {
1934 'win_use_allocator_shim%': 0,
[email protected]45b7c522013-08-21 06:58:221935 },{
1936 # Turn on multiple dll by default on Windows when in static_library.
1937 'chrome_multiple_dll%': 1,
[email protected]8974e042010-06-21 18:06:521938 }],
[email protected]2a794002014-02-22 00:27:111939 ['asan==1', {
1940 'win_use_allocator_shim%': 0,
1941 }],
scottmgf01a9ae2014-09-19 23:49:501942 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
1943 # Only enabled by default for ninja because it's buggy in VS.
1944 # Not enabled for component=static_library because some targets
1945 # are too large and the toolchain fails due to the size of the
1946 # .obj files.
[email protected]6f390be2012-08-16 18:57:101947 'incremental_chrome_dll%': 1,
1948 }],
[email protected]a96cf1422013-11-08 08:55:411949 # Don't do incremental linking for large modules on 32-bit or when
1950 # component=static_library as the toolchain fails due to the size of
1951 # the .ilk files.
1952 ['MSVS_OS_BITS==32 or component=="static_library"', {
[email protected]10bb8c92009-08-07 21:16:031953 'msvs_large_module_debug_link_mode%': '1', # No
1954 },{
1955 'msvs_large_module_debug_link_mode%': '2', # Yes
1956 }],
[email protected]912c55c2009-07-31 23:33:551957 ],
[email protected]ef4fa4072009-12-04 22:46:501958 'nacl_win64_defines': [
1959 # This flag is used to minimize dependencies when building
1960 # Native Client loader for 64-bit Windows.
1961 'NACL_WIN64',
1962 ],
[email protected]912c55c2009-07-31 23:33:551963 }],
[email protected]bb6aba32011-01-07 19:04:431964
[email protected]24641702014-07-03 17:20:151965 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios" and embedded==0', {
[email protected]8e553f42010-10-25 20:05:441966 'use_cups%': 1,
1967 }, {
1968 'use_cups%': 0,
1969 }],
[email protected]bb6aba32011-01-07 19:04:431970
[email protected]693f63c2014-01-17 06:52:191971 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
[email protected]280755c2013-05-23 10:44:351972 'enable_pepper_cdms%': 1,
1973 }, {
1974 'enable_pepper_cdms%': 0,
1975 }],
1976
[email protected]4b556cf2014-06-10 23:21:531977 ['OS=="android"', {
1978 'enable_browser_cdms%': 1,
1979 }, {
1980 'enable_browser_cdms%': 0,
1981 }],
1982
[email protected]eb5f1672013-01-31 07:56:461983 # Native Client glibc toolchain is enabled
petarjc8a5da742014-08-27 14:33:361984 # by default except on arm, mips and mips64.
1985 ['target_arch=="arm" or target_arch=="mipsel" or target_arch=="mips64el"', {
[email protected]2f7da672012-06-21 08:38:321986 'disable_glibc%': 1,
1987 }, {
1988 'disable_glibc%': 0,
1989 }],
1990
[email protected]19fe8f0b2010-12-07 07:27:271991 # Set the relative path from this file to the GYP file of the JPEG
1992 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281993 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1994 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271995 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281996 }, {
1997 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1998 }],
[email protected]bb6aba32011-01-07 19:04:431999
[email protected]abcc9ac2011-05-16 20:04:352000 # Options controlling the use of GConf (the classic GNOME configuration
2001 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]02968b82013-11-14 02:42:432002 ['chromeos==1 or embedded==1', {
[email protected]1c6fe29302011-01-20 22:14:312003 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:352004 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:312005 }, {
2006 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:352007 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:312008 }],
2009
[email protected]4de39f82011-03-28 12:01:292010 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:292011 ['branding=="Chrome"', {
2012 # TODO(mmoss) The .grd files look for _google_chrome, but for
2013 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:292014 'grit_defines': ['-D', '_google_chrome',
2015 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:292016 }, {
[email protected]4de39f82011-03-28 12:01:292017 'grit_defines': ['-D', '_chromium',
2018 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:292019 }],
[email protected]bb6aba32011-01-07 19:04:432020 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:132021 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:432022 }],
[email protected]d628ab412013-09-07 03:26:372023 ['desktop_linux==1', {
2024 'grit_defines': ['-D', 'desktop_linux'],
2025 }],
[email protected]bb6aba32011-01-07 19:04:432026 ['toolkit_views==1', {
2027 'grit_defines': ['-D', 'toolkit_views'],
2028 }],
[email protected]8dd791d2011-09-16 16:37:302029 ['use_aura==1', {
2030 'grit_defines': ['-D', 'use_aura'],
2031 }],
[email protected]ed329be2012-01-03 22:02:162032 ['use_ash==1', {
2033 'grit_defines': ['-D', 'use_ash'],
2034 }],
[email protected]c329adf82011-10-05 14:34:572035 ['use_nss==1', {
2036 'grit_defines': ['-D', 'use_nss'],
2037 }],
[email protected]ff78e4e2013-05-03 19:19:152038 ['use_ozone==1', {
2039 'grit_defines': ['-D', 'use_ozone'],
2040 }],
[email protected]77a848262013-02-22 11:17:252041 ['image_loader_extension==1', {
2042 'grit_defines': ['-D', 'image_loader_extension'],
2043 }],
[email protected]9a425422011-01-11 00:53:182044 ['remoting==1', {
2045 'grit_defines': ['-D', 'remoting'],
2046 }],
joleksya91e8682014-09-10 13:48:412047 ['use_titlecase_in_grd==1', {
[email protected]bb6aba32011-01-07 19:04:432048 'grit_defines': ['-D', 'use_titlecase'],
2049 }],
[email protected]00dc155832011-02-01 18:51:192050 ['use_third_party_translations==1', {
2051 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:122052 'locales': [
[email protected]8581e1ba2011-08-22 23:27:162053 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
2054 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:122055 ],
[email protected]00dc155832011-02-01 18:51:192056 }],
[email protected]da1c8d692011-09-20 20:35:012057 ['OS=="android"', {
newt0548dfae2014-11-07 03:39:092058 'grit_defines': [
2059 '-t', 'android',
2060 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true',
2061 '--no-output-all-resource-defines',
2062 ],
[email protected]da1c8d692011-09-20 20:35:012063 }],
[email protected]cc1f0572013-07-31 05:41:032064 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:232065 'grit_defines': ['-D', 'scale_factors=2x'],
2066 }],
[email protected]ad563d02012-10-03 10:37:032067 ['OS == "ios"', {
2068 'grit_defines': [
[email protected]033346902013-08-20 01:01:122069 '-t', 'ios',
[email protected]ad563d02012-10-03 10:37:032070 # iOS uses a whitelist to filter resources.
lliabraa59d7c372014-11-07 16:28:272071 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt',
2072 '--no-output-all-resource-defines',
[email protected]ad563d02012-10-03 10:37:032073 ],
[email protected]b4530c82013-05-09 09:20:012074
[email protected]d04384ab2014-03-13 20:46:012075 # Enable host builds when generating with ninja-ios.
[email protected]b4530c82013-05-09 09:20:012076 'conditions': [
2077 ['"<(GENERATOR)"=="ninja"', {
[email protected]b4530c82013-05-09 09:20:012078 'host_os%': "mac",
[email protected]ce2cad72014-02-13 18:17:352079 }],
[email protected]d04384ab2014-03-13 20:46:012080
2081 # TODO(sdefresne): Remove the target_subarch check once Apple has
2082 # upstreamed the support for "arm64". http://crbug.com/341453
2083 ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', {
[email protected]ce2cad72014-02-13 18:17:352084 'clang_xcode%': 1,
2085 }],
[email protected]b4530c82013-05-09 09:20:012086 ],
[email protected]ad563d02012-10-03 10:37:032087 }],
[email protected]6a3cd37e2012-04-17 17:13:342088 ['enable_extensions==1', {
2089 'grit_defines': ['-D', 'enable_extensions'],
2090 }],
[email protected]6ab4ef92013-12-09 08:43:172091 ['enable_plugins!=0', {
[email protected]6ab4ef92013-12-09 08:43:172092 'grit_defines': ['-D', 'enable_plugins'],
2093 }],
vitalybuka93eea402014-11-05 23:47:152094 ['enable_basic_printing==1 or enable_print_preview==1', {
[email protected]658677f2012-06-09 06:04:022095 'grit_defines': ['-D', 'enable_printing'],
2096 }],
vitalybuka93eea402014-11-05 23:47:152097 ['enable_print_preview==1', {
vitalybukae29991c2014-11-05 21:15:122098 'grit_defines': ['-D', 'enable_print_preview'],
[email protected]b429eb19b2014-01-27 21:07:502099 }],
[email protected]c2aad542012-07-31 20:40:332100 ['enable_themes==1', {
2101 'grit_defines': ['-D', 'enable_themes'],
2102 }],
[email protected]ef1dd5062012-12-17 06:41:332103 ['enable_app_list==1', {
2104 'grit_defines': ['-D', 'enable_app_list'],
2105 }],
[email protected]dc4e8b82012-11-15 03:58:162106 ['enable_settings_app==1', {
2107 'grit_defines': ['-D', 'enable_settings_app'],
2108 }],
[email protected]5411d8202013-01-30 01:32:152109 ['enable_google_now==1', {
2110 'grit_defines': ['-D', 'enable_google_now'],
2111 }],
[email protected]a3a720f2013-04-25 19:35:422112 ['use_concatenated_impulse_responses==1', {
2113 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
2114 }],
[email protected]f66ddbd2013-06-27 14:17:042115 ['enable_webrtc==1', {
2116 'grit_defines': ['-D', 'enable_webrtc'],
2117 }],
[email protected]754a2002014-02-14 16:40:342118 ['enable_hangout_services_extension==1', {
2119 'grit_defines': ['-D', 'enable_hangout_services_extension'],
2120 }],
[email protected]25b8cb32014-01-30 11:04:292121 ['enable_task_manager==1', {
2122 'grit_defines': ['-D', 'enable_task_manager'],
2123 }],
[email protected]335b6872014-02-13 20:14:132124 ['notifications==1', {
2125 'grit_defines': ['-D', 'enable_notifications'],
2126 }],
[email protected]4b202ae2014-05-23 07:45:362127 ['enable_wifi_bootstrapping==1', {
2128 'grit_defines': ['-D', 'enable_wifi_bootstrapping'],
2129 }],
[email protected]2b9e68e2014-04-15 12:51:252130 ['enable_resource_whitelist_generation==1 and OS!="win"', {
[email protected]e4fdab92014-04-04 00:52:222131 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelisted_resource_{numeric_id}") {numeric_id}'],
[email protected]1a43cc572014-03-07 22:36:322132 }],
[email protected]2b9e68e2014-04-15 12:51:252133 ['enable_resource_whitelist_generation==1 and OS=="win"', {
2134 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'],
2135 }],
[email protected]2188c8d2014-03-21 00:58:562136 ['enable_mdns==1 or OS=="mac"', {
2137 'grit_defines': ['-D', 'enable_service_discovery'],
2138 'enable_service_discovery%': 1
2139 }],
[email protected]3bb37e62012-04-19 03:40:082140 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:072141 'clang_chrome_plugins_flags': [
2142 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:312143 ],
[email protected]5d451ad2011-02-11 16:43:462144 }],
[email protected]e12b37ec2014-06-16 11:21:172145 ['asan==1 or msan==1 or lsan==1 or tsan==1', {
[email protected]92799b632011-08-15 14:33:062146 'clang%': 1,
[email protected]3a0278b12014-05-20 15:37:582147 'use_allocator%': 'none',
glider7dbed1572014-09-23 16:38:112148 'use_sanitizer_options%': 1,
[email protected]92799b632011-08-15 14:33:062149 }],
[email protected]17b15a162014-07-24 15:41:422150 ['asan==1 and OS=="linux" and chromeos==0', {
[email protected]49d75ae2014-07-22 13:28:082151 'use_custom_libcxx%': 1,
2152 }],
[email protected]7fd639a2014-05-30 23:59:012153 ['ubsan==1', {
2154 'clang%': 1,
2155 }],
[email protected]0dbe7af92014-06-26 23:31:402156 ['ubsan_vptr==1', {
2157 'clang%': 1,
2158 }],
[email protected]f5d8c222012-08-29 17:47:022159 ['asan==1 and OS=="mac"', {
treib0b804d02014-09-01 17:06:482160 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
2161 # runtime is fully adopted. See http://crbug.com/242503.
jiayl55c7faa2014-09-24 16:25:182162 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:022163 }],
[email protected]c9a829272012-07-04 07:51:122164 ['tsan==1', {
[email protected]193149c2014-04-08 23:56:092165 'use_custom_libcxx%': 1,
[email protected]c9a829272012-07-04 07:51:122166 }],
[email protected]a10ddd2d2013-02-26 20:06:592167 ['msan==1', {
[email protected]e12b37ec2014-06-16 11:21:172168 # Use a just-built, MSan-instrumented libc++ instead of the system-wide
2169 # libstdc++. This is required to avoid false positive reports whenever
2170 # the C++ standard library is used.
2171 'use_custom_libcxx%': 1,
2172 # Running the V8-generated code on an ARM simulator is a powerful hack
2173 # that allows the tool to see the memory accesses from JITted code.
2174 # Without this flag, JS code causes false positive reports from MSan.
2175 'v8_target_arch': 'arm64',
[email protected]a10ddd2d2013-02-26 20:06:592176 }],
[email protected]c9a829272012-07-04 07:51:122177
[email protected]7ce58b22012-09-26 05:17:252178 ['OS=="linux" and clang_type_profiler==1', {
2179 'clang%': 1,
2180 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:322181 'conditions': [
2182 ['host_arch=="x64"', {
2183 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
2184 }],
2185 ['host_arch=="ia32"', {
2186 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
2187 # Clang in this directory at your own risk if needed for some
2188 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
2189 # usage). Any failure by this compiler should not close the tree.
2190 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
2191 }],
2192 ],
[email protected]7ce58b22012-09-26 05:17:252193 }],
2194
[email protected]85a75e572014-05-06 20:13:382195 ['OS=="win"', {
2196 # The Clang plugins don't currently work on Windows.
2197 # TODO(hans): One day, this will work. (crbug.com/82385)
2198 'clang_use_chrome_plugins%': 0,
2199 }],
2200
[email protected]a9318c72012-03-01 01:29:472201 # On valgrind bots, override the optimizer settings so we don't inline too
2202 # much and make the stacks harder to figure out.
2203 #
2204 # TODO(rnk): Kill off variables that no one else uses and just implement
2205 # them under a build_for_tool== condition.
2206 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
2207 # gcc flags
2208 'mac_debug_optimization': '1',
2209 'mac_release_optimization': '1',
2210 'release_optimize': '1',
2211 'no_gc_sections': 1,
2212 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
2213 '-fno-builtin -fno-optimize-sibling-calls',
2214 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
2215 '-fno-builtin -fno-optimize-sibling-calls',
2216
2217 # MSVS flags for TSan on Pin and Windows.
2218 'win_debug_RuntimeChecks': '0',
2219 'win_debug_disable_iterator_debugging': '1',
2220 'win_debug_Optimization': '1',
2221 'win_debug_InlineFunctionExpansion': '0',
2222 'win_release_InlineFunctionExpansion': '0',
2223 'win_release_OmitFramePointers': '0',
2224
[email protected]2fa89ef2014-05-07 18:45:592225 'use_allocator': 'tcmalloc',
[email protected]a9318c72012-03-01 01:29:472226 'release_valgrind_build': 1,
2227 'werror': '',
2228 'component': 'static_library',
2229 'use_system_zlib': 0,
2230 }],
2231
2232 # Build tweaks for DrMemory.
2233 # TODO(rnk): Combine with tsan config to share the builder.
2234 # http://crbug.com/108155
2235 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:472236 # These runtime checks force initialization of stack vars which blocks
2237 # DrMemory's uninit detection.
2238 'win_debug_RuntimeChecks': '0',
[email protected]49605d42013-10-18 13:58:172239 # Iterator debugging is slow.
[email protected]a9318c72012-03-01 01:29:472240 'win_debug_disable_iterator_debugging': '1',
2241 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:162242 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
2243 # /O2 and /Ob0 (disable inline) cannot be used together because of a
2244 # compiler bug, so we use /Ob1 instead.
2245 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:472246 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:502247 # Ditto for debug, to support bumping win_debug_Optimization.
2248 'win_debug_InlineFunctionExpansion': 0,
2249 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:472250 # Keep the code under #ifndef NVALGRIND.
2251 'release_valgrind_build': 1,
2252 }],
[email protected]b6a5ac92012-10-29 18:17:222253
[email protected]fcc89bf2013-10-30 17:37:212254 # Enable RLZ on Win, Mac, iOS and ChromeOS.
2255 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:222256 'enable_rlz%': 1,
2257 }],
[email protected]7d6763422013-04-26 12:06:542258
2259 # Set default compiler flags depending on ARM version.
[email protected]7d6763422013-04-26 12:06:542260 ['arm_version==6 and android_webview_build==0', {
2261 'arm_arch%': 'armv6',
2262 'arm_tune%': '',
[email protected]70f970d2013-12-16 14:11:382263 'arm_fpu%': 'vfp',
2264 'arm_float_abi%': 'softfp',
[email protected]7d6763422013-04-26 12:06:542265 'arm_thumb%': 0,
2266 }],
2267 ['arm_version==7 and android_webview_build==0', {
2268 'arm_arch%': 'armv7-a',
[email protected]7557cd42014-05-28 15:32:592269 'arm_tune%': 'generic-armv7-a',
[email protected]7d6763422013-04-26 12:06:542270 'conditions': [
2271 ['arm_neon==1', {
2272 'arm_fpu%': 'neon',
2273 }, {
2274 'arm_fpu%': 'vfpv3-d16',
2275 }],
2276 ],
[email protected]3f85dac32013-10-29 02:38:462277 # Change the default to hard once the armhf transition is complete.
[email protected]7d6763422013-04-26 12:06:542278 'arm_float_abi%': 'softfp',
2279 'arm_thumb%': 1,
2280 }],
2281
Gordana.Cmiljanovicaaea9272014-11-20 19:12:582282 # Set default compiler flags depending on MIPS architecture variant.
2283 ['target_arch=="mipsel" and mips_arch_variant=="r2" and android_webview_build==0', {
2284 'mips_fpu_mode%': 'fp32',
2285 }],
2286
[email protected]7d6763422013-04-26 12:06:542287 ['android_webview_build==1', {
2288 # The WebView build gets its cpu-specific flags from the Android build system.
2289 'arm_arch%': '',
2290 'arm_tune%': '',
2291 'arm_fpu%': '',
2292 'arm_float_abi%': '',
2293 'arm_thumb%': 0,
Gordana.Cmiljanovicaaea9272014-11-20 19:12:582294 'mips_fpu_mode%': '',
[email protected]7d6763422013-04-26 12:06:542295 }],
[email protected]5ac4b902013-10-22 17:21:292296
2297 # Enable brlapi by default for chromeos.
2298 [ 'chromeos==1', {
2299 'use_brlapi%': 1,
2300 }],
[email protected]f93c2c92013-10-31 18:22:442301
[email protected]3bdb0992014-05-16 21:30:512302 ['use_ozone==1 and ozone_auto_platforms==1', {
2303 # Use test as the default platform.
2304 'ozone_platform%': 'test',
[email protected]4814ed22013-11-01 05:37:262305
[email protected]3bdb0992014-05-16 21:30:512306 # Build all platforms whose deps are in install-build-deps.sh.
2307 # Only these platforms will be compile tested by buildbots.
[email protected]4814ed22013-11-01 05:37:262308 'ozone_platform_dri%': 1,
2309 'ozone_platform_test%': 1,
[email protected]3bdb0992014-05-16 21:30:512310 'ozone_platform_egltest%': 1,
2311 }],
2312
[email protected]da7aed42013-12-17 22:28:312313 ['desktop_linux==1 and use_aura==1 and use_x11==1', {
2314 'use_clipboard_aurax11%': 1,
2315 }],
2316
[email protected]e71a3622013-12-04 07:32:412317 ['OS=="win" and use_goma==1', {
2318 # goma doesn't support pch yet.
2319 'chromium_win_pch': 0,
2320 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
2321 'conditions': [
scottmge14e79b2014-09-15 23:10:172322 ['win_z7==0 and fastbuild==0', {
[email protected]c73363762014-04-16 21:11:462323 'fastbuild': 1,
[email protected]e71a3622013-12-04 07:32:412324 }],
2325 ],
2326 }],
[email protected]8efc26082014-01-24 13:26:352327
[email protected]2a794002014-02-22 00:27:112328 ['OS=="win" and (clang==1 or asan==1)', {
[email protected]8efc26082014-01-24 13:26:352329 'chromium_win_pch': 0,
2330 }],
2331
[email protected]acad4962014-08-04 19:05:022332 ['host_clang==1', {
2333 'host_cc': '<(make_clang_dir)/bin/clang',
2334 'host_cxx': '<(make_clang_dir)/bin/clang++',
2335 }, {
2336 'host_cc': '<!(which gcc)',
2337 'host_cxx': '<!(which g++)',
2338 }],
2339
leecame6f6b732014-08-24 23:38:092340 # The seccomp-bpf sandbox is only supported on five architectures
[email protected]9f7615ee2013-12-19 21:38:382341 # currently.
2342 # Do not disable seccomp_bpf anywhere without talking to
2343 # [email protected]!
2344 ['((OS=="linux" or OS=="android") and '
2345 '(target_arch=="ia32" or target_arch=="x64" or '
leecame6f6b732014-08-24 23:38:092346 'target_arch=="arm" or target_arch=="mipsel" or '
2347 'target_arch=="arm64"))', {
[email protected]9f7615ee2013-12-19 21:38:382348 'use_seccomp_bpf%': 1,
2349 }, {
2350 'use_seccomp_bpf%': 0,
2351 }],
fdegans3572927c2014-11-06 12:28:022352
fdegansd7a59f92014-10-23 11:49:542353 # Set component build with LTO until all tests pass.
2354 # This also reduces link time.
2355 ['use_lto==1', {
2356 'component%': "shared_library",
2357 }],
[email protected]912c55c2009-07-31 23:33:552358 ],
[email protected]a9318c72012-03-01 01:29:472359
the_jkffdda022014-10-03 11:36:192360 # older history files use fts2 instead of fts3
2361 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)',
2362
[email protected]6a502252013-12-13 11:49:092363 # The path to the ANGLE library.
2364 'angle_path': '<(DEPTH)/third_party/angle',
[email protected]c91dc722013-06-12 22:53:012365
[email protected]35958422011-09-28 02:03:592366 # List of default apps to install in new profiles. The first list contains
2367 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:062368 # contains the destination location for each of the files. When a crx
2369 # is added or removed from the list, the chrome/browser/resources/
2370 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:592371 'default_apps_list': [
2372 'browser/resources/default_apps/external_extensions.json',
2373 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062374 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592375 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002376 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232377 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592378 ],
2379 'default_apps_list_linux_dest': [
2380 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
2381 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062382 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592383 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002384 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232385 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592386 ],
[email protected]27572d12014-08-11 20:36:042387
2388 # Whether to allow building of the GPU-related isolates.
2389 'archive_gpu_tests%': 0,
leilei4003c4f2014-09-23 21:33:162390
fdegans3572927c2014-11-06 12:28:022391 # Whether to allow building of chromoting related isolates.
leilei4003c4f2014-09-23 21:33:162392 'archive_chromoting_tests%': 0,
[email protected]2f80c312009-02-25 21:26:552393 },
2394 'target_defaults': {
[email protected]1c966092009-08-20 21:19:262395 'variables': {
[email protected]a6e22132010-02-10 20:43:182396 # The condition that operates on chromium_code is in a target_conditions
2397 # section, and will not have access to the default fallback value of
2398 # chromium_code at the top of this file, or to the chromium_code
2399 # variable placed at the root variables scope of .gyp files, because
2400 # those variables are not set at target scope. As a workaround,
2401 # if chromium_code is not set at target scope, define it in target scope
2402 # to contain whatever value it has during early variable expansion.
2403 # That's enough to make it available during target conditional
2404 # processing.
2405 'chromium_code%': '<(chromium_code)',
2406
[email protected]7cd58be2014-03-21 12:39:562407 'component%': '<(component)',
2408
[email protected]24641702014-07-03 17:20:152409 'chromecast%': '<(chromecast)',
2410
[email protected]7e0d664a2009-12-03 21:07:472411 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
2412 'win_release_Optimization%': '2', # 2 = /Os
2413 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:332414
2415 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:242416 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:112417 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:242418 # Tri-state: blank is default, 1 on, 0 off
2419 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:332420
[email protected]6b0507b2010-05-07 07:41:212421 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
2422 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:332423
[email protected]6b0507b2010-05-07 07:41:212424 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:152425 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
2426 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:332427
[email protected]fac10d12010-11-08 16:00:312428 # VS inserts quite a lot of extra checks to algorithms like
2429 # std::partial_sort in Debug build which make them O(N^2)
2430 # instead of O(N*logN). This is particularly slow under memory
2431 # tools like ThreadSanitizer so we want it to be disablable.
2432 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
[email protected]907cb98d2014-02-23 07:19:552433 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:472434
[email protected]5d60b0b2013-07-30 20:24:302435 # An application manifest fragment to declare compatibility settings for
2436 # 'executable' targets. Ignored in other target type.
2437 'win_exe_compatibility_manifest%':
2438 '<(DEPTH)\\build\\win\\compatibility.manifest',
2439
[email protected]ffd984b12009-09-11 19:37:002440 'release_extra_cflags%': '',
2441 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:002442
2443 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:522444
[email protected]ef5c5f1b2011-12-17 02:16:242445 # the non-qualified versions are widely assumed to be *nix-only
2446 'win_release_extra_cflags%': '',
2447 'win_debug_extra_cflags%': '',
2448
[email protected]b1eb341c2011-11-09 18:46:072449 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
2450 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
2451
[email protected]ef3326702011-10-06 18:06:442452 # Only used by Windows build for now. Can be used to build into a
2453 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
2454 # output files in src/build/VS2010_{Debug,Release}.
2455 'build_dir_prefix%': '',
2456
[email protected]9ac2db692012-06-08 01:01:572457 # Targets are by default not nacl untrusted code.
2458 'nacl_untrusted_build%': 0,
2459
[email protected]9c55d9d2012-11-15 23:28:442460 'pnacl_compile_flags': [
[email protected]7dcd93c2013-11-02 02:05:532461 # pnacl uses the clang compiler so we need to suppress all the
[email protected]9c55d9d2012-11-15 23:28:442462 # same warnings as we do for clang.
2463 # TODO(sbc): Remove these if/when they are removed from the clang
2464 # build.
2465 '-Wno-unused-function',
2466 '-Wno-char-subscripts',
2467 '-Wno-c++11-extensions',
2468 '-Wno-unnamed-type-template-args',
2469 ],
2470
[email protected]8974e042010-06-21 18:06:522471 'conditions': [
2472 ['OS=="win" and component=="shared_library"', {
2473 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:162474 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2475 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:522476 }, {
2477 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2478 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2479 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2480 }],
[email protected]1e013672012-06-29 22:12:202481 ['OS=="ios"', {
2482 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2483 'mac_release_optimization%': 's', # Use -Os unless overridden
2484 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2485 }, {
2486 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
thakis9ce1b752014-11-10 16:19:392487 'mac_release_optimization%': '2', # Use -O2 unless overridden
[email protected]1e013672012-06-29 22:12:202488 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2489 }],
[email protected]625eb032014-02-13 21:48:252490 ['OS=="android"', {
2491 'host_os%': '<(host_os)', # See comment above chromium_code.
2492 }],
[email protected]8974e042010-06-21 18:06:522493 ],
[email protected]dcbc32cc2014-08-01 21:48:202494 'clang_warning_flags': [
2495 '-Wheader-hygiene',
2496
2497 # Don't die on dtoa code that uses a char as an array index.
2498 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2499 '-Wno-char-subscripts',
2500
2501 # TODO(thakis): This used to be implied by -Wno-unused-function,
2502 # which we no longer use. Check if it makes sense to remove
2503 # this as well. http://crbug.com/316352
2504 '-Wno-unneeded-internal-declaration',
2505
2506 # Warns on switches on enums that cover all enum values but
2507 # also contain a default: branch. Chrome is full of that.
2508 '-Wno-covered-switch-default',
2509
2510 # Warns when a const char[] is converted to bool.
2511 '-Wstring-conversion',
2512
2513 # C++11-related flags:
2514
2515 # This warns on using ints as initializers for floats in
2516 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
2517 # which happens in several places in chrome code. Not sure if
2518 # this is worth fixing.
2519 '-Wno-c++11-narrowing',
2520
2521 # Clang considers the `register` keyword as deprecated, but e.g.
2522 # code generated by flex (used in angle) contains that keyword.
2523 # http://crbug.com/255186
2524 '-Wno-deprecated-register',
2525 ],
[email protected]1c966092009-08-20 21:19:262526 },
[email protected]dcbc32cc2014-08-01 21:48:202527 'includes': [ 'set_clang_warning_flags.gypi', ],
[email protected]c91dc722013-06-12 22:53:012528 'defines': [
[email protected]6d84e0b2013-12-05 12:16:132529 # Don't use deprecated V8 APIs anywhere.
2530 'V8_DEPRECATION_WARNINGS',
[email protected]c91dc722013-06-12 22:53:012531 ],
[email protected]97865022014-06-13 23:18:042532 'include_dirs': [
2533 '<(SHARED_INTERMEDIATE_DIR)',
2534 ],
[email protected]32aa8cc2009-03-04 21:36:392535 'conditions': [
[email protected]d808e212013-03-12 14:06:162536 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:312537 'dependencies': [
2538 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
2539 ],
2540 }],
timurrrr6e2f3e262014-08-29 16:51:522541 ['OS=="win" and asan==1 and component=="shared_library"', {
2542 'dependencies': [
2543 '<(DEPTH)/build/win/asan.gyp:asan_dynamic_runtime',
2544 ],
2545 }],
[email protected]2fa89ef2014-05-07 18:45:592546 ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', {
[email protected]7ce58b22012-09-26 05:17:252547 'cflags_cc!': ['-fno-rtti'],
2548 'cflags_cc+': [
2549 '-frtti',
2550 '-gline-tables-only',
2551 '-fintercept-allocation-functions',
2552 ],
2553 'defines': ['TYPE_PROFILING'],
2554 'dependencies': [
2555 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
2556 ],
2557 }],
[email protected]32aa8cc2009-03-04 21:36:392558 ['branding=="Chrome"', {
2559 'defines': ['GOOGLE_CHROME_BUILD'],
2560 }, { # else: branding!="Chrome"
2561 'defines': ['CHROMIUM_BUILD'],
2562 }],
[email protected]286d9a12012-05-30 16:20:382563 ['OS=="mac" and component=="shared_library"', {
2564 'xcode_settings': {
2565 'DYLIB_INSTALL_NAME_BASE': '@rpath',
2566 'LD_RUNPATH_SEARCH_PATHS': [
2567 # For unbundled binaries.
2568 '@loader_path/.',
2569 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
2570 '@loader_path/../../..',
2571 ],
2572 },
2573 }],
[email protected]6fcbf9d2014-05-09 22:01:282574 ['clang==1 and OS!="win"', {
2575 # This is here so that all files get recompiled after a clang roll and
2576 # when turning clang on or off.
2577 # (defines are passed via the command line, and build systems rebuild
2578 # things when their commandline changes). Nothing should ever read this
2579 # define.
2580 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'],
2581 }],
[email protected]b6a5ac92012-10-29 18:17:222582 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:172583 'defines': ['ENABLE_RLZ'],
2584 }],
[email protected]63e39a282011-07-13 20:41:282585 ['component=="shared_library"', {
2586 'defines': ['COMPONENT_BUILD'],
2587 }],
[email protected]06c756182010-04-27 18:31:312588 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:172589 'defines': ['TOOLKIT_VIEWS=1'],
2590 }],
[email protected]1ee7c56c2011-10-19 14:51:332591 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:112592 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
2593 }],
[email protected]41423092011-08-25 15:39:582594 ['use_aura==1', {
2595 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:352596 }],
[email protected]ed329be2012-01-03 22:02:162597 ['use_ash==1', {
2598 'defines': ['USE_ASH=1'],
2599 }],
[email protected]91e273a102014-07-22 19:50:472600 ['use_pango==1', {
2601 'defines': ['USE_PANGO=1'],
2602 }],
[email protected]928362a2013-11-19 20:17:162603 ['use_cairo==1', {
2604 'defines': ['USE_CAIRO=1'],
2605 }],
[email protected]2a76009b2013-08-07 21:02:312606 ['use_cras==1', {
2607 'defines': ['USE_CRAS=1'],
2608 }],
[email protected]ff78e4e2013-05-03 19:19:152609 ['use_ozone==1', {
2610 'defines': ['USE_OZONE=1'],
2611 }],
[email protected]cb800562012-11-20 22:36:072612 ['use_default_render_theme==1', {
2613 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
2614 }],
[email protected]e190d272012-08-30 17:36:442615 ['use_libjpeg_turbo==1', {
2616 'defines': ['USE_LIBJPEG_TURBO=1'],
2617 }],
[email protected]2fa2f2d82013-04-29 18:13:122618 ['use_x11==1', {
2619 'defines': ['USE_X11=1'],
2620 }],
[email protected]89dcd662013-12-12 23:06:502621 ['use_clipboard_aurax11==1', {
2622 'defines': ['USE_CLIPBOARD_AURAX11=1'],
2623 }],
[email protected]bd7b6fe2012-03-05 21:02:402624 ['enable_one_click_signin==1', {
2625 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2626 }],
[email protected]b56a9e02014-06-20 09:57:042627 ['enable_pre_sync_backup==1', {
2628 'defines': ['ENABLE_PRE_SYNC_BACKUP'],
2629 }],
[email protected]77a848262013-02-22 11:17:252630 ['image_loader_extension==1', {
2631 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2632 }],
[email protected]7664ab32011-02-01 23:35:252633 ['profiling==1', {
2634 'defines': ['ENABLE_PROFILING=1'],
2635 }],
[email protected]542bf24a2010-06-11 23:08:172636 ['remoting==1', {
2637 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:002638 }],
[email protected]5b87e782012-02-09 18:19:322639 ['enable_webrtc==1', {
2640 'defines': ['ENABLE_WEBRTC=1'],
2641 }],
[email protected]d01120e62010-05-10 17:04:482642 ['proprietary_codecs==1', {
2643 'defines': ['USE_PROPRIETARY_CODECS'],
damienva6c97632014-08-27 01:47:582644 'conditions': [
2645 ['enable_mpeg2ts_stream_parser==1', {
2646 'defines': ['ENABLE_MPEG2TS_STREAM_PARSER'],
2647 }],
2648 ],
[email protected]d01120e62010-05-10 17:04:482649 }],
[email protected]7ddea9802012-02-22 23:08:052650 ['enable_viewport==1', {
2651 'defines': ['ENABLE_VIEWPORT'],
2652 }],
[email protected]280755c2013-05-23 10:44:352653 ['enable_pepper_cdms==1', {
2654 'defines': ['ENABLE_PEPPER_CDMS'],
2655 }],
[email protected]4b556cf2014-06-10 23:21:532656 ['enable_browser_cdms==1', {
2657 'defines': ['ENABLE_BROWSER_CDMS'],
2658 }],
[email protected]f31e2e52011-07-14 16:01:192659 ['configuration_policy==1', {
2660 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2661 }],
[email protected]7cce3232011-10-28 10:41:572662 ['notifications==1', {
2663 'defines': ['ENABLE_NOTIFICATIONS'],
2664 }],
[email protected]1efbaaa2012-04-24 02:43:242665 ['enable_hidpi==1', {
2666 'defines': ['ENABLE_HIDPI=1'],
2667 }],
[email protected]cef6c76f2013-10-30 16:33:302668 ['native_discardable_memory==1', {
2669 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
2670 }],
2671 ['native_memory_pressure_signals==1', {
2672 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
2673 }],
[email protected]49513e02013-11-20 08:36:402674 ['use_udev==1', {
2675 'defines': ['USE_UDEV'],
2676 }],
[email protected]9c1949e2009-10-02 19:59:542677 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:312678 'xcode_settings': {
2679 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2680 },
[email protected]9c1949e2009-10-02 19:59:542681 'conditions': [
[email protected]0dbe7af92014-06-26 23:31:402682 ['clang==1 and asan==0 and msan==0 and tsan==0 and ubsan_vptr==0', {
[email protected]c86fd472013-04-02 19:42:302683 # Clang creates chubby debug information, which makes linking very
2684 # slow. For now, don't create debug information with clang. See
2685 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432686 'conditions': [
2687 ['OS=="linux"', {
2688 'variables': {
2689 'debug_extra_cflags': '-g0',
2690 },
2691 }],
2692 # Android builds symbols on release by default, disable them.
2693 ['OS=="android"', {
2694 'variables': {
2695 'debug_extra_cflags': '-g0',
2696 'release_extra_cflags': '-g0',
2697 },
2698 }],
2699 ],
2700 }, { # else clang!=1
2701 'conditions': [
[email protected]c86fd472013-04-02 19:42:302702 ['OS=="win" and fastbuild==2', {
2703 # Completely disable debug information.
2704 'msvs_settings': {
2705 'VCLinkerTool': {
2706 'GenerateDebugInformation': 'false',
2707 },
2708 'VCCLCompilerTool': {
2709 'DebugInformationFormat': '0',
2710 },
2711 },
2712 }],
2713 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432714 'msvs_settings': {
2715 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312716 # This tells the linker to generate .pdbs, so that
2717 # we can get meaningful stack traces.
2718 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432719 },
2720 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312721 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432722 'DebugInformationFormat': '0',
2723 },
2724 },
2725 }],
[email protected]c86fd472013-04-02 19:42:302726 ['OS=="linux" and fastbuild==2', {
2727 'variables': {
2728 'debug_extra_cflags': '-g0',
2729 },
2730 }],
2731 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432732 'variables': {
2733 'debug_extra_cflags': '-g1',
2734 },
2735 }],
[email protected]c86fd472013-04-02 19:42:302736 ['OS=="android" and fastbuild==2', {
2737 'variables': {
2738 'debug_extra_cflags': '-g0',
2739 'release_extra_cflags': '-g0',
2740 },
2741 }],
2742 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432743 'variables': {
2744 'debug_extra_cflags': '-g1',
2745 'release_extra_cflags': '-g1',
2746 },
2747 }],
2748 ],
2749 }], # clang!=1
2750 ],
[email protected]9c1949e2009-10-02 19:59:542751 }], # fastbuild!=0
[email protected]19677402014-06-18 13:10:042752 ['dont_embed_build_metadata==1', {
[email protected]b9e9992a2014-06-12 21:01:192753 'defines': [
[email protected]19677402014-06-18 13:10:042754 'DONT_EMBED_BUILD_METADATA',
[email protected]b9e9992a2014-06-12 21:01:192755 ],
[email protected]19677402014-06-18 13:10:042756 }], # dont_embed_build_metadata==1
[email protected]20960e072011-09-20 20:59:012757 ['dcheck_always_on!=0', {
2758 'defines': ['DCHECK_ALWAYS_ON=1'],
2759 }], # dcheck_always_on!=0
[email protected]a1e87422013-07-09 21:47:012760 ['tracing_like_official_build!=0', {
2761 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2762 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472763 ['win_use_allocator_shim==0', {
2764 'conditions': [
2765 ['OS=="win"', {
2766 'defines': ['NO_TCMALLOC'],
2767 }],
2768 ],
2769 }],
[email protected]6c65f2b2014-05-07 08:57:462770 ['asan==1', {
2771 'defines': [
2772 'ADDRESS_SANITIZER',
2773 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]be766bb2014-07-01 19:22:122774 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]6c65f2b2014-05-07 08:57:462775 ],
2776 }],
[email protected]1612e552014-02-15 04:49:182777 ['syzyasan==1', {
2778 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
[email protected]696de4e62012-11-21 21:18:542779 'msvs_settings': {
2780 'VCLinkerTool': {
2781 'Profile': 'true',
2782 },
2783 },
[email protected]2f047202013-06-14 06:36:392784 'defines': [
[email protected]aee2f332014-03-27 15:08:042785 'SYZYASAN',
[email protected]2f047202013-06-14 06:36:392786 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]be766bb2014-07-01 19:22:122787 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]2f047202013-06-14 06:36:392788 ],
[email protected]1612e552014-02-15 04:49:182789 }],
[email protected]4e4d6042010-08-26 18:34:382790 ['OS=="win"', {
2791 'defines': [
2792 '__STD_C',
2793 '_CRT_SECURE_NO_DEPRECATE',
2794 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102795 # This define is required to pull in the new Win8 interfaces from
2796 # system headers like ShObjIdl.h.
scottmga6675a5f2014-11-15 01:37:472797 'NTDDI_VERSION=0x06030000',
[email protected]37416742013-11-12 07:13:332798 # This is required for ATL to use XP-safe versions of its functions.
2799 '_USING_V110_SDK71_',
[email protected]4e4d6042010-08-26 18:34:382800 ],
2801 'include_dirs': [
2802 '<(DEPTH)/third_party/wtl/include',
2803 ],
[email protected]9619e65d2012-05-23 19:06:522804 'conditions': [
2805 ['win_z7!=0', {
2806 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092807 # Generates debug info when win_z7=1
2808 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2809 'VCLinkerTool': {
2810 'GenerateDebugInformation': 'true',
2811 },
[email protected]9619e65d2012-05-23 19:06:522812 'VCCLCompilerTool': {
2813 'DebugInformationFormat': '1',
2814 }
2815 }
brucedawson4b6961d2014-10-28 22:18:042816 }], # win_z7!=0
2817 ['win_analyze', {
2818 'defines!': [
2819 # This is prohibited when running /analyze.
2820 '_USING_V110_SDK71_',
2821 ],
2822 'msvs_settings': {
2823 'VCCLCompilerTool': {
2824 # Set WarnAsError to false to disable this setting for most
2825 # projects so that compilation continues.
2826 'WarnAsError': 'false',
2827 # When win_analyze is specified add the /analyze switch.
2828 # Also add /WX- to force-disable WarnAsError for projects that
2829 # override WarnAsError.
2830 # Also, disable various noisy warnings that have low value.
2831 'AdditionalOptions': [
2832 '/analyze',
2833 '/WX-',
2834 '/wd6011', # Dereferencing NULL pointer
2835 '/wd6312', # Possible infinite loop: use of the constant
2836 # EXCEPTION_CONTINUE_EXECUTION in the exception-filter
2837 '/wd6326', # Potential comparison of constant with constant
2838 '/wd28159', # Consider using 'GetTickCount64'
2839 '/wd28204', # Inconsistent SAL annotations
2840 '/wd28251', # Inconsistent SAL annotations
2841 '/wd28252', # Inconsistent SAL annotations
2842 '/wd28253', # Inconsistent SAL annotations
2843 '/wd28196', # The precondition is not satisfied
2844 '/wd28301', # Inconsistent SAL annotations
2845 '/wd6340', # Sign mismatch in function parameter
2846 '/wd28182', # Dereferencing NULL pointer
2847 ],
2848 },
2849 },
2850 }], # win_analyze
2851 ],
[email protected]4e4d6042010-08-26 18:34:382852 }], # OS==win
[email protected]24641702014-07-03 17:20:152853 ['chromecast==1', {
2854 'defines': [
2855 'LOG_DISABLED=0',
2856 ],
2857 'conditions': [
2858 ['target_arch=="arm"', {
2859 'defines': [
2860 # TODO(lcwu): Work around an error when building Chromium
2861 # with gcc-4.5.3 (e.g. v8/src/platform-linux.cc). Remove
2862 # this define once the toolchain is updated.
2863 # See crbug.com/388933.
2864 '__SOFTFP',
2865 ],
2866 }],
gunschb50a4e3f2014-09-17 04:05:282867 ['use_playready==1', {
2868 'defines': [
2869 'PLAYREADY_CDM_AVAILABLE',
2870 ],
2871 }],
[email protected]24641702014-07-03 17:20:152872 ],
2873 }],
[email protected]44879ed2012-04-06 01:11:022874 ['enable_task_manager==1', {
2875 'defines': [
2876 'ENABLE_TASK_MANAGER=1',
2877 ],
2878 }],
[email protected]6a3cd37e2012-04-17 17:13:342879 ['enable_extensions==1', {
2880 'defines': [
2881 'ENABLE_EXTENSIONS=1',
2882 ],
2883 }],
[email protected]13eb97d2012-01-05 01:07:122884 ['OS=="win" and branding=="Chrome"', {
2885 'defines': ['ENABLE_SWIFTSHADER'],
2886 }],
[email protected]407dfa632011-12-23 11:59:352887 ['enable_dart==1', {
2888 'defines': ['WEBKIT_USING_DART=1'],
2889 }],
[email protected]18e0f39b2012-01-17 16:47:342890 ['enable_plugin_installation==1', {
2891 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2892 }],
[email protected]6d17f6392012-12-05 05:24:542893 ['enable_plugins==1', {
2894 'defines': ['ENABLE_PLUGINS=1'],
2895 }],
[email protected]cdb756ef2012-04-05 18:34:532896 ['enable_session_service==1', {
2897 'defines': ['ENABLE_SESSION_SERVICE=1'],
2898 }],
[email protected]6b40bb582012-03-15 20:50:382899 ['enable_themes==1', {
2900 'defines': ['ENABLE_THEMES=1'],
2901 }],
[email protected]57e67ac2013-02-22 03:37:222902 ['enable_autofill_dialog==1', {
2903 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2904 }],
[email protected]d3340bf512014-05-22 22:27:582905 ['enable_prod_wallet_service==1', {
2906 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'],
2907 }],
[email protected]0acdd772012-04-05 22:53:002908 ['enable_background==1', {
2909 'defines': ['ENABLE_BACKGROUND=1'],
2910 }],
[email protected]6ee43a72012-12-07 22:44:402911 ['enable_google_now==1', {
2912 'defines': ['ENABLE_GOOGLE_NOW=1'],
2913 }],
[email protected]3b5e88d2013-09-06 11:03:062914 ['cld_version!=0', {
2915 'defines': ['CLD_VERSION=<(cld_version)'],
2916 }],
vitalybuka93eea402014-11-05 23:47:152917 ['enable_basic_printing==1 or enable_print_preview==1', {
2918 # Convenience define for ENABLE_BASIC_PRINTING || ENABLE_PRINT_PREVIEW.
2919 'defines': ['ENABLE_PRINTING=1'],
[email protected]1e54c1c2013-08-12 17:16:052920 }],
vitalybuka93eea402014-11-05 23:47:152921 ['enable_basic_printing==1', {
2922 # Enable basic printing support and UI.
2923 'defines': ['ENABLE_BASIC_PRINTING=1'],
2924 }],
2925 ['enable_print_preview==1', {
2926 # Enable printing with print preview.
2927 # Can be defined without ENABLE_BASIC_PRINTING.
vitalybukae29991c2014-11-05 21:15:122928 'defines': ['ENABLE_PRINT_PREVIEW=1'],
[email protected]658677f2012-06-09 06:04:022929 }],
[email protected]c6ce08072013-07-31 07:48:532930 ['enable_spellcheck==1', {
2931 'defines': ['ENABLE_SPELLCHECK=1'],
2932 }],
[email protected]e6026962012-06-14 21:28:322933 ['enable_captive_portal_detection==1', {
2934 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2935 }],
[email protected]dc4e8b82012-11-15 03:58:162936 ['enable_app_list==1', {
2937 'defines': ['ENABLE_APP_LIST=1'],
2938 }],
2939 ['enable_settings_app==1', {
2940 'defines': ['ENABLE_SETTINGS_APP=1'],
2941 }],
[email protected]02494ec2014-05-07 15:05:292942 ['disable_file_support==1', {
2943 'defines': ['DISABLE_FILE_SUPPORT=1'],
2944 }],
[email protected]9bfe0ab2012-08-30 13:18:112945 ['disable_ftp_support==1', {
2946 'defines': ['DISABLE_FTP_SUPPORT=1'],
2947 }],
[email protected]847aaab82014-05-07 14:05:462948 ['use_icu_alternatives_on_android==1', {
2949 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'],
2950 }],
[email protected]0850e842013-01-19 03:44:312951 ['enable_managed_users==1', {
2952 'defines': ['ENABLE_MANAGED_USERS=1'],
2953 }],
[email protected]199def22013-02-21 17:52:292954 ['spdy_proxy_auth_property != ""', {
2955 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2956 }],
[email protected]f37e9412013-05-27 23:18:252957 ['spdy_proxy_auth_value != ""', {
2958 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2959 }],
[email protected]5cbeb502013-04-23 19:25:272960 ['enable_mdns==1', {
2961 'defines': ['ENABLE_MDNS=1'],
[email protected]b9171622013-10-01 22:05:232962 }],
[email protected]2188c8d2014-03-21 00:58:562963 ['enable_service_discovery==1', {
2964 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ],
2965 }],
[email protected]4b202ae2014-05-23 07:45:362966 ['enable_wifi_bootstrapping==1', {
2967 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ],
2968 }],
[email protected]754a2002014-02-14 16:40:342969 ['enable_hangout_services_extension==1', {
2970 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'],
2971 }],
[email protected]8c64e282013-11-28 16:05:142972 ['enable_ipc_fuzzer==1', {
2973 'defines': ['ENABLE_IPC_FUZZER=1'],
2974 }],
[email protected]8b4efe92014-02-21 16:08:202975 ['video_hole==1', {
2976 'defines': ['VIDEO_HOLE=1'],
2977 }],
japhet46789a82014-09-10 03:06:462978 ['enable_load_completion_hacks==1', {
2979 'defines': ['ENABLE_LOAD_COMPLETION_HACKS=1'],
2980 }],
baixo3a3c88a2014-10-28 11:52:212981 ['v8_use_external_startup_data==1', {
2982 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'],
2983 }],
[email protected]a6e22132010-02-10 20:43:182984 ], # conditions for 'target_defaults'
2985 'target_conditions': [
bedupont65ce5acc2014-11-04 16:30:412986 ['<(use_libpci)==1', {
2987 'defines': ['USE_LIBPCI=1'],
2988 }],
[email protected]e1b2d732014-03-28 16:20:322989 ['<(use_openssl)==1', {
[email protected]ad9449f92014-03-12 09:34:102990 'defines': ['USE_OPENSSL=1'],
2991 }],
[email protected]e1b2d732014-03-28 16:20:322992 ['<(use_openssl_certs)==1', {
2993 'defines': ['USE_OPENSSL_CERTS=1'],
2994 }],
2995 ['>(nacl_untrusted_build)==1', {
2996 'defines': [
2997 'USE_OPENSSL=1',
2998 'USE_OPENSSL_CERTS=1',
2999 ],
3000 }],
hidehiko2b720d22014-10-17 06:40:303001 ['<(use_glib)==1 and >(nacl_untrusted_build)==0', {
3002 'defines': ['USE_GLIB=1'],
3003 }],
[email protected]ad9449f92014-03-12 09:34:103004 ['<(use_nss)==1 and >(nacl_untrusted_build)==0', {
3005 'defines': ['USE_NSS=1'],
3006 }],
[email protected]02517012014-06-13 09:28:413007 ['<(chromeos)==1 and >(nacl_untrusted_build)==0', {
3008 'defines': ['OS_CHROMEOS=1'],
3009 }],
[email protected]e59443e2014-08-18 14:13:333010 ['enable_wexit_time_destructors==1 and OS!="win"', {
3011 # TODO: Enable on Windows too, http://crbug.com/404525
[email protected]dcbc32cc2014-08-01 21:48:203012 'variables': { 'clang_warning_flags': ['-Wexit-time-destructors']},
[email protected]b1eb341c2011-11-09 18:46:073013 }],
[email protected]c14d8e772010-02-09 22:06:153014 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:283015 'conditions': [
[email protected]1e013672012-06-29 22:12:203016 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:333017 # We don't want to get warnings from third-party code,
3018 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:283019 'cflags!': [
3020 '-Wall',
3021 '-Wextra',
[email protected]d8543312010-02-10 17:43:283022 ],
[email protected]167ec822011-10-24 22:05:273023 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:003024 # Don't warn about hash_map in third-party code.
3025 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:273026 ],
3027 'cflags': [
[email protected]c0a6b272011-02-09 22:32:333028 # Don't warn about printf format problems.
3029 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:223030 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:003031 ],
[email protected]d16bd642011-07-25 23:59:183032 'cflags_cc!': [
[email protected]f58fa2c2013-12-06 08:06:203033 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453).
[email protected]d16bd642011-07-25 23:59:183034 '-Wsign-compare',
3035 ]
[email protected]d8543312010-02-10 17:43:283036 }],
[email protected]82dd5eb32012-08-18 04:24:323037 # TODO: Fix all warnings on chromeos too.
3038 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
3039 'cflags!': [
3040 '-Werror',
3041 ],
3042 }],
[email protected]bc073c062012-01-13 06:28:033043 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:113044 'cflags': [
3045 # Don't warn about ignoring the return value from e.g. close().
3046 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:033047 # BSD systems do not support this option, since they are usually
3048 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:113049 '-Wno-unused-result',
3050 ],
3051 }],
[email protected]d8543312010-02-10 17:43:283052 [ 'OS=="win"', {
3053 'defines': [
3054 '_CRT_SECURE_NO_DEPRECATE',
3055 '_CRT_NONSTDC_NO_WARNINGS',
3056 '_CRT_NONSTDC_NO_DEPRECATE',
3057 '_SCL_SECURE_NO_DEPRECATE',
3058 ],
3059 'msvs_disabled_warnings': [4800],
3060 'msvs_settings': {
3061 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:113062 'WarningLevel': '3',
[email protected]86caa4052014-07-18 07:22:093063 'WarnAsError': 'true',
[email protected]d8543312010-02-10 17:43:283064 'Detect64BitPortabilityProblems': 'false',
3065 },
3066 },
[email protected]c54b41cb2012-08-24 20:58:243067 'conditions': [
3068 ['buildtype=="Official"', {
3069 'msvs_settings': {
3070 'VCCLCompilerTool': { 'WarnAsError': 'false' },
3071 }
3072 }],
[email protected]8efc26082014-01-24 13:26:353073 ['clang==1', {
3074 'msvs_settings': {
3075 'VCCLCompilerTool': { 'WarnAsError': 'false' },
3076 }
3077 }],
kulkarni.a9af92a12014-09-19 18:47:213078 [ 'component=="shared_library"', {
3079 # TODO(darin): Unfortunately, some third_party code depends on base.
3080 'msvs_disabled_warnings': [
3081 4251, # class 'std::xx' needs to have dll-interface.
3082 ],
3083 }],
[email protected]c54b41cb2012-08-24 20:58:243084 ],
[email protected]d8543312010-02-10 17:43:283085 }],
kulkarni.a9af92a12014-09-19 18:47:213086
[email protected]1e013672012-06-29 22:12:203087 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:283088 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:063089 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:283090 },
[email protected]3a352c362012-05-08 19:45:493091 'conditions': [
3092 ['buildtype=="Official"', {
3093 'xcode_settings': {
3094 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
3095 },
3096 }],
3097 ],
[email protected]d8543312010-02-10 17:43:283098 }],
[email protected]1e013672012-06-29 22:12:203099 [ 'OS=="ios"', {
3100 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:223101 # TODO(ios): Fix remaining warnings in third-party code, then
3102 # remove this; the Mac cleanup didn't get everything that's
3103 # flagged in an iOS build.
3104 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:203105 'RUN_CLANG_STATIC_ANALYZER': 'NO',
[email protected]5a2637d02013-11-12 17:01:173106 # Several internal ios directories generate numerous warnings for
3107 # -Wobjc-missing-property-synthesis.
3108 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
[email protected]1e013672012-06-29 22:12:203109 },
3110 }],
[email protected]c14d8e772010-02-09 22:06:153111 ],
3112 }, {
[email protected]a5c598152012-01-27 04:55:133113 'includes': [
3114 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
3115 'filename_rules.gypi',
3116 ],
[email protected]41af4f82012-11-08 00:09:313117 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:153118 # C99 macros on Mac and Linux.
3119 'defines': [
[email protected]41af4f82012-11-08 00:09:313120 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:153121 '__STDC_FORMAT_MACROS',
3122 ],
3123 'conditions': [
[email protected]c14d8e772010-02-09 22:06:153124 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:073125 # turn on warnings for signed/unsigned mismatch on chromium code.
3126 'msvs_settings': {
3127 'VCCLCompilerTool': {
3128 'AdditionalOptions': ['/we4389'],
3129 },
3130 },
[email protected]c14d8e772010-02-09 22:06:153131 }],
[email protected]63e39a282011-07-13 20:41:283132 ['OS=="win" and component=="shared_library"', {
3133 'msvs_disabled_warnings': [
3134 4251, # class 'std::xx' needs to have dll-interface.
3135 ],
3136 }],
[email protected]c14d8e772010-02-09 22:06:153137 ],
3138 }],
[email protected]a6e22132010-02-10 20:43:183139 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:553140 'default_configuration': 'Debug',
3141 'configurations': {
[email protected]5153767c2009-12-22 01:52:503142 # VCLinkerTool LinkIncremental values below:
3143 # 0 == default
3144 # 1 == /INCREMENTAL:NO
3145 # 2 == /INCREMENTAL
3146 # Debug links incremental, Release does not.
3147 #
[email protected]7b99801e2010-11-03 17:26:233148 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:503149 #
3150 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:563151 'abstract': 1,
3152 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:513153 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:563154 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
3155 'CharacterSet': '1',
3156 },
[email protected]f59e1302013-02-15 13:48:403157 # Add the default import libs.
3158 'msvs_settings':{
3159 'VCLinkerTool': {
3160 'AdditionalDependencies': [
3161 'kernel32.lib',
3162 'gdi32.lib',
3163 'winspool.lib',
3164 'comdlg32.lib',
3165 'advapi32.lib',
3166 'shell32.lib',
3167 'ole32.lib',
3168 'oleaut32.lib',
3169 'user32.lib',
3170 'uuid.lib',
3171 'odbc32.lib',
3172 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:393173 'delayimp.lib',
[email protected]48293fb2013-12-04 04:02:033174 'credui.lib',
3175 'netapi32.lib',
[email protected]f59e1302013-02-15 13:48:403176 ],
scottmg567a3fd2014-11-19 01:47:213177 'AdditionalOptions': [
3178 # Suggested by Microsoft Devrel to avoid
3179 # LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000)
3180 # which started happening more regularly after VS2013 Update 4.
3181 '/maxilksize:2147483647',
3182 ],
[email protected]f59e1302013-02-15 13:48:403183 },
3184 },
[email protected]5153767c2009-12-22 01:52:503185 },
3186 'x86_Base': {
3187 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:503188 'msvs_settings': {
3189 'VCLinkerTool': {
[email protected]388484f02014-02-06 09:49:213190 'MinimumRequiredVersion': '5.01', # XP.
[email protected]ef4fa4072009-12-04 22:46:503191 'TargetMachine': '1',
3192 },
[email protected]2d584a92013-11-12 22:44:393193 'VCLibrarianTool': {
3194 'TargetMachine': '1',
3195 },
[email protected]ef4fa4072009-12-04 22:46:503196 },
[email protected]2fa40782009-11-01 21:17:343197 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:563198 },
[email protected]5153767c2009-12-22 01:52:503199 'x64_Base': {
3200 'abstract': 1,
3201 'msvs_configuration_platform': 'x64',
3202 'msvs_settings': {
3203 'VCLinkerTool': {
[email protected]68c88b02014-06-04 17:16:043204 # Make sure to understand http://crbug.com/361720 if you want to
3205 # increase this.
3206 'MinimumRequiredVersion': '5.02', # Server 2003.
[email protected]5153767c2009-12-22 01:52:503207 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:503208 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:053209 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:503210 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:053211 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:363212 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
3213 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:503214 },
[email protected]d26b4418ab2010-03-24 22:06:353215 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:503216 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:053217 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:503218 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:053219 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]2d584a92013-11-12 22:44:393220 'TargetMachine': '17', # x64
[email protected]5153767c2009-12-22 01:52:503221 },
3222 },
[email protected]5153767c2009-12-22 01:52:503223 },
3224 'Debug_Base': {
3225 'abstract': 1,
[email protected]14339762011-04-05 07:36:583226 'defines': [
3227 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3228 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3229 ],
[email protected]1c966092009-08-20 21:19:263230 'xcode_settings': {
[email protected]d5d593a2009-08-28 23:23:293231 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:493232 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:493233 '<@(debug_extra_cflags)',
3234 ],
[email protected]1c966092009-08-20 21:19:263235 },
[email protected]bb05e452009-10-29 21:24:563236 'msvs_settings': {
3237 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:473238 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:563239 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:213240 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:473241 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:153242 'conditions': [
3243 # According to MSVS, InlineFunctionExpansion=0 means
3244 # "default inlining", not "/Ob0".
3245 # Thus, we have to handle InlineFunctionExpansion==0 separately.
3246 ['win_debug_InlineFunctionExpansion==0', {
3247 'AdditionalOptions': ['/Ob0'],
3248 }],
3249 ['win_debug_InlineFunctionExpansion!=""', {
3250 'InlineFunctionExpansion':
3251 '<(win_debug_InlineFunctionExpansion)',
3252 }],
[email protected]fac10d12010-11-08 16:00:313253 ['win_debug_disable_iterator_debugging==1', {
3254 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
3255 }],
[email protected]ef5c5f1b2011-12-17 02:16:243256
3257 # if win_debug_OmitFramePointers is blank, leave as default
3258 ['win_debug_OmitFramePointers==1', {
3259 'OmitFramePointers': 'true',
3260 }],
3261 ['win_debug_OmitFramePointers==0', {
3262 'OmitFramePointers': 'false',
3263 # The above is not sufficient (http://crbug.com/106711): it
3264 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
3265 # perform FPO regardless, so we must explicitly disable.
3266 # We still want the false setting above to avoid having
3267 # "/Oy /Oy-" and warnings about overriding.
3268 'AdditionalOptions': ['/Oy-'],
3269 }],
[email protected]2ae6e022010-05-07 13:19:153270 ],
[email protected]ef5c5f1b2011-12-17 02:16:243271 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:563272 },
3273 'VCLinkerTool': {
3274 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:333275 # ASLR makes debugging with windbg difficult because Chrome.exe and
3276 # Chrome.dll share the same base name. As result, windbg will
3277 # name the Chrome.dll module like chrome_<base address>, where
3278 # <base address> typically changes with each launch. This in turn
3279 # means that breakpoints in Chrome.dll don't stick from one launch
3280 # to the next. For this reason, we turn ASLR off in debug builds.
3281 # Note that this is a three-way bool, where 0 means to pick up
3282 # the default setting, 1 is off and 2 is on.
3283 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:563284 },
3285 'VCResourceCompilerTool': {
3286 'PreprocessorDefinitions': ['_DEBUG'],
3287 },
3288 },
[email protected]2f80c312009-02-25 21:26:553289 'conditions': [
[email protected]78204c92012-09-14 04:42:553290 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:543291 'target_conditions': [
3292 ['_toolset=="target"', {
3293 'cflags': [
3294 '<@(debug_extra_cflags)',
3295 ],
3296 }],
[email protected]bb05e452009-10-29 21:24:563297 ],
[email protected]2f80c312009-02-25 21:26:553298 }],
[email protected]1eec679e2013-12-13 22:10:273299 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', {
[email protected]a8d94b42013-12-10 18:52:223300 # Enable libstdc++ debugging facilities to help catch problems
3301 # early, see http://crbug.com/65151 .
3302 # TODO(phajdan.jr): Should we enable this for all of POSIX?
3303 'defines': ['_GLIBCXX_DEBUG=1',],
3304 }],
[email protected]330ba6d2014-03-06 05:41:363305 ['release_valgrind_build==0', {
[email protected]56cca4e2011-07-01 21:33:353306 'xcode_settings': {
3307 'OTHER_CFLAGS': [
3308 '-fstack-protector-all', # Implies -fstack-protector
3309 ],
3310 },
3311 }],
[email protected]e86432a2014-08-18 21:01:083312 ['clang==1', {
3313 'cflags': [
3314 # Allow comparing the address of references and 'this' against 0
3315 # in debug builds. Technically, these can never be null in
3316 # well-defined C/C++ and Clang can optimize such checks away in
3317 # release builds, but they may be used in asserts in debug builds.
3318 '-Wno-undefined-bool-conversion',
3319 '-Wno-tautological-undefined-compare',
3320 ],
3321 'xcode_settings': {
3322 'OTHER_CFLAGS': [
3323 '-Wno-undefined-bool-conversion',
3324 '-Wno-tautological-undefined-compare',
3325 ],
3326 },
3327 'msvs_settings': {
3328 'VCCLCompilerTool': {
3329 'AdditionalOptions': [
3330 '-Wno-undefined-bool-conversion',
3331 '-Wno-tautological-undefined-compare',
3332 ],
3333 },
3334 },
3335 }],
[email protected]2f80c312009-02-25 21:26:553336 ],
3337 },
[email protected]5153767c2009-12-22 01:52:503338 'Release_Base': {
3339 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:553340 'defines': [
3341 'NDEBUG',
3342 ],
[email protected]1c966092009-08-20 21:19:263343 'xcode_settings': {
3344 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
3345 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:003346 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:263347 },
[email protected]bb05e452009-10-29 21:24:563348 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:473349 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:473350 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:153351 'conditions': [
[email protected]2212d272011-12-20 21:37:373352 # In official builds, each target will self-select
3353 # an optimization level.
3354 ['buildtype!="Official"', {
3355 'Optimization': '<(win_release_Optimization)',
3356 },
3357 ],
[email protected]2ae6e022010-05-07 13:19:153358 # According to MSVS, InlineFunctionExpansion=0 means
3359 # "default inlining", not "/Ob0".
3360 # Thus, we have to handle InlineFunctionExpansion==0 separately.
3361 ['win_release_InlineFunctionExpansion==0', {
3362 'AdditionalOptions': ['/Ob0'],
3363 }],
3364 ['win_release_InlineFunctionExpansion!=""', {
3365 'InlineFunctionExpansion':
3366 '<(win_release_InlineFunctionExpansion)',
3367 }],
[email protected]626d2d22011-10-11 15:47:333368
[email protected]ef5c5f1b2011-12-17 02:16:243369 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:333370 ['win_release_OmitFramePointers==1', {
3371 'OmitFramePointers': 'true',
3372 }],
3373 ['win_release_OmitFramePointers==0', {
3374 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:243375 # The above is not sufficient (http://crbug.com/106711): it
3376 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
3377 # perform FPO regardless, so we must explicitly disable.
3378 # We still want the false setting above to avoid having
3379 # "/Oy /Oy-" and warnings about overriding.
3380 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:333381 }],
[email protected]2ae6e022010-05-07 13:19:153382 ],
[email protected]21fac242014-07-18 09:30:333383 'AdditionalOptions': [
3384 '/d2Zi+', # Improve debugging of Release builds.
scottmg4f828c942014-08-29 04:11:073385 '/Zc:inline', # Remove unreferenced COMDAT (faster links).
[email protected]21fac242014-07-18 09:30:333386 '<@(win_release_extra_cflags)',
3387 ],
[email protected]7e0d664a2009-12-03 21:07:473388 },
[email protected]bb05e452009-10-29 21:24:563389 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:343390 # LinkIncremental is a tri-state boolean, where 0 means default
3391 # (i.e., inherit from parent solution), 1 means false, and
3392 # 2 means true.
[email protected]bb05e452009-10-29 21:24:563393 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:343394 # This corresponds to the /PROFILE flag which ensures the PDB
3395 # file contains FIXUP information (growing the PDB file by about
3396 # 5%) but does not otherwise alter the output binary. This
3397 # information is used by the Syzygy optimization tool when
3398 # decomposing the release image.
3399 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:563400 },
3401 },
[email protected]2f80c312009-02-25 21:26:553402 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:163403 ['msvs_use_common_release', {
3404 'includes': ['release.gypi'],
3405 }],
[email protected]7bdd7d7c2012-11-01 10:36:163406 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:583407 'defines': [
3408 'NVALGRIND',
3409 'DYNAMIC_ANNOTATIONS_ENABLED=0',
3410 ],
[email protected]ee857512010-05-14 08:24:423411 }, {
[email protected]14339762011-04-05 07:36:583412 'defines': [
[email protected]2f047202013-06-14 06:36:393413 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]be766bb2014-07-01 19:22:123414 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]14339762011-04-05 07:36:583415 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3416 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3417 ],
[email protected]92822e82009-09-18 14:26:563418 }],
cpu962a1412014-11-25 02:25:173419 ['OS=="win" and win_use_allocator_shim==0', {
[email protected]7e0d664a2009-12-03 21:07:473420 'defines': ['NO_TCMALLOC'],
3421 }],
[email protected]8b225222014-02-18 22:54:443422 # _FORTIFY_SOURCE isn't really supported by Clang now, see
3423 # http://llvm.org/bugs/show_bug.cgi?id=16821.
[email protected]ed472ad2014-07-10 00:50:523424 # It seems to work fine with Ubuntu 12 headers though, so use it
3425 # in official builds.
3426 ['os_posix==1 and (asan!=1 and msan!=1 and tsan!=1 and lsan!=1 and ubsan!=1) and (OS!="linux" or clang!=1 or buildtype=="Official")', {
[email protected]9577be42013-11-01 15:16:303427 'target_conditions': [
3428 ['chromium_code==1', {
3429 # Non-chromium code is not guaranteed to compile cleanly
3430 # with _FORTIFY_SOURCE. Also, fortified build may fail
3431 # when optimizations are disabled, so only do that for Release
3432 # build.
3433 'defines': [
3434 '_FORTIFY_SOURCE=2',
3435 ],
3436 }],
[email protected]37305ae2012-12-11 01:54:583437 ],
3438 }],
[email protected]7df38122012-11-05 23:54:433439 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:543440 'target_conditions': [
3441 ['_toolset=="target"', {
3442 'cflags': [
3443 '<@(release_extra_cflags)',
3444 ],
[email protected]9082bba2014-05-20 06:50:213445 'conditions': [
3446 ['enable_resource_whitelist_generation==1', {
3447 'cflags': [
3448 '-Wunknown-pragmas -Wno-error=unknown-pragmas',
3449 ],
3450 }],
3451 ],
[email protected]d8e3b122012-05-31 23:07:543452 }],
[email protected]bb05e452009-10-29 21:24:563453 ],
3454 }],
[email protected]b64ec822013-05-23 12:57:413455 ['OS=="ios"', {
3456 'defines': [
3457 'NS_BLOCK_ASSERTIONS=1',
3458 ],
3459 }],
[email protected]2f80c312009-02-25 21:26:553460 ],
3461 },
[email protected]5153767c2009-12-22 01:52:503462 #
3463 # Concrete configurations
3464 #
3465 'Debug': {
3466 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
3467 },
3468 'Release': {
3469 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:503470 },
[email protected]f926fa0a2009-08-04 22:50:133471 'conditions': [
[email protected]8125fba72014-02-26 14:32:583472 [ 'OS=="ios"', {
3473 'Profile': {
3474 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
3475 'target_conditions': [
3476 [ '_type=="executable"', {
3477 # To get a real .dSYM bundle produced by dsymutil, set the
3478 # debug information format to dwarf-with-dsym. Since
3479 # strip_from_xcode will not be used, set Xcode to do the
3480 # stripping as well.
3481 'xcode_settings': {
3482 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3483 'DEPLOYMENT_POSTPROCESSING': 'YES',
3484 'STRIP_INSTALLED_PRODUCT': 'YES',
3485 },
3486 }],
3487 ],
3488 },
3489 }],
[email protected]f926fa0a2009-08-04 22:50:133490 [ 'OS=="win"', {
3491 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:503492 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:503493 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:303494 },
3495 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:503496 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:303497 },
[email protected]f926fa0a2009-08-04 22:50:133498 }],
3499 ],
[email protected]2f80c312009-02-25 21:26:553500 },
3501 },
3502 'conditions': [
[email protected]41300ff2014-04-07 08:17:253503 ['os_posix==1', {
3504 'target_defaults': {
3505 'ldflags': [
3506 '-Wl,-z,now',
3507 '-Wl,-z,relro',
3508 ],
glider7dbed1572014-09-23 16:38:113509 # TODO(glider): enable the default options on other systems.
3510 'conditions': [
3511 ['use_sanitizer_options==1 and ((OS=="linux" and (chromeos==0 or target_arch!="ia32")) or OS=="mac")', {
3512 'dependencies': [
3513 '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options',
3514 ],
3515 }],
3516 ],
[email protected]41300ff2014-04-07 08:17:253517 },
3518 }],
[email protected]713d6e4a2014-03-28 18:18:203519 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
[email protected]453a8ad32014-05-20 17:32:493520 ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', {
[email protected]43539ec2012-11-20 22:35:253521 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:253522 'ldflags': [
[email protected]a89c460c2014-03-17 13:42:133523 '-Wl,--fatal-warnings',
[email protected]43539ec2012-11-20 22:35:253524 ],
[email protected]43539ec2012-11-20 22:35:253525 },
3526 }],
[email protected]d2ca75c2013-02-01 05:47:173527 ['os_posix==1 and chromeos==0', {
3528 # Chrome OS enables -fstack-protector-strong via its build wrapper,
3529 # and we want to avoid overriding this, so stack-protector is only
3530 # enabled when not building on Chrome OS.
3531 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
3532 # supports it.
3533 'target_defaults': {
3534 'cflags': [
3535 '-fstack-protector',
3536 '--param=ssp-buffer-size=4',
3537 ],
3538 },
3539 }],
[email protected]1e013672012-06-29 22:12:203540 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:263541 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:273542 # Enable -Werror by default, but put it in a variable so it can
3543 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
3544 'variables': {
[email protected]cbbb3472012-01-25 18:32:313545 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:203546 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:273547 },
[email protected]6863896f2012-01-25 17:51:363548 'defines': [
3549 '_FILE_OFFSET_BITS=64',
3550 ],
[email protected]9d384032009-03-20 23:13:263551 'cflags': [
[email protected]1bba09c2009-08-13 12:53:163552 '<(werror)', # See note above about the werror variable.
3553 '-pthread',
[email protected]ef8c3cf2012-01-24 04:37:293554 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:163555 '-Wall',
[email protected]0fa17082010-03-26 00:48:053556 # TODO(evan): turn this back on once all the builds work.
3557 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:203558 # Don't warn about unused function params. We use those everywhere.
3559 '-Wno-unused-parameter',
3560 # Don't warn about the "struct foo f = {0};" initialization pattern.
3561 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:123562 # Don't export any symbols (for example, to plugins we dlopen()).
3563 # Note: this is *required* to make some plugins work.
3564 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:353565 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:243566 ],
3567 'cflags_cc': [
Scott Graham9ebc1b92014-09-11 17:04:273568 '-fno-exceptions',
[email protected]832d0212009-10-28 19:12:223569 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:243570 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:363571 # Make inline functions have hidden visiblity by default.
3572 # Surprisingly, not covered by -fvisibility=hidden.
3573 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:173574 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
[email protected]f58fa2c2013-12-06 08:06:203575 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453)
[email protected]554abd902011-07-25 04:03:173576 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:263577 ],
[email protected]a6cf87e2009-04-03 04:07:383578 'ldflags': [
[email protected]138241f2010-03-30 23:53:103579 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:263580 ],
[email protected]1e013672012-06-29 22:12:203581 'libraries' : [
3582 '<(libraries_for_target)',
3583 ],
[email protected]3aacaf952009-04-02 15:34:093584 'configurations': {
[email protected]5153767c2009-12-22 01:52:503585 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:313586 'variables': {
3587 'debug_optimize%': '0',
3588 },
[email protected]3aacaf952009-04-02 15:34:093589 'defines': [
3590 '_DEBUG',
3591 ],
3592 'cflags': [
[email protected]95ad2032012-08-24 00:49:253593 '-O>(debug_optimize)',
[email protected]230023c2014-07-02 09:31:333594 '-g',
mithrofb34b342014-09-22 07:26:443595 '-gdwarf-4',
[email protected]3aacaf952009-04-02 15:34:093596 ],
[email protected]da1c8d692011-09-20 20:35:013597 'conditions' : [
[email protected]3f05e912013-04-11 20:38:343598 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:343599 'ldflags': [
[email protected]933d0722013-07-03 04:32:493600 # Warn in case of text relocations.
3601 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:343602 ],
3603 }],
[email protected]fa9d4e262012-08-21 04:39:003604 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:553605 # Some configurations are copied from Release_Base to reduce
3606 # the binary size.
3607 'variables': {
3608 'debug_optimize%': 's',
3609 },
[email protected]da1c8d692011-09-20 20:35:013610 'cflags': [
[email protected]8a37e4502012-08-14 22:42:553611 '-fdata-sections',
3612 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:013613 ],
[email protected]8a37e4502012-08-14 22:42:553614 'ldflags': [
3615 '-Wl,-O1',
3616 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:553617 ],
[email protected]da1c8d692011-09-20 20:35:013618 }],
[email protected]264868d22014-07-10 17:37:373619 ['OS=="android" and android_full_debug==0 and target_arch!="arm64"', {
3620 # We don't omit frame pointers on arm64 since they are required
3621 # to correctly unwind stackframes which contain system library
3622 # function frames (crbug.com/391706).
3623 'cflags': [
3624 '-fomit-frame-pointer',
3625 ],
3626 }],
[email protected]d4c0ec5b2013-03-10 03:07:453627 ['OS=="linux" and target_arch=="ia32"', {
3628 'ldflags': [
3629 '-Wl,--no-as-needed',
3630 ],
3631 }],
[email protected]2578ea12014-01-17 06:02:513632 ['debug_unwind_tables==1', {
3633 'cflags': ['-funwind-tables'],
3634 }, {
3635 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
primianoa452216012014-11-25 12:34:093636 'defines': ['NO_UNWIND_TABLES'],
[email protected]2578ea12014-01-17 06:02:513637 }],
[email protected]9dbbabd2014-04-30 23:42:323638 # TODO(mostynb): shuffle clang/gcc_version/binutils_version
3639 # definitions in to the right scope to use them when setting
3640 # linux_use_debug_fission, so it can be used here alone.
3641 ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', {
[email protected]1c26c6a2014-03-17 14:11:213642 'cflags': ['-gsplit-dwarf'],
[email protected]1c26c6a2014-03-17 14:11:213643 }],
[email protected]da1c8d692011-09-20 20:35:013644 ],
[email protected]5315f2842009-04-28 00:43:273645 },
[email protected]5153767c2009-12-22 01:52:503646 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:013647 'variables': {
3648 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:513649 # Binaries become big and gold is unable to perform GC
3650 # and remove unused sections for some of test targets
3651 # on 32 bit platform.
3652 # (This is currently observed only in chromeos valgrind bots)
3653 # The following flag is to disable --gc-sections linker
3654 # option for these bots.
3655 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:123656
3657 # TODO(bradnelson): reexamine how this is done if we change the
3658 # expansion of configurations
3659 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:013660 },
[email protected]3aacaf952009-04-02 15:34:093661 'cflags': [
[email protected]4c33a9b2014-06-23 22:20:193662 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:533663 # Don't emit the GCC version ident directives, they just end up
3664 # in the .comment section taking up binary size.
3665 '-fno-ident',
3666 # Put data and code in their own sections, so that unused symbols
3667 # can be removed at link time with --gc-sections.
3668 '-fdata-sections',
3669 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:093670 ],
[email protected]c902f2c2010-08-06 20:04:183671 'ldflags': [
3672 # Specifically tell the linker to perform optimizations.
3673 # See http://lwn.net/Articles/192624/ .
3674 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:223675 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:183676 ],
[email protected]1dd529642010-05-15 01:02:513677 'conditions' : [
3678 ['no_gc_sections==0', {
3679 'ldflags': [
3680 '-Wl,--gc-sections',
3681 ],
3682 }],
[email protected]264868d22014-07-10 17:37:373683 ['OS=="android" and target_arch!="arm64"', {
3684 # We don't omit frame pointers on arm64 since they are required
3685 # to correctly unwind stackframes which contain system library
3686 # function frames (crbug.com/391706).
3687 'cflags': [
3688 '-fomit-frame-pointer',
3689 ]
3690 }],
[email protected]da1c8d692011-09-20 20:35:013691 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:583692 'variables': {
3693 'release_optimize%': 's',
3694 },
[email protected]933d0722013-07-03 04:32:493695 'ldflags': [
[email protected]933d0722013-07-03 04:32:493696 # Warn in case of text relocations.
3697 '-Wl,--warn-shared-textrel',
3698 ],
[email protected]da1c8d692011-09-20 20:35:013699 }],
[email protected]7664ab32011-02-01 23:35:253700 ['profiling==1', {
3701 'cflags': [
3702 '-fno-omit-frame-pointer',
3703 '-g',
3704 ],
[email protected]0358c4832013-06-23 14:17:583705 'conditions' : [
3706 ['profiling_full_stack_frames==1', {
3707 'cflags': [
3708 '-fno-inline',
3709 '-fno-optimize-sibling-calls',
3710 ],
3711 }],
3712 ],
[email protected]7664ab32011-02-01 23:35:253713 }],
[email protected]2578ea12014-01-17 06:02:513714 ['release_unwind_tables==1', {
3715 'cflags': ['-funwind-tables'],
3716 }, {
3717 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
primianoa452216012014-11-25 12:34:093718 'defines': ['NO_UNWIND_TABLES'],
[email protected]a637d4382014-01-11 03:12:053719 }],
[email protected]8d726a42012-02-09 03:49:003720 ],
[email protected]3aacaf952009-04-02 15:34:093721 },
3722 },
[email protected]606116d22009-05-06 22:38:233723 'conditions': [
[email protected]04b482602011-09-14 02:36:213724 ['target_arch=="ia32"', {
3725 'target_conditions': [
3726 ['_toolset=="target"', {
3727 'asflags': [
3728 # Needed so that libs with .s files (e.g. libicudata.a)
3729 # are compatible with the general 32-bit-ness.
3730 '-32',
3731 ],
3732 # All floating-point computations on x87 happens in 80-bit
3733 # precision. Because the C and C++ language standards allow
3734 # the compiler to keep the floating-point values in higher
3735 # precision than what's specified in the source and doing so
3736 # is more efficient than constantly rounding up to 64-bit or
3737 # 32-bit precision as specified in the source, the compiler,
3738 # especially in the optimized mode, tries very hard to keep
3739 # values in x87 floating-point stack (in 80-bit precision)
3740 # as long as possible. This has important side effects, that
3741 # the real value used in computation may change depending on
3742 # how the compiler did the optimization - that is, the value
3743 # kept in 80-bit is different than the value rounded down to
3744 # 64-bit or 32-bit. There are possible compiler options to
3745 # make this behavior consistent (e.g. -ffloat-store would keep
3746 # all floating-values in the memory, thus force them to be
3747 # rounded to its original precision) but they have significant
3748 # runtime performance penalty.
3749 #
3750 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
3751 # which keep floating-point values in SSE registers in its
3752 # native precision (32-bit for single precision, and 64-bit
3753 # for double precision values). This means the floating-point
3754 # value used during computation does not change depending on
3755 # how the compiler optimized the code, since the value is
3756 # always kept in its specified precision.
[email protected]6c0d30672014-03-12 00:31:303757 #
3758 # Refer to http://crbug.com/348761 for rationale behind SSE2
3759 # being a minimum requirement for 32-bit Linux builds and
3760 # http://crbug.com/313032 for an example where this has "bit"
3761 # us in the past.
3762 'cflags': [
3763 '-msse2',
3764 '-mfpmath=sse',
3765 '-mmmx', # Allows mmintrin.h for MMX intrinsics.
3766 '-m32',
3767 ],
3768 'ldflags': [
3769 '-m32',
3770 ],
[email protected]04b482602011-09-14 02:36:213771 'conditions': [
[email protected]0a0063c52013-03-29 06:36:213772 # Use gold linker for Android ia32 target.
3773 ['OS=="android"', {
[email protected]0a0063c52013-03-29 06:36:213774 'ldflags': [
3775 '-fuse-ld=gold',
3776 ],
3777 }],
[email protected]04b482602011-09-14 02:36:213778 # Install packages have started cropping up with
3779 # different headers between the 32-bit and 64-bit
3780 # versions, so we have to shadow those differences off
3781 # and make sure a 32-bit-on-64-bit build picks up the
3782 # right files.
[email protected]32594022012-05-10 03:22:283783 # For android build, use NDK headers instead of host headers
3784 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:213785 'include_dirs+': [
3786 '/usr/include32',
3787 ],
3788 }],
3789 ],
[email protected]ffde7932009-05-29 00:39:063790 }],
[email protected]606116d22009-05-06 22:38:233791 ],
3792 }],
[email protected]be0090f22014-03-18 17:43:483793 ['target_arch=="x64"', {
3794 'target_conditions': [
3795 ['_toolset=="target"', {
3796 'conditions': [
3797 # Use gold linker for Android x64 target.
3798 ['OS=="android"', {
[email protected]be0090f22014-03-18 17:43:483799 'ldflags': [
3800 '-fuse-ld=gold',
3801 ],
3802 }],
3803 ],
3804 'cflags': [
3805 '-m64',
3806 '-march=x86-64',
3807 ],
3808 'ldflags': [
3809 '-m64',
3810 ],
3811 }],
3812 ],
3813 }],
[email protected]3dda8a962009-08-10 18:58:073814 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:293815 'target_conditions': [
3816 ['_toolset=="target"', {
[email protected]77c1b29392009-12-04 06:21:293817 'conditions': [
[email protected]d7595862014-08-18 15:41:073818 ['clang==0', {
3819 'cflags_cc': [
3820 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3821 # has changed whenever it encounters a varargs function. This
3822 # silences those warnings, as they are not helpful and
3823 # clutter legitimate warnings.
3824 '-Wno-abi',
3825 ],
3826 }],
[email protected]0c2072e2014-08-18 18:21:183827 ['clang==1 and arm_arch!="" and OS!="android"', {
[email protected]d7595862014-08-18 15:41:073828 'cflags': [
3829 '-target arm-linux-gnueabihf',
[email protected]d7595862014-08-18 15:41:073830 ],
3831 'ldflags': [
3832 '-target arm-linux-gnueabihf',
3833 ],
3834 }],
[email protected]7d6763422013-04-26 12:06:543835 ['arm_arch!=""', {
3836 'cflags': [
3837 '-march=<(arm_arch)',
3838 ],
fdegansd7a59f92014-10-23 11:49:543839 'conditions': [
3840 ['use_lto==1 or use_lto_o2==1', {
3841 'ldflags': [
3842 '-march=<(arm_arch)',
3843 ],
3844 }],
3845 ],
[email protected]7d6763422013-04-26 12:06:543846 }],
[email protected]0c2072e2014-08-18 18:21:183847 ['clang==1 and OS!="android"', {
[email protected]d7595862014-08-18 15:41:073848 'cflags': [
[email protected]0c2072e2014-08-18 18:21:183849 # We need to disable clang's builtin assembler as it can't
3850 # handle several asm files, crbug.com/124610
[email protected]d7595862014-08-18 15:41:073851 '-no-integrated-as',
3852 ],
3853 }],
[email protected]7d6763422013-04-26 12:06:543854 ['arm_tune!=""', {
3855 'cflags': [
3856 '-mtune=<(arm_tune)',
3857 ],
fdegansd7a59f92014-10-23 11:49:543858 'conditions': [
3859 ['use_lto==1 or use_lto_o2==1', {
3860 'ldflags': [
3861 '-mtune=<(arm_tune)',
3862 ],
3863 }],
3864 ],
[email protected]7d6763422013-04-26 12:06:543865 }],
3866 ['arm_fpu!=""', {
3867 'cflags': [
3868 '-mfpu=<(arm_fpu)',
3869 ],
fdegansd7a59f92014-10-23 11:49:543870 'conditions': [
3871 ['use_lto==1 or use_lto_o2==1', {
3872 'ldflags': [
3873 '-mfpu=<(arm_fpu)',
3874 ],
3875 }],
3876 ],
[email protected]7d6763422013-04-26 12:06:543877 }],
3878 ['arm_float_abi!=""', {
3879 'cflags': [
3880 '-mfloat-abi=<(arm_float_abi)',
3881 ],
fdegansd7a59f92014-10-23 11:49:543882 'conditions': [
3883 ['use_lto==1 or use_lto_o2==1', {
3884 'ldflags': [
3885 '-mfloat-abi=<(arm_float_abi)',
3886 ],
3887 }],
3888 ],
[email protected]7d6763422013-04-26 12:06:543889 }],
3890 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293891 'cflags': [
fdegans6b767132014-09-09 10:09:293892 '-mthumb',
3893 ],
fdegansd7a59f92014-10-23 11:49:543894 'conditions': [
3895 ['use_lto==1 or use_lto_o2==1', {
3896 'ldflags': [
3897 '-mthumb',
3898 ],
3899 }],
3900 ],
[email protected]77c1b29392009-12-04 06:21:293901 }],
[email protected]da1c8d692011-09-20 20:35:013902 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533903 # Most of the following flags are derived from what Android
3904 # uses by default when building for arm, reference for which
3905 # can be found in the following file in the Android NDK:
fdegans6b767132014-09-09 10:09:293906 # toolchains/arm-linux-androideabi-4.9/setup.mk
[email protected]7b1112c2012-03-16 22:03:533907 'cflags': [
3908 # The tree-sra optimization (scalar replacement for
3909 # aggregates enabling subsequent optimizations) leads to
3910 # invalid code generation when using the Android NDK's
3911 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433912 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533913 '-fno-tree-sra',
fdegans6b767132014-09-09 10:09:293914 # The following option is disabled to improve binary
3915 # size and performance in gcc 4.9.
[email protected]7557cd42014-05-28 15:32:593916 '-fno-caller-saves',
[email protected]7b1112c2012-03-16 22:03:533917 '-Wno-psabi',
3918 ],
[email protected]ad17e342012-07-17 20:45:483919 # Android now supports .relro sections properly.
3920 # NOTE: While these flags enable the generation of .relro
3921 # sections, the generated libraries can still be loaded on
3922 # older Android platform versions.
3923 'ldflags': [
3924 '-Wl,-z,relro',
3925 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483926 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483927 ],
[email protected]da1c8d692011-09-20 20:35:013928 'conditions': [
fdegansc16332e82014-09-09 13:55:293929 ['gcc_version==48 and clang==0', {
3930 'cflags': [
3931 # The following 5 options are disabled to save on
3932 # binary size in GCC 4.8.
3933 '-fno-partial-inlining',
3934 '-fno-early-inlining',
3935 '-fno-tree-copy-prop',
3936 '-fno-tree-loop-optimize',
3937 '-fno-move-loop-invariants',
3938 ],
3939 }],
[email protected]7d6763422013-04-26 12:06:543940 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223941 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013942 }],
[email protected]4c48ef102012-11-29 22:00:383943 ['profiling==1', {
3944 'cflags': [
[email protected]a0e681cc2014-05-16 16:56:473945 # Thumb code with frame pointer makes chrome crash
3946 # early.
3947 '-marm',
3948 '-mapcs-frame', # Required by -fno-omit-frame-pointer.
3949 # The perf report sometimes incorrectly attributes
3950 # code from tail calls.
3951 '-fno-optimize-sibling-calls',
3952 ],
3953 'cflags!': [
3954 '-fomit-frame-pointer',
[email protected]4c48ef102012-11-29 22:00:383955 ],
3956 }],
[email protected]220ea5932012-08-09 10:44:073957 ['clang==1', {
3958 'cflags!': [
3959 # Clang does not support the following options.
3960 '-mthumb-interwork',
3961 '-finline-limit=64',
3962 '-fno-tree-sra',
[email protected]7557cd42014-05-28 15:32:593963 '-fno-caller-saves',
[email protected]220ea5932012-08-09 10:44:073964 '-Wno-psabi',
3965 ],
[email protected]b763d402014-01-13 18:34:223966 'cflags': [
3967 # TODO(hans) Enable integrated-as (crbug.com/124610).
3968 '-no-integrated-as',
[email protected]f4091d32014-01-23 23:16:353969 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
[email protected]b763d402014-01-13 18:34:223970 ],
[email protected]1afb1102014-01-31 00:04:223971 'ldflags': [
[email protected]2a9c8562014-08-11 18:01:213972 # Let clang find the ld.gold in the NDK.
[email protected]b728310a2014-08-08 20:53:343973 '--gcc-toolchain=<(android_toolchain)/..',
[email protected]1afb1102014-01-31 00:04:223974 ],
[email protected]220ea5932012-08-09 10:44:073975 }],
[email protected]cdc001e2014-01-23 11:07:533976 ['asan==1', {
3977 'cflags': [
3978 '-marm', # Required for frame pointer based stack traces.
3979 ],
3980 }],
[email protected]da1c8d692011-09-20 20:35:013981 ],
3982 }],
[email protected]24641702014-07-03 17:20:153983 ['chromecast==1', {
3984 'cflags': [
3985 # We set arm_arch to "" so that -march compiler option
3986 # is not set. Otherwise a gcc bug that would complain
3987 # about it conflicting with '-mcpu=cortex-a9'. The flag
3988 # '-march=armv7-a' is actually redundant anyway because
3989 # it is enabled by default when we built the toolchain.
3990 # And using '-mcpu=cortex-a9' should be sufficient.
3991 '-mcpu=cortex-a9',
3992 '-funwind-tables',
3993 # Breakpad requires symbols with debugging information
3994 '-g',
3995 ],
3996 'ldflags': [
3997 # We want to statically link libstdc++/libgcc_s.
3998 '-static-libstdc++',
3999 '-static-libgcc',
4000 ],
4001 'cflags!': [
4002 # Some components in Chromium (e.g. v8, skia, ffmpeg)
4003 # define their own cflags for arm builds that could
4004 # conflict with the flags we set here (e.g.
4005 # '-mcpu=cortex-a9'). Remove these flags explicitly.
4006 '-march=armv7-a',
4007 '-mtune=cortex-a8',
4008 ],
4009 }],
[email protected]3dda8a962009-08-10 18:58:074010 ],
4011 }],
4012 ],
4013 }],
[email protected]7a2f984a2014-03-20 18:35:494014 ['target_arch=="arm64"', {
4015 'target_conditions': [
4016 ['_toolset=="target"', {
4017 'conditions': [
4018 ['OS=="android"', {
4019 'cflags!': [
4020 '-fstack-protector', # stack protector is always enabled on arm64.
4021 ],
4022 }],
4023 ],
4024 }],
4025 ],
4026 }],
[email protected]23eea4a42013-04-27 04:10:264027 ['target_arch=="mipsel"', {
4028 'target_conditions': [
4029 ['_toolset=="target"', {
4030 'conditions': [
petarjc8a5da742014-08-27 14:33:364031 ['android_webview_build==0 and mips_arch_variant=="r6"', {
4032 'cflags': ['-mips32r6', '-Wa,-mips32r6'],
4033 'conditions': [
4034 ['OS=="android"', {
4035 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',],
4036 }],
4037 ],
4038 }],
4039 ['android_webview_build==0 and mips_arch_variant=="r2"', {
[email protected]23eea4a42013-04-27 04:10:264040 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:344041 }],
petarjc8a5da742014-08-27 14:33:364042 ['android_webview_build==0 and mips_arch_variant=="r1"', {
[email protected]23eea4a42013-04-27 04:10:264043 'cflags': ['-mips32', '-Wa,-mips32'],
4044 }],
4045 ],
[email protected]23eea4a42013-04-27 04:10:264046 'ldflags': [
[email protected]23eea4a42013-04-27 04:10:264047 '-Wl,--no-keep-memory'
4048 ],
4049 'cflags_cc': [
4050 '-Wno-uninitialized',
4051 ],
4052 }],
4053 ],
4054 }],
petarjc8a5da742014-08-27 14:33:364055 ['target_arch=="mips64el"', {
4056 'target_conditions': [
4057 ['_toolset=="target"', {
4058 'conditions': [
4059 ['android_webview_build==0 and mips_arch_variant=="r6"', {
4060 'cflags': ['-mips64r6', '-Wa,-mips64r6'],
4061 'ldflags': [ '-mips64r6' ],
4062 }],
4063 ['android_webview_build==0 and mips_arch_variant=="r2"', {
4064 'cflags': ['-mips64r2', '-Wa,-mips64r2'],
4065 'ldflags': [ '-mips64r2' ],
4066 }],
4067 ],
4068 'cflags_cc': [
4069 '-Wno-uninitialized',
4070 ],
4071 }],
4072 ],
4073 }],
[email protected]2fb843b2010-08-12 02:11:084074 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:584075 'cflags': [
4076 '-fPIC',
4077 ],
[email protected]d3f692b32011-12-14 19:04:354078 'ldflags': [
4079 '-fPIC',
4080 ],
[email protected]c76723a2010-01-25 23:10:584081 }],
[email protected]ee28c9f2009-09-04 01:53:014082 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:574083 'target_conditions': [
4084 ['_toolset=="target"', {
4085 'cflags': [
4086 '--sysroot=<(sysroot)',
4087 ],
4088 'ldflags': [
4089 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:154090 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:574091 ],
4092 }]]
[email protected]ee28c9f2009-09-04 01:53:014093 }],
[email protected]58680ce2010-09-18 00:09:154094 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:124095 'cflags': [
[email protected]00c83cc2013-07-25 00:55:504096 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:074097 '-Wno-reserved-user-defined-literal',
4098 ],
4099 'cflags_cc': [
thakis7d982512014-10-31 19:40:274100 # gnu++11 instead of c++11 is needed because some code uses
4101 # typeof() (a GNU extension).
4102 # TODO(thakis): Eventually switch this to c++11 instead,
4103 # http://crbug.com/427584
[email protected]8dec02e2013-04-30 21:40:074104 '-std=gnu++11',
4105 ],
4106 }],
[email protected]acad4962014-08-04 19:05:024107 ['clang==0 and host_clang==1', {
4108 'target_conditions': [
4109 ['_toolset=="host"', {
4110 'cflags_cc': [ '-std=gnu++11', ],
4111 }],
4112 ],
4113 }],
[email protected]5d451ad2011-02-11 16:43:464114 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:264115 'cflags': [
[email protected]c872dc52012-05-19 06:36:314116 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:264117 ],
[email protected]5d451ad2011-02-11 16:43:464118 }],
[email protected]4a9ac22e2011-12-02 03:41:534119 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:264120 'cflags': [
4121 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534122 ],
4123 }],
4124 ['clang==1 and clang_add_plugin!=""', {
4125 'cflags': [
[email protected]d23720682011-08-11 00:16:264126 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4127 ],
[email protected]5e781232011-01-28 02:57:594128 }],
[email protected]49110f02013-04-22 22:51:344129 ['clang==1 and target_arch=="ia32"', {
4130 'cflags': [
4131 # Else building libyuv gives clang's register allocator issues,
4132 # see llvm.org/PR15798 / crbug.com/233709
4133 '-momit-leaf-frame-pointer',
hans9df460f2014-10-09 16:08:504134 # Align the stack on 16-byte boundaries, http://crbug.com/418554.
4135 '-mstack-alignment=16',
4136 '-mstackrealign',
[email protected]49110f02013-04-22 22:51:344137 ],
4138 }],
[email protected]2616d45d2012-01-19 03:15:484139 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4140 'cflags': [
4141 # See http://crbug.com/110262
4142 '-fcolor-diagnostics',
4143 ],
4144 }],
[email protected]062522a2013-06-13 15:49:554145 # Common options for AddressSanitizer, LeakSanitizer,
4146 # ThreadSanitizer and MemorySanitizer.
[email protected]0dbe7af92014-06-26 23:31:404147 ['asan==1 or lsan==1 or tsan==1 or msan==1 or ubsan==1 or ubsan_vptr==1', {
[email protected]cf351c22013-04-19 13:00:544148 'target_conditions': [
4149 ['_toolset=="target"', {
4150 'cflags': [
4151 '-fno-omit-frame-pointer',
4152 '-gline-tables-only',
4153 ],
[email protected]b772fce2014-01-22 09:27:524154 'cflags!': [
4155 '-fomit-frame-pointer',
4156 ],
[email protected]7fd639a2014-05-30 23:59:014157 }],
4158 ],
4159 }],
4160 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
4161 'target_conditions': [
4162 ['_toolset=="target"', {
[email protected]49110f02013-04-22 22:51:344163 'ldflags!': [
4164 # Functions interposed by the sanitizers can make ld think
4165 # that some libraries aren't needed when they actually are,
4166 # http://crbug.com/234010. As workaround, disable --as-needed.
4167 '-Wl,--as-needed',
4168 ],
[email protected]2f047202013-06-14 06:36:394169 'defines': [
4170 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]7a16a1e2014-07-04 04:18:034171 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]2f047202013-06-14 06:36:394172 ],
[email protected]cf351c22013-04-19 13:00:544173 }],
4174 ],
4175 }],
[email protected]92799b632011-08-15 14:33:064176 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:424177 'target_conditions': [
4178 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:454179 'cflags': [
[email protected]48688df02012-11-27 21:04:564180 '-fsanitize=address',
earthdok298382332014-10-29 21:35:154181 # TODO(earthdok): Re-enable. http://crbug.com/427202
4182 #'-fsanitize-blacklist=<(asan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:454183 ],
4184 'ldflags': [
[email protected]48688df02012-11-27 21:04:564185 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:454186 ],
[email protected]1ffc3b3962012-05-16 14:08:424187 }],
[email protected]921c7b52011-11-25 10:34:354188 ],
[email protected]eec02d982014-03-21 18:51:174189 'conditions': [
4190 ['OS=="mac"', {
4191 'cflags': [
4192 '-mllvm -asan-globals=0', # http://crbug.com/352073
4193 ],
4194 }],
4195 ],
[email protected]92799b632011-08-15 14:33:064196 }],
[email protected]7fd639a2014-05-30 23:59:014197 ['ubsan==1', {
4198 'target_conditions': [
4199 ['_toolset=="target"', {
4200 'cflags': [
4201 '-fsanitize=undefined',
4202 # -fsanitize=vptr is incompatible with -fno-rtti.
4203 '-fno-sanitize=vptr',
gliderdfb61d82014-11-11 16:28:054204 # Employ the experimental PBQP register allocator to avoid
4205 # slow compilation on files with too many basic blocks.
4206 # See http://crbug.com/426271.
4207 '-mllvm -regalloc=pbqp',
4208 # Speculatively use coalescing to slightly improve the code
4209 # generated by PBQP regallocator. May increase compile time.
4210 '-mllvm -pbqp-coalescing',
[email protected]7fd639a2014-05-30 23:59:014211 ],
4212 'ldflags': [
4213 '-fsanitize=undefined',
4214 # -fsanitize=vptr is incompatible with -fno-rtti.
4215 '-fno-sanitize=vptr',
4216 ],
4217 }],
4218 ],
4219 }],
[email protected]0dbe7af92014-06-26 23:31:404220 ['ubsan_vptr==1', {
4221 'target_conditions': [
4222 ['_toolset=="target"', {
4223 'cflags': [
4224 '-fsanitize=vptr',
[email protected]0dbe7af92014-06-26 23:31:404225 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
[email protected]0dbe7af92014-06-26 23:31:404226 ],
4227 'cflags_cc!': [
4228 '-fno-rtti',
4229 ],
4230 'cflags!': [
4231 '-fno-rtti',
4232 ],
4233 'ldflags': [
[email protected]22e15542014-07-18 23:09:244234 '-fsanitize=vptr',
[email protected]0dbe7af92014-06-26 23:31:404235 ],
4236 'defines': [
4237 'UNDEFINED_SANITIZER',
4238 ],
4239 }],
4240 ],
4241 }],
[email protected]544a18ed2014-01-17 21:01:364242 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034243 'target_conditions': [
4244 ['_toolset=="target"', {
4245 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364246 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034247 ],
4248 }],
4249 ],
4250 }],
earthdok78507b92014-10-23 14:00:134251 ['asan_field_padding!=0', {
4252 'target_conditions': [
4253 ['_toolset=="target"', {
4254 'cflags': [
4255 '-fsanitize-address-field-padding=<(asan_field_padding)',
4256 ],
4257 }],
4258 ],
4259 }],
[email protected]062522a2013-06-13 15:49:554260 ['lsan==1', {
4261 'target_conditions': [
4262 ['_toolset=="target"', {
4263 'cflags': [
4264 '-fsanitize=leak',
4265 ],
4266 'ldflags': [
4267 '-fsanitize=leak',
4268 ],
4269 'defines': [
4270 'LEAK_SANITIZER',
[email protected]f6f65a02013-09-06 05:40:524271 'WTF_USE_LEAK_SANITIZER=1',
[email protected]062522a2013-06-13 15:49:554272 ],
4273 }],
4274 ],
4275 }],
[email protected]c9a829272012-07-04 07:51:124276 ['tsan==1', {
4277 'target_conditions': [
4278 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:454279 'cflags': [
[email protected]927a9d672012-11-09 11:28:204280 '-fsanitize=thread',
[email protected]3227d8f2014-04-26 00:49:324281 '-fsanitize-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:454282 ],
4283 'ldflags': [
[email protected]927a9d672012-11-09 11:28:204284 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:454285 ],
4286 'defines': [
4287 'THREAD_SANITIZER',
4288 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:164289 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:454290 ],
[email protected]c9a829272012-07-04 07:51:124291 }],
4292 ],
4293 }],
[email protected]a10ddd2d2013-02-26 20:06:594294 ['msan==1', {
4295 'target_conditions': [
4296 ['_toolset=="target"', {
4297 'cflags': [
4298 '-fsanitize=memory',
[email protected]a030ab62014-06-23 17:14:154299 '-fsanitize-memory-track-origins=<(msan_track_origins)',
[email protected]190d4ce62014-01-17 20:24:534300 '-fsanitize-blacklist=<(msan_blacklist)',
[email protected]a10ddd2d2013-02-26 20:06:594301 ],
4302 'ldflags': [
4303 '-fsanitize=memory',
4304 ],
4305 'defines': [
4306 'MEMORY_SANITIZER',
4307 ],
[email protected]a10ddd2d2013-02-26 20:06:594308 }],
4309 ],
4310 }],
[email protected]c8103a42013-11-12 13:41:304311 ['use_instrumented_libraries==1', {
4312 'dependencies': [
4313 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
4314 ],
[email protected]c8103a42013-11-12 13:41:304315 }],
[email protected]22b3f531e2013-12-20 13:07:284316 ['use_custom_libcxx==1', {
4317 'dependencies': [
[email protected]121cbf6e2014-05-05 13:30:424318 '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
[email protected]22b3f531e2013-12-20 13:07:284319 ],
4320 }],
[email protected]8a48f3f2012-12-04 20:14:044321 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:444322 'target_conditions' : [
[email protected]c45dbc52014-05-27 14:02:484323 # crazy_linker has an upstream gyp file we can't edit, and we
4324 # don't want to instrument it.
4325 ['_toolset=="target" and _target_name!="crazy_linker"', {
[email protected]8a6abd12012-05-16 10:04:444326 'cflags': [
4327 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:454328 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:244329 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:454330 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:444331 ],
4332 }],
[email protected]82e9b002013-07-16 21:04:244333 ['_toolset=="target" and OS=="android"', {
4334 'cflags': [
4335 # Avoids errors with current NDK:
4336 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant"
[email protected]037688fc2014-07-04 20:07:364337 '-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.h',
[email protected]82e9b002013-07-16 21:04:244338 ],
4339 }],
[email protected]8a6abd12012-05-16 10:04:444340 ],
4341 }],
[email protected]ce4367d2013-01-15 16:13:104342 ['linux_dump_symbols==1', {
4343 'cflags': [ '-g' ],
noms277720162014-08-26 15:21:084344 'conditions': [
4345 ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', {
4346 'target_conditions': [
4347 ['_toolset=="target"', {
4348 'ldflags': [
4349 # Attempt to use less memory to prevent the linker from
4350 # running out of address space. Considering installing a
4351 # 64-bit kernel and switching to a 64-bit linker.
4352 '-Wl,--no-keep-memory',
4353 ],
4354 }],
4355 ],
4356 }],
4357 ],
[email protected]cbd5fd52009-08-26 00:14:274358 }],
[email protected]2fa89ef2014-05-07 18:45:594359 ['use_allocator!="tcmalloc"', {
[email protected]61a9b2d82010-02-26 00:31:084360 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:244361 }],
[email protected]8d726a42012-02-09 03:49:004362 ['linux_use_gold_flags==1', {
[email protected]b728310a2014-08-08 20:53:344363 # Newer gccs and clangs support -fuse-ld, use the flag to force gold
4364 # selection.
4365 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
4366 'ldflags': [ '-fuse-ld=gold', ],
4367
[email protected]c5a6fe42013-07-21 14:03:334368 'target_conditions': [
4369 ['_toolset=="target"', {
4370 'ldflags': [
4371 # Experimentation found that using four linking threads
4372 # saved ~20% of link time.
4373 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
4374 # Only apply this to the target linker, since the host
4375 # linker might not be gold, but isn't used much anyway.
[email protected]21ed97e2014-01-14 23:40:554376 # TODO(raymes): Disable threading because gold is frequently
4377 # crashing on the bots: crbug.com/161942.
4378 # '-Wl,--threads',
4379 # '-Wl,--thread-count=4',
[email protected]c5a6fe42013-07-21 14:03:334380 ],
4381 }],
[email protected]68d01e82012-12-08 03:36:324382 ],
[email protected]8d726a42012-02-09 03:49:004383 'conditions': [
4384 ['release_valgrind_build==0', {
4385 'target_conditions': [
4386 ['_toolset=="target"', {
4387 'ldflags': [
Lei Zhangd99e73cf2014-09-24 08:04:494388 '-Wl,--icf=safe',
[email protected]8d726a42012-02-09 03:49:004389 ],
4390 }],
4391 ],
4392 }],
4393 ],
4394 }],
[email protected]f0a58322014-04-16 09:50:234395 ['linux_use_bundled_binutils==1', {
[email protected]9c233692014-04-09 20:20:454396 'cflags': [
4397 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
4398 ],
[email protected]f0a58322014-04-16 09:50:234399 }],
4400 ['linux_use_bundled_gold==1', {
4401 # Put our binutils, which contains gold in the search path. We pass
4402 # the path to gold to the compiler. gyp leaves unspecified what the
4403 # cwd is when running the compiler, so the normal gyp path-munging
4404 # fails us. This hack gets the right path.
[email protected]b07806c12012-02-03 22:44:594405 'ldflags': [
[email protected]9c233692014-04-09 20:20:454406 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
[email protected]b07806c12012-02-03 22:44:594407 ],
4408 }],
[email protected]ebb701b72014-04-24 08:24:514409 # Some binutils 2.23 releases may or may not have new dtags enabled,
4410 # but they are all compatible with --disable-new-dtags,
4411 # because the new dynamic tags are not created by default.
4412 ['binutils_version>=223', {
[email protected]f0a58322014-04-16 09:50:234413 # Newer binutils don't set DT_RPATH unless you disable "new" dtags
4414 # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
4415 # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags
4416 # inside this file to allow usage of --no-as-needed and removal of
4417 # this flag.
[email protected]9c233692014-04-09 20:20:454418 'ldflags': [
4419 '-Wl,--disable-new-dtags',
4420 ],
[email protected]6d4327bf2014-06-23 23:20:464421 }],
[email protected]3d40fa22014-07-31 12:55:014422 ['gcc_version>=47 and clang==0', {
[email protected]6d4327bf2014-06-23 23:20:464423 'target_conditions': [
4424 ['_toolset=="target"', {
4425 'cflags_cc': [
4426 '-std=gnu++11',
4427 # See comment for -Wno-c++11-narrowing.
4428 '-Wno-narrowing',
4429 # TODO(thakis): Remove, http://crbug.com/263960
4430 '-Wno-literal-suffix',
4431 ],
4432 }],
4433 ],
4434 }],
[email protected]acad4962014-08-04 19:05:024435 ['host_gcc_version>=47 and clang==0 and host_clang==0', {
[email protected]6d4327bf2014-06-23 23:20:464436 'target_conditions': [
4437 ['_toolset=="host"', {
4438 'cflags_cc': [
4439 '-std=gnu++11',
4440 # See comment for -Wno-c++11-narrowing.
4441 '-Wno-narrowing',
4442 # TODO(thakis): Remove, http://crbug.com/263960
4443 '-Wno-literal-suffix',
4444 ],
4445 }],
4446 ],
4447 }],
[email protected]606116d22009-05-06 22:38:234448 ],
[email protected]9d384032009-03-20 23:13:264449 },
4450 }],
[email protected]c51e8d52009-12-11 20:04:064451 # FreeBSD-specific options; note that most FreeBSD options are set above,
4452 # with Linux.
4453 ['OS=="freebsd"', {
4454 'target_defaults': {
4455 'ldflags': [
4456 '-Wl,--no-keep-memory',
4457 ],
4458 },
4459 }],
[email protected]da1c8d692011-09-20 20:35:014460 # Android-specific options; note that most are set above with Linux.
4461 ['OS=="android"', {
4462 'variables': {
[email protected]25036722012-12-11 10:36:174463 # This is a unique identifier for a given build. It's used for
4464 # identifying various build artifacts corresponding to a particular
4465 # build of chrome (e.g. where to find archived symbols).
4466 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:014467 'conditions': [
[email protected]da1c8d692011-09-20 20:35:014468 # Figure this out early since it needs symbols from libgcc.a, so it
4469 # has to be before that in the set of libraries.
torne3bc122f2014-10-18 11:10:174470 ['component=="shared_library"', {
4471 'android_stlport_library': 'stlport_shared',
[email protected]da1c8d692011-09-20 20:35:014472 }, {
torne3bc122f2014-10-18 11:10:174473 'android_stlport_library': 'stlport_static',
[email protected]da1c8d692011-09-20 20:35:014474 }],
4475 ],
4476
4477 # Placing this variable here prevents from forking libvpx, used
4478 # by remoting. Remoting is off, so it needn't built,
4479 # so forking it's deps seems like overkill.
4480 # But this variable need defined to properly run gyp.
4481 # A proper solution is to have an OS==android conditional
4482 # in third_party/libvpx/libvpx.gyp to define it.
4483 'libvpx_path': 'lib/linux/arm',
4484 },
4485 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:014486 'variables': {
4487 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:594488 'conditions': [
4489 # If we're using the components build, append "cr" to all shared
4490 # libraries to avoid naming collisions with android system library
4491 # versions with the same name (e.g. skia, icu).
4492 ['component=="shared_library"', {
4493 'android_product_extension': 'cr.so',
4494 }, {
4495 'android_product_extension': 'so',
4496 } ],
4497 ],
[email protected]8a37e4502012-08-14 22:42:554498 },
[email protected]da1c8d692011-09-20 20:35:014499 'target_conditions': [
[email protected]e4865252013-04-04 09:15:594500 ['_type=="shared_library"', {
[email protected]71b4fc32014-08-11 11:27:124501 'product_extension': '<(android_product_extension)',
[email protected]e4865252013-04-04 09:15:594502 }],
4503
[email protected]da1c8d692011-09-20 20:35:014504 # Settings for building device targets using Android's toolchain.
4505 # These are based on the setup.mk file from the Android NDK.
4506 #
4507 # The NDK Android executable link step looks as follows:
4508 # $LDFLAGS
4509 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
4510 # $(PRIVATE_OBJECTS) <-- The .o that we built
4511 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
4512 # $(TARGET_LIBGCC) <-- libgcc.a
4513 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
4514 # $(PRIVATE_LDLIBS) <-- System .so
4515 # $(TARGET_CRTEND_O) <-- crtend.o
4516 #
4517 # For now the above are approximated for executables by adding
4518 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
4519 # of 'libraries'.
4520 #
4521 # The NDK Android shared library link step looks as follows:
4522 # $LDFLAGS
4523 # $(PRIVATE_OBJECTS) <-- The .o that we built
4524 # -l,--whole-archive
4525 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
4526 # -l,--no-whole-archive
4527 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
4528 # $(TARGET_LIBGCC) <-- libgcc.a
4529 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
4530 # $(PRIVATE_LDLIBS) <-- System .so
4531 #
[email protected]ad17e342012-07-17 20:45:484532 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:014533 #
4534 # For both executables and shared libraries, add the proper
4535 # libgcc.a to the start of libraries which puts it in the
4536 # proper spot after .o and .a files get linked in.
4537 #
4538 # TODO: The proper thing to do longer-tem would be proper gyp
4539 # support for a custom link command line.
4540 ['_toolset=="target"', {
4541 'cflags!': [
4542 '-pthread', # Not supported by Android toolchain.
4543 ],
4544 'cflags': [
[email protected]da1c8d692011-09-20 20:35:014545 '-ffunction-sections',
4546 '-funwind-tables',
4547 '-g',
4548 '-fstack-protector',
4549 '-fno-short-enums',
4550 '-finline-limit=64',
4551 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:014552 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:014553 ],
4554 'defines': [
4555 'ANDROID',
4556 '__GNU_SOURCE=1', # Necessary for clone()
4557 'USE_STLPORT=1',
4558 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:174559 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:014560 ],
4561 'ldflags!': [
4562 '-pthread', # Not supported by Android toolchain.
4563 ],
4564 'ldflags': [
[email protected]da1c8d692011-09-20 20:35:014565 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:014566 ],
[email protected]da1c8d692011-09-20 20:35:014567 'conditions': [
[email protected]71b4fc32014-08-11 11:27:124568 ['component=="static_library"', {
4569 'ldflags': [
[email protected]b4193652014-06-09 11:33:384570 '-Wl,--exclude-libs=ALL',
4571 ],
4572 }],
[email protected]220ea5932012-08-09 10:44:074573 ['clang==1', {
4574 'cflags': [
4575 # Work around incompatibilities between bionic and clang
4576 # headers.
4577 '-D__compiler_offsetof=__builtin_offsetof',
4578 '-Dnan=__builtin_nan',
4579 ],
4580 'conditions': [
4581 ['target_arch=="arm"', {
4582 'cflags': [
4583 '-target arm-linux-androideabi',
[email protected]220ea5932012-08-09 10:44:074584 ],
4585 'ldflags': [
4586 '-target arm-linux-androideabi',
4587 ],
4588 }],
4589 ['target_arch=="ia32"', {
4590 'cflags': [
4591 '-target x86-linux-androideabi',
4592 ],
4593 'ldflags': [
4594 '-target x86-linux-androideabi',
4595 ],
4596 }],
[email protected]be0090f22014-03-18 17:43:484597 # Place holder for x64 support, not tested.
4598 # TODO: Enable clang support for Android x64. http://crbug.com/346626
4599 ['target_arch=="x64"', {
4600 'cflags': [
4601 '-target x86_64-linux-androideabi',
4602 ],
4603 'ldflags': [
4604 '-target x86_64-linux-androideabi',
4605 ],
4606 }],
[email protected]220ea5932012-08-09 10:44:074607 ],
4608 }],
[email protected]ed70ed1862012-11-07 12:11:254609 ['asan==1', {
4610 'cflags': [
4611 # Android build relies on -Wl,--gc-sections removing
4612 # unreachable code. ASan instrumentation for globals inhibits
4613 # this and results in a library with unresolvable relocations.
4614 # TODO(eugenis): find a way to reenable this.
4615 '-mllvm -asan-globals=0',
4616 ],
hans51709a22014-10-15 21:20:134617 'conditions': [
4618 ['target_arch=="arm"', {
4619 'ldflags': [
4620 # TODO(hans): The ASan runtime is no longer automatically
4621 # added to the link line when using -nostdlib. Can we
4622 # stop adding -nostdlib? (crbug.com/423429)
4623 '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/lib/clang/3.6.0/lib/linux/libclang_rt.asan-arm-android.so',
4624 ],
4625 }],
4626 ],
[email protected]ed70ed1862012-11-07 12:11:254627 }],
[email protected]d999c3cb2013-03-12 10:22:364628 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:464629 'defines': [
[email protected]f5c7758a2012-07-25 16:17:574630 # The NDK has these things, but doesn't define the constants
4631 # to say that it does. Define them here instead.
4632 'HAVE_SYS_UIO_H',
4633 ],
4634 'cflags': [
4635 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:464636 ],
[email protected]da1c8d692011-09-20 20:35:014637 'ldflags': [
[email protected]5baf7482011-12-13 16:00:524638 '--sysroot=<(android_ndk_sysroot)',
torne3bc122f2014-10-18 11:10:174639 '-nostdlib',
4640 ],
fdegans3572927c2014-11-06 12:28:024641 'variables': {
4642 'conditions': [
4643 ['target_arch=="arm" and arm_thumb==1', {
4644 'thumb_option%': '-mthumb',
4645 }, {
4646 'thumb_option%': '',
4647 }],
4648 ],
4649 },
torne3bc122f2014-10-18 11:10:174650 'libraries': [
4651 '-l<(android_stlport_library)',
4652 # Manually link the libgcc.a that the cross compiler uses.
fdegans3572927c2014-11-06 12:28:024653 '<!(<(android_toolchain)/*-gcc <(thumb_option) -print-libgcc-file-name)',
torne3bc122f2014-10-18 11:10:174654 '-lc',
4655 '-ldl',
4656 '-lm',
[email protected]da1c8d692011-09-20 20:35:014657 ],
4658 }],
[email protected]d999c3cb2013-03-12 10:22:364659 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:084660 'cflags': [
[email protected]04882132012-11-21 12:40:454661 # Android predefines this as 1; undefine it here so Chromium
4662 # can redefine it later to be 2 for chromium code and unset
4663 # for third party code. This works because cflags are added
4664 # before defines.
4665 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:554666 # Disable any additional warnings enabled by the Android build system but which
4667 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:084668 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:554669 '-Wno-extra', # Enabled by -Wextra, but no specific flag
4670 '-Wno-ignored-qualifiers',
4671 '-Wno-type-limits',
[email protected]6c55f1242014-02-12 16:06:564672 '-Wno-unused-but-set-variable',
[email protected]0d7291e2012-10-04 19:16:084673 ],
4674 'cflags_cc': [
[email protected]2f34a202013-03-11 13:59:164675 # Other things unrelated to -Wextra:
4676 '-Wno-non-virtual-dtor',
4677 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:084678 ],
torne3bc122f2014-10-18 11:10:174679 'libraries': [
4680 '-ldl',
4681 ],
[email protected]0d7291e2012-10-04 19:16:084682 }],
[email protected]9577be42013-11-01 15:16:304683 ['android_webview_build==1', {
4684 'target_conditions': [
4685 ['chromium_code==0', {
4686 'cflags': [
4687 # There is a class of warning which:
4688 # 1) Android always enables and also treats as errors
4689 # 2) Chromium ignores in third party code
4690 # So we re-enable those warnings when building Android.
4691 '-Wno-address',
4692 '-Wno-format-security',
4693 '-Wno-return-type',
4694 '-Wno-sequence-point',
4695 ],
4696 'cflags_cc': [
4697 '-Wno-non-virtual-dtor',
4698 ],
4699 }],
[email protected]0d7291e2012-10-04 19:16:084700 ],
4701 }],
[email protected]febd3572012-05-03 09:17:454702 ['target_arch == "arm"', {
4703 'ldflags': [
4704 # Enable identical code folding to reduce size.
4705 '-Wl,--icf=safe',
4706 ],
4707 }],
[email protected]da1c8d692011-09-20 20:35:014708 # NOTE: The stlport header include paths below are specified in
4709 # cflags rather than include_dirs because they need to come
4710 # after include_dirs. Think of them like system headers, but
4711 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
4712 # toolchain (circa Gingerbread) will exhibit strange errors.
4713 # The include ordering here is important; change with caution.
torne3bc122f2014-10-18 11:10:174714 ['android_webview_build==0', {
[email protected]da1c8d692011-09-20 20:35:014715 'cflags': [
[email protected]843ca8c2014-07-09 15:50:324716 '-isystem<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:014717 ],
fdegans3572927c2014-11-06 12:28:024718 'conditions': [
4719 ['target_arch=="arm" and arm_thumb==1', {
4720 'ldflags': [ '-L<(android_stlport_libs_dir)/thumb' ]
4721 }, {
4722 'ldflags': [ '-L<(android_stlport_libs_dir)' ]
4723 }],
[email protected]da1c8d692011-09-20 20:35:014724 ],
torne3bc122f2014-10-18 11:10:174725 }, { # else: android_webview_build!=0
4726 'aosp_build_settings': {
4727 # Specify that we want to statically link stlport from the
4728 # NDK. This will provide all the include and library paths
4729 # automatically at build time, and link the right library.
4730 'LOCAL_NDK_STL_VARIANT': 'stlport_static',
4731 },
[email protected]da1c8d692011-09-20 20:35:014732 }],
4733 ['target_arch=="ia32"', {
4734 # The x86 toolchain currently has problems with stack-protector.
4735 'cflags!': [
4736 '-fstack-protector',
4737 ],
4738 'cflags': [
4739 '-fno-stack-protector',
4740 ],
4741 }],
4742 ],
4743 'target_conditions': [
4744 ['_type=="executable"', {
[email protected]7d2b7cf2014-05-14 15:15:194745 # Force android tools to export the "main" symbol so they can be
4746 # loaded on ICS using the run_pie wrapper. See crbug.com/373219.
4747 # TODO(primiano): remove -fvisibility and -rdynamic flags below
4748 # when ICS support will be dropped.
4749 'cflags': [
4750 '-fPIE',
4751 '-fvisibility=default',
4752 ],
[email protected]da1c8d692011-09-20 20:35:014753 'ldflags': [
4754 '-Bdynamic',
[email protected]da1c8d692011-09-20 20:35:014755 '-Wl,--gc-sections',
4756 '-Wl,-z,nocopyreloc',
[email protected]7d2b7cf2014-05-14 15:15:194757 '-pie',
4758 '-rdynamic',
[email protected]da1c8d692011-09-20 20:35:014759 # crtbegin_dynamic.o should be the last item in ldflags.
4760 '<(android_ndk_lib)/crtbegin_dynamic.o',
4761 ],
4762 'libraries': [
4763 # crtend_android.o needs to be the last item in libraries.
4764 # Do not add any libraries after this!
4765 '<(android_ndk_lib)/crtend_android.o',
4766 ],
4767 }],
[email protected]f5c7758a2012-07-25 16:17:574768 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]7ab8b9be2014-06-12 17:20:424769 'ldflags!': [
4770 '-Wl,--exclude-libs=ALL',
4771 ],
[email protected]da1c8d692011-09-20 20:35:014772 'ldflags': [
4773 '-Wl,-shared,-Bsymbolic',
4774 ],
[email protected]d093fe8b2013-04-30 18:00:234775 'conditions': [
4776 ['android_webview_build==0', {
4777 'ldflags': [
4778 # crtbegin_so.o should be the last item in ldflags.
4779 '<(android_ndk_lib)/crtbegin_so.o',
4780 ],
4781 'libraries': [
4782 # crtend_so.o needs to be the last item in libraries.
4783 # Do not add any libraries after this!
4784 '<(android_ndk_lib)/crtend_so.o',
4785 ],
4786 }],
[email protected]a08029b42012-04-25 03:18:464787 ],
[email protected]da1c8d692011-09-20 20:35:014788 }],
4789 ],
4790 }],
4791 # Settings for building host targets using the system toolchain.
4792 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:124793 'cflags!': [
4794 # Due to issues in Clang build system, using ASan on 32-bit
4795 # binaries on x86_64 host is problematic.
4796 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:564797 '-fsanitize=address',
[email protected]3984aaf2012-02-16 11:42:124798 ],
[email protected]da1c8d692011-09-20 20:35:014799 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:444800 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:014801 '-Wl,-z,noexecstack',
4802 '-Wl,--gc-sections',
4803 '-Wl,-O1',
4804 '-Wl,--as-needed',
[email protected]df240712013-09-02 23:17:224805 '-Wl,--warn-shared-textrel',
4806 '-Wl,--fatal-warnings',
[email protected]da1c8d692011-09-20 20:35:014807 ],
4808 }],
[email protected]0ccf578f2013-03-13 11:13:394809 # Settings for building host targets on mac.
4810 ['_toolset=="host" and host_os=="mac"', {
4811 'ldflags!': [
4812 '-Wl,-z,now',
4813 '-Wl,-z,relro',
4814 ],
4815 }],
[email protected]da1c8d692011-09-20 20:35:014816 ],
4817 },
4818 }],
[email protected]93f21e42010-04-01 00:35:154819 ['OS=="solaris"', {
4820 'cflags!': ['-fvisibility=hidden'],
4821 'cflags_cc!': ['-fvisibility-inlines-hidden'],
4822 }],
[email protected]1e013672012-06-29 22:12:204823 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:554824 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:424825 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:554826 'xcode_settings': {
4827 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:244828 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
4829 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]47c3e852013-09-13 02:22:314830 'COPY_PHASE_STRIP': 'NO',
[email protected]ab2956372009-08-13 18:11:044831 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
4832 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:044833 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
4834 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
4835 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:254836 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
4837 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:044838 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
4839 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
4840 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
4841 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:554842 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:044843 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:554844 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:044845 'WARNING_CFLAGS': [
4846 '-Wall',
4847 '-Wendif-labels',
4848 '-Wextra',
4849 # Don't warn about unused function parameters.
4850 '-Wno-unused-parameter',
4851 # Don't warn about the "struct foo f = {0};" initialization
4852 # pattern.
4853 '-Wno-missing-field-initializers',
4854 ],
[email protected]b3fb8092009-03-12 19:09:244855 'conditions': [
4856 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:594857 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
4858 ],
[email protected]2936b8c2012-10-29 10:57:314859 # Note that the prebuilt Clang binaries should not be used for iOS
4860 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:284861 ['clang==1', {
thakis7d982512014-10-31 19:40:274862 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
[email protected]3e893e0c2012-11-16 16:58:444863 # Warn if automatic synthesis is triggered with
4864 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534865 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:304866 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:284867 'WARNING_CFLAGS': [
[email protected]bb148192014-04-02 03:37:334868 # This warns on selectors from Cocoa headers (-length, -set).
4869 # cfe-dev is currently discussing the merits of this warning.
4870 # TODO(thakis): Reevaluate what to do with this, based one
4871 # cfe-dev discussion.
4872 '-Wno-selector-type-mismatch',
[email protected]ce2cad72014-02-13 18:17:354873 ],
[email protected]ce2cad72014-02-13 18:17:354874 'conditions': [
4875 ['clang_xcode==0', {
4876 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
4877 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]ce2cad72014-02-13 18:17:354878 }],
[email protected]66733172010-09-22 00:09:284879 ],
4880 }],
[email protected]ce2cad72014-02-13 18:17:354881 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:464882 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:314883 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:464884 ],
4885 }],
[email protected]ce2cad72014-02-13 18:17:354886 ['clang==1 and clang_xcode==0 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:594887 'OTHER_CFLAGS': [
4888 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534889 ],
4890 }],
[email protected]ce2cad72014-02-13 18:17:354891 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', {
[email protected]4a9ac22e2011-12-02 03:41:534892 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:594893 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4894 ],
4895 }],
[email protected]2616d45d2012-01-19 03:15:484896 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4897 'OTHER_CFLAGS': [
4898 # See http://crbug.com/110262
4899 '-fcolor-diagnostics',
4900 ],
4901 }],
[email protected]91274072014-04-03 01:49:494902 ['OS=="ios" and target_subarch!="arm32" and \
[email protected]7e0fe4912014-04-09 20:53:004903 "<(GENERATOR)"=="xcode"', {
[email protected]91274072014-04-03 01:49:494904 'OTHER_CFLAGS': [
4905 # TODO(ios): when building Chrome for iOS on 64-bit platform
4906 # with Xcode, the -Wshorted-64-to-32 warning is automatically
4907 # enabled. This cause failures when compiling protobuf code,
4908 # so disable the warning. http://crbug.com/359107
4909 '-Wno-shorten-64-to-32',
4910 ],
4911 }],
[email protected]b3fb8092009-03-12 19:09:244912 ],
[email protected]2f80c312009-02-25 21:26:554913 },
[email protected]34f40892011-09-06 21:53:304914 'conditions': [
4915 ['clang==1', {
4916 'variables': {
4917 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
4918 },
4919 }],
[email protected]921c7b52011-11-25 10:34:354920 ['asan==1', {
4921 'xcode_settings': {
4922 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:564923 '-fsanitize=address',
[email protected]22df2b22014-03-13 10:55:074924 '-mllvm -asan-globals=0', # http://crbug.com/352073
[email protected]14a37352014-05-16 11:39:554925 '-gline-tables-only',
[email protected]921c7b52011-11-25 10:34:354926 ],
[email protected]921c7b52011-11-25 10:34:354927 },
[email protected]921c7b52011-11-25 10:34:354928 }],
[email protected]544a18ed2014-01-17 21:01:364929 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034930 'target_conditions': [
4931 ['_toolset=="target"', {
4932 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364933 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034934 ],
4935 }],
4936 ],
4937 }],
[email protected]34f40892011-09-06 21:53:304938 ],
[email protected]2f80c312009-02-25 21:26:554939 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:554940 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:464941 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:084942 'conditions': [
4943 ['asan==1', {
4944 'xcode_settings': {
4945 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:444946 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:084947 ],
4948 },
4949 }],
[email protected]c9cc9442013-12-28 21:27:444950 ['mac_write_linker_maps==1', {
4951 'xcode_settings': {
4952 'OTHER_LDFLAGS': [
4953 '-Wl,-map,>(_target_name).map',
4954 ],
4955 },
4956 }],
[email protected]4281a4e2012-08-24 19:05:084957 ],
[email protected]5d7dc972009-04-16 15:30:464958 }],
4959 ['_mac_bundle', {
4960 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:314961 'target_conditions': [
4962 ['_type=="executable"', {
4963 'conditions': [
4964 ['asan==1', {
4965 'postbuilds': [
4966 {
4967 'variables': {
4968 # Define copy_asan_dylib_path in a variable ending in
4969 # _path so that gyp understands it's a path and
4970 # performs proper relativization during dict merging.
4971 'copy_asan_dylib_path':
4972 'mac/copy_asan_runtime_dylib.sh',
4973 },
4974 'postbuild_name': 'Copy ASan runtime dylib',
4975 'action': [
4976 '<(copy_asan_dylib_path)',
4977 ],
4978 },
4979 ],
4980 }],
4981 ],
4982 }],
4983 ],
[email protected]87fde4a2009-02-28 00:50:084984 }],
[email protected]2936b8c2012-10-29 10:57:314985 ], # target_conditions
4986 }, # target_defaults
4987 }], # OS=="mac" or OS=="ios"
4988 ['OS=="mac"', {
4989 'target_defaults': {
[email protected]eea7d332014-05-16 11:43:084990 'defines': [
4991 # Prevent Mac OS X AssertMacros.h from defining macros that collide
4992 # with common names, like 'check', 'require', and 'verify'.
4993 # (Included by system header. Also exists on iOS but not included.)
4994 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h
4995 '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0',
4996 ],
[email protected]2936b8c2012-10-29 10:57:314997 'variables': {
4998 # These should end with %, but there seems to be a bug with % in
4999 # variables that are intended to be set to different values in
5000 # different targets, like these.
5001 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:315002 # Strip debugging symbols from the target.
5003 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:375004 'conditions': [
5005 ['asan==1', {
5006 'conditions': [
5007 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:355008 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:375009 }, {
5010 'mac_real_dsym': '<(mac_want_real_dsym)'
5011 }],
5012 ],
5013 }, {
5014 'conditions': [
5015 ['mac_want_real_dsym=="default"', {
5016 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
5017 }, {
5018 'mac_real_dsym': '<(mac_want_real_dsym)'
5019 }],
5020 ],
5021 }],
5022 ],
[email protected]2936b8c2012-10-29 10:57:315023 },
5024 'xcode_settings': {
5025 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
5026 # (Equivalent to -fPIC)
5027 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
5028 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
5029 # Keep pch files below xcodebuild/.
5030 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:395031 'OTHER_CFLAGS': [
5032 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
5033 # xcode_setting, but not until all downstream projects' mac bots are
5034 # using xcode >= 4.6, because that's when the default value of the
5035 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
5036 # setting is a no-op as far as xcode is concerned, but the compiler
5037 # behaves differently based on whether -fno-strict-aliasing is
5038 # specified or not.
5039 '-fno-strict-aliasing', # See http://crbug.com/32204.
5040 ],
[email protected]2936b8c2012-10-29 10:57:315041 },
5042 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:105043 ['_type=="executable"', {
5044 'postbuilds': [
5045 {
5046 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:365047 # code execution when running on Mac OS X 10.7 ("Lion"), and
5048 # ensures that the position-independent executable (PIE) bit
5049 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:105050 'variables': {
[email protected]8c40f322011-08-24 03:33:365051 # Define change_mach_o_flags in a variable ending in _path
5052 # so that GYP understands it's a path and performs proper
5053 # relativization during dict merging.
5054 'change_mach_o_flags_path':
5055 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:175056 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:135057 ],
5058 'target_conditions': [
[email protected]162407f2011-09-08 15:33:175059 ['mac_pie==0 or release_valgrind_build==1', {
5060 # Don't enable PIE if it's unwanted. It's unwanted if
5061 # the target specifies mac_pie=0 or if building for
5062 # Valgrind, because Valgrind doesn't understand slide.
5063 # See the similar mac_pie/release_valgrind_build check
5064 # below.
[email protected]081c0342011-08-24 14:59:135065 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:135066 '--no-pie',
5067 ],
5068 }],
5069 ],
[email protected]6303fed2011-08-11 01:12:105070 },
[email protected]8c40f322011-08-24 03:33:365071 'postbuild_name': 'Change Mach-O Flags',
5072 'action': [
5073 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:135074 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:365075 ],
[email protected]6303fed2011-08-11 01:12:105076 },
5077 ],
treib0b804d02014-09-01 17:06:485078 'conditions': [
5079 ['asan==1', {
5080 'variables': {
jiayl55c7faa2014-09-24 16:25:185081 'asan_saves_file': 'asan.saves',
treib0b804d02014-09-01 17:06:485082 },
5083 'xcode_settings': {
jiayl55c7faa2014-09-24 16:25:185084 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
treib0b804d02014-09-01 17:06:485085 },
5086 }],
5087 ],
[email protected]162407f2011-09-08 15:33:175088 'target_conditions': [
5089 ['mac_pie==1 and release_valgrind_build==0', {
5090 # Turn on position-independence (ASLR) for executables. When
5091 # PIE is on for the Chrome executables, the framework will
5092 # also be subject to ASLR.
5093 # Don't do this when building for Valgrind, because Valgrind
5094 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
5095 # understand slide, and get rid of the Valgrind check.
5096 'xcode_settings': {
5097 'OTHER_LDFLAGS': [
5098 '-Wl,-pie', # Position-independent executable (MH_PIE)
5099 ],
5100 },
5101 }],
5102 ],
[email protected]6a0242bc2011-07-01 00:34:465103 }],
[email protected]9a5e72862010-09-02 16:16:585104 ['(_type=="executable" or _type=="shared_library" or \
5105 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:205106 'target_conditions': [
5107 ['mac_real_dsym == 1', {
5108 # To get a real .dSYM bundle produced by dsymutil, set the
5109 # debug information format to dwarf-with-dsym. Since
5110 # strip_from_xcode will not be used, set Xcode to do the
5111 # stripping as well.
5112 'configurations': {
[email protected]5153767c2009-12-22 01:52:505113 'Release_Base': {
[email protected]24700642009-06-01 16:01:205114 'xcode_settings': {
5115 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
5116 'DEPLOYMENT_POSTPROCESSING': 'YES',
5117 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:075118 'target_conditions': [
[email protected]c2111422010-06-01 18:30:255119 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:075120 # The Xcode default is to strip debugging symbols
5121 # only (-S). Local symbols should be stripped as
5122 # well, which will be handled by -x. Xcode will
5123 # continue to insert -S when stripping even when
5124 # additional flags are added with STRIPFLAGS.
5125 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:405126 }], # _type=="shared_library" or _type=="loadable_module"
treib0b804d02014-09-01 17:06:485127 ['_type=="executable"', {
5128 'conditions': [
5129 ['asan==1', {
5130 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
jiayl55c7faa2014-09-24 16:25:185131 }]
treib0b804d02014-09-01 17:06:485132 ],
5133 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:075134 ], # target_conditions
5135 }, # xcode_settings
5136 }, # configuration "Release"
5137 }, # configurations
[email protected]24700642009-06-01 16:01:205138 }, { # mac_real_dsym != 1
5139 # To get a fast fake .dSYM bundle, use a post-build step to
5140 # produce the .dSYM and strip the executable. strip_from_xcode
5141 # only operates in the Release configuration.
5142 'postbuilds': [
5143 {
5144 'variables': {
5145 # Define strip_from_xcode in a variable ending in _path
5146 # so that gyp understands it's a path and performs proper
5147 # relativization during dict merging.
5148 'strip_from_xcode_path': 'mac/strip_from_xcode',
5149 },
5150 'postbuild_name': 'Strip If Needed',
5151 'action': ['<(strip_from_xcode_path)'],
5152 },
[email protected]e14a9f92009-08-05 19:26:075153 ], # postbuilds
5154 }], # mac_real_dsym
5155 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:585156 }], # (_type=="executable" or _type=="shared_library" or
5157 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:075158 ], # target_conditions
5159 }, # target_defaults
5160 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:205161 ['OS=="ios"', {
5162 'target_defaults': {
5163 'xcode_settings' : {
thakisa90810d2014-11-04 19:41:545164 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
[email protected]ce2cad72014-02-13 18:17:355165
[email protected]ce2cad72014-02-13 18:17:355166 'conditions': [
[email protected]fe329272014-03-12 19:06:575167 # Older Xcodes do not support -Wno-deprecated-register, so pass an
5168 # additional flag to suppress the "unknown compiler option" error.
5169 # Restrict this flag to builds that are either compiling with Xcode
5170 # or compiling with Xcode's Clang. This will allow Ninja builds to
5171 # continue failing on unknown compiler options.
5172 # TODO(rohitrao): This flag is temporary and should be removed as
5173 # soon as the iOS bots are updated to use Xcode 5.1.
[email protected]d04384ab2014-03-13 20:46:015174 ['clang_xcode==1', {
[email protected]fe329272014-03-12 19:06:575175 'WARNING_CFLAGS': [
5176 '-Wno-unknown-warning-option',
5177 ],
5178 }],
5179
5180 # Limit the valid architectures depending on "target_subarch".
5181 # This need to include the "arm" architectures but also the "x86"
5182 # ones (they are used when building for the simulator).
[email protected]ce2cad72014-02-13 18:17:355183 ['target_subarch=="arm32"', {
Stuart Morgan7c31daa2014-08-29 13:59:455184 'VALID_ARCHS': ['armv7', 'i386'],
[email protected]ce2cad72014-02-13 18:17:355185 }],
5186 ['target_subarch=="arm64"', {
5187 'VALID_ARCHS': ['arm64', 'x86_64'],
5188 }],
5189 ['target_subarch=="both"', {
Stuart Morgan7c31daa2014-08-29 13:59:455190 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'],
[email protected]ce2cad72014-02-13 18:17:355191 }],
[email protected]480c6672014-08-04 11:28:065192 ['use_system_libcxx==1', {
5193 'target_conditions': [
5194 # Only use libc++ when building target for iOS not when building
5195 # tools for the host (OS X) as Mac targets OS X SDK 10.6 which
5196 # does not support libc++.
5197 ['_toolset=="target"', {
5198 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
5199 }]
5200 ],
[email protected]7c613ee92014-08-14 21:22:315201 }, {
5202 # The default for deployment target of 7.0+ is libc++, so force
5203 # the old behavior unless libc++ is enabled.
5204 'CLANG_CXX_LIBRARY': 'libstdc++', # -stdlib=libstdc++
[email protected]480c6672014-08-04 11:28:065205 }],
[email protected]ce2cad72014-02-13 18:17:355206 ],
[email protected]1e013672012-06-29 22:12:205207 },
5208 'target_conditions': [
[email protected]296bc452013-05-13 21:29:475209 ['_toolset=="host"', {
5210 'xcode_settings': {
5211 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
5212 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:355213 'VALID_ARCHS': [
5214 'x86_64',
5215 ],
[email protected]c3c372e2013-10-29 22:31:515216 'ARCHS': [
[email protected]ce2cad72014-02-13 18:17:355217 'x86_64',
[email protected]c3c372e2013-10-29 22:31:515218 ],
[email protected]296bc452013-05-13 21:29:475219 },
5220 }],
5221 ['_toolset=="target"', {
5222 'xcode_settings': {
5223 # This section should be for overriding host settings. But,
5224 # since we can't negate the iphone deployment target above, we
5225 # instead set it here for target only.
5226 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:355227 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'],
[email protected]296bc452013-05-13 21:29:475228 },
5229 }],
[email protected]1e013672012-06-29 22:12:205230 ['_type=="executable"', {
5231 'configurations': {
5232 'Release_Base': {
5233 'xcode_settings': {
5234 'DEPLOYMENT_POSTPROCESSING': 'YES',
5235 'STRIP_INSTALLED_PRODUCT': 'YES',
5236 },
5237 },
[email protected]3c6aa862012-11-05 17:11:445238 'Debug_Base': {
5239 'xcode_settings': {
5240 # Remove dSYM to reduce build time.
5241 'DEBUG_INFORMATION_FORMAT': 'dwarf',
5242 },
5243 },
[email protected]1e013672012-06-29 22:12:205244 },
[email protected]c3c372e2013-10-29 22:31:515245 'xcode_settings': {
5246 'conditions': [
5247 ['chromium_ios_signing', {
5248 # iOS SDK wants everything for device signed.
5249 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
5250 }, {
5251 'CODE_SIGNING_REQUIRED': 'NO',
5252 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
5253 }],
5254 ],
5255 },
[email protected]1e013672012-06-29 22:12:205256 }],
5257 ], # target_conditions
5258 }, # target_defaults
5259 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:555260 ['OS=="win"', {
5261 'target_defaults': {
5262 'defines': [
scottmga6675a5f2014-11-15 01:37:475263 '_WIN32_WINNT=0x0603',
5264 'WINVER=0x0603',
[email protected]2f80c312009-02-25 21:26:555265 'WIN32',
5266 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:555267 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:285268 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:555269 '_CRT_RAND_S',
5270 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
5271 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:275272 '_ATL_NO_OPENGL',
scottmg467d0492014-11-17 23:08:305273 '_SECURE_ATL',
[email protected]2b4465502014-07-25 21:02:285274 # _HAS_EXCEPTIONS must match ExceptionHandling in msvs_settings.
5275 '_HAS_EXCEPTIONS=0',
scottmga6675a5f2014-11-15 01:37:475276 # Silence some warnings; we can't switch the the 'recommended'
5277 # versions as they're not available on old OSs.
5278 '_WINSOCK_DEPRECATED_NO_WARNINGS',
[email protected]2f80c312009-02-25 21:26:555279 ],
[email protected]8974e042010-06-21 18:06:525280 'conditions': [
[email protected]2212d272011-12-20 21:37:375281 ['buildtype=="Official"', {
5282 # In official builds, targets can self-select an optimization
5283 # level by defining a variable named 'optimize', and setting it
5284 # to one of
5285 # - "size", optimizes for minimal code size - the default.
5286 # - "speed", optimizes for speed over code size.
5287 # - "max", whole program optimization and link-time code
5288 # generation. This is very expensive and should be used
5289 # sparingly.
5290 'variables': {
5291 'optimize%': 'size',
5292 },
[email protected]72589062014-03-14 16:48:305293 'msvs_settings': {
5294 'VCLinkerTool': {
5295 # Set /LTCG for the official builds.
5296 'LinkTimeCodeGeneration': '1',
5297 },
5298 },
[email protected]2212d272011-12-20 21:37:375299 'target_conditions': [
5300 ['optimize=="size"', {
5301 'msvs_settings': {
5302 'VCCLCompilerTool': {
5303 # 1, optimizeMinSpace, Minimize Size (/O1)
5304 'Optimization': '1',
5305 # 2, favorSize - Favor small code (/Os)
5306 'FavorSizeOrSpeed': '2',
5307 },
5308 },
5309 },
5310 ],
5311 ['optimize=="speed"', {
5312 'msvs_settings': {
5313 'VCCLCompilerTool': {
5314 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
5315 'Optimization': '2',
5316 # 1, favorSpeed - Favor fast code (/Ot)
5317 'FavorSizeOrSpeed': '1',
5318 },
5319 },
5320 },
5321 ],
5322 ['optimize=="max"', {
[email protected]cb875c02014-06-12 18:06:315323 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO
5324 # builds. Probably anything that this would catch that
5325 # wouldn't be caught in a normal build isn't going to
5326 # actually be a bug, so the incremental value of C4702 for
5327 # PGO builds is likely very small.
5328 'msvs_disabled_warnings': [
5329 4702
5330 ],
[email protected]2212d272011-12-20 21:37:375331 'msvs_settings': {
5332 'VCCLCompilerTool': {
5333 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
5334 'Optimization': '2',
5335 # 1, favorSpeed - Favor fast code (/Ot)
5336 'FavorSizeOrSpeed': '1',
5337 # This implies link time code generation.
5338 'WholeProgramOptimization': 'true',
5339 },
5340 },
5341 },
5342 ],
5343 ],
5344 },
5345 ],
scottmga6675a5f2014-11-15 01:37:475346 ['msvs_xtree_patched!=1', {
5347 # If xtree hasn't been patched, then we disable C4702. Otherwise,
5348 # it's enabled. This will generally only be true for system-level
5349 # installed Express users.
5350 'msvs_disabled_warnings': [
5351 4702,
5352 ],
5353 }],
[email protected]8974e042010-06-21 18:06:525354 ],
[email protected]5b5ca7cb2009-07-20 23:00:205355 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:055356 '<(windows_sdk_path)/Include/shared',
5357 '<(windows_sdk_path)/Include/um',
5358 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:555359 '$(VSInstallDir)/VC/atlmfc/include',
5360 ],
[email protected]bab6e232013-11-27 22:52:395361 'msvs_cygwin_shell': 0,
[email protected]0a42e9002014-05-24 02:35:265362 'msvs_disabled_warnings': [
[email protected]5a3c1f062014-07-26 00:01:535363 # C4127: conditional expression is constant
5364 # This warning can in theory catch dead code and other problems, but
5365 # triggers in far too many desirable cases where the conditional
5366 # expression is either set by macros or corresponds some legitimate
5367 # compile-time constant expression (due to constant template args,
5368 # conditionals comparing the sizes of different types, etc.). Some of
5369 # these can be worked around, but it's not worth it.
5370 4127,
5371
5372 # C4351: new behavior: elements of array 'array' will be default
5373 # initialized
5374 # This is a silly "warning" that basically just alerts you that the
5375 # compiler is going to actually follow the language spec like it's
5376 # supposed to, instead of not following it like old buggy versions
5377 # did. There's absolutely no reason to turn this on.
5378 4351,
5379
5380 # C4355: 'this': used in base member initializer list
5381 # It's commonly useful to pass |this| to objects in a class'
5382 # initializer list. While this warning can catch real bugs, most of
5383 # the time the constructors in question don't attempt to call methods
5384 # on the passed-in pointer (until later), and annotating every legit
5385 # usage of this is simply more hassle than the warning is worth.
5386 4355,
5387
5388 # C4503: 'identifier': decorated name length exceeded, name was
5389 # truncated
5390 # This only means that some long error messages might have truncated
5391 # identifiers in the presence of lots of templates. It has no effect
5392 # on program correctness and there's no real reason to waste time
5393 # trying to prevent it.
5394 4503,
[email protected]480c6672014-08-04 11:28:065395
[email protected]5a3c1f062014-07-26 00:01:535396 # C4611: interaction between 'function' and C++ object destruction is
5397 # non-portable
5398 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN
5399 # suggests using exceptions instead of setjmp/longjmp for C++, but
5400 # Chromium code compiles without exception support. We therefore have
5401 # to use setjmp/longjmp for e.g. JPEG decode error handling, which
5402 # means we have to turn off this warning (and be careful about how
5403 # object destruction happens in such cases).
5404 4611,
5405
[email protected]942c3a60f2011-05-03 02:04:115406 # TODO(maruel): These warnings are level 4. They will be slowly
5407 # removed as code is fixed.
[email protected]5a3c1f062014-07-26 00:01:535408 4100, # Unreferenced formal parameter
5409 4121, # Alignment of a member was sensitive to packing
[email protected]5a3c1f062014-07-26 00:01:535410 4244, # Conversion from 'type1' to 'type2', possible loss of data
5411 4481, # Nonstandard extension used: override specifier 'keyword'
5412 4505, # Unreferenced local function has been removed
5413 4510, # Default constructor could not be generated
5414 4512, # Assignment operator could not be generated
5415 4610, # Object can never be instantiated
scottmga6675a5f2014-11-15 01:37:475416 4996, # 'X': was declared deprecated (for GetVersionEx).
[email protected]942c3a60f2011-05-03 02:04:115417 ],
[email protected]2f80c312009-02-25 21:26:555418 'msvs_settings': {
5419 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:445420 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:555421 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:555422 'BufferSecurityCheck': 'true',
5423 'EnableFunctionLevelLinking': 'true',
5424 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:115425 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:555426 'WarnAsError': 'true',
5427 'DebugInformationFormat': '3',
[email protected]2b4465502014-07-25 21:02:285428 # ExceptionHandling must match _HAS_EXCEPTIONS above.
5429 'ExceptionHandling': '0',
[email protected]2f80c312009-02-25 21:26:555430 },
5431 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:165432 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:375433 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:055434 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:375435 ],
[email protected]2f80c312009-02-25 21:26:555436 },
5437 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:555438 'AdditionalDependencies': [
5439 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:505440 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:555441 'version.lib',
5442 'msimg32.lib',
5443 'ws2_32.lib',
5444 'usp10.lib',
5445 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:085446 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:485447 'winmm.lib',
5448 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:555449 ],
[email protected]a78da50e2010-06-09 21:31:375450 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:055451 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:375452 ],
[email protected]2f80c312009-02-25 21:26:555453 'GenerateDebugInformation': 'true',
5454 'MapFileName': '$(OutDir)\\$(TargetName).map',
5455 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:555456 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:485457 # SubSystem values:
5458 # 0 == not set
5459 # 1 == /SUBSYSTEM:CONSOLE
5460 # 2 == /SUBSYSTEM:WINDOWS
5461 # Most of the executables we'll ever create are tests
5462 # and utilities with console output.
5463 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:555464 },
5465 'VCMIDLTool': {
5466 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:095467 'TypeLibraryName': '$(InputName).tlb',
5468 'OutputDirectory': '$(IntDir)',
5469 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:335470 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:095471 'InterfaceIdentifierFileName': '$(InputName)_i.c',
5472 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:555473 },
5474 'VCResourceCompilerTool': {
5475 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:385476 'AdditionalIncludeDirectories': [
5477 '<(DEPTH)',
5478 '<(SHARED_INTERMEDIATE_DIR)',
5479 ],
[email protected]2f80c312009-02-25 21:26:555480 },
[email protected]5d60b0b2013-07-30 20:24:305481 'target_conditions': [
[email protected]2b52f992014-02-26 19:09:475482 ['_type=="executable"', {
5483 'VCManifestTool': {
5484 'EmbedManifest': 'true',
5485 },
5486 }],
[email protected]5d60b0b2013-07-30 20:24:305487 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
5488 'VCManifestTool': {
5489 'AdditionalManifestFiles': [
5490 '>(win_exe_compatibility_manifest)',
5491 ],
5492 },
5493 }],
[email protected]5d60b0b2013-07-30 20:24:305494 ],
[email protected]8efc26082014-01-24 13:26:355495 'conditions': [
5496 ['clang==1', {
5497 # Building with Clang on Windows is a work in progress and very
5498 # experimental. See crbug.com/82385.
5499 'VCCLCompilerTool': {
5500 'WarnAsError': 'false',
5501 'RuntimeTypeInfo': 'false',
5502 'AdditionalOptions': [
[email protected]49ee7ef2014-04-12 03:07:465503 '-fmsc-version=1800',
[email protected]8efc26082014-01-24 13:26:355504 '/fallback',
5505
5506 # Many files use intrinsics without including this header.
5507 # TODO(hans): Fix those files, or move this to sub-GYPs.
5508 '/FIIntrin.h',
5509
5510 # TODO(hans): Make this list shorter eventually.
5511 '-Qunused-arguments',
5512 '-Wno-c++11-compat-deprecated-writable-strings',
[email protected]8efc26082014-01-24 13:26:355513 '-Wno-deprecated-declarations',
[email protected]8efc26082014-01-24 13:26:355514 '-Wno-empty-body',
5515 '-Wno-enum-conversion',
[email protected]609d1c02014-02-11 02:05:135516 '-Wno-extra-tokens',
5517 '-Wno-ignored-attributes',
[email protected]8efc26082014-01-24 13:26:355518 '-Wno-incompatible-pointer-types',
[email protected]609d1c02014-02-11 02:05:135519 '-Wno-int-to-void-pointer-cast',
5520 '-Wno-invalid-noreturn',
[email protected]8efc26082014-01-24 13:26:355521 '-Wno-logical-op-parentheses',
5522 '-Wno-microsoft',
5523 '-Wno-missing-braces',
[email protected]609d1c02014-02-11 02:05:135524 '-Wno-missing-declarations',
[email protected]8efc26082014-01-24 13:26:355525 '-Wno-msvc-include',
5526 '-Wno-null-dereference',
5527 '-Wno-overloaded-virtual',
5528 '-Wno-parentheses',
5529 '-Wno-pointer-sign',
5530 '-Wno-reorder',
5531 '-Wno-return-type-c-linkage',
5532 '-Wno-self-assign',
[email protected]609d1c02014-02-11 02:05:135533 '-Wno-sometimes-uninitialized',
[email protected]8efc26082014-01-24 13:26:355534 '-Wno-switch',
5535 '-Wno-tautological-compare',
5536 '-Wno-unknown-pragmas',
5537 '-Wno-unsequenced',
5538 '-Wno-unused-function',
5539 '-Wno-unused-private-field',
5540 '-Wno-unused-value',
5541 '-Wno-unused-variable',
Nico Weber58972722014-09-06 20:53:195542 '-Wno-unused-local-typedef', # http://crbug.com/411648
thakis42c03072014-10-31 23:52:285543 '-Wno-inconsistent-missing-override', #http://crbug.com/428099
[email protected]8efc26082014-01-24 13:26:355544 ],
5545 },
5546 }],
[email protected]2a794002014-02-22 00:27:115547 ['asan==1', {
5548 # ASan on Windows is a work in progress and very experimental.
5549 # See crbug.com/345874.
5550 'VCCLCompilerTool': {
5551 'AdditionalOptions': [
5552 '-fsanitize=address',
5553 ],
[email protected]4c1abdb2014-05-16 17:03:575554 'AdditionalIncludeDirectories': [
5555 # MSVC needs to be able to find the sanitizer headers when
5556 # invoked via /fallback. This is critical for using macros
5557 # like ASAN_UNPOISON_MEMORY_REGION in files where we fall
5558 # back.
[email protected]e7a1cba2014-08-04 15:58:295559 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer',
[email protected]4c1abdb2014-05-16 17:03:575560 ],
[email protected]2a794002014-02-22 00:27:115561 },
5562 'VCLinkerTool': {
5563 'AdditionalLibraryDirectories': [
5564 # TODO(hans): If make_clang_dir is absolute, this breaks.
[email protected]e7a1cba2014-08-04 15:58:295565 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows',
[email protected]2a794002014-02-22 00:27:115566 ],
5567 },
5568 'target_conditions': [
timurrrr6e2f3e262014-08-29 16:51:525569 ['component=="shared_library"', {
5570 'VCLinkerTool': {
5571 'AdditionalDependencies': [
5572 'clang_rt.asan_dynamic-i386.lib',
timurrrr1d8adb22014-09-15 18:48:345573 'clang_rt.asan_dynamic_runtime_thunk-i386.lib',
timurrrr6e2f3e262014-08-29 16:51:525574 ],
5575 },
5576 }],
5577 ['_type=="executable" and component=="static_library"', {
[email protected]2a794002014-02-22 00:27:115578 'VCLinkerTool': {
5579 'AdditionalDependencies': [
5580 'clang_rt.asan-i386.lib',
5581 ],
5582 },
5583 }],
timurrrr6e2f3e262014-08-29 16:51:525584 ['(_type=="shared_library" or _type=="loadable_module") and component=="static_library"', {
[email protected]2a794002014-02-22 00:27:115585 'VCLinkerTool': {
5586 'AdditionalDependencies': [
5587 'clang_rt.asan_dll_thunk-i386.lib',
5588 ],
5589 },
5590 }],
5591 ],
5592 }],
[email protected]8efc26082014-01-24 13:26:355593 ],
[email protected]2f80c312009-02-25 21:26:555594 },
5595 },
5596 }],
[email protected]79e2336c2011-05-12 18:18:345597 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:315598 'target_defaults': {
5599 'defines': [
5600 'DISABLE_NACL',
5601 ],
5602 },
5603 }],
[email protected]cfbf9bc2009-12-07 22:07:565604 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:195605 'target_defaults': {
5606 'msvs_settings': {
5607 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:195608 'DelayLoadDLLs': [
5609 'dbghelp.dll',
5610 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:015611 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:195612 'uxtheme.dll',
5613 ],
5614 },
5615 },
[email protected]ef4fa4072009-12-04 22:46:505616 'configurations': {
[email protected]5153767c2009-12-22 01:52:505617 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:505618 'msvs_settings': {
5619 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:165620 'AdditionalOptions': [
5621 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:335622 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:165623 '/ignore:4199',
5624 '/ignore:4221',
5625 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:435626 ],
5627 'conditions': [
[email protected]1612e552014-02-15 04:49:185628 ['syzyasan==0', {
[email protected]c3fcbd122013-06-20 10:47:435629 'AdditionalOptions': ['/largeaddressaware'],
5630 }],
[email protected]1f9471a2010-01-04 06:40:165631 ],
[email protected]ef4fa4072009-12-04 22:46:505632 },
5633 },
5634 },
[email protected]5153767c2009-12-22 01:52:505635 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:505636 'msvs_settings': {
5637 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:165638 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:505639 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:335640 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:165641 '/ignore:4199',
5642 '/ignore:4221',
5643 '/nxcompat',
5644 ],
[email protected]ef4fa4072009-12-04 22:46:505645 },
5646 },
5647 },
5648 },
[email protected]48c7af72009-07-03 22:00:195649 },
5650 }],
[email protected]9821d0d2010-04-16 22:40:375651 ['enable_new_npdevice_api==1', {
5652 'target_defaults': {
5653 'defines': [
5654 'ENABLE_NEW_NPDEVICE_API',
5655 ],
5656 },
5657 }],
[email protected]5f683172013-04-27 01:53:195658 # Don't warn about the "typedef 'foo' locally defined but not used"
fdegans6b767132014-09-09 10:09:295659 # for gcc 4.8 and higher.
[email protected]5f683172013-04-27 01:53:195660 # TODO: remove this flag once all builds work. See crbug.com/227506
[email protected]33668ca62014-07-10 18:01:575661 ['gcc_version>=48 and clang==0', {
[email protected]5f683172013-04-27 01:53:195662 'target_defaults': {
5663 'cflags': [
5664 '-Wno-unused-local-typedefs',
5665 ],
5666 },
5667 }],
[email protected]acad4962014-08-04 19:05:025668 ['gcc_version>=48 and clang==0 and host_clang==1', {
5669 'target_defaults': {
5670 'target_conditions': [
5671 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}],
5672 ],
5673 },
5674 }],
torne981f132f2014-10-09 18:37:205675 # In the android webview build, force host targets to be compiled with clang
5676 # as the hermetic host gcc is very old on some platforms. This is already
5677 # the default on the current development version of AOSP but we force it
torne6c1c4462014-10-15 15:55:585678 # here in case we need to compile against an older release version. We also
5679 # explicitly set it to false for target binaries to avoid causing problems
torne8beb6702014-11-05 12:16:405680 # for the work to enable clang by default in AOSP. We also force the use of
5681 # libstdc++ on host as peculiarities of the android gyp backend mean that
5682 # using libc++ doesn't work, and Chromium doesn't yet require a more modern
5683 # C++ library.
torne981f132f2014-10-09 18:37:205684 ['android_webview_build==1', {
5685 'target_defaults': {
5686 'target_conditions': [
5687 ['_toolset=="host"', {
5688 'aosp_build_settings': {
5689 'LOCAL_CLANG': 'true',
torne8beb6702014-11-05 12:16:405690 'LOCAL_CXX_STL': 'libstdc++',
torne981f132f2014-10-09 18:37:205691 },
torne6c1c4462014-10-15 15:55:585692 }, { # else: _toolset != "host"
5693 'aosp_build_settings': {
5694 'LOCAL_CLANG': 'false',
5695 },
torne981f132f2014-10-09 18:37:205696 }],
5697 ],
5698 },
5699 }],
[email protected]7a4c78e02014-05-12 11:10:165700 # We need a special case to handle the android webview build on mac because
5701 # the host gcc there doesn't accept this flag, but the target gcc may
5702 # require it.
5703 ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', {
5704 'target_defaults': {
5705 'target_conditions': [
[email protected]f2cef302014-05-23 13:34:585706 ['_toolset=="host"', {
[email protected]7a4c78e02014-05-12 11:10:165707 'cflags!': [
5708 '-Wno-unused-local-typedefs',
5709 ],
5710 }],
5711 ],
5712 },
5713 }],
[email protected]ce2cad72014-02-13 18:17:355714 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
5715 'and OS!="win"', {
[email protected]e71a3622013-12-04 07:32:415716 'make_global_settings': [
5717 ['CC', '<(make_clang_dir)/bin/clang'],
5718 ['CXX', '<(make_clang_dir)/bin/clang++'],
5719 ['CC.host', '$(CC)'],
5720 ['CXX.host', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:305721 ],
5722 }],
[email protected]6e354d42014-01-29 01:59:215723 ['clang==1 and OS=="win"', {
5724 'make_global_settings': [
5725 # On Windows, gyp's ninja generator only looks at CC.
5726 ['CC', '<(make_clang_dir)/bin/clang-cl'],
5727 ],
5728 }],
Nico Weberd4daea02014-11-25 01:55:215729 ['use_lld==1 and OS=="win"', {
5730 'make_global_settings': [
5731 # Limited to Windows because lld-link is the driver that is compatible
5732 # to link.exe.
5733 ['LD', '<(make_clang_dir)/bin/lld-link'],
5734 ],
5735 }],
[email protected]615fa6642012-08-14 19:17:075736 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:275737 # Hardcode the compiler names in the Makefile so that
5738 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:115739 'make_global_settings': [
[email protected]e71a3622013-12-04 07:32:415740 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
5741 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
[email protected]acad4962014-08-04 19:05:025742 ['CC.host', '<(host_cc)'],
5743 ['CXX.host', '<(host_cxx)'],
[email protected]d10e2cc2012-03-20 10:45:275744 ],
5745 }],
[email protected]23eea4a42013-04-27 04:10:265746 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:465747 'make_global_settings': [
5748 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
5749 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
[email protected]acad4962014-08-04 19:05:025750 ['CC.host', '<(host_cc)'],
5751 ['CXX.host', '<(host_cxx)'],
[email protected]eb5f1672013-01-31 07:56:465752 ],
5753 }],
[email protected]d69a73b2014-07-29 16:50:445754 ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', {
5755 # Set default ARM cross compiling on linux. These can be overridden
5756 # using CC/CXX/etc environment variables.
5757 'make_global_settings': [
5758 ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
5759 ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
[email protected]acad4962014-08-04 19:05:025760 ['CC.host', '<(host_cc)'],
5761 ['CXX.host', '<(host_cxx)'],
[email protected]d69a73b2014-07-29 16:50:445762 ],
5763 }],
[email protected]e71a3622013-12-04 07:32:415764
5765 # TODO(yyanagisawa): supports GENERATOR==make
5766 # make generator doesn't support CC_wrapper without CC
5767 # in make_global_settings yet.
[email protected]c80075412014-02-27 18:46:265768 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
[email protected]e71a3622013-12-04 07:32:415769 'make_global_settings': [
5770 ['CC_wrapper', '<(gomadir)/gomacc'],
5771 ['CXX_wrapper', '<(gomadir)/gomacc'],
5772 ['CC.host_wrapper', '<(gomadir)/gomacc'],
5773 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
5774 ],
5775 }],
fdegansd7a59f92014-10-23 11:49:545776 ['use_lto==1', {
5777 'target_defaults': {
5778 'target_conditions': [
5779 ['_toolset=="target"', {
5780 'cflags': [
5781 '-flto',
5782 '-ffat-lto-objects',
5783 ],
5784 }],
5785 ],
5786 },
5787 }],
5788 ['use_lto==1 or use_lto_o2==1', {
5789 'target_defaults': {
5790 'target_conditions': [
5791 ['_toolset=="target"', {
5792 'ldflags': [
5793 '-flto=32',
5794 ],
5795 }],
5796 ],
5797 },
5798 }],
[email protected]2f80c312009-02-25 21:26:555799 ],
5800 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:505801 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
5802 # This block adds *project-wide* configuration settings to each project
5803 # file. It's almost always wrong to put things here. Specify your
5804 # custom xcode_settings in target_defaults to add them to targets instead.
5805
[email protected]1e013672012-06-29 22:12:205806 'conditions': [
[email protected]fca3d812012-07-27 00:55:365807 # In an Xcode Project Info window, the "Base SDK for All Configurations"
5808 # setting sets the SDK on a project-wide basis. In order to get the
5809 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
5810 # here at the project level.
[email protected]2c261532012-10-06 00:46:295811 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:365812 'conditions': [
[email protected]2c261532012-10-06 00:46:295813 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:365814 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:295815 }, {
5816 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:365817 }],
5818 ],
[email protected]2c261532012-10-06 00:46:295819 }],
5820 ['OS=="ios"', {
5821 'conditions': [
5822 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:405823 'conditions': [
5824 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]c3c372e2013-10-29 22:31:515825 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:405826 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:385827 }, {
5828 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:405829 }],
5830 ],
[email protected]2c261532012-10-06 00:46:295831 }, {
5832 'SDKROOT': '<(ios_sdk_path)', # -isysroot
5833 }],
5834 ],
[email protected]1e013672012-06-29 22:12:205835 }],
5836 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:205837 # Target both iPhone and iPad.
5838 'TARGETED_DEVICE_FAMILY': '1,2',
[email protected]72c0d3652013-11-05 19:11:425839 }, { # OS!="ios"
5840 'conditions': [
5841 ['target_arch=="x64"', {
5842 'ARCHS': [
5843 'x86_64'
5844 ],
5845 }],
5846 ['target_arch=="ia32"', {
5847 'ARCHS': [
5848 'i386'
5849 ],
5850 }],
5851 ],
[email protected]d64554012013-10-31 18:40:005852 }],
[email protected]1e013672012-06-29 22:12:205853 ],
[email protected]0c8ab452009-11-06 21:57:505854
[email protected]2f80c312009-02-25 21:26:555855 # The Xcode generator will look for an xcode_settings section at the root
5856 # of each dict and use it to apply settings on a file-wide basis. Most
5857 # settings should not be here, they should be in target-specific
5858 # xcode_settings sections, or better yet, should use non-Xcode-specific
5859 # settings in target dicts. SYMROOT is a special case, because many other
5860 # Xcode variables depend on it, including variables such as
5861 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5862 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5863 # files to appear (when present) in the UI as actual files and not red
5864 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5865 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:165866 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:555867 },
[email protected]ee28c9f2009-09-04 01:53:015868}