blob: 30ba0701c03d1c2eb48a1e66c319561caeea6cc2 [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.
44 ['OS=="win" or OS=="mac" or OS=="ios"', {
45 '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
[email protected]18e0f39b2012-01-17 16:47:34570 # Enable plug-in installation by default.
571 'enable_plugin_installation%': 1,
572
[email protected]62424a52012-03-18 03:09:50573 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42574 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35575 # Chrome UI.
576 # TODO(asvitkine): Enable this on all platforms and delete this flag.
577 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50578 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35579
[email protected]a9318c72012-03-01 01:29:47580 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
581 # with one of those tools.
582 'build_for_tool%': '',
583
[email protected]37138132013-01-17 23:08:52584 # If no directory is specified then a temporary directory will be used.
585 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47586 # True if isolate should fail if the isolate files refer to files
587 # that are missing.
jam6d2b3cd02014-09-18 19:08:48588 'test_isolation_fail_on_missing': 1,
[email protected]01971642012-03-07 14:39:56589
[email protected]49ae3e52012-04-12 09:50:12590 'wix_path%': '<(DEPTH)/third_party/wix',
591
[email protected]0850e842013-01-19 03:44:31592 # Managed users are enabled by default.
593 'enable_managed_users%': 1,
594
[email protected]1591c44d2013-07-15 13:28:43595 # Platform natively supports discardable memory.
596 'native_discardable_memory%': 0,
597
598 # Platform sends memory pressure signals natively.
599 'native_memory_pressure_signals%': 0,
600
[email protected]199def22013-02-21 17:52:29601 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25602 'spdy_proxy_auth_value%' : '',
[email protected]5e131c9f2013-07-10 19:21:05603 'enable_mdns%' : 0,
[email protected]2188c8d2014-03-21 00:58:56604 'enable_service_discovery%': 0,
[email protected]4b202ae2014-05-23 07:45:36605 'enable_wifi_bootstrapping%': 0,
[email protected]754a2002014-02-14 16:40:34606 'enable_hangout_services_extension%': 0,
[email protected]199def22013-02-21 17:52:29607
[email protected]877090c2014-03-19 15:25:54608 # Enable the Syzygy optimization step.
609 'syzygy_optimize%': 0,
610
[email protected]145eacd2014-05-09 23:18:16611 # Enable hole punching for the protected video.
612 'video_hole%': 0,
613
japhet46789a82014-09-10 03:06:46614 # Temporary hack to allow us to unify blink's definitions of load
615 # completion. blink uses a crazy set of constraints to determine load
616 # completion, but only actually requires them for layout tests. However,
617 # we need to maintain all the old behaviors while the plumbing is put in
618 # place on both sides of the repo boundary.
619 'enable_load_completion_hacks%': 1,
620
[email protected]3bdb0992014-05-16 21:30:51621 # Automatically select platforms under ozone. Turn this off to
622 # build only explicitly selected platforms.
623 'ozone_auto_platforms%': 1,
624
torneed51a582014-08-28 18:28:17625 # If this is set clang is used as host compiler, but not as target
626 # compiler. Always do this by default.
627 'host_clang%': 1,
628
fdegansd7a59f92014-10-23 11:49:54629 # Variables to control Link-Time Optimizations (LTO).
630 # Note: the variables must *not* be enabled at the same time.
631 # In this case LTO would 'merge' the optimization flags
632 # at link-time which would lead to all code be optimized with -O2.
633 # Enable LTO on the code compiled with -Os.
634 # See crbug.com/407544
635 'use_lto%': 0,
636 # Enable LTO on code compiled with -O2.
637 'use_lto_o2%': 0,
638
[email protected]bb6aba32011-01-07 19:04:43639 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34640 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37641 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34642 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37643 }, {
644 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34645 }],
646
[email protected]df9167b2011-11-14 19:15:25647 # A flag for BSD platforms
648 ['OS=="freebsd" or OS=="openbsd"', {
649 'os_bsd%': 1,
650 }, {
651 'os_bsd%': 0,
652 }],
653
[email protected]c329adf82011-10-05 14:34:57654 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42655 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57656 'use_nss%': 1,
657 }, {
658 'use_nss%': 0,
659 }],
[email protected]e0b85a52011-10-06 03:30:42660
[email protected]e1b2d732014-03-28 16:20:32661 # When OpenSSL is used for SSL and crypto on Unix-like systems, use
662 # OpenSSL's certificate definition.
663 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', {
664 'use_openssl_certs%': 1,
665 }, {
666 'use_openssl_certs%': 0,
667 }],
668
[email protected]49513e02013-11-20 08:36:40669 # libudev usage. This currently only affects the content layer.
[email protected]048ab5f2013-11-22 01:42:47670 ['OS=="linux" and embedded==0', {
[email protected]49513e02013-11-20 08:36:40671 'use_udev%': 1,
672 }, {
673 'use_udev%': 0,
674 }],
675
[email protected]c335f4802013-04-06 04:51:21676 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54677 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34678 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37679 }, {
[email protected]c49ab0c2011-05-18 17:25:37680 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34681 }],
[email protected]9a8175892012-03-20 02:11:58682
[email protected]02968b82013-11-14 02:42:43683 # Flags to use glib.
[email protected]559d8f4f2014-04-23 18:28:51684 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]c335f4802013-04-06 04:51:21685 'use_glib%': 0,
686 }, {
687 'use_glib%': 1,
[email protected]02968b82013-11-14 02:42:43688 }],
689
[email protected]928362a2013-11-19 20:17:16690 # Flags to use pango and cairo.
[email protected]02968b82013-11-14 02:42:43691 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
692 'use_pango%': 0,
[email protected]928362a2013-11-19 20:17:16693 'use_cairo%': 0,
[email protected]02968b82013-11-14 02:42:43694 }, {
[email protected]26bade892013-05-23 21:44:15695 'use_pango%': 1,
[email protected]928362a2013-11-19 20:17:16696 'use_cairo%': 1,
[email protected]c335f4802013-04-06 04:51:21697 }],
698
[email protected]61955d92013-11-13 20:44:52699 # DBus usage.
[email protected]02968b82013-11-14 02:42:43700 ['OS=="linux" and embedded==0', {
[email protected]61955d92013-11-13 20:44:52701 'use_dbus%': 1,
702 }, {
703 'use_dbus%': 0,
704 }],
705
[email protected]efadeacf2011-10-27 19:01:00706 # We always use skia text rendering in Aura on Windows, since GDI
707 # doesn't agree with our BackingStore.
708 # TODO(beng): remove once skia text rendering is on by default.
709 ['use_aura==1 and OS=="win"', {
710 'enable_skia_text%': 1,
711 }],
[email protected]9edeb712011-09-20 21:20:33712
[email protected]63692212010-09-16 00:22:21713 # A flag to enable or disable our compile-time dependency
714 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
715 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49716 # for Linux distributions and for Aura.
[email protected]8370a622014-02-19 08:12:29717 ['OS!="linux" or chromeos==1', {
[email protected]63692212010-09-16 00:22:21718 'use_gnome_keyring%': 0,
719 }, {
720 'use_gnome_keyring%': 1,
721 }],
[email protected]0afe5212010-10-01 18:56:11722
[email protected]ce67da1b62014-04-17 19:20:23723 ['OS=="mac" or OS=="ios"', {
724 # Mac and iOS want Title Case strings
joleksya91e8682014-09-10 13:48:41725 'use_titlecase_in_grd%': 1,
[email protected]bb6aba32011-01-07 19:04:43726 }],
727
[email protected]ff9300872014-01-22 11:09:32728 # Enable loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06729 ['chromeos==1', {
[email protected]77a848262013-02-22 11:17:25730 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50731 }, {
[email protected]77a848262013-02-22 11:17:25732 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51733 }],
[email protected]7de46352011-09-12 15:39:19734
[email protected]c79d1972013-02-06 18:47:29735 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01736 'enable_one_click_signin%': 1,
[email protected]b56a9e02014-06-20 09:57:04737 'enable_pre_sync_backup%': 1,
[email protected]e4b66bf2012-05-29 20:39:51738 }],
739
[email protected]da1c8d692011-09-20 20:35:01740 ['OS=="android"', {
[email protected]55e02302012-08-21 00:50:46741 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40742 'enable_google_now%': 0,
andrewhaydenfe3b6162014-11-11 20:24:46743 'cld_version%': 1,
[email protected]c6ce08072013-07-31 07:48:53744 'enable_spellcheck%': 0,
[email protected]55e02302012-08-21 00:50:46745 'enable_themes%': 0,
[email protected]48de0fc2012-08-02 11:03:58746 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54747 'arm_neon%': 0,
748 'arm_neon_optional%': 1,
[email protected]1591c44d2013-07-15 13:28:43749 'native_discardable_memory%': 1,
750 'native_memory_pressure_signals%': 1,
vitalybuka93eea402014-11-05 23:47:15751 'enable_basic_printing%': 1,
752 'enable_print_preview%': 0,
[email protected]25b8cb32014-01-30 11:04:29753 'enable_task_manager%':0,
[email protected]145eacd2014-05-09 23:18:16754 'video_hole%': 1,
[email protected]b25f0032013-08-19 22:26:25755 }],
[email protected]b25f0032013-08-19 22:26:25756
[email protected]0d841b7d2013-08-20 20:22:22757 # Android OS includes support for proprietary codecs regardless of
[email protected]24641702014-07-03 17:20:15758 # building Chromium or Google Chrome. We also ship Google Chrome and
759 # Chromecast with proprietary codecs.
760 ['OS=="android" or branding=="Chrome" or chromecast==1', {
[email protected]0d841b7d2013-08-20 20:22:22761 'proprietary_codecs%': 1,
[email protected]d80a06192013-08-23 23:33:41762 }, {
763 'proprietary_codecs%': 0,
[email protected]0d841b7d2013-08-20 20:22:22764 }],
765
[email protected]85f29582013-12-16 18:02:04766 ['OS=="mac" or OS=="ios"', {
[email protected]cef6c76f2013-10-30 16:33:30767 'native_discardable_memory%': 1,
768 'native_memory_pressure_signals%': 1,
769 }],
770
[email protected]8f5999e2013-08-10 18:27:05771 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
772 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]d3340bf512014-05-22 22:27:58773 'enable_autofill_dialog%': 1,
774
775 'conditions': [
776 ['buildtype=="Official"', {
777 'enable_prod_wallet_service%': 1,
778 }],
779 ]
[email protected]57e67ac2013-02-22 03:37:22780 }],
781
[email protected]f96d63b2014-04-01 19:22:44782 ['OS=="android"', {
[email protected]118347052013-01-12 08:35:43783 'enable_webrtc%': 1,
784 }],
785
[email protected]0d16f292012-07-02 22:10:48786 ['OS=="ios"', {
[email protected]9bfe0ab2012-08-30 13:18:11787 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24788 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40789 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06790 'cld_version%': 1,
vitalybuka93eea402014-11-05 23:47:15791 'enable_basic_printing%': 0,
792 'enable_print_preview%': 0,
[email protected]3c6aa862012-11-05 17:11:44793 'enable_session_service%': 0,
oshima66a9f962014-11-07 20:01:16794 'enable_spellcheck%': 0,
[email protected]c4ac4d12012-09-12 12:02:24795 'enable_themes%': 0,
796 'enable_webrtc%': 0,
797 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48798 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44799 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31800 'enable_managed_users%': 0,
[email protected]25b8cb32014-01-30 11:04:29801 'enable_task_manager%': 0,
sdefresne7da3d882014-09-19 15:59:23802 'use_system_libcxx%': 1,
the_jkffdda022014-10-03 11:36:19803 'support_pre_M6_history_database%': 0,
[email protected]0d16f292012-07-02 22:10:48804 }],
805
[email protected]839d5172011-10-13 17:18:11806 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27807 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01808 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33809 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11810 }, {
[email protected]1ee7c56c2011-10-19 14:51:33811 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11812 }],
[email protected]9061bee82012-01-16 11:45:17813
[email protected]c3340fb32012-12-20 20:45:39814 # Turn precompiled headers on by default.
815 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17816 'chromium_win_pch%': 1
817 }],
[email protected]18e0f39b2012-01-17 16:47:34818
[email protected]321dd1b2014-06-02 21:51:04819 ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', {
[email protected]18e0f39b2012-01-17 16:47:34820 'enable_plugin_installation%': 0,
821 }, {
822 'enable_plugin_installation%': 1,
823 }],
[email protected]b07806c12012-02-03 22:44:59824
[email protected]50d3c4a42014-04-22 08:29:14825 # Whether PPAPI is enabled.
[email protected]693f63c2014-01-17 06:52:19826 ['OS=="android" or OS=="ios" or embedded==1', {
[email protected]6d17f6392012-12-05 05:24:54827 'enable_plugins%': 0,
828 }, {
829 'enable_plugins%': 1,
830 }],
831
[email protected]f0a58322014-04-16 09:50:23832 # linux_use_bundled_gold: whether to use the gold linker binary checked
833 # into third_party/binutils. Force this off via GYP_DEFINES when you
834 # are using a custom toolchain and need to control -B in ldflags.
noms277720162014-08-26 15:21:08835 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
836 # for component=static_library builds.
837 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]f0a58322014-04-16 09:50:23838 'linux_use_bundled_gold%': 1,
[email protected]be239492012-02-09 19:00:17839 }, {
[email protected]f0a58322014-04-16 09:50:23840 'linux_use_bundled_gold%': 0,
841 }],
842
843 # linux_use_bundled_binutils: whether to use the binary binutils
844 # checked into third_party/binutils. These are not multi-arch so cannot
845 # be used except on x86 and x86-64 (the only two architectures which
noms277720162014-08-26 15:21:08846 # are currently checke in). Force this off via GYP_DEFINES when you
[email protected]f0a58322014-04-16 09:50:23847 # are using a custom toolchain and need to control -B in cflags.
848 ['OS=="linux" and (target_arch=="x64")', {
849 'linux_use_bundled_binutils%': 1,
850 }, {
851 'linux_use_bundled_binutils%': 0,
[email protected]d1d90a42013-03-26 12:01:34852 }],
853
854 # linux_use_gold_flags: whether to use build flags that rely on gold.
[email protected]fd6d17c2014-04-29 22:01:49855 # On by default for x64 Linux.
856 ['OS=="linux" and target_arch=="x64"', {
[email protected]d1d90a42013-03-26 12:01:34857 'linux_use_gold_flags%': 1,
858 }, {
[email protected]8d726a42012-02-09 03:49:00859 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59860 }],
[email protected]2e22e2f2012-03-15 21:53:10861
[email protected]9dbbabd2014-04-30 23:42:32862 # linux_use_debug_fission: whether to use split DWARF debug info
863 # files. This can reduce link time significantly, but is incompatible
864 # with some utilities such as icecc and ccache. Requires gold and
865 # gcc >= 4.8 or clang.
866 # http://gcc.gnu.org/wiki/DebugFission
867 ['OS=="linux" and target_arch=="x64"', {
868 'linux_use_debug_fission%': 1,
869 }, {
870 'linux_use_debug_fission%': 0,
871 }],
872
[email protected]a95d5302012-11-03 00:02:19873 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32874 'enable_captive_portal_detection%': 0,
875 }, {
876 'enable_captive_portal_detection%': 1,
877 }],
878
[email protected]3bd47e022012-03-22 04:19:12879 # Enable Skia UI text drawing incrementally on different platforms.
880 # http://crbug.com/105550
881 #
882 # On Aura, this allows per-tile painting to be used in the browser
883 # compositor.
[email protected]04b67b62013-09-14 01:32:17884 ['OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12885 'use_canvas_skia%': 1,
886 }],
[email protected]adb44342012-07-23 13:36:12887
[email protected]0753ea42012-08-30 20:15:44888 ['chromeos==1', {
vitalybukae6f4a712014-11-06 04:02:29889 'enable_basic_printing%': 0,
890 'enable_print_preview%': 1,
[email protected]0753ea42012-08-30 20:15:44891 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
892 'use_libjpeg_turbo%': 0,
893 }],
894
[email protected]5be161f2013-06-18 11:09:33895 # Do not enable the Settings App on ChromeOS.
896 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12897 'enable_settings_app%': 1,
898 }, {
899 'enable_settings_app%': 0,
900 }],
[email protected]94cdbf42012-12-11 19:49:22901
902 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
903 # Set some defaults for arm/linux chrome builds
[email protected]2fa89ef2014-05-07 18:45:59904 'use_allocator%': 'none',
[email protected]84b00d12f2012-12-14 01:53:43905 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22906 # incorrect results when passed to pkg-config
sbc41d0e082014-10-22 20:39:29907 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22908 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46909
[email protected]42972b62013-08-28 05:46:42910 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
[email protected]e2aaaac2013-05-08 07:20:09911 'conditions': [
912 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43913 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09914 }],
915 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43916 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09917 }],
918 ],
[email protected]42972b62013-08-28 05:46:42919 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e2aaaac2013-05-08 07:20:09920
[email protected]59e85f472013-06-28 18:20:44921 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07922 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28923 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46924 }],
[email protected]5b38a522013-03-20 17:00:47925
926 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01927 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47928 # e.g. base_unittests_run runs the target base_unittests. The test
[email protected]10d8ac32013-10-31 13:34:31929 # target always calls tools/swarming_client/isolate.py. See the script's
maruel82147542014-10-01 13:21:42930 # --help for more information. Meant to be overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01931 # TODO(maruel): Remove the conditions as more configurations are
932 # supported.
[email protected]e51e35652013-12-19 02:39:08933 ['OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47934 'test_isolation_mode%': 'check',
935 }, {
936 'test_isolation_mode%': 'noop',
937 }],
[email protected]9d5cb982014-06-24 23:37:20938 # Whether Android build uses OpenMAX DL FFT.
939 ['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")', {
940 # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel.
[email protected]353fa4a2014-05-02 17:36:22941 # When enabled, this will also enable WebAudio support on
[email protected]9d5cb982014-06-24 23:37:20942 # Android for these architectures. Default is enabled. Whether
[email protected]353fa4a2014-05-02 17:36:22943 # WebAudio is actually available depends on runtime settings
944 # and flags.
[email protected]330f3a32013-04-23 05:47:58945 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53946 }, {
947 'use_openmax_dl_fft%': 0,
948 }],
[email protected]5e131c9f2013-07-10 19:21:05949 ['OS=="win" or OS=="linux"', {
950 'enable_mdns%' : 1,
[email protected]2abbc1a2013-08-07 22:09:06951 }],
952
953 # Turns on compiler optimizations in V8 in Debug build, except
954 # on android_clang, where we're hitting a weird linker error.
955 # TODO(dpranke): http://crbug.com/266155 .
956 ['OS=="android"', {
[email protected]6268e01b42013-10-19 22:44:19957 'v8_optimized_debug%': 1,
[email protected]2abbc1a2013-08-07 22:09:06958 }, {
[email protected]6268e01b42013-10-19 22:44:19959 'v8_optimized_debug%': 2,
[email protected]2abbc1a2013-08-07 22:09:06960 }],
[email protected]02968b82013-11-14 02:42:43961
962 # Disable various features by default on embedded.
963 ['embedded==1', {
964 'remoting%': 0,
vitalybuka93eea402014-11-05 23:47:15965 'enable_basic_printing%': 0,
966 'enable_print_preview%': 0,
[email protected]02968b82013-11-14 02:42:43967 }],
[email protected]b390dd7d2014-03-20 14:49:41968
[email protected]7ef66c62014-03-20 18:20:00969 # By default, use ICU data file (icudtl.dat) on all platforms
[email protected]24641702014-07-03 17:20:15970 # except when building Android WebView or Chromecast.
[email protected]7ef66c62014-03-20 18:20:00971 # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium).
[email protected]7cd31432014-05-10 12:16:52972 # Set the data reduction proxy origin for Android Webview.
[email protected]967767d2014-07-16 05:46:24973 ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0', {
[email protected]7ef66c62014-03-20 18:20:00974 'icu_use_data_file_flag%' : 1,
975 }, {
976 'icu_use_data_file_flag%' : 0,
977 }],
[email protected]4b202ae2014-05-23 07:45:36978 ['OS=="win" or OS=="mac"', {
979 'enable_wifi_bootstrapping%' : 1,
980 }],
[email protected]91464ea2014-07-18 05:32:11981
982 # Path to sas.dll, which provides the SendSAS function.
983 # http://msdn.microsoft.com/en-us/library/windows/desktop/dd979761(v=vs.85).aspx
984 ['target_arch=="x64"', {
985 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/amd64',
986 }, {
987 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
988 }],
mlamouri23668752014-08-28 20:56:45989
990 # Turn on JNI generation optimizations on non-WebView builds.
991 ['OS=="android" and android_webview_build==0', {
992 'optimize_jni_generation%': 1,
993 }, {
994 'optimize_jni_generation%': 0,
995 }],
baixo3a3c88a2014-10-28 11:52:21996
997 # TODO(baixo): Enable v8_use_external_startup_data
998 # http://crbug.com/421063
999 ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0', {
1000 'v8_use_external_startup_data': 0,
1001 }, {
1002 'v8_use_external_startup_data': 0,
1003 }],
[email protected]b3f23ba2010-04-26 22:58:171004 ],
[email protected]2b113652012-09-17 17:01:391005
[email protected]a3a720f2013-04-25 19:35:421006 # Set this to 1 to enable use of concatenated impulse responses
1007 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:261008 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:421009
[email protected]f2817cf2013-05-16 11:39:541010 # You can set the variable 'use_official_google_api_keys' to 1
1011 # to use the Google-internal file containing official API keys
1012 # for Google Chrome even in a developer build. Setting this
1013 # variable explicitly to 1 will cause your build to fail if the
1014 # internal file is missing.
[email protected]2b113652012-09-17 17:01:391015 #
[email protected]f2817cf2013-05-16 11:39:541016 # The variable is documented here, but not handled in this file;
1017 # see //google_apis/determine_use_official_keys.gypi for the
1018 # implementation.
[email protected]2b113652012-09-17 17:01:391019 #
[email protected]f2817cf2013-05-16 11:39:541020 # Set the variable to 0 to not use the internal file, even when
1021 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:391022 #
[email protected]f2817cf2013-05-16 11:39:541023 # Leave it unset in your include.gypi to have the variable
1024 # implicitly set to 1 if you have
1025 # src/google_apis/internal/google_chrome_api_keys.h in your
1026 # checkout, and implicitly set to 0 if not.
1027 #
1028 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:391029 # was explicitly set to 1, i.e. they always use official keys,
1030 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:541031 #
1032 # NOTE: You MUST NOT explicitly set the variable to 2 in your
1033 # include.gypi or by other means. Due to subtleties of GYP, this
1034 # is not the same as leaving the variable unset, even though its
1035 # default value in
1036 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:391037
1038 # Set these to bake the specified API keys and OAuth client
1039 # IDs/secrets into your build.
1040 #
1041 # If you create a build without values baked in, you can instead
1042 # set environment variables to provide the keys at runtime (see
1043 # src/google_apis/google_api_keys.h for details). Features that
1044 # require server-side APIs may fail to work if no keys are
1045 # provided.
1046 #
1047 # Note that if you are building an official build or if
1048 # use_official_google_api_keys has been set to 1 (explicitly or
1049 # implicitly), these values will be ignored and the official
1050 # keys will be used instead.
1051 'google_api_key%': '',
1052 'google_default_client_id%': '',
1053 'google_default_client_secret%': '',
[email protected]d33d2222014-06-04 15:39:581054 # Native Client is enabled by default.
1055 'disable_nacl%': '0',
the_jkffdda022014-10-03 11:36:191056
1057 # Set to 1 to support old history files
1058 'support_pre_M6_history_database%': '1',
[email protected]e14a9f92009-08-05 19:26:071059 },
1060
[email protected]e72e55b2011-01-06 22:19:301061 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:071062 'branding%': '<(branding)',
1063 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:271064 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:351065 'target_subarch%': '<(target_subarch)',
petarjc8a5da742014-08-27 14:33:361066 'mips_arch_variant%': '<(mips_arch_variant)',
[email protected]cf185b32010-01-12 04:29:591067 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:441068 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:331069 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:581070 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:161071 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:311072 'use_cras%': '<(use_cras)',
bedupont65ce5acc2014-11-04 16:30:411073 'use_libpci%': '<(use_libpci)',
[email protected]e0b85a52011-10-06 03:30:421074 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:321075 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]c329adf82011-10-05 14:34:571076 'use_nss%': '<(use_nss)',
[email protected]49513e02013-11-20 08:36:401077 'use_udev%': '<(use_udev)',
[email protected]df9167b2011-11-14 19:15:251078 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:341079 'os_posix%': '<(os_posix)',
[email protected]61955d92013-11-13 20:44:521080 'use_dbus%': '<(use_dbus)',
[email protected]258dca42011-09-21 00:17:191081 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:151082 'use_pango%': '<(use_pango)',
[email protected]928362a2013-11-19 20:17:161083 'use_cairo%': '<(use_cairo)',
[email protected]ff78e4e2013-05-03 19:19:151084 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:481085 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:501086 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]d628ab412013-09-07 03:26:371087 'desktop_linux%': '<(desktop_linux)',
[email protected]79e2336c2011-05-12 18:18:341088 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:211089 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:111090 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:441091 'chromeos%': '<(chromeos)',
[email protected]24641702014-07-03 17:20:151092 'chromecast%': '<(chromecast)',
[email protected]7ddea9802012-02-22 23:08:051093 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:241094 'enable_hidpi%': '<(enable_hidpi)',
[email protected]77a848262013-02-22 11:17:251095 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:541096 'fastbuild%': '<(fastbuild)',
[email protected]19677402014-06-18 13:10:041097 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)',
[email protected]c73363762014-04-16 21:11:461098 'win_z7%': '<(win_z7)',
[email protected]20960e072011-09-20 20:59:011099 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a1e87422013-07-09 21:47:011100 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]7d6763422013-04-26 12:06:541101 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:431102 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:541103 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:231104 'sysroot%': '<(sysroot)',
[email protected]a23d7142014-02-14 16:58:451105 'chroot_cmd%': '<(chroot_cmd)',
[email protected]945361a2011-09-30 04:38:431106 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:521107 'component%': '<(component)',
brucedawson4b6961d2014-10-28 22:18:041108 'win_analyze%': '<(win_analyze)',
[email protected]1a43cc572014-03-07 22:36:321109 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)',
joleksya91e8682014-09-10 13:48:411110 'use_titlecase_in_grd%': '<(use_titlecase_in_grd)',
[email protected]9e94cca2011-02-04 17:38:171111 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:181112 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:401113 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]b56a9e02014-06-20 09:57:041114 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)',
[email protected]dda90ae2011-07-19 22:07:481115 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:161116 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:251117 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:561118 'safe_browsing%': '<(safe_browsing)',
[email protected]418653fdf2014-07-02 07:38:211119 'enable_web_speech%': '<(enable_web_speech)',
[email protected]7cce3232011-10-28 10:41:571120 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:461121 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:371122 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:061123 'asan%': '<(asan)',
earthdok78507b92014-10-23 14:00:131124 'asan_blacklist%': '<(asan_blacklist)',
[email protected]20a127f2014-01-16 03:25:031125 'asan_coverage%': '<(asan_coverage)',
earthdok78507b92014-10-23 14:00:131126 'asan_field_padding%': '<(asan_field_padding)',
[email protected]1b9654122014-04-28 12:11:151127 'use_sanitizer_options%': '<(use_sanitizer_options)',
[email protected]1612e552014-02-15 04:49:181128 'syzyasan%': '<(syzyasan)',
[email protected]877090c2014-03-19 15:25:541129 'syzygy_optimize%': '<(syzygy_optimize)',
[email protected]062522a2013-06-13 15:49:551130 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:591131 'msan%': '<(msan)',
[email protected]190d4ce62014-01-17 20:24:531132 'msan_blacklist%': '<(msan_blacklist)',
[email protected]a030ab62014-06-23 17:14:151133 'msan_track_origins%': '<(msan_track_origins)',
[email protected]c9a829272012-07-04 07:51:121134 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:161135 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7fd639a2014-05-30 23:59:011136 'ubsan%': '<(ubsan)',
[email protected]0dbe7af92014-06-26 23:31:401137 'ubsan_vptr%': '<(ubsan_vptr)',
1138 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)',
[email protected]c8103a42013-11-12 13:41:301139 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
[email protected]22b3f531e2013-12-20 13:07:281140 'use_custom_libcxx%': '<(use_custom_libcxx)',
[email protected]480c6672014-08-04 11:28:061141 'use_system_libcxx%': '<(use_system_libcxx)',
[email protected]7ce58b22012-09-26 05:17:251142 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:441143 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:461144 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:341145 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:341146 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:541147 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:531148 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:381149 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:221150 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]d3340bf512014-05-22 22:27:581151 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)',
[email protected]0acdd772012-04-05 22:53:001152 'enable_background%': '<(enable_background)',
[email protected]f0a58322014-04-16 09:50:231153 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)',
1154 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)',
[email protected]8d726a42012-02-09 03:49:001155 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9dbbabd2014-04-30 23:42:321156 'linux_use_debug_fission%': '<(linux_use_debug_fission)',
[email protected]62424a52012-03-18 03:09:501157 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:331158 'test_isolation_mode%': '<(test_isolation_mode)',
1159 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:471160 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
vitalybuka93eea402014-11-05 23:47:151161 'enable_basic_printing%': '<(enable_basic_printing)',
1162 'enable_print_preview%': '<(enable_print_preview)',
[email protected]c6ce08072013-07-31 07:48:531163 'enable_spellcheck%': '<(enable_spellcheck)',
[email protected]6ee43a72012-12-07 22:44:401164 'enable_google_now%': '<(enable_google_now)',
[email protected]3b5e88d2013-09-06 11:03:061165 'cld_version%': '<(cld_version)',
[email protected]61753f22014-03-19 12:10:591166 'cld2_table_size%': '<(cld2_table_size)',
[email protected]e6026962012-06-14 21:28:321167 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]02494ec2014-05-07 15:05:291168 'disable_file_support%': '<(disable_file_support)',
[email protected]9bfe0ab2012-08-30 13:18:111169 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]847aaab82014-05-07 14:05:461170 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)',
[email protected]44879ed2012-04-06 01:11:021171 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:061172 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:121173 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:441174 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:121175 'use_system_libjpeg%': '<(use_system_libjpeg)',
newtd5366cb2014-10-21 03:27:161176 'android_channel%': '<(android_channel)',
[email protected]d999c3cb2013-03-12 10:22:361177 'android_webview_build%': '<(android_webview_build)',
[email protected]967767d2014-07-16 05:46:241178 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)',
[email protected]7ef66c62014-03-20 18:20:001179 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)',
[email protected]5660f192013-04-02 16:55:461180 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:071181 'create_standalone_apk%': 1,
[email protected]dc4e8b82012-11-15 03:58:161182 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:071183 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:161184 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:391185 'google_api_key%': '<(google_api_key)',
1186 'google_default_client_id%': '<(google_default_client_id)',
1187 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:311188 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:431189 'native_discardable_memory%': '<(native_discardable_memory)',
1190 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]199def22013-02-21 17:52:291191 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:251192 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]5e131c9f2013-07-10 19:21:051193 'enable_mdns%' : '<(enable_mdns)',
[email protected]2188c8d2014-03-21 00:58:561194 'enable_service_discovery%' : '<(enable_service_discovery)',
[email protected]4b202ae2014-05-23 07:45:361195 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)',
[email protected]754a2002014-02-14 16:40:341196 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)',
[email protected]6268e01b42013-10-19 22:44:191197 'v8_optimized_debug%': '<(v8_optimized_debug)',
[email protected]d80a06192013-08-23 23:33:411198 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]e71a3622013-12-04 07:32:411199 'use_goma%': '<(use_goma)',
1200 'gomadir%': '<(gomadir)',
fdegansd7a59f92014-10-23 11:49:541201 'use_lto%': '<(use_lto)',
1202 'use_lto_o2%': '<(use_lto_o2)',
[email protected]145eacd2014-05-09 23:18:161203 'video_hole%': '<(video_hole)',
japhet46789a82014-09-10 03:06:461204 'enable_load_completion_hacks%': '<(enable_load_completion_hacks)',
the_jkffdda022014-10-03 11:36:191205 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)',
baixo3a3c88a2014-10-28 11:52:211206 'v8_use_external_startup_data': '<(v8_use_external_startup_data)',
[email protected]01971642012-03-07 14:39:561207
Sadrul Habib Chowdhuryec96ebf2014-09-05 19:13:341208 # Whether or not we are building the Athena shell.
1209 'use_athena%': '0',
1210
[email protected]2f325672012-10-31 23:29:371211 # Use system protobuf instead of bundled one.
1212 'use_system_protobuf%': 0,
1213
[email protected]371e1092011-10-12 20:37:361214 # Use system yasm instead of bundled one.
1215 'use_system_yasm%': 0,
1216
[email protected]ea02e962013-04-26 11:18:161217 # Use system ICU instead of bundled one.
1218 'use_system_icu%' : 0,
1219
[email protected]cd00bd862012-02-29 00:40:361220 # Default to enabled PIE; this is important for ASLR but we may need to be
1221 # able to turn it off for various reasons.
1222 'linux_disable_pie%': 0,
1223
[email protected]caa95c82009-11-23 22:39:321224 # The release channel that this build targets. This is used to restrict
1225 # channel-specific build options, like which installer packages to create.
1226 # The default is 'all', which does no channel-specific filtering.
1227 'channel%': 'all',
1228
[email protected]b3fb8092009-03-12 19:09:241229 # Override chromium_mac_pch and set it to 0 to suppress the use of
1230 # precompiled headers on the Mac. Prefix header injection may still be
1231 # used, but prefix headers will not be precompiled. This is useful when
1232 # using distcc to distribute a build to compile slaves that don't
1233 # share the same compiler executable as the system driving the compilation,
1234 # because precompiled headers rely on pointers into a specific compiler
1235 # executable's image. Setting this to 0 is needed to use an experimental
1236 # Linux-Mac cross compiler distcc farm.
1237 'chromium_mac_pch%': 1,
1238
[email protected]27b687ec42012-03-26 22:22:151239 # The default value for mac_strip in target_defaults. This cannot be
1240 # set there, per the comment about variable% in a target_defaults.
[email protected]70d0f782013-11-14 06:22:291241 'mac_strip_release%': 0,
[email protected]27b687ec42012-03-26 22:22:151242
[email protected]c0a12772013-08-22 00:08:311243 # Set to 1 to enable java code coverage. Instruments classes during build
1244 # to produce .ec files during runtime.
1245 'emma_coverage%': 0,
1246
[email protected]9662d922013-10-04 22:02:441247 # EMMA filter string consisting of a list of inclusion/exclusion patterns
1248 # separated with whitespace and/or comma. Only has effect if
1249 # 'emma_coverage=1'.
1250 'emma_filter%': '',
1251
[email protected]22860352013-12-11 03:02:101252 # Set to 1 to enable running Android lint on java/class files.
[email protected]2faf2bf2014-08-06 19:12:241253 'android_lint%': 1,
[email protected]22860352013-12-11 03:02:101254
[email protected]7477ea6f2009-12-22 23:28:151255 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:471256 # environment variable, the libcmt shim it uses sometimes gets in
1257 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
1258 # 'win_use_allocator_shim': 0,
1259 # 'win_release_RuntimeLibrary': 2
1260 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:521261 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:111262
[email protected]e5b2eaa2009-04-14 01:39:121263 # TODO(bradnelson): eliminate this when possible.
1264 # To allow local gyp files to prevent release.vsprops from being included.
1265 # Yes(1) means include release.vsprops.
1266 # Once all vsprops settings are migrated into gyp, this can go away.
1267 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:231268
[email protected]cbd5fd52009-08-26 00:14:271269 # TODO(bradnelson): eliminate this when possible.
1270 # To allow local gyp files to override additional linker options for msvs.
1271 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:191272 'msvs_use_common_linker_extras%': 1,
1273
[email protected]1ffb6502009-06-02 07:46:241274 # TODO(sgk): eliminate this if possible.
1275 # It would be nicer to support this via a setting in 'target_defaults'
1276 # in chrome/app/locales/locales.gypi overriding the setting in the
1277 # 'Debug' configuration in the 'target_defaults' dict below,
1278 # but that doesn't work as we'd like.
1279 'msvs_debug_link_incremental%': '2',
1280
[email protected]1f790ef2011-01-11 20:45:361281 # Needed for some of the largest modules.
1282 'msvs_debug_link_nonincremental%': '1',
1283
[email protected]6f390be2012-08-16 18:57:101284 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:061285 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:261286 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:061287
[email protected]1ff64292013-07-18 20:37:151288 # Experimental setting to break chrome.dll into multiple pieces based on
1289 # process type.
1290 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:021291
[email protected]72589062014-03-14 16:48:301292 # Experimental setting to optimize Chrome's DLLs with PGO.
1293 'chrome_pgo_phase%': '0',
1294
scottmga6675a5f2014-11-15 01:37:471295 # Whether the VS xtree header has been patched to disable warning 4702. If
1296 # it has, then we don't need to disable 4702 (unreachable code warning).
1297 # The patch is preapplied to the internal toolchain and hence all bots.
1298 'msvs_xtree_patched%': '<!pymod_do_main(win_is_xtree_patched)',
1299
[email protected]3bb37e62012-04-19 03:40:081300 # Clang stuff.
1301 'clang%': '<(clang)',
[email protected]acad4962014-08-04 19:05:021302 'host_clang%': '<(host_clang)',
1303 'make_clang_dir%': '<(make_clang_dir)',
[email protected]58680ce2010-09-18 00:09:151304
[email protected]d04384ab2014-03-13 20:46:011305 # Control which version of clang to use when building for iOS. If set to
1306 # '1', uses the version of clang that ships with Xcode. If set to '0', uses
1307 # the version of clang that ships with the Chromium source. This variable
1308 # is automatically set to '1' when using the Xcode generator.
[email protected]ce2cad72014-02-13 18:17:351309 'clang_xcode%': 0,
1310
[email protected]5e781232011-01-28 02:57:591311 # These two variables can be set in GYP_DEFINES while running
1312 # |gclient runhooks| to let clang run a plugin in every compilation.
1313 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1314 # Example:
[email protected]93120fe2011-02-03 20:46:421315 # 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:591316
1317 'clang_load%': '',
1318 'clang_add_plugin%': '',
1319
[email protected]c9cc9442013-12-28 21:27:441320 # Tell ld64 to write map files describing binary layout. Useful
1321 # for looking at what contributes to binary size, e.g. with
1322 # https://github.com/nico/bloat
1323 'mac_write_linker_maps%': 0,
1324
[email protected]da1c8d692011-09-20 20:35:011325 # The default type of gtest.
1326 'gtest_target_type%': 'executable',
1327
[email protected]7664ab32011-02-01 23:35:251328 # Enable sampling based profiler.
1329 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1330 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:581331 # Profile without optimizing out stack frames when profiling==1.
1332 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:251333
[email protected]36532f332010-08-25 00:22:011334 # And if we want to dump symbols for Breakpad-enabled builds.
[email protected]8ebfecb2013-11-14 05:30:311335 'linux_dump_symbols%': 0,
[email protected]36532f332010-08-25 00:22:011336 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:031337 'linux_strip_binary%': 0,
[email protected]2578ea12014-01-17 06:02:511338 # If we want stack unwind support for backtrace().
1339 'debug_unwind_tables%': 1,
1340 'release_unwind_tables%': 1,
[email protected]05cb6962009-10-01 23:29:031341
[email protected]8d949f1a02014-04-10 14:01:571342 # Override where to find binutils
1343 'binutils_version%': 0,
1344 'binutils_dir%': '',
1345
[email protected]46ce5b562010-06-16 18:39:531346 # Enable TCMalloc.
[email protected]2fa89ef2014-05-07 18:45:591347 # Default of 'use_allocator' is set to 'none' if OS=='android' later.
1348 'use_allocator%': 'tcmalloc',
[email protected]01699e22009-11-11 19:24:241349
[email protected]556c5d72010-06-10 05:45:011350 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1351 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:351352 # Set to 1 to link against gsettings APIs instead of using dlopen().
1353 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:011354
[email protected]a63e8d22013-03-23 16:17:081355 # Enable use of OpenMAX DL FFT routines.
1356 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341357
[email protected]9821d0d2010-04-16 22:40:371358 # Enable new NPDevice API.
1359 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501360
[email protected]e72e55b2011-01-06 22:19:301361 # .gyp files or targets should set chromium_code to 1 if they build
1362 # Chromium-specific code, as opposed to external code. This variable is
1363 # used to control such things as the set of warnings to enable, and
1364 # whether warnings are treated as errors.
1365 'chromium_code%': 0,
1366
[email protected]41300ff2014-04-07 08:17:251367 # Disable fatal linker warnings, similarly to how we make it possible
1368 # to disable -Werror (e.g. for different toolchain versions).
1369 'disable_fatal_linker_warnings%': 0,
1370
[email protected]8d726a42012-02-09 03:49:001371 'release_valgrind_build%': 0,
1372
[email protected]b1eb341c2011-11-09 18:46:071373 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1374 'enable_wexit_time_destructors%': 0,
1375
[email protected]d69acbc2014-02-10 21:14:461376 # Build libpeerconnection as a static library by default.
1377 'libpeer_target_type%': 'static_library',
1378
[email protected]9e1149d72012-07-24 01:27:171379 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1380 'internal_gles2_conform_tests%': 0,
1381
ullysses.a.eoffffbb37e2014-10-01 01:07:591382 # Set to 1 to compile with the Khronos GL-CTS conformance tests.
1383 'internal_khronos_glcts_tests%': 0,
1384
[email protected]5c18edd2013-11-19 22:04:111385 # Set to 1 to compile the filter fuzzer.
1386 'internal_filter_fuzzer%': 0,
1387
[email protected]e72e55b2011-01-06 22:19:301388 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1389 # so Cocoa is happy (http://crbug.com/20441).
1390 'locales': [
1391 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1392 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1393 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411394 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301395 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1396 'vi', 'zh-CN', 'zh-TW',
1397 ],
1398
[email protected]cc0322d2011-07-24 09:29:191399 # Pseudo locales are special locales which are used for testing and
1400 # debugging. They don't get copied to the final app. For more info,
1401 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1402 'pseudo_locales': [
1403 'fake-bidi',
1404 ],
1405
[email protected]bb6aba32011-01-07 19:04:431406 'grit_defines': [],
1407
[email protected]bd3bd442011-03-28 07:58:511408 # If debug_devtools is set to 1, JavaScript files for DevTools are
1409 # stored as is and loaded from disk. Otherwise, a concatenated file
1410 # is stored in resources.pak. It is still possible to load JS files
1411 # from disk by passing --debug-devtools cmdline switch.
1412 'debug_devtools%': 0,
1413
[email protected]464750f2011-10-24 23:16:181414 # The Java Bridge is not compiled in by default.
1415 'java_bridge%': 0,
1416
[email protected]1e013672012-06-29 22:12:201417 # Code signing for iOS binaries. The bots need to be able to disable this.
1418 'chromium_ios_signing%': 1,
1419
[email protected]33e1c372011-12-14 16:32:071420 # This flag is only used when disable_nacl==0 and disables all those
1421 # subcomponents which would require the installation of a native_client
1422 # untrusted toolchain.
1423 'disable_nacl_untrusted%': 0,
1424
[email protected]407dfa632011-12-23 11:59:351425 # Disable Dart by default.
1426 'enable_dart%': 0,
1427
[email protected]d33d2222014-06-04 15:39:581428 # Copy out the setting of disable_nacl.
1429 'disable_nacl%': '<(disable_nacl)',
[email protected]836285f22012-04-03 16:19:261430
[email protected]1e40ba002013-03-07 22:07:331431 # Portable Native Client is enabled by default.
1432 'disable_pnacl%': 0,
1433
[email protected]fa9d4e262012-08-21 04:39:001434 # Whether to build full debug version for Debug configuration on Android.
1435 # Compared to full debug version, the default Debug configuration on Android
1436 # has no full v8 debug, has size optimization and linker gc section, so that
1437 # we can build a debug version with acceptable size and performance.
1438 'android_full_debug%': 0,
1439
[email protected]65885272012-10-05 23:55:501440 # Sets the default version name and code for Android app, by default we
1441 # do a developer build.
1442 'android_app_version_name%': 'Developer Build',
aruslanad6082262014-10-13 18:53:121443 'android_app_version_code%': 1,
[email protected]65885272012-10-05 23:55:501444
[email protected]014d1ff12013-07-02 01:52:331445 # Contains data about the attached devices for gyp_managed_install.
1446 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1447
[email protected]dd0ef2f2014-04-16 21:52:491448 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")',
1449 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")',
[email protected]49ae3e52012-04-12 09:50:121450
[email protected]1f8d9402012-07-06 22:47:561451 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1452 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051453
[email protected]fd6d8822012-12-08 06:56:111454 # Whether we are using the rlz library or not. Platforms like Android send
1455 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221456 'enable_rlz%': 0,
1457
[email protected]3b4038e2013-07-28 08:59:541458 # Turns on the i18n support in V8.
1459 'v8_enable_i18n_support': 1,
1460
[email protected]6a694912014-01-17 14:17:401461 # Compile d8 for the host toolset.
1462 'v8_toolset_for_d8': 'host',
1463
[email protected]2c14260f2013-09-11 11:48:221464 # Use brlapi from brltty for braille display support.
1465 'use_brlapi%': 0,
1466
[email protected]c66b5aa2013-09-12 13:29:411467 # Relative path to icu.gyp from this file.
1468 'icu_gyp_path': '../third_party/icu/icu.gyp',
1469
[email protected]8c64e282013-11-28 16:05:141470 # IPC fuzzer is disabled by default.
1471 'enable_ipc_fuzzer%': 0,
1472
[email protected]1eec679e2013-12-13 22:10:271473 # Force disable libstdc++ debug mode.
1474 'disable_glibcxx_debug%': 0,
1475
[email protected]8063669f2014-04-01 01:50:291476 # Set to 1 to compile with MSE support for MPEG2 TS
1477 'enable_mpeg2ts_stream_parser%': 0,
1478
[email protected]ec13bd72014-04-16 19:04:301479 # Support ChromeOS touchpad gestures with ozone.
1480 'use_evdev_gestures%': 0,
1481
[email protected]3bdb0992014-05-16 21:30:511482 # Default ozone platform (if no --ozone-platform flag).
1483 'ozone_platform%': "",
1484
1485 # Ozone platforms to include in the build.
1486 'ozone_platform_caca%': 0,
1487 'ozone_platform_dri%': 0,
1488 'ozone_platform_egltest%': 0,
[email protected]26ce20d52014-05-29 17:22:501489 'ozone_platform_gbm%': 0,
[email protected]3bdb0992014-05-16 21:30:511490 'ozone_platform_ozonex%': 0,
1491 'ozone_platform_test%': 0,
1492
andresantosof15013412014-11-13 02:14:561493 # Whether the browser is non-native (using Views Toolkit) on Mac.
1494 'mac_views_browser%': 0,
1495
derat77f15bd2014-11-13 00:04:161496 # Experiment: http://crbug.com/426914
1497 'envoy%': 0,
1498
[email protected]912c55c2009-07-31 23:33:551499 'conditions': [
sebmarchand153e1b82014-10-31 20:25:521500 ['buildtype=="Official"', {
1501 # Continue to embed build meta data in Official builds, basically the
1502 # time it was built.
1503 # TODO(maruel): This decision should be revisited because having an
1504 # official deterministic build has high value too but MSVC toolset can't
1505 # generate anything deterministic with WPO enabled AFAIK.
1506 'dont_embed_build_metadata%': 0,
1507 }],
[email protected]877090c2014-03-19 15:25:541508 # Enable the Syzygy optimization step for the official builds.
1509 ['OS=="win" and buildtype=="Official" and syzyasan!=1', {
1510 'syzygy_optimize%': 1,
1511 }, {
1512 'syzygy_optimize%': 0,
1513 }],
[email protected]9c233692014-04-09 20:20:451514 # Get binutils version so we can enable debug fission if we can.
1515 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1516 'conditions': [
1517 # compiler_version doesn't work with clang
1518 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so
1519 # compiler_version works with clang.
1520 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1521 # that it takes effect here.
[email protected]0dbe7af92014-06-26 23:31:401522 ['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:161523 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)',
[email protected]9c233692014-04-09 20:20:451524 }],
1525 # On Android we know the binutils version in the toolchain.
1526 ['OS=="android"', {
1527 'binutils_version%': 222,
1528 }],
noms277720162014-08-26 15:21:081529 ['host_arch=="x64"', {
1530 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1531 }],
1532 ['host_arch=="ia32"', {
1533 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
1534 }],
[email protected]9c233692014-04-09 20:20:451535 # Our version of binutils in third_party/binutils
[email protected]f0a58322014-04-16 09:50:231536 ['linux_use_bundled_binutils==1', {
[email protected]9c233692014-04-09 20:20:451537 'binutils_version%': 224,
[email protected]9c233692014-04-09 20:20:451538 }],
1539 ],
1540 }, {
1541 'binutils_version%': 0,
1542 }],
[email protected]5f683172013-04-27 01:53:191543 # The version of GCC in use, set later in platforms that use GCC and have
1544 # not explicitly chosen to build with clang. Currently, this means all
1545 # platforms except Windows, Mac and iOS.
1546 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1547 # it takes effect here.
[email protected]0dbe7af92014-06-26 23:31:401548 ['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:491549 'conditions': [
fdegans6b767132014-09-09 10:09:291550 ['OS=="android" and android_webview_build==0', {
1551 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)',
1552 # We directly set the gcc version since we know what we use.
1553 'gcc_version%': 49,
[email protected]ffa01d22014-01-14 00:14:491554 }],
fdegans6b767132014-09-09 10:09:291555 ['OS=="android" and android_webview_build==1', {
torneed51a582014-08-28 18:28:171556 # Android WebView uses a hermetic clang toolchain for host builds.
1557 'host_gcc_version%': 0,
fdegans6b767132014-09-09 10:09:291558 # Android WebView uses the GCC toolchain from the Android build.
1559 'gcc_version%': 48,
1560 }],
1561 ['OS!="android"', {
[email protected]313fcf632014-05-27 13:58:591562 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)',
fdegans6b767132014-09-09 10:09:291563 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)',
[email protected]313fcf632014-05-27 13:58:591564 }],
[email protected]ffa01d22014-01-14 00:14:491565 ],
[email protected]5f683172013-04-27 01:53:191566 }, {
[email protected]707ad51b2014-04-23 08:20:161567 'host_gcc_version%': 0,
[email protected]5f683172013-04-27 01:53:191568 'gcc_version%': 0,
1569 }],
[email protected]dd0ef2f2014-04-16 21:52:491570 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', {
[email protected]1f8d9402012-07-06 22:47:561571 'windows_sdk_path%': '<(windows_sdk_default_path)',
1572 }, {
scottmga6675a5f2014-11-15 01:37:471573 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.1',
[email protected]1f8d9402012-07-06 22:47:561574 }],
[email protected]dd0ef2f2014-04-16 21:52:491575 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', {
[email protected]1f8d9402012-07-06 22:47:561576 'directx_sdk_path%': '<(directx_sdk_default_path)',
1577 }, {
1578 'directx_sdk_path%': '$(DXSDK_DIR)',
1579 }],
[email protected]54184ce72012-10-18 07:11:261580 ['OS=="win"', {
1581 'windows_driver_kit_path%': '$(WDK_DIR)',
1582 }],
[email protected]1e013672012-06-29 22:12:201583 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]cbd5fd52009-08-26 00:14:271584 'conditions': [
petarjc8a5da742014-08-27 14:33:361585 ['target_arch=="mipsel" or target_arch=="mips64el"', {
[email protected]eb5f1672013-01-31 07:56:461586 'werror%': '',
1587 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461588 'nacl_untrusted_build%': 0,
[email protected]2fa89ef2014-05-07 18:45:591589 'use_allocator%': 'none',
[email protected]59e85f472013-06-28 18:20:441590 }],
1591 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461592 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281593 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461594 }],
[email protected]4c9cc6c2009-10-01 18:54:571595 # All Chrome builds have breakpad symbols, but only process the
1596 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081597 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571598 'linux_dump_symbols%': 1,
[email protected]2578ea12014-01-17 06:02:511599
1600 # Omit unwind support in official release builds to save space. We
1601 # can use breakpad for these builds.
1602 'release_unwind_tables%': 0,
noms277720162014-08-26 15:21:081603
1604 'conditions': [
1605 # For official builds, use a 64-bit linker to avoid running out
1606 # of address space. The buildbots should have a 64-bit kernel
1607 # and a 64-bit libc installed.
1608 ['host_arch=="ia32" and target_arch=="ia32"', {
1609 'linux_use_bundled_gold%': '1',
1610 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1611 }],
1612 ],
[email protected]4c9cc6c2009-10-01 18:54:571613 }],
[email protected]cbd5fd52009-08-26 00:14:271614 ],
[email protected]1e013672012-06-29 22:12:201615 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481616 ['OS=="ios"', {
1617 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191618 'enable_background%': 0,
[email protected]7ef66c62014-03-20 18:20:001619 'icu_use_data_file_flag%': 1,
[email protected]418653fdf2014-07-02 07:38:211620 'enable_web_speech%': 0,
[email protected]4e3996f92012-07-17 10:41:131621 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471622 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411623 'locales==': [
[email protected]47cf7a32013-09-03 22:16:391624 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
[email protected]27a1d6b2014-07-23 17:14:531625 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms',
1626 'nb', 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr',
1627 'uk', 'vi', 'zh-CN', 'zh-TW',
[email protected]b6fbd6742013-03-15 11:15:411628 ],
[email protected]57871bc2012-08-20 16:28:121629
[email protected]523f128d2013-08-06 17:36:111630 # iOS SDK and deployment target support. The |ios_sdk| value is left
1631 # blank so that when it is set in the project files it will be the
1632 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1633 # causes Xcode to spit out a warning for every single project file for
1634 # not using the "current" SDK.
[email protected]2c261532012-10-06 00:46:291635 'ios_sdk%': '',
1636 'ios_sdk_path%': '',
[email protected]7c613ee92014-08-14 21:22:311637 'ios_deployment_target%': '7.0',
[email protected]fcd634182012-10-09 10:50:321638
1639 'conditions': [
1640 # ios_product_name is set to the name of the .app bundle as it should
1641 # appear on disk.
1642 ['branding=="Chrome"', {
1643 'ios_product_name%': 'Chrome',
1644 }, { # else: branding!="Chrome"
1645 'ios_product_name%': 'Chromium',
1646 }],
1647 ['branding=="Chrome" and buildtype=="Official"', {
1648 'ios_breakpad%': 1,
1649 }, { # else: branding!="Chrome" or buildtype!="Official"
1650 'ios_breakpad%': 0,
1651 }],
1652 ],
1653 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011654 ['OS=="android"', {
1655 # Location of Android NDK.
1656 'variables': {
1657 'variables': {
[email protected]1ffa4b62014-02-19 18:20:221658 # Unfortunately we have to use absolute paths to the SDK/NDK because
1659 # they're passed to ant which uses a different relative path from
1660 # gyp.
1661 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1662 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1663 'android_host_arch%': '<!(uname -m)',
1664 # Android API-level of the SDK used for compilation.
aurimas1030b8f2014-10-18 01:11:491665 'android_sdk_version%': '21',
fdegans27660a32014-10-24 13:00:181666 'android_sdk_build_tools_version%': '21.0.1',
[email protected]1ffa4b62014-02-19 18:20:221667 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
[email protected]da1c8d692011-09-20 20:35:011668 },
[email protected]5061d152013-01-16 17:45:571669 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011670 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571671 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041672 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221673 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]625eb032014-02-13 21:48:251674 'host_os%': '<(host_os)',
[email protected]5061d152013-01-16 17:45:571675
[email protected]e20a8ad2013-03-18 15:05:041676 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]aeaf01212014-02-19 00:52:521677 # Android SDK build tools (e.g. dx, aapt, aidl)
1678 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)',
[email protected]5061d152013-01-16 17:45:571679
[email protected]5cfec2b2013-03-05 20:54:331680 # Android API level 14 is ICS (Android 4.0) which is the minimum
1681 # platform requirement for Chrome on Android, we use it for native
1682 # code compilation.
[email protected]5061d152013-01-16 17:45:571683 'conditions': [
1684 ['target_arch == "ia32"', {
1685 'android_app_abi%': 'x86',
1686 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331687 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]bda44542014-04-29 08:54:161688 'android_ndk_lib_dir%': 'usr/lib',
fdegans6b767132014-09-09 10:09:291689 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]5061d152013-01-16 17:45:571690 }],
[email protected]be0090f22014-03-18 17:43:481691 ['target_arch == "x64"', {
1692 'android_app_abi%': 'x86_64',
[email protected]84b50a582014-07-17 23:45:371693 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver',
fdegans27660a32014-10-24 13:00:181694 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-x86_64',
[email protected]bda44542014-04-29 08:54:161695 'android_ndk_lib_dir%': 'usr/lib64',
[email protected]84b50a582014-07-17 23:45:371696 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]be0090f22014-03-18 17:43:481697 }],
[email protected]5061d152013-01-16 17:45:571698 ['target_arch=="arm"', {
1699 'conditions': [
[email protected]7d6763422013-04-26 12:06:541700 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571701 'android_app_abi%': 'armeabi',
1702 }, {
1703 'android_app_abi%': 'armeabi-v7a',
1704 }],
1705 ],
1706 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331707 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]bda44542014-04-29 08:54:161708 'android_ndk_lib_dir%': 'usr/lib',
fdegans6b767132014-09-09 10:09:291709 '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:571710 }],
[email protected]7a2f984a2014-03-20 18:35:491711 ['target_arch == "arm64"', {
[email protected]fa846092014-03-25 04:01:001712 'android_app_abi%': 'arm64-v8a',
[email protected]84b50a582014-07-17 23:45:371713 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver',
fdegans27660a32014-10-24 13:00:181714 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-arm64',
[email protected]bda44542014-04-29 08:54:161715 'android_ndk_lib_dir%': 'usr/lib',
[email protected]84b50a582014-07-17 23:45:371716 '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:491717 }],
[email protected]23eea4a42013-04-27 04:10:261718 ['target_arch == "mipsel"', {
1719 'android_app_abi%': 'mips',
1720 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1721 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]bda44542014-04-29 08:54:161722 'android_ndk_lib_dir%': 'usr/lib',
fdegans6b767132014-09-09 10:09:291723 '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:261724 }],
petarjc8a5da742014-08-27 14:33:361725 ['target_arch == "mips64el"', {
1726 'android_app_abi%': 'mips64',
1727 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64/gdbserver/gdbserver',
fdegans27660a32014-10-24 13:00:181728 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-mips64',
petarjc8a5da742014-08-27 14:33:361729 'android_ndk_lib_dir%': 'usr/lib64',
1730 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
1731 'gcc_version%': 49,
1732 }],
[email protected]5061d152013-01-16 17:45:571733 ],
[email protected]da1c8d692011-09-20 20:35:011734 },
[email protected]5061d152013-01-16 17:45:571735 # Copy conditionally-set variables out one scope.
1736 'android_app_abi%': '<(android_app_abi)',
1737 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011738 'android_ndk_root%': '<(android_ndk_root)',
[email protected]941c6ab2014-03-24 04:07:341739 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571740 'android_sdk_root%': '<(android_sdk_root)',
1741 'android_sdk_version%': '<(android_sdk_version)',
1742 'android_toolchain%': '<(android_toolchain)',
1743
[email protected]da1c8d692011-09-20 20:35:011744 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
[email protected]bda44542014-04-29 08:54:161745 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)',
[email protected]6bfda61f2013-08-09 06:48:181746 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]e20a8ad2013-03-18 15:05:041747 'android_sdk%': '<(android_sdk)',
1748 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011749
[email protected]225ec632013-04-03 18:20:221750 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221751 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221752 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]625eb032014-02-13 21:48:251753 'host_os%': '<(host_os)',
[email protected]225ec632013-04-03 18:20:221754
[email protected]8ecd30e2014-07-04 19:58:341755 # Location of the "objcopy" binary, used by both gyp and scripts.
1756 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)',
1757
[email protected]c0f76312012-08-16 13:52:041758 # Location of the "strip" binary, used by both gyp and scripts.
1759 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1760
[email protected]225ec632013-04-03 18:20:221761 # Location of the "readelf" binary.
1762 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1763
[email protected]d8621ce2013-02-22 00:37:331764 # Determines whether we should optimize JNI generation at the cost of
1765 # breaking assumptions in the build system that when inputs have changed
1766 # the outputs should always change as well. This is meant purely for
1767 # developer builds, to avoid spurious re-linking of native files.
mlamouri23668752014-08-28 20:56:451768 'optimize_jni_generation%': '<(optimize_jni_generation)',
[email protected]d8621ce2013-02-22 00:37:331769
[email protected]da1c8d692011-09-20 20:35:011770 # Always uses openssl.
1771 'use_openssl%': 1,
[email protected]e1b2d732014-03-28 16:20:321772 'use_openssl_certs%': 1,
[email protected]da1c8d692011-09-20 20:35:011773
1774 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]9c8eb982014-07-09 07:51:501775 'safe_browsing%': 1,
[email protected]418653fdf2014-07-02 07:38:211776 'enable_web_speech%': 0,
[email protected]464750f2011-10-24 23:16:181777 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581778 'build_ffmpegsumo%': 0,
[email protected]2fa89ef2014-05-07 18:45:591779 'use_allocator%': 'none',
[email protected]658677f2012-06-09 06:04:021780
[email protected]ad17e342012-07-17 20:45:481781 # Disable Native Client.
1782 'disable_nacl%': 1,
1783
[email protected]58242012012-04-12 16:14:311784 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001785 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111786
[email protected]cdb756ef2012-04-05 18:34:531787 # Sessions are store separately in the Java side.
1788 'enable_session_service%': 0,
1789
[email protected]ad17e342012-07-17 20:45:481790 'p2p_apis%' : 0,
1791
[email protected]48de0fc2012-08-02 11:03:581792 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011793
1794 # Uses system APIs for decoding audio and video.
1795 'use_libffmpeg%': '0',
1796
torne3bc122f2014-10-18 11:10:171797 # TODO(torne): Remove this unsupported option once all the places that
1798 # test it have been updated.
1799 'use_system_stlport%': 0,
[email protected]adb44342012-07-23 13:36:121800
[email protected]da1c8d692011-09-20 20:35:011801 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361802 'android_webview_build%': '<(android_webview_build)',
[email protected]71b4fc32014-08-11 11:27:121803
1804 # Default android linker script for shared library exports.
1805 'android_linker_script%': '<(SHARED_INTERMEDIATE_DIR)/android_exports.lst',
[email protected]da1c8d692011-09-20 20:35:011806 }], # OS=="android"
[email protected]24641702014-07-03 17:20:151807 ['embedded==1', {
1808 'use_system_fontconfig%': 0,
1809 }, {
1810 'use_system_fontconfig%': 1,
1811 }],
1812 ['chromecast==1', {
[email protected]bef141592014-08-15 04:28:011813 'enable_mpeg2ts_stream_parser%': 1,
[email protected]24641702014-07-03 17:20:151814 'ffmpeg_branding%': 'Chrome',
1815 'ozone_platform_ozonex%': 1,
gunschb50a4e3f2014-09-17 04:05:281816 'use_playready%': 0,
[email protected]24641702014-07-03 17:20:151817 'conditions': [
1818 ['target_arch=="arm"', {
1819 'arm_arch%': '',
1820 'arm_tune%': 'cortex-a9',
1821 'arm_thumb%': 1,
[email protected]24641702014-07-03 17:20:151822 'video_hole%': 1,
1823 }],
1824 ],
1825 }],
hjd46eac8f2014-09-09 15:42:311826 ['android_webview_build==1', {
[email protected]b3139552013-05-30 14:16:121827 # When building the WebView in the Android tree, jarjar will remap all
1828 # the class names, so the JNI generator needs to know this.
1829 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1830 }],
[email protected]b9b8f9cf2014-07-17 04:42:261831 ['OS=="linux" and target_arch!="mipsel"', {
[email protected]5b61a7b2014-07-10 07:36:381832 # TODO(thakis): This is here to measure perf for a while.
1833 'clang%': 1,
1834 }], # OS=="mac"
[email protected]e14a9f92009-08-05 19:26:071835 ['OS=="mac"', {
[email protected]70d0f782013-11-14 06:22:291836 'conditions': [
1837 # All Chrome builds have breakpad symbols, but only process the
1838 # symbols from official builds.
1839 ['(branding=="Chrome" and buildtype=="Official")', {
1840 'mac_strip_release%': 1,
1841 }],
[email protected]22860352013-12-11 03:02:101842 ],
[email protected]296bc452013-05-13 21:29:471843 }], # OS=="mac"
1844 ['OS=="mac" or OS=="ios"', {
[email protected]d04384ab2014-03-13 20:46:011845 'clang%': 1,
1846
[email protected]2c261532012-10-06 00:46:291847 'variables': {
1848 # Mac OS X SDK and deployment target support. The SDK identifies
1849 # the version of the system headers that will be used, and
1850 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1851 # macro. "Maximum allowed" refers to the operating system version
1852 # whose APIs are available in the headers. The deployment target
1853 # identifies the minimum system version that the built products are
1854 # expected to function on. It corresponds to the
1855 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1856 # macros are available, #include <AvailabilityMacros.h>. Additional
1857 # documentation on these macros is available at
1858 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1859 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1860 # deployment target to 10.6. Other projects, such as O3D, may
1861 # override these defaults.
1862
1863 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1864 # about that is at least the specified version. In official builds,
1865 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1866 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1867 # path to the SDK; when set to a non-empty string, SDK detection
1868 # based on mac_sdk_min will be bypassed entirely.
lliabraa3a721cde2014-10-16 16:46:481869 'conditions': [
1870 ['OS=="ios"', {
1871 'mac_sdk_min%': '10.8',
1872 }, { # else OS!="ios"
1873 'mac_sdk_min%': '10.6',
1874 }],
1875 ],
[email protected]2c261532012-10-06 00:46:291876 'mac_sdk_path%': '',
1877
1878 'mac_deployment_target%': '10.6',
1879 },
1880
1881 'mac_sdk_min': '<(mac_sdk_min)',
1882 'mac_sdk_path': '<(mac_sdk_path)',
1883 'mac_deployment_target': '<(mac_deployment_target)',
1884
[email protected]794fb4782011-12-14 19:10:561885 # Compile in Breakpad support by default so that it can be
1886 # tested, even if it is not enabled by default at runtime.
1887 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071888 'conditions': [
1889 # mac_product_name is set to the name of the .app bundle as it should
1890 # appear on disk. This duplicates data from
1891 # chrome/app/theme/chromium/BRANDING and
1892 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1893 # these names into the build system.
1894 ['branding=="Chrome"', {
1895 'mac_product_name%': 'Google Chrome',
1896 }, { # else: branding!="Chrome"
1897 'mac_product_name%': 'Chromium',
1898 }],
lliabraa3a721cde2014-10-16 16:46:481899 # Official mac builds require a specific OS X SDK, but iOS and
1900 # non-official mac builds do not.
lliabraa0c127e92014-10-16 17:16:311901 ['branding=="Chrome" and buildtype=="Official" and OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291902 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
lliabraa3a721cde2014-10-16 16:46:481903 }, {
1904 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
1905 }],
1906 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:561907 # Enable uploading crash dumps.
1908 'mac_breakpad_uploads%': 1,
1909 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071910 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561911 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071912 'mac_keystone%': 1,
1913 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:561914 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071915 'mac_breakpad%': 0,
1916 'mac_keystone%': 0,
1917 }],
1918 ],
[email protected]296bc452013-05-13 21:29:471919 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551920 ['OS=="win"', {
1921 'conditions': [
[email protected]a7a15f32013-08-06 06:09:431922 # This is the architecture convention used in WinSDK paths.
1923 ['target_arch=="ia32"', {
1924 'winsdk_arch%': 'x86',
1925 },{
1926 'winsdk_arch%': '<(target_arch)',
1927 }],
[email protected]8974e042010-06-21 18:06:521928 ['component=="shared_library"', {
1929 'win_use_allocator_shim%': 0,
[email protected]45b7c522013-08-21 06:58:221930 },{
1931 # Turn on multiple dll by default on Windows when in static_library.
1932 'chrome_multiple_dll%': 1,
[email protected]8974e042010-06-21 18:06:521933 }],
[email protected]2a794002014-02-22 00:27:111934 ['asan==1', {
1935 'win_use_allocator_shim%': 0,
1936 }],
scottmgf01a9ae2014-09-19 23:49:501937 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
1938 # Only enabled by default for ninja because it's buggy in VS.
1939 # Not enabled for component=static_library because some targets
1940 # are too large and the toolchain fails due to the size of the
1941 # .obj files.
[email protected]6f390be2012-08-16 18:57:101942 'incremental_chrome_dll%': 1,
1943 }],
[email protected]a96cf1422013-11-08 08:55:411944 # Don't do incremental linking for large modules on 32-bit or when
1945 # component=static_library as the toolchain fails due to the size of
1946 # the .ilk files.
1947 ['MSVS_OS_BITS==32 or component=="static_library"', {
[email protected]10bb8c92009-08-07 21:16:031948 'msvs_large_module_debug_link_mode%': '1', # No
1949 },{
1950 'msvs_large_module_debug_link_mode%': '2', # Yes
1951 }],
[email protected]49ee7ef2014-04-12 03:07:461952 ['MSVS_VERSION=="2013e"', {
[email protected]3e2648a2011-03-21 20:58:501953 'msvs_express%': 1,
1954 'secure_atl%': 0,
1955 },{
1956 'msvs_express%': 0,
1957 'secure_atl%': 1,
1958 }],
[email protected]912c55c2009-07-31 23:33:551959 ],
[email protected]ef4fa4072009-12-04 22:46:501960 'nacl_win64_defines': [
1961 # This flag is used to minimize dependencies when building
1962 # Native Client loader for 64-bit Windows.
1963 'NACL_WIN64',
1964 ],
[email protected]912c55c2009-07-31 23:33:551965 }],
[email protected]bb6aba32011-01-07 19:04:431966
[email protected]24641702014-07-03 17:20:151967 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios" and embedded==0', {
[email protected]8e553f42010-10-25 20:05:441968 'use_cups%': 1,
1969 }, {
1970 'use_cups%': 0,
1971 }],
[email protected]bb6aba32011-01-07 19:04:431972
[email protected]693f63c2014-01-17 06:52:191973 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
[email protected]280755c2013-05-23 10:44:351974 'enable_pepper_cdms%': 1,
1975 }, {
1976 'enable_pepper_cdms%': 0,
1977 }],
1978
[email protected]4b556cf2014-06-10 23:21:531979 ['OS=="android"', {
1980 'enable_browser_cdms%': 1,
1981 }, {
1982 'enable_browser_cdms%': 0,
1983 }],
1984
[email protected]eb5f1672013-01-31 07:56:461985 # Native Client glibc toolchain is enabled
petarjc8a5da742014-08-27 14:33:361986 # by default except on arm, mips and mips64.
1987 ['target_arch=="arm" or target_arch=="mipsel" or target_arch=="mips64el"', {
[email protected]2f7da672012-06-21 08:38:321988 'disable_glibc%': 1,
1989 }, {
1990 'disable_glibc%': 0,
1991 }],
1992
[email protected]19fe8f0b2010-12-07 07:27:271993 # Set the relative path from this file to the GYP file of the JPEG
1994 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281995 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1996 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271997 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281998 }, {
1999 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
2000 }],
[email protected]bb6aba32011-01-07 19:04:432001
[email protected]abcc9ac2011-05-16 20:04:352002 # Options controlling the use of GConf (the classic GNOME configuration
2003 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]02968b82013-11-14 02:42:432004 ['chromeos==1 or embedded==1', {
[email protected]1c6fe29302011-01-20 22:14:312005 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:352006 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:312007 }, {
2008 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:352009 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:312010 }],
2011
[email protected]4de39f82011-03-28 12:01:292012 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:292013 ['branding=="Chrome"', {
2014 # TODO(mmoss) The .grd files look for _google_chrome, but for
2015 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:292016 'grit_defines': ['-D', '_google_chrome',
2017 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:292018 }, {
[email protected]4de39f82011-03-28 12:01:292019 'grit_defines': ['-D', '_chromium',
2020 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:292021 }],
[email protected]bb6aba32011-01-07 19:04:432022 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:132023 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:432024 }],
[email protected]d628ab412013-09-07 03:26:372025 ['desktop_linux==1', {
2026 'grit_defines': ['-D', 'desktop_linux'],
2027 }],
[email protected]bb6aba32011-01-07 19:04:432028 ['toolkit_views==1', {
2029 'grit_defines': ['-D', 'toolkit_views'],
2030 }],
[email protected]8dd791d2011-09-16 16:37:302031 ['use_aura==1', {
2032 'grit_defines': ['-D', 'use_aura'],
2033 }],
[email protected]ed329be2012-01-03 22:02:162034 ['use_ash==1', {
2035 'grit_defines': ['-D', 'use_ash'],
2036 }],
[email protected]c329adf82011-10-05 14:34:572037 ['use_nss==1', {
2038 'grit_defines': ['-D', 'use_nss'],
2039 }],
[email protected]ff78e4e2013-05-03 19:19:152040 ['use_ozone==1', {
2041 'grit_defines': ['-D', 'use_ozone'],
2042 }],
[email protected]77a848262013-02-22 11:17:252043 ['image_loader_extension==1', {
2044 'grit_defines': ['-D', 'image_loader_extension'],
2045 }],
[email protected]9a425422011-01-11 00:53:182046 ['remoting==1', {
2047 'grit_defines': ['-D', 'remoting'],
2048 }],
joleksya91e8682014-09-10 13:48:412049 ['use_titlecase_in_grd==1', {
[email protected]bb6aba32011-01-07 19:04:432050 'grit_defines': ['-D', 'use_titlecase'],
2051 }],
[email protected]00dc155832011-02-01 18:51:192052 ['use_third_party_translations==1', {
2053 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:122054 'locales': [
[email protected]8581e1ba2011-08-22 23:27:162055 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
2056 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:122057 ],
[email protected]00dc155832011-02-01 18:51:192058 }],
[email protected]da1c8d692011-09-20 20:35:012059 ['OS=="android"', {
newt0548dfae2014-11-07 03:39:092060 'grit_defines': [
2061 '-t', 'android',
2062 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true',
2063 '--no-output-all-resource-defines',
2064 ],
[email protected]da1c8d692011-09-20 20:35:012065 }],
[email protected]cc1f0572013-07-31 05:41:032066 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:232067 'grit_defines': ['-D', 'scale_factors=2x'],
2068 }],
[email protected]ad563d02012-10-03 10:37:032069 ['OS == "ios"', {
2070 'grit_defines': [
[email protected]033346902013-08-20 01:01:122071 '-t', 'ios',
[email protected]ad563d02012-10-03 10:37:032072 # iOS uses a whitelist to filter resources.
lliabraa59d7c372014-11-07 16:28:272073 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt',
2074 '--no-output-all-resource-defines',
[email protected]ad563d02012-10-03 10:37:032075 ],
[email protected]b4530c82013-05-09 09:20:012076
[email protected]d04384ab2014-03-13 20:46:012077 # Enable host builds when generating with ninja-ios.
[email protected]b4530c82013-05-09 09:20:012078 'conditions': [
2079 ['"<(GENERATOR)"=="ninja"', {
[email protected]b4530c82013-05-09 09:20:012080 'host_os%': "mac",
[email protected]ce2cad72014-02-13 18:17:352081 }],
[email protected]d04384ab2014-03-13 20:46:012082
2083 # TODO(sdefresne): Remove the target_subarch check once Apple has
2084 # upstreamed the support for "arm64". http://crbug.com/341453
2085 ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', {
[email protected]ce2cad72014-02-13 18:17:352086 'clang_xcode%': 1,
2087 }],
[email protected]b4530c82013-05-09 09:20:012088 ],
[email protected]ad563d02012-10-03 10:37:032089 }],
[email protected]6a3cd37e2012-04-17 17:13:342090 ['enable_extensions==1', {
2091 'grit_defines': ['-D', 'enable_extensions'],
2092 }],
[email protected]6ab4ef92013-12-09 08:43:172093 ['enable_plugins!=0', {
[email protected]6ab4ef92013-12-09 08:43:172094 'grit_defines': ['-D', 'enable_plugins'],
2095 }],
vitalybuka93eea402014-11-05 23:47:152096 ['enable_basic_printing==1 or enable_print_preview==1', {
[email protected]658677f2012-06-09 06:04:022097 'grit_defines': ['-D', 'enable_printing'],
2098 }],
vitalybuka93eea402014-11-05 23:47:152099 ['enable_print_preview==1', {
vitalybukae29991c2014-11-05 21:15:122100 'grit_defines': ['-D', 'enable_print_preview'],
[email protected]b429eb19b2014-01-27 21:07:502101 }],
[email protected]c2aad542012-07-31 20:40:332102 ['enable_themes==1', {
2103 'grit_defines': ['-D', 'enable_themes'],
2104 }],
[email protected]ef1dd5062012-12-17 06:41:332105 ['enable_app_list==1', {
2106 'grit_defines': ['-D', 'enable_app_list'],
2107 }],
[email protected]dc4e8b82012-11-15 03:58:162108 ['enable_settings_app==1', {
2109 'grit_defines': ['-D', 'enable_settings_app'],
2110 }],
[email protected]5411d8202013-01-30 01:32:152111 ['enable_google_now==1', {
2112 'grit_defines': ['-D', 'enable_google_now'],
2113 }],
[email protected]a3a720f2013-04-25 19:35:422114 ['use_concatenated_impulse_responses==1', {
2115 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
2116 }],
[email protected]f66ddbd2013-06-27 14:17:042117 ['enable_webrtc==1', {
2118 'grit_defines': ['-D', 'enable_webrtc'],
2119 }],
[email protected]754a2002014-02-14 16:40:342120 ['enable_hangout_services_extension==1', {
2121 'grit_defines': ['-D', 'enable_hangout_services_extension'],
2122 }],
[email protected]25b8cb32014-01-30 11:04:292123 ['enable_task_manager==1', {
2124 'grit_defines': ['-D', 'enable_task_manager'],
2125 }],
[email protected]335b6872014-02-13 20:14:132126 ['notifications==1', {
2127 'grit_defines': ['-D', 'enable_notifications'],
2128 }],
[email protected]4b202ae2014-05-23 07:45:362129 ['enable_wifi_bootstrapping==1', {
2130 'grit_defines': ['-D', 'enable_wifi_bootstrapping'],
2131 }],
[email protected]2b9e68e2014-04-15 12:51:252132 ['enable_resource_whitelist_generation==1 and OS!="win"', {
[email protected]e4fdab92014-04-04 00:52:222133 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelisted_resource_{numeric_id}") {numeric_id}'],
[email protected]1a43cc572014-03-07 22:36:322134 }],
[email protected]2b9e68e2014-04-15 12:51:252135 ['enable_resource_whitelist_generation==1 and OS=="win"', {
2136 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'],
2137 }],
[email protected]2188c8d2014-03-21 00:58:562138 ['enable_mdns==1 or OS=="mac"', {
2139 'grit_defines': ['-D', 'enable_service_discovery'],
2140 'enable_service_discovery%': 1
2141 }],
[email protected]3bb37e62012-04-19 03:40:082142 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:072143 'clang_chrome_plugins_flags': [
2144 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:312145 ],
[email protected]5d451ad2011-02-11 16:43:462146 }],
[email protected]e12b37ec2014-06-16 11:21:172147 ['asan==1 or msan==1 or lsan==1 or tsan==1', {
[email protected]92799b632011-08-15 14:33:062148 'clang%': 1,
[email protected]3a0278b12014-05-20 15:37:582149 'use_allocator%': 'none',
glider7dbed1572014-09-23 16:38:112150 'use_sanitizer_options%': 1,
[email protected]92799b632011-08-15 14:33:062151 }],
[email protected]17b15a162014-07-24 15:41:422152 ['asan==1 and OS=="linux" and chromeos==0', {
[email protected]49d75ae2014-07-22 13:28:082153 'use_custom_libcxx%': 1,
2154 }],
[email protected]7fd639a2014-05-30 23:59:012155 ['ubsan==1', {
2156 'clang%': 1,
2157 }],
[email protected]0dbe7af92014-06-26 23:31:402158 ['ubsan_vptr==1', {
2159 'clang%': 1,
2160 }],
[email protected]f5d8c222012-08-29 17:47:022161 ['asan==1 and OS=="mac"', {
treib0b804d02014-09-01 17:06:482162 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
2163 # runtime is fully adopted. See http://crbug.com/242503.
jiayl55c7faa2014-09-24 16:25:182164 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:022165 }],
[email protected]c9a829272012-07-04 07:51:122166 ['tsan==1', {
[email protected]193149c2014-04-08 23:56:092167 'use_custom_libcxx%': 1,
[email protected]c9a829272012-07-04 07:51:122168 }],
[email protected]a10ddd2d2013-02-26 20:06:592169 ['msan==1', {
[email protected]e12b37ec2014-06-16 11:21:172170 # Use a just-built, MSan-instrumented libc++ instead of the system-wide
2171 # libstdc++. This is required to avoid false positive reports whenever
2172 # the C++ standard library is used.
2173 'use_custom_libcxx%': 1,
2174 # Running the V8-generated code on an ARM simulator is a powerful hack
2175 # that allows the tool to see the memory accesses from JITted code.
2176 # Without this flag, JS code causes false positive reports from MSan.
2177 'v8_target_arch': 'arm64',
[email protected]a10ddd2d2013-02-26 20:06:592178 }],
[email protected]c9a829272012-07-04 07:51:122179
[email protected]7ce58b22012-09-26 05:17:252180 ['OS=="linux" and clang_type_profiler==1', {
2181 'clang%': 1,
2182 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:322183 'conditions': [
2184 ['host_arch=="x64"', {
2185 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
2186 }],
2187 ['host_arch=="ia32"', {
2188 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
2189 # Clang in this directory at your own risk if needed for some
2190 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
2191 # usage). Any failure by this compiler should not close the tree.
2192 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
2193 }],
2194 ],
[email protected]7ce58b22012-09-26 05:17:252195 }],
2196
[email protected]85a75e572014-05-06 20:13:382197 ['OS=="win"', {
2198 # The Clang plugins don't currently work on Windows.
2199 # TODO(hans): One day, this will work. (crbug.com/82385)
2200 'clang_use_chrome_plugins%': 0,
2201 }],
2202
[email protected]a9318c72012-03-01 01:29:472203 # On valgrind bots, override the optimizer settings so we don't inline too
2204 # much and make the stacks harder to figure out.
2205 #
2206 # TODO(rnk): Kill off variables that no one else uses and just implement
2207 # them under a build_for_tool== condition.
2208 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
2209 # gcc flags
2210 'mac_debug_optimization': '1',
2211 'mac_release_optimization': '1',
2212 'release_optimize': '1',
2213 'no_gc_sections': 1,
2214 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
2215 '-fno-builtin -fno-optimize-sibling-calls',
2216 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
2217 '-fno-builtin -fno-optimize-sibling-calls',
2218
2219 # MSVS flags for TSan on Pin and Windows.
2220 'win_debug_RuntimeChecks': '0',
2221 'win_debug_disable_iterator_debugging': '1',
2222 'win_debug_Optimization': '1',
2223 'win_debug_InlineFunctionExpansion': '0',
2224 'win_release_InlineFunctionExpansion': '0',
2225 'win_release_OmitFramePointers': '0',
2226
[email protected]2fa89ef2014-05-07 18:45:592227 'use_allocator': 'tcmalloc',
[email protected]a9318c72012-03-01 01:29:472228 'release_valgrind_build': 1,
2229 'werror': '',
2230 'component': 'static_library',
2231 'use_system_zlib': 0,
2232 }],
2233
2234 # Build tweaks for DrMemory.
2235 # TODO(rnk): Combine with tsan config to share the builder.
2236 # http://crbug.com/108155
2237 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:472238 # These runtime checks force initialization of stack vars which blocks
2239 # DrMemory's uninit detection.
2240 'win_debug_RuntimeChecks': '0',
[email protected]49605d42013-10-18 13:58:172241 # Iterator debugging is slow.
[email protected]a9318c72012-03-01 01:29:472242 'win_debug_disable_iterator_debugging': '1',
2243 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:162244 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
2245 # /O2 and /Ob0 (disable inline) cannot be used together because of a
2246 # compiler bug, so we use /Ob1 instead.
2247 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:472248 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:502249 # Ditto for debug, to support bumping win_debug_Optimization.
2250 'win_debug_InlineFunctionExpansion': 0,
2251 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:472252 # Keep the code under #ifndef NVALGRIND.
2253 'release_valgrind_build': 1,
2254 }],
[email protected]b6a5ac92012-10-29 18:17:222255
[email protected]fcc89bf2013-10-30 17:37:212256 # Enable RLZ on Win, Mac, iOS and ChromeOS.
2257 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:222258 'enable_rlz%': 1,
2259 }],
[email protected]7d6763422013-04-26 12:06:542260
2261 # Set default compiler flags depending on ARM version.
[email protected]7d6763422013-04-26 12:06:542262 ['arm_version==6 and android_webview_build==0', {
2263 'arm_arch%': 'armv6',
2264 'arm_tune%': '',
[email protected]70f970d2013-12-16 14:11:382265 'arm_fpu%': 'vfp',
2266 'arm_float_abi%': 'softfp',
[email protected]7d6763422013-04-26 12:06:542267 'arm_thumb%': 0,
2268 }],
2269 ['arm_version==7 and android_webview_build==0', {
2270 'arm_arch%': 'armv7-a',
[email protected]7557cd42014-05-28 15:32:592271 'arm_tune%': 'generic-armv7-a',
[email protected]7d6763422013-04-26 12:06:542272 'conditions': [
2273 ['arm_neon==1', {
2274 'arm_fpu%': 'neon',
2275 }, {
2276 'arm_fpu%': 'vfpv3-d16',
2277 }],
2278 ],
[email protected]3f85dac32013-10-29 02:38:462279 # Change the default to hard once the armhf transition is complete.
[email protected]7d6763422013-04-26 12:06:542280 'arm_float_abi%': 'softfp',
2281 'arm_thumb%': 1,
2282 }],
2283
2284 ['android_webview_build==1', {
2285 # The WebView build gets its cpu-specific flags from the Android build system.
2286 'arm_arch%': '',
2287 'arm_tune%': '',
2288 'arm_fpu%': '',
2289 'arm_float_abi%': '',
2290 'arm_thumb%': 0,
2291 }],
[email protected]5ac4b902013-10-22 17:21:292292
2293 # Enable brlapi by default for chromeos.
2294 [ 'chromeos==1', {
2295 'use_brlapi%': 1,
2296 }],
[email protected]f93c2c92013-10-31 18:22:442297
[email protected]3bdb0992014-05-16 21:30:512298 ['use_ozone==1 and ozone_auto_platforms==1', {
2299 # Use test as the default platform.
2300 'ozone_platform%': 'test',
[email protected]4814ed22013-11-01 05:37:262301
[email protected]3bdb0992014-05-16 21:30:512302 # Build all platforms whose deps are in install-build-deps.sh.
2303 # Only these platforms will be compile tested by buildbots.
[email protected]4814ed22013-11-01 05:37:262304 'ozone_platform_dri%': 1,
2305 'ozone_platform_test%': 1,
[email protected]3bdb0992014-05-16 21:30:512306 'ozone_platform_egltest%': 1,
2307 }],
2308
[email protected]da7aed42013-12-17 22:28:312309 ['desktop_linux==1 and use_aura==1 and use_x11==1', {
2310 'use_clipboard_aurax11%': 1,
2311 }],
2312
[email protected]e71a3622013-12-04 07:32:412313 ['OS=="win" and use_goma==1', {
2314 # goma doesn't support pch yet.
2315 'chromium_win_pch': 0,
2316 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
2317 'conditions': [
scottmge14e79b2014-09-15 23:10:172318 ['win_z7==0 and fastbuild==0', {
[email protected]c73363762014-04-16 21:11:462319 'fastbuild': 1,
[email protected]e71a3622013-12-04 07:32:412320 }],
2321 ],
2322 }],
[email protected]8efc26082014-01-24 13:26:352323
[email protected]2a794002014-02-22 00:27:112324 ['OS=="win" and (clang==1 or asan==1)', {
[email protected]8efc26082014-01-24 13:26:352325 'chromium_win_pch': 0,
2326 }],
2327
[email protected]acad4962014-08-04 19:05:022328 ['host_clang==1', {
2329 'host_cc': '<(make_clang_dir)/bin/clang',
2330 'host_cxx': '<(make_clang_dir)/bin/clang++',
2331 }, {
2332 'host_cc': '<!(which gcc)',
2333 'host_cxx': '<!(which g++)',
2334 }],
2335
leecame6f6b732014-08-24 23:38:092336 # The seccomp-bpf sandbox is only supported on five architectures
[email protected]9f7615ee2013-12-19 21:38:382337 # currently.
2338 # Do not disable seccomp_bpf anywhere without talking to
2339 # [email protected]!
2340 ['((OS=="linux" or OS=="android") and '
2341 '(target_arch=="ia32" or target_arch=="x64" or '
leecame6f6b732014-08-24 23:38:092342 'target_arch=="arm" or target_arch=="mipsel" or '
2343 'target_arch=="arm64"))', {
[email protected]9f7615ee2013-12-19 21:38:382344 'use_seccomp_bpf%': 1,
2345 }, {
2346 'use_seccomp_bpf%': 0,
2347 }],
fdegans3572927c2014-11-06 12:28:022348
fdegansd7a59f92014-10-23 11:49:542349 # Set component build with LTO until all tests pass.
2350 # This also reduces link time.
2351 ['use_lto==1', {
2352 'component%': "shared_library",
2353 }],
[email protected]912c55c2009-07-31 23:33:552354 ],
[email protected]a9318c72012-03-01 01:29:472355
the_jkffdda022014-10-03 11:36:192356 # older history files use fts2 instead of fts3
2357 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)',
2358
[email protected]6a502252013-12-13 11:49:092359 # The path to the ANGLE library.
2360 'angle_path': '<(DEPTH)/third_party/angle',
[email protected]c91dc722013-06-12 22:53:012361
[email protected]35958422011-09-28 02:03:592362 # List of default apps to install in new profiles. The first list contains
2363 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:062364 # contains the destination location for each of the files. When a crx
2365 # is added or removed from the list, the chrome/browser/resources/
2366 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:592367 'default_apps_list': [
2368 'browser/resources/default_apps/external_extensions.json',
2369 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062370 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592371 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002372 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232373 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592374 ],
2375 'default_apps_list_linux_dest': [
2376 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
2377 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062378 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592379 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002380 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232381 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592382 ],
[email protected]27572d12014-08-11 20:36:042383
2384 # Whether to allow building of the GPU-related isolates.
2385 'archive_gpu_tests%': 0,
leilei4003c4f2014-09-23 21:33:162386
fdegans3572927c2014-11-06 12:28:022387 # Whether to allow building of chromoting related isolates.
leilei4003c4f2014-09-23 21:33:162388 'archive_chromoting_tests%': 0,
[email protected]2f80c312009-02-25 21:26:552389 },
2390 'target_defaults': {
[email protected]1c966092009-08-20 21:19:262391 'variables': {
[email protected]a6e22132010-02-10 20:43:182392 # The condition that operates on chromium_code is in a target_conditions
2393 # section, and will not have access to the default fallback value of
2394 # chromium_code at the top of this file, or to the chromium_code
2395 # variable placed at the root variables scope of .gyp files, because
2396 # those variables are not set at target scope. As a workaround,
2397 # if chromium_code is not set at target scope, define it in target scope
2398 # to contain whatever value it has during early variable expansion.
2399 # That's enough to make it available during target conditional
2400 # processing.
2401 'chromium_code%': '<(chromium_code)',
2402
[email protected]7cd58be2014-03-21 12:39:562403 'component%': '<(component)',
2404
[email protected]24641702014-07-03 17:20:152405 'chromecast%': '<(chromecast)',
2406
[email protected]7e0d664a2009-12-03 21:07:472407 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
2408 'win_release_Optimization%': '2', # 2 = /Os
2409 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:332410
2411 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:242412 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:112413 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:242414 # Tri-state: blank is default, 1 on, 0 off
2415 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:332416
[email protected]6b0507b2010-05-07 07:41:212417 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
2418 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:332419
[email protected]6b0507b2010-05-07 07:41:212420 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:152421 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
2422 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:332423
[email protected]fac10d12010-11-08 16:00:312424 # VS inserts quite a lot of extra checks to algorithms like
2425 # std::partial_sort in Debug build which make them O(N^2)
2426 # instead of O(N*logN). This is particularly slow under memory
2427 # tools like ThreadSanitizer so we want it to be disablable.
2428 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
[email protected]907cb98d2014-02-23 07:19:552429 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:472430
[email protected]5d60b0b2013-07-30 20:24:302431 # An application manifest fragment to declare compatibility settings for
2432 # 'executable' targets. Ignored in other target type.
2433 'win_exe_compatibility_manifest%':
2434 '<(DEPTH)\\build\\win\\compatibility.manifest',
2435
[email protected]ffd984b12009-09-11 19:37:002436 'release_extra_cflags%': '',
2437 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:002438
2439 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:522440
[email protected]ef5c5f1b2011-12-17 02:16:242441 # the non-qualified versions are widely assumed to be *nix-only
2442 'win_release_extra_cflags%': '',
2443 'win_debug_extra_cflags%': '',
2444
[email protected]b1eb341c2011-11-09 18:46:072445 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
2446 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
2447
[email protected]ef3326702011-10-06 18:06:442448 # Only used by Windows build for now. Can be used to build into a
2449 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
2450 # output files in src/build/VS2010_{Debug,Release}.
2451 'build_dir_prefix%': '',
2452
[email protected]9ac2db692012-06-08 01:01:572453 # Targets are by default not nacl untrusted code.
2454 'nacl_untrusted_build%': 0,
2455
[email protected]9c55d9d2012-11-15 23:28:442456 'pnacl_compile_flags': [
[email protected]7dcd93c2013-11-02 02:05:532457 # pnacl uses the clang compiler so we need to suppress all the
[email protected]9c55d9d2012-11-15 23:28:442458 # same warnings as we do for clang.
2459 # TODO(sbc): Remove these if/when they are removed from the clang
2460 # build.
2461 '-Wno-unused-function',
2462 '-Wno-char-subscripts',
2463 '-Wno-c++11-extensions',
2464 '-Wno-unnamed-type-template-args',
2465 ],
2466
[email protected]8974e042010-06-21 18:06:522467 'conditions': [
2468 ['OS=="win" and component=="shared_library"', {
2469 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:162470 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2471 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:522472 }, {
2473 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2474 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2475 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2476 }],
[email protected]1e013672012-06-29 22:12:202477 ['OS=="ios"', {
2478 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2479 'mac_release_optimization%': 's', # Use -Os unless overridden
2480 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2481 }, {
2482 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
thakis9ce1b752014-11-10 16:19:392483 'mac_release_optimization%': '2', # Use -O2 unless overridden
[email protected]1e013672012-06-29 22:12:202484 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2485 }],
[email protected]625eb032014-02-13 21:48:252486 ['OS=="android"', {
2487 'host_os%': '<(host_os)', # See comment above chromium_code.
2488 }],
[email protected]8974e042010-06-21 18:06:522489 ],
[email protected]dcbc32cc2014-08-01 21:48:202490 'clang_warning_flags': [
2491 '-Wheader-hygiene',
2492
2493 # Don't die on dtoa code that uses a char as an array index.
2494 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2495 '-Wno-char-subscripts',
2496
2497 # TODO(thakis): This used to be implied by -Wno-unused-function,
2498 # which we no longer use. Check if it makes sense to remove
2499 # this as well. http://crbug.com/316352
2500 '-Wno-unneeded-internal-declaration',
2501
2502 # Warns on switches on enums that cover all enum values but
2503 # also contain a default: branch. Chrome is full of that.
2504 '-Wno-covered-switch-default',
2505
2506 # Warns when a const char[] is converted to bool.
2507 '-Wstring-conversion',
2508
2509 # C++11-related flags:
2510
2511 # This warns on using ints as initializers for floats in
2512 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
2513 # which happens in several places in chrome code. Not sure if
2514 # this is worth fixing.
2515 '-Wno-c++11-narrowing',
2516
2517 # Clang considers the `register` keyword as deprecated, but e.g.
2518 # code generated by flex (used in angle) contains that keyword.
2519 # http://crbug.com/255186
2520 '-Wno-deprecated-register',
[email protected]dcbc32cc2014-08-01 21:48:202521 ],
[email protected]1c966092009-08-20 21:19:262522 },
[email protected]dcbc32cc2014-08-01 21:48:202523 'includes': [ 'set_clang_warning_flags.gypi', ],
[email protected]c91dc722013-06-12 22:53:012524 'defines': [
[email protected]6d84e0b2013-12-05 12:16:132525 # Don't use deprecated V8 APIs anywhere.
2526 'V8_DEPRECATION_WARNINGS',
[email protected]c91dc722013-06-12 22:53:012527 ],
[email protected]97865022014-06-13 23:18:042528 'include_dirs': [
2529 '<(SHARED_INTERMEDIATE_DIR)',
2530 ],
[email protected]32aa8cc2009-03-04 21:36:392531 'conditions': [
[email protected]d808e212013-03-12 14:06:162532 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:312533 'dependencies': [
2534 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
2535 ],
2536 }],
timurrrr6e2f3e262014-08-29 16:51:522537 ['OS=="win" and asan==1 and component=="shared_library"', {
2538 'dependencies': [
2539 '<(DEPTH)/build/win/asan.gyp:asan_dynamic_runtime',
2540 ],
2541 }],
[email protected]2fa89ef2014-05-07 18:45:592542 ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', {
[email protected]7ce58b22012-09-26 05:17:252543 'cflags_cc!': ['-fno-rtti'],
2544 'cflags_cc+': [
2545 '-frtti',
2546 '-gline-tables-only',
2547 '-fintercept-allocation-functions',
2548 ],
2549 'defines': ['TYPE_PROFILING'],
2550 'dependencies': [
2551 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
2552 ],
2553 }],
[email protected]32aa8cc2009-03-04 21:36:392554 ['branding=="Chrome"', {
2555 'defines': ['GOOGLE_CHROME_BUILD'],
2556 }, { # else: branding!="Chrome"
2557 'defines': ['CHROMIUM_BUILD'],
2558 }],
[email protected]286d9a12012-05-30 16:20:382559 ['OS=="mac" and component=="shared_library"', {
2560 'xcode_settings': {
2561 'DYLIB_INSTALL_NAME_BASE': '@rpath',
2562 'LD_RUNPATH_SEARCH_PATHS': [
2563 # For unbundled binaries.
2564 '@loader_path/.',
2565 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
2566 '@loader_path/../../..',
2567 ],
2568 },
2569 }],
[email protected]6fcbf9d2014-05-09 22:01:282570 ['clang==1 and OS!="win"', {
2571 # This is here so that all files get recompiled after a clang roll and
2572 # when turning clang on or off.
2573 # (defines are passed via the command line, and build systems rebuild
2574 # things when their commandline changes). Nothing should ever read this
2575 # define.
2576 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'],
2577 }],
[email protected]b6a5ac92012-10-29 18:17:222578 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:172579 'defines': ['ENABLE_RLZ'],
2580 }],
[email protected]63e39a282011-07-13 20:41:282581 ['component=="shared_library"', {
2582 'defines': ['COMPONENT_BUILD'],
2583 }],
[email protected]06c756182010-04-27 18:31:312584 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:172585 'defines': ['TOOLKIT_VIEWS=1'],
2586 }],
[email protected]1ee7c56c2011-10-19 14:51:332587 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:112588 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
2589 }],
[email protected]41423092011-08-25 15:39:582590 ['use_aura==1', {
2591 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:352592 }],
[email protected]ed329be2012-01-03 22:02:162593 ['use_ash==1', {
2594 'defines': ['USE_ASH=1'],
2595 }],
[email protected]91e273a102014-07-22 19:50:472596 ['use_pango==1', {
2597 'defines': ['USE_PANGO=1'],
2598 }],
[email protected]928362a2013-11-19 20:17:162599 ['use_cairo==1', {
2600 'defines': ['USE_CAIRO=1'],
2601 }],
[email protected]2a76009b2013-08-07 21:02:312602 ['use_cras==1', {
2603 'defines': ['USE_CRAS=1'],
2604 }],
[email protected]ff78e4e2013-05-03 19:19:152605 ['use_ozone==1', {
2606 'defines': ['USE_OZONE=1'],
2607 }],
[email protected]cb800562012-11-20 22:36:072608 ['use_default_render_theme==1', {
2609 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
2610 }],
[email protected]e190d272012-08-30 17:36:442611 ['use_libjpeg_turbo==1', {
2612 'defines': ['USE_LIBJPEG_TURBO=1'],
2613 }],
[email protected]2fa2f2d82013-04-29 18:13:122614 ['use_x11==1', {
2615 'defines': ['USE_X11=1'],
2616 }],
[email protected]89dcd662013-12-12 23:06:502617 ['use_clipboard_aurax11==1', {
2618 'defines': ['USE_CLIPBOARD_AURAX11=1'],
2619 }],
[email protected]bd7b6fe2012-03-05 21:02:402620 ['enable_one_click_signin==1', {
2621 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2622 }],
[email protected]b56a9e02014-06-20 09:57:042623 ['enable_pre_sync_backup==1', {
2624 'defines': ['ENABLE_PRE_SYNC_BACKUP'],
2625 }],
[email protected]77a848262013-02-22 11:17:252626 ['image_loader_extension==1', {
2627 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2628 }],
[email protected]7664ab32011-02-01 23:35:252629 ['profiling==1', {
2630 'defines': ['ENABLE_PROFILING=1'],
2631 }],
[email protected]542bf24a2010-06-11 23:08:172632 ['remoting==1', {
2633 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:002634 }],
[email protected]5b87e782012-02-09 18:19:322635 ['enable_webrtc==1', {
2636 'defines': ['ENABLE_WEBRTC=1'],
2637 }],
[email protected]d01120e62010-05-10 17:04:482638 ['proprietary_codecs==1', {
2639 'defines': ['USE_PROPRIETARY_CODECS'],
damienva6c97632014-08-27 01:47:582640 'conditions': [
2641 ['enable_mpeg2ts_stream_parser==1', {
2642 'defines': ['ENABLE_MPEG2TS_STREAM_PARSER'],
2643 }],
2644 ],
[email protected]d01120e62010-05-10 17:04:482645 }],
[email protected]7ddea9802012-02-22 23:08:052646 ['enable_viewport==1', {
2647 'defines': ['ENABLE_VIEWPORT'],
2648 }],
[email protected]280755c2013-05-23 10:44:352649 ['enable_pepper_cdms==1', {
2650 'defines': ['ENABLE_PEPPER_CDMS'],
2651 }],
[email protected]4b556cf2014-06-10 23:21:532652 ['enable_browser_cdms==1', {
2653 'defines': ['ENABLE_BROWSER_CDMS'],
2654 }],
[email protected]f31e2e52011-07-14 16:01:192655 ['configuration_policy==1', {
2656 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2657 }],
[email protected]7cce3232011-10-28 10:41:572658 ['notifications==1', {
2659 'defines': ['ENABLE_NOTIFICATIONS'],
2660 }],
[email protected]1efbaaa2012-04-24 02:43:242661 ['enable_hidpi==1', {
2662 'defines': ['ENABLE_HIDPI=1'],
2663 }],
[email protected]cef6c76f2013-10-30 16:33:302664 ['native_discardable_memory==1', {
2665 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
2666 }],
2667 ['native_memory_pressure_signals==1', {
2668 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
2669 }],
[email protected]49513e02013-11-20 08:36:402670 ['use_udev==1', {
2671 'defines': ['USE_UDEV'],
2672 }],
[email protected]9c1949e2009-10-02 19:59:542673 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:312674 'xcode_settings': {
2675 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2676 },
[email protected]9c1949e2009-10-02 19:59:542677 'conditions': [
[email protected]0dbe7af92014-06-26 23:31:402678 ['clang==1 and asan==0 and msan==0 and tsan==0 and ubsan_vptr==0', {
[email protected]c86fd472013-04-02 19:42:302679 # Clang creates chubby debug information, which makes linking very
2680 # slow. For now, don't create debug information with clang. See
2681 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432682 'conditions': [
2683 ['OS=="linux"', {
2684 'variables': {
2685 'debug_extra_cflags': '-g0',
2686 },
2687 }],
2688 # Android builds symbols on release by default, disable them.
2689 ['OS=="android"', {
2690 'variables': {
2691 'debug_extra_cflags': '-g0',
2692 'release_extra_cflags': '-g0',
2693 },
2694 }],
2695 ],
2696 }, { # else clang!=1
2697 'conditions': [
[email protected]c86fd472013-04-02 19:42:302698 ['OS=="win" and fastbuild==2', {
2699 # Completely disable debug information.
2700 'msvs_settings': {
2701 'VCLinkerTool': {
2702 'GenerateDebugInformation': 'false',
2703 },
2704 'VCCLCompilerTool': {
2705 'DebugInformationFormat': '0',
2706 },
2707 },
2708 }],
2709 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432710 'msvs_settings': {
2711 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312712 # This tells the linker to generate .pdbs, so that
2713 # we can get meaningful stack traces.
2714 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432715 },
2716 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312717 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432718 'DebugInformationFormat': '0',
2719 },
2720 },
2721 }],
[email protected]c86fd472013-04-02 19:42:302722 ['OS=="linux" and fastbuild==2', {
2723 'variables': {
2724 'debug_extra_cflags': '-g0',
2725 },
2726 }],
2727 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432728 'variables': {
2729 'debug_extra_cflags': '-g1',
2730 },
2731 }],
[email protected]c86fd472013-04-02 19:42:302732 ['OS=="android" and fastbuild==2', {
2733 'variables': {
2734 'debug_extra_cflags': '-g0',
2735 'release_extra_cflags': '-g0',
2736 },
2737 }],
2738 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432739 'variables': {
2740 'debug_extra_cflags': '-g1',
2741 'release_extra_cflags': '-g1',
2742 },
2743 }],
2744 ],
2745 }], # clang!=1
2746 ],
[email protected]9c1949e2009-10-02 19:59:542747 }], # fastbuild!=0
[email protected]19677402014-06-18 13:10:042748 ['dont_embed_build_metadata==1', {
[email protected]b9e9992a2014-06-12 21:01:192749 'defines': [
[email protected]19677402014-06-18 13:10:042750 'DONT_EMBED_BUILD_METADATA',
[email protected]b9e9992a2014-06-12 21:01:192751 ],
[email protected]19677402014-06-18 13:10:042752 }], # dont_embed_build_metadata==1
[email protected]20960e072011-09-20 20:59:012753 ['dcheck_always_on!=0', {
2754 'defines': ['DCHECK_ALWAYS_ON=1'],
2755 }], # dcheck_always_on!=0
[email protected]a1e87422013-07-09 21:47:012756 ['tracing_like_official_build!=0', {
2757 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2758 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472759 ['win_use_allocator_shim==0', {
2760 'conditions': [
2761 ['OS=="win"', {
2762 'defines': ['NO_TCMALLOC'],
2763 }],
2764 ],
2765 }],
[email protected]6c65f2b2014-05-07 08:57:462766 ['asan==1', {
2767 'defines': [
2768 'ADDRESS_SANITIZER',
2769 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]be766bb2014-07-01 19:22:122770 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]6c65f2b2014-05-07 08:57:462771 ],
2772 }],
[email protected]1612e552014-02-15 04:49:182773 ['syzyasan==1', {
2774 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
[email protected]696de4e62012-11-21 21:18:542775 'msvs_settings': {
2776 'VCLinkerTool': {
2777 'Profile': 'true',
2778 },
2779 },
[email protected]2f047202013-06-14 06:36:392780 'defines': [
[email protected]aee2f332014-03-27 15:08:042781 'SYZYASAN',
[email protected]2f047202013-06-14 06:36:392782 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]be766bb2014-07-01 19:22:122783 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]2f047202013-06-14 06:36:392784 ],
[email protected]1612e552014-02-15 04:49:182785 }],
[email protected]4e4d6042010-08-26 18:34:382786 ['OS=="win"', {
2787 'defines': [
2788 '__STD_C',
2789 '_CRT_SECURE_NO_DEPRECATE',
2790 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102791 # This define is required to pull in the new Win8 interfaces from
2792 # system headers like ShObjIdl.h.
scottmga6675a5f2014-11-15 01:37:472793 'NTDDI_VERSION=0x06030000',
[email protected]37416742013-11-12 07:13:332794 # This is required for ATL to use XP-safe versions of its functions.
2795 '_USING_V110_SDK71_',
[email protected]4e4d6042010-08-26 18:34:382796 ],
2797 'include_dirs': [
2798 '<(DEPTH)/third_party/wtl/include',
2799 ],
[email protected]9619e65d2012-05-23 19:06:522800 'conditions': [
2801 ['win_z7!=0', {
2802 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092803 # Generates debug info when win_z7=1
2804 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2805 'VCLinkerTool': {
2806 'GenerateDebugInformation': 'true',
2807 },
[email protected]9619e65d2012-05-23 19:06:522808 'VCCLCompilerTool': {
2809 'DebugInformationFormat': '1',
2810 }
2811 }
brucedawson4b6961d2014-10-28 22:18:042812 }], # win_z7!=0
2813 ['win_analyze', {
2814 'defines!': [
2815 # This is prohibited when running /analyze.
2816 '_USING_V110_SDK71_',
2817 ],
2818 'msvs_settings': {
2819 'VCCLCompilerTool': {
2820 # Set WarnAsError to false to disable this setting for most
2821 # projects so that compilation continues.
2822 'WarnAsError': 'false',
2823 # When win_analyze is specified add the /analyze switch.
2824 # Also add /WX- to force-disable WarnAsError for projects that
2825 # override WarnAsError.
2826 # Also, disable various noisy warnings that have low value.
2827 'AdditionalOptions': [
2828 '/analyze',
2829 '/WX-',
2830 '/wd6011', # Dereferencing NULL pointer
2831 '/wd6312', # Possible infinite loop: use of the constant
2832 # EXCEPTION_CONTINUE_EXECUTION in the exception-filter
2833 '/wd6326', # Potential comparison of constant with constant
2834 '/wd28159', # Consider using 'GetTickCount64'
2835 '/wd28204', # Inconsistent SAL annotations
2836 '/wd28251', # Inconsistent SAL annotations
2837 '/wd28252', # Inconsistent SAL annotations
2838 '/wd28253', # Inconsistent SAL annotations
2839 '/wd28196', # The precondition is not satisfied
2840 '/wd28301', # Inconsistent SAL annotations
2841 '/wd6340', # Sign mismatch in function parameter
2842 '/wd28182', # Dereferencing NULL pointer
2843 ],
2844 },
2845 },
2846 }], # win_analyze
2847 ],
[email protected]4e4d6042010-08-26 18:34:382848 }], # OS==win
[email protected]24641702014-07-03 17:20:152849 ['chromecast==1', {
2850 'defines': [
2851 'LOG_DISABLED=0',
2852 ],
2853 'conditions': [
2854 ['target_arch=="arm"', {
2855 'defines': [
2856 # TODO(lcwu): Work around an error when building Chromium
2857 # with gcc-4.5.3 (e.g. v8/src/platform-linux.cc). Remove
2858 # this define once the toolchain is updated.
2859 # See crbug.com/388933.
2860 '__SOFTFP',
2861 ],
2862 }],
gunschb50a4e3f2014-09-17 04:05:282863 ['use_playready==1', {
2864 'defines': [
2865 'PLAYREADY_CDM_AVAILABLE',
2866 ],
2867 }],
[email protected]24641702014-07-03 17:20:152868 ],
2869 }],
[email protected]44879ed2012-04-06 01:11:022870 ['enable_task_manager==1', {
2871 'defines': [
2872 'ENABLE_TASK_MANAGER=1',
2873 ],
2874 }],
[email protected]6a3cd37e2012-04-17 17:13:342875 ['enable_extensions==1', {
2876 'defines': [
2877 'ENABLE_EXTENSIONS=1',
2878 ],
2879 }],
[email protected]13eb97d2012-01-05 01:07:122880 ['OS=="win" and branding=="Chrome"', {
2881 'defines': ['ENABLE_SWIFTSHADER'],
2882 }],
[email protected]407dfa632011-12-23 11:59:352883 ['enable_dart==1', {
2884 'defines': ['WEBKIT_USING_DART=1'],
2885 }],
[email protected]18e0f39b2012-01-17 16:47:342886 ['enable_plugin_installation==1', {
2887 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2888 }],
[email protected]6d17f6392012-12-05 05:24:542889 ['enable_plugins==1', {
2890 'defines': ['ENABLE_PLUGINS=1'],
2891 }],
[email protected]cdb756ef2012-04-05 18:34:532892 ['enable_session_service==1', {
2893 'defines': ['ENABLE_SESSION_SERVICE=1'],
2894 }],
[email protected]6b40bb582012-03-15 20:50:382895 ['enable_themes==1', {
2896 'defines': ['ENABLE_THEMES=1'],
2897 }],
[email protected]57e67ac2013-02-22 03:37:222898 ['enable_autofill_dialog==1', {
2899 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2900 }],
[email protected]d3340bf512014-05-22 22:27:582901 ['enable_prod_wallet_service==1', {
2902 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'],
2903 }],
[email protected]0acdd772012-04-05 22:53:002904 ['enable_background==1', {
2905 'defines': ['ENABLE_BACKGROUND=1'],
2906 }],
[email protected]6ee43a72012-12-07 22:44:402907 ['enable_google_now==1', {
2908 'defines': ['ENABLE_GOOGLE_NOW=1'],
2909 }],
[email protected]3b5e88d2013-09-06 11:03:062910 ['cld_version!=0', {
2911 'defines': ['CLD_VERSION=<(cld_version)'],
2912 }],
vitalybuka93eea402014-11-05 23:47:152913 ['enable_basic_printing==1 or enable_print_preview==1', {
2914 # Convenience define for ENABLE_BASIC_PRINTING || ENABLE_PRINT_PREVIEW.
2915 'defines': ['ENABLE_PRINTING=1'],
[email protected]1e54c1c2013-08-12 17:16:052916 }],
vitalybuka93eea402014-11-05 23:47:152917 ['enable_basic_printing==1', {
2918 # Enable basic printing support and UI.
2919 'defines': ['ENABLE_BASIC_PRINTING=1'],
2920 }],
2921 ['enable_print_preview==1', {
2922 # Enable printing with print preview.
2923 # Can be defined without ENABLE_BASIC_PRINTING.
vitalybukae29991c2014-11-05 21:15:122924 'defines': ['ENABLE_PRINT_PREVIEW=1'],
[email protected]658677f2012-06-09 06:04:022925 }],
[email protected]c6ce08072013-07-31 07:48:532926 ['enable_spellcheck==1', {
2927 'defines': ['ENABLE_SPELLCHECK=1'],
2928 }],
[email protected]e6026962012-06-14 21:28:322929 ['enable_captive_portal_detection==1', {
2930 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2931 }],
[email protected]dc4e8b82012-11-15 03:58:162932 ['enable_app_list==1', {
2933 'defines': ['ENABLE_APP_LIST=1'],
2934 }],
2935 ['enable_settings_app==1', {
2936 'defines': ['ENABLE_SETTINGS_APP=1'],
2937 }],
[email protected]02494ec2014-05-07 15:05:292938 ['disable_file_support==1', {
2939 'defines': ['DISABLE_FILE_SUPPORT=1'],
2940 }],
[email protected]9bfe0ab2012-08-30 13:18:112941 ['disable_ftp_support==1', {
2942 'defines': ['DISABLE_FTP_SUPPORT=1'],
2943 }],
[email protected]847aaab82014-05-07 14:05:462944 ['use_icu_alternatives_on_android==1', {
2945 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'],
2946 }],
[email protected]0850e842013-01-19 03:44:312947 ['enable_managed_users==1', {
2948 'defines': ['ENABLE_MANAGED_USERS=1'],
2949 }],
[email protected]199def22013-02-21 17:52:292950 ['spdy_proxy_auth_property != ""', {
2951 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2952 }],
[email protected]f37e9412013-05-27 23:18:252953 ['spdy_proxy_auth_value != ""', {
2954 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2955 }],
[email protected]5cbeb502013-04-23 19:25:272956 ['enable_mdns==1', {
2957 'defines': ['ENABLE_MDNS=1'],
[email protected]b9171622013-10-01 22:05:232958 }],
[email protected]2188c8d2014-03-21 00:58:562959 ['enable_service_discovery==1', {
2960 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ],
2961 }],
[email protected]4b202ae2014-05-23 07:45:362962 ['enable_wifi_bootstrapping==1', {
2963 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ],
2964 }],
[email protected]754a2002014-02-14 16:40:342965 ['enable_hangout_services_extension==1', {
2966 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'],
2967 }],
[email protected]8c64e282013-11-28 16:05:142968 ['enable_ipc_fuzzer==1', {
2969 'defines': ['ENABLE_IPC_FUZZER=1'],
2970 }],
[email protected]8b4efe92014-02-21 16:08:202971 ['video_hole==1', {
2972 'defines': ['VIDEO_HOLE=1'],
2973 }],
japhet46789a82014-09-10 03:06:462974 ['enable_load_completion_hacks==1', {
2975 'defines': ['ENABLE_LOAD_COMPLETION_HACKS=1'],
2976 }],
baixo3a3c88a2014-10-28 11:52:212977 ['v8_use_external_startup_data==1', {
2978 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'],
2979 }],
[email protected]a6e22132010-02-10 20:43:182980 ], # conditions for 'target_defaults'
2981 'target_conditions': [
bedupont65ce5acc2014-11-04 16:30:412982 ['<(use_libpci)==1', {
2983 'defines': ['USE_LIBPCI=1'],
2984 }],
[email protected]e1b2d732014-03-28 16:20:322985 ['<(use_openssl)==1', {
[email protected]ad9449f92014-03-12 09:34:102986 'defines': ['USE_OPENSSL=1'],
2987 }],
[email protected]e1b2d732014-03-28 16:20:322988 ['<(use_openssl_certs)==1', {
2989 'defines': ['USE_OPENSSL_CERTS=1'],
2990 }],
2991 ['>(nacl_untrusted_build)==1', {
2992 'defines': [
2993 'USE_OPENSSL=1',
2994 'USE_OPENSSL_CERTS=1',
2995 ],
2996 }],
hidehiko2b720d22014-10-17 06:40:302997 ['<(use_glib)==1 and >(nacl_untrusted_build)==0', {
2998 'defines': ['USE_GLIB=1'],
2999 }],
[email protected]ad9449f92014-03-12 09:34:103000 ['<(use_nss)==1 and >(nacl_untrusted_build)==0', {
3001 'defines': ['USE_NSS=1'],
3002 }],
[email protected]02517012014-06-13 09:28:413003 ['<(chromeos)==1 and >(nacl_untrusted_build)==0', {
3004 'defines': ['OS_CHROMEOS=1'],
3005 }],
[email protected]e59443e2014-08-18 14:13:333006 ['enable_wexit_time_destructors==1 and OS!="win"', {
3007 # TODO: Enable on Windows too, http://crbug.com/404525
[email protected]dcbc32cc2014-08-01 21:48:203008 'variables': { 'clang_warning_flags': ['-Wexit-time-destructors']},
[email protected]b1eb341c2011-11-09 18:46:073009 }],
[email protected]c14d8e772010-02-09 22:06:153010 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:283011 'conditions': [
[email protected]1e013672012-06-29 22:12:203012 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:333013 # We don't want to get warnings from third-party code,
3014 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:283015 'cflags!': [
3016 '-Wall',
3017 '-Wextra',
[email protected]d8543312010-02-10 17:43:283018 ],
[email protected]167ec822011-10-24 22:05:273019 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:003020 # Don't warn about hash_map in third-party code.
3021 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:273022 ],
3023 'cflags': [
[email protected]c0a6b272011-02-09 22:32:333024 # Don't warn about printf format problems.
3025 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:223026 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:003027 ],
[email protected]d16bd642011-07-25 23:59:183028 'cflags_cc!': [
[email protected]f58fa2c2013-12-06 08:06:203029 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453).
[email protected]d16bd642011-07-25 23:59:183030 '-Wsign-compare',
3031 ]
[email protected]d8543312010-02-10 17:43:283032 }],
[email protected]82dd5eb32012-08-18 04:24:323033 # TODO: Fix all warnings on chromeos too.
3034 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
3035 'cflags!': [
3036 '-Werror',
3037 ],
3038 }],
[email protected]bc073c062012-01-13 06:28:033039 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:113040 'cflags': [
3041 # Don't warn about ignoring the return value from e.g. close().
3042 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:033043 # BSD systems do not support this option, since they are usually
3044 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:113045 '-Wno-unused-result',
3046 ],
3047 }],
[email protected]d8543312010-02-10 17:43:283048 [ 'OS=="win"', {
3049 'defines': [
3050 '_CRT_SECURE_NO_DEPRECATE',
3051 '_CRT_NONSTDC_NO_WARNINGS',
3052 '_CRT_NONSTDC_NO_DEPRECATE',
3053 '_SCL_SECURE_NO_DEPRECATE',
3054 ],
3055 'msvs_disabled_warnings': [4800],
3056 'msvs_settings': {
3057 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:113058 'WarningLevel': '3',
[email protected]86caa4052014-07-18 07:22:093059 'WarnAsError': 'true',
[email protected]d8543312010-02-10 17:43:283060 'Detect64BitPortabilityProblems': 'false',
3061 },
3062 },
[email protected]c54b41cb2012-08-24 20:58:243063 'conditions': [
3064 ['buildtype=="Official"', {
3065 'msvs_settings': {
3066 'VCCLCompilerTool': { 'WarnAsError': 'false' },
3067 }
3068 }],
[email protected]8efc26082014-01-24 13:26:353069 ['clang==1', {
3070 'msvs_settings': {
3071 'VCCLCompilerTool': { 'WarnAsError': 'false' },
3072 }
3073 }],
kulkarni.a9af92a12014-09-19 18:47:213074 [ 'component=="shared_library"', {
3075 # TODO(darin): Unfortunately, some third_party code depends on base.
3076 'msvs_disabled_warnings': [
3077 4251, # class 'std::xx' needs to have dll-interface.
3078 ],
3079 }],
[email protected]c54b41cb2012-08-24 20:58:243080 ],
[email protected]d8543312010-02-10 17:43:283081 }],
kulkarni.a9af92a12014-09-19 18:47:213082
[email protected]1e013672012-06-29 22:12:203083 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:283084 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:063085 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:283086 },
[email protected]3a352c362012-05-08 19:45:493087 'conditions': [
3088 ['buildtype=="Official"', {
3089 'xcode_settings': {
3090 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
3091 },
3092 }],
3093 ],
[email protected]d8543312010-02-10 17:43:283094 }],
[email protected]1e013672012-06-29 22:12:203095 [ 'OS=="ios"', {
3096 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:223097 # TODO(ios): Fix remaining warnings in third-party code, then
3098 # remove this; the Mac cleanup didn't get everything that's
3099 # flagged in an iOS build.
3100 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:203101 'RUN_CLANG_STATIC_ANALYZER': 'NO',
[email protected]5a2637d02013-11-12 17:01:173102 # Several internal ios directories generate numerous warnings for
3103 # -Wobjc-missing-property-synthesis.
3104 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
[email protected]1e013672012-06-29 22:12:203105 },
3106 }],
[email protected]c14d8e772010-02-09 22:06:153107 ],
3108 }, {
[email protected]a5c598152012-01-27 04:55:133109 'includes': [
3110 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
3111 'filename_rules.gypi',
3112 ],
[email protected]41af4f82012-11-08 00:09:313113 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:153114 # C99 macros on Mac and Linux.
3115 'defines': [
[email protected]41af4f82012-11-08 00:09:313116 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:153117 '__STDC_FORMAT_MACROS',
3118 ],
3119 'conditions': [
[email protected]c14d8e772010-02-09 22:06:153120 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:073121 # turn on warnings for signed/unsigned mismatch on chromium code.
3122 'msvs_settings': {
3123 'VCCLCompilerTool': {
3124 'AdditionalOptions': ['/we4389'],
3125 },
3126 },
[email protected]c14d8e772010-02-09 22:06:153127 }],
[email protected]63e39a282011-07-13 20:41:283128 ['OS=="win" and component=="shared_library"', {
3129 'msvs_disabled_warnings': [
3130 4251, # class 'std::xx' needs to have dll-interface.
3131 ],
3132 }],
[email protected]c14d8e772010-02-09 22:06:153133 ],
3134 }],
[email protected]a6e22132010-02-10 20:43:183135 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:553136 'default_configuration': 'Debug',
3137 'configurations': {
[email protected]5153767c2009-12-22 01:52:503138 # VCLinkerTool LinkIncremental values below:
3139 # 0 == default
3140 # 1 == /INCREMENTAL:NO
3141 # 2 == /INCREMENTAL
3142 # Debug links incremental, Release does not.
3143 #
[email protected]7b99801e2010-11-03 17:26:233144 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:503145 #
3146 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:563147 'abstract': 1,
3148 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:513149 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:563150 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
3151 'CharacterSet': '1',
3152 },
[email protected]f59e1302013-02-15 13:48:403153 # Add the default import libs.
3154 'msvs_settings':{
3155 'VCLinkerTool': {
3156 'AdditionalDependencies': [
3157 'kernel32.lib',
3158 'gdi32.lib',
3159 'winspool.lib',
3160 'comdlg32.lib',
3161 'advapi32.lib',
3162 'shell32.lib',
3163 'ole32.lib',
3164 'oleaut32.lib',
3165 'user32.lib',
3166 'uuid.lib',
3167 'odbc32.lib',
3168 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:393169 'delayimp.lib',
[email protected]48293fb2013-12-04 04:02:033170 'credui.lib',
3171 'netapi32.lib',
[email protected]f59e1302013-02-15 13:48:403172 ],
3173 },
3174 },
[email protected]5153767c2009-12-22 01:52:503175 },
3176 'x86_Base': {
3177 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:503178 'msvs_settings': {
3179 'VCLinkerTool': {
[email protected]388484f02014-02-06 09:49:213180 'MinimumRequiredVersion': '5.01', # XP.
[email protected]ef4fa4072009-12-04 22:46:503181 'TargetMachine': '1',
3182 },
[email protected]2d584a92013-11-12 22:44:393183 'VCLibrarianTool': {
3184 'TargetMachine': '1',
3185 },
[email protected]ef4fa4072009-12-04 22:46:503186 },
[email protected]2fa40782009-11-01 21:17:343187 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:563188 },
[email protected]5153767c2009-12-22 01:52:503189 'x64_Base': {
3190 'abstract': 1,
3191 'msvs_configuration_platform': 'x64',
3192 'msvs_settings': {
3193 'VCLinkerTool': {
[email protected]68c88b02014-06-04 17:16:043194 # Make sure to understand http://crbug.com/361720 if you want to
3195 # increase this.
3196 'MinimumRequiredVersion': '5.02', # Server 2003.
[email protected]5153767c2009-12-22 01:52:503197 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:503198 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:053199 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:503200 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:053201 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:363202 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
3203 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:503204 },
[email protected]d26b4418ab2010-03-24 22:06:353205 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:503206 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:053207 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:503208 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:053209 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]2d584a92013-11-12 22:44:393210 'TargetMachine': '17', # x64
[email protected]5153767c2009-12-22 01:52:503211 },
3212 },
[email protected]5153767c2009-12-22 01:52:503213 },
3214 'Debug_Base': {
3215 'abstract': 1,
[email protected]14339762011-04-05 07:36:583216 'defines': [
3217 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3218 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3219 ],
[email protected]1c966092009-08-20 21:19:263220 'xcode_settings': {
[email protected]d5d593a2009-08-28 23:23:293221 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:493222 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:493223 '<@(debug_extra_cflags)',
3224 ],
[email protected]1c966092009-08-20 21:19:263225 },
[email protected]bb05e452009-10-29 21:24:563226 'msvs_settings': {
3227 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:473228 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:563229 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:213230 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:473231 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:153232 'conditions': [
3233 # According to MSVS, InlineFunctionExpansion=0 means
3234 # "default inlining", not "/Ob0".
3235 # Thus, we have to handle InlineFunctionExpansion==0 separately.
3236 ['win_debug_InlineFunctionExpansion==0', {
3237 'AdditionalOptions': ['/Ob0'],
3238 }],
3239 ['win_debug_InlineFunctionExpansion!=""', {
3240 'InlineFunctionExpansion':
3241 '<(win_debug_InlineFunctionExpansion)',
3242 }],
[email protected]fac10d12010-11-08 16:00:313243 ['win_debug_disable_iterator_debugging==1', {
3244 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
3245 }],
[email protected]ef5c5f1b2011-12-17 02:16:243246
3247 # if win_debug_OmitFramePointers is blank, leave as default
3248 ['win_debug_OmitFramePointers==1', {
3249 'OmitFramePointers': 'true',
3250 }],
3251 ['win_debug_OmitFramePointers==0', {
3252 'OmitFramePointers': 'false',
3253 # The above is not sufficient (http://crbug.com/106711): it
3254 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
3255 # perform FPO regardless, so we must explicitly disable.
3256 # We still want the false setting above to avoid having
3257 # "/Oy /Oy-" and warnings about overriding.
3258 'AdditionalOptions': ['/Oy-'],
3259 }],
[email protected]2ae6e022010-05-07 13:19:153260 ],
[email protected]ef5c5f1b2011-12-17 02:16:243261 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:563262 },
3263 'VCLinkerTool': {
3264 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:333265 # ASLR makes debugging with windbg difficult because Chrome.exe and
3266 # Chrome.dll share the same base name. As result, windbg will
3267 # name the Chrome.dll module like chrome_<base address>, where
3268 # <base address> typically changes with each launch. This in turn
3269 # means that breakpoints in Chrome.dll don't stick from one launch
3270 # to the next. For this reason, we turn ASLR off in debug builds.
3271 # Note that this is a three-way bool, where 0 means to pick up
3272 # the default setting, 1 is off and 2 is on.
3273 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:563274 },
3275 'VCResourceCompilerTool': {
3276 'PreprocessorDefinitions': ['_DEBUG'],
3277 },
3278 },
[email protected]2f80c312009-02-25 21:26:553279 'conditions': [
[email protected]78204c92012-09-14 04:42:553280 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:543281 'target_conditions': [
3282 ['_toolset=="target"', {
3283 'cflags': [
3284 '<@(debug_extra_cflags)',
3285 ],
3286 }],
[email protected]bb05e452009-10-29 21:24:563287 ],
[email protected]2f80c312009-02-25 21:26:553288 }],
[email protected]1eec679e2013-12-13 22:10:273289 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', {
[email protected]a8d94b42013-12-10 18:52:223290 # Enable libstdc++ debugging facilities to help catch problems
3291 # early, see http://crbug.com/65151 .
3292 # TODO(phajdan.jr): Should we enable this for all of POSIX?
3293 'defines': ['_GLIBCXX_DEBUG=1',],
3294 }],
[email protected]330ba6d2014-03-06 05:41:363295 ['release_valgrind_build==0', {
[email protected]56cca4e2011-07-01 21:33:353296 'xcode_settings': {
3297 'OTHER_CFLAGS': [
3298 '-fstack-protector-all', # Implies -fstack-protector
3299 ],
3300 },
3301 }],
[email protected]e86432a2014-08-18 21:01:083302 ['clang==1', {
3303 'cflags': [
3304 # Allow comparing the address of references and 'this' against 0
3305 # in debug builds. Technically, these can never be null in
3306 # well-defined C/C++ and Clang can optimize such checks away in
3307 # release builds, but they may be used in asserts in debug builds.
3308 '-Wno-undefined-bool-conversion',
3309 '-Wno-tautological-undefined-compare',
3310 ],
3311 'xcode_settings': {
3312 'OTHER_CFLAGS': [
3313 '-Wno-undefined-bool-conversion',
3314 '-Wno-tautological-undefined-compare',
3315 ],
3316 },
3317 'msvs_settings': {
3318 'VCCLCompilerTool': {
3319 'AdditionalOptions': [
3320 '-Wno-undefined-bool-conversion',
3321 '-Wno-tautological-undefined-compare',
3322 ],
3323 },
3324 },
3325 }],
[email protected]2f80c312009-02-25 21:26:553326 ],
3327 },
[email protected]5153767c2009-12-22 01:52:503328 'Release_Base': {
3329 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:553330 'defines': [
3331 'NDEBUG',
3332 ],
[email protected]1c966092009-08-20 21:19:263333 'xcode_settings': {
3334 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
3335 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:003336 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:263337 },
[email protected]bb05e452009-10-29 21:24:563338 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:473339 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:473340 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:153341 'conditions': [
[email protected]2212d272011-12-20 21:37:373342 # In official builds, each target will self-select
3343 # an optimization level.
3344 ['buildtype!="Official"', {
3345 'Optimization': '<(win_release_Optimization)',
3346 },
3347 ],
[email protected]2ae6e022010-05-07 13:19:153348 # According to MSVS, InlineFunctionExpansion=0 means
3349 # "default inlining", not "/Ob0".
3350 # Thus, we have to handle InlineFunctionExpansion==0 separately.
3351 ['win_release_InlineFunctionExpansion==0', {
3352 'AdditionalOptions': ['/Ob0'],
3353 }],
3354 ['win_release_InlineFunctionExpansion!=""', {
3355 'InlineFunctionExpansion':
3356 '<(win_release_InlineFunctionExpansion)',
3357 }],
[email protected]626d2d22011-10-11 15:47:333358
[email protected]ef5c5f1b2011-12-17 02:16:243359 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:333360 ['win_release_OmitFramePointers==1', {
3361 'OmitFramePointers': 'true',
3362 }],
3363 ['win_release_OmitFramePointers==0', {
3364 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:243365 # The above is not sufficient (http://crbug.com/106711): it
3366 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
3367 # perform FPO regardless, so we must explicitly disable.
3368 # We still want the false setting above to avoid having
3369 # "/Oy /Oy-" and warnings about overriding.
3370 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:333371 }],
[email protected]2ae6e022010-05-07 13:19:153372 ],
[email protected]21fac242014-07-18 09:30:333373 'AdditionalOptions': [
3374 '/d2Zi+', # Improve debugging of Release builds.
scottmg4f828c942014-08-29 04:11:073375 '/Zc:inline', # Remove unreferenced COMDAT (faster links).
[email protected]21fac242014-07-18 09:30:333376 '<@(win_release_extra_cflags)',
3377 ],
[email protected]7e0d664a2009-12-03 21:07:473378 },
[email protected]bb05e452009-10-29 21:24:563379 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:343380 # LinkIncremental is a tri-state boolean, where 0 means default
3381 # (i.e., inherit from parent solution), 1 means false, and
3382 # 2 means true.
[email protected]bb05e452009-10-29 21:24:563383 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:343384 # This corresponds to the /PROFILE flag which ensures the PDB
3385 # file contains FIXUP information (growing the PDB file by about
3386 # 5%) but does not otherwise alter the output binary. This
3387 # information is used by the Syzygy optimization tool when
3388 # decomposing the release image.
3389 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:563390 },
3391 },
[email protected]2f80c312009-02-25 21:26:553392 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:163393 ['msvs_use_common_release', {
3394 'includes': ['release.gypi'],
3395 }],
[email protected]7bdd7d7c2012-11-01 10:36:163396 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:583397 'defines': [
3398 'NVALGRIND',
3399 'DYNAMIC_ANNOTATIONS_ENABLED=0',
3400 ],
[email protected]ee857512010-05-14 08:24:423401 }, {
[email protected]14339762011-04-05 07:36:583402 'defines': [
[email protected]2f047202013-06-14 06:36:393403 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]be766bb2014-07-01 19:22:123404 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]14339762011-04-05 07:36:583405 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3406 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3407 ],
[email protected]92822e82009-09-18 14:26:563408 }],
[email protected]7e0d664a2009-12-03 21:07:473409 ['win_use_allocator_shim==0', {
3410 'defines': ['NO_TCMALLOC'],
3411 }],
[email protected]8b225222014-02-18 22:54:443412 # _FORTIFY_SOURCE isn't really supported by Clang now, see
3413 # http://llvm.org/bugs/show_bug.cgi?id=16821.
[email protected]ed472ad2014-07-10 00:50:523414 # It seems to work fine with Ubuntu 12 headers though, so use it
3415 # in official builds.
3416 ['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:303417 'target_conditions': [
3418 ['chromium_code==1', {
3419 # Non-chromium code is not guaranteed to compile cleanly
3420 # with _FORTIFY_SOURCE. Also, fortified build may fail
3421 # when optimizations are disabled, so only do that for Release
3422 # build.
3423 'defines': [
3424 '_FORTIFY_SOURCE=2',
3425 ],
3426 }],
[email protected]37305ae2012-12-11 01:54:583427 ],
3428 }],
[email protected]7df38122012-11-05 23:54:433429 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:543430 'target_conditions': [
3431 ['_toolset=="target"', {
3432 'cflags': [
3433 '<@(release_extra_cflags)',
3434 ],
[email protected]9082bba2014-05-20 06:50:213435 'conditions': [
3436 ['enable_resource_whitelist_generation==1', {
3437 'cflags': [
3438 '-Wunknown-pragmas -Wno-error=unknown-pragmas',
3439 ],
3440 }],
3441 ],
[email protected]d8e3b122012-05-31 23:07:543442 }],
[email protected]bb05e452009-10-29 21:24:563443 ],
3444 }],
[email protected]b64ec822013-05-23 12:57:413445 ['OS=="ios"', {
3446 'defines': [
3447 'NS_BLOCK_ASSERTIONS=1',
3448 ],
3449 }],
[email protected]2f80c312009-02-25 21:26:553450 ],
3451 },
[email protected]5153767c2009-12-22 01:52:503452 #
3453 # Concrete configurations
3454 #
3455 'Debug': {
3456 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
3457 },
3458 'Release': {
3459 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:503460 },
[email protected]f926fa0a2009-08-04 22:50:133461 'conditions': [
[email protected]8125fba72014-02-26 14:32:583462 [ 'OS=="ios"', {
3463 'Profile': {
3464 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
3465 'target_conditions': [
3466 [ '_type=="executable"', {
3467 # To get a real .dSYM bundle produced by dsymutil, set the
3468 # debug information format to dwarf-with-dsym. Since
3469 # strip_from_xcode will not be used, set Xcode to do the
3470 # stripping as well.
3471 'xcode_settings': {
3472 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3473 'DEPLOYMENT_POSTPROCESSING': 'YES',
3474 'STRIP_INSTALLED_PRODUCT': 'YES',
3475 },
3476 }],
3477 ],
3478 },
3479 }],
[email protected]f926fa0a2009-08-04 22:50:133480 [ 'OS=="win"', {
3481 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:503482 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:503483 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:303484 },
3485 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:503486 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:303487 },
[email protected]f926fa0a2009-08-04 22:50:133488 }],
3489 ],
[email protected]2f80c312009-02-25 21:26:553490 },
3491 },
3492 'conditions': [
[email protected]41300ff2014-04-07 08:17:253493 ['os_posix==1', {
3494 'target_defaults': {
3495 'ldflags': [
3496 '-Wl,-z,now',
3497 '-Wl,-z,relro',
3498 ],
glider7dbed1572014-09-23 16:38:113499 # TODO(glider): enable the default options on other systems.
3500 'conditions': [
3501 ['use_sanitizer_options==1 and ((OS=="linux" and (chromeos==0 or target_arch!="ia32")) or OS=="mac")', {
3502 'dependencies': [
3503 '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options',
3504 ],
3505 }],
3506 ],
[email protected]41300ff2014-04-07 08:17:253507 },
3508 }],
[email protected]713d6e4a2014-03-28 18:18:203509 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
[email protected]453a8ad32014-05-20 17:32:493510 ['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:253511 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:253512 'ldflags': [
[email protected]a89c460c2014-03-17 13:42:133513 '-Wl,--fatal-warnings',
[email protected]43539ec2012-11-20 22:35:253514 ],
[email protected]43539ec2012-11-20 22:35:253515 },
3516 }],
[email protected]d2ca75c2013-02-01 05:47:173517 ['os_posix==1 and chromeos==0', {
3518 # Chrome OS enables -fstack-protector-strong via its build wrapper,
3519 # and we want to avoid overriding this, so stack-protector is only
3520 # enabled when not building on Chrome OS.
3521 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
3522 # supports it.
3523 'target_defaults': {
3524 'cflags': [
3525 '-fstack-protector',
3526 '--param=ssp-buffer-size=4',
3527 ],
3528 },
3529 }],
[email protected]1e013672012-06-29 22:12:203530 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:263531 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:273532 # Enable -Werror by default, but put it in a variable so it can
3533 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
3534 'variables': {
[email protected]cbbb3472012-01-25 18:32:313535 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:203536 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:273537 },
[email protected]6863896f2012-01-25 17:51:363538 'defines': [
3539 '_FILE_OFFSET_BITS=64',
3540 ],
[email protected]9d384032009-03-20 23:13:263541 'cflags': [
[email protected]1bba09c2009-08-13 12:53:163542 '<(werror)', # See note above about the werror variable.
3543 '-pthread',
[email protected]ef8c3cf2012-01-24 04:37:293544 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:163545 '-Wall',
[email protected]0fa17082010-03-26 00:48:053546 # TODO(evan): turn this back on once all the builds work.
3547 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:203548 # Don't warn about unused function params. We use those everywhere.
3549 '-Wno-unused-parameter',
3550 # Don't warn about the "struct foo f = {0};" initialization pattern.
3551 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:123552 # Don't export any symbols (for example, to plugins we dlopen()).
3553 # Note: this is *required* to make some plugins work.
3554 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:353555 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:243556 ],
3557 'cflags_cc': [
Scott Graham9ebc1b92014-09-11 17:04:273558 '-fno-exceptions',
[email protected]832d0212009-10-28 19:12:223559 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:243560 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:363561 # Make inline functions have hidden visiblity by default.
3562 # Surprisingly, not covered by -fvisibility=hidden.
3563 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:173564 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
[email protected]f58fa2c2013-12-06 08:06:203565 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453)
[email protected]554abd902011-07-25 04:03:173566 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:263567 ],
[email protected]a6cf87e2009-04-03 04:07:383568 'ldflags': [
[email protected]138241f2010-03-30 23:53:103569 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:263570 ],
[email protected]1e013672012-06-29 22:12:203571 'libraries' : [
3572 '<(libraries_for_target)',
3573 ],
[email protected]3aacaf952009-04-02 15:34:093574 'configurations': {
[email protected]5153767c2009-12-22 01:52:503575 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:313576 'variables': {
3577 'debug_optimize%': '0',
3578 },
[email protected]3aacaf952009-04-02 15:34:093579 'defines': [
3580 '_DEBUG',
3581 ],
3582 'cflags': [
[email protected]95ad2032012-08-24 00:49:253583 '-O>(debug_optimize)',
[email protected]230023c2014-07-02 09:31:333584 '-g',
mithrofb34b342014-09-22 07:26:443585 '-gdwarf-4',
[email protected]3aacaf952009-04-02 15:34:093586 ],
[email protected]da1c8d692011-09-20 20:35:013587 'conditions' : [
[email protected]3f05e912013-04-11 20:38:343588 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:343589 'ldflags': [
[email protected]933d0722013-07-03 04:32:493590 # Warn in case of text relocations.
3591 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:343592 ],
3593 }],
[email protected]fa9d4e262012-08-21 04:39:003594 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:553595 # Some configurations are copied from Release_Base to reduce
3596 # the binary size.
3597 'variables': {
3598 'debug_optimize%': 's',
3599 },
[email protected]da1c8d692011-09-20 20:35:013600 'cflags': [
[email protected]8a37e4502012-08-14 22:42:553601 '-fdata-sections',
3602 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:013603 ],
[email protected]8a37e4502012-08-14 22:42:553604 'ldflags': [
3605 '-Wl,-O1',
3606 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:553607 ],
[email protected]da1c8d692011-09-20 20:35:013608 }],
[email protected]264868d22014-07-10 17:37:373609 ['OS=="android" and android_full_debug==0 and target_arch!="arm64"', {
3610 # We don't omit frame pointers on arm64 since they are required
3611 # to correctly unwind stackframes which contain system library
3612 # function frames (crbug.com/391706).
3613 'cflags': [
3614 '-fomit-frame-pointer',
3615 ],
3616 }],
[email protected]d4c0ec5b2013-03-10 03:07:453617 ['OS=="linux" and target_arch=="ia32"', {
3618 'ldflags': [
3619 '-Wl,--no-as-needed',
3620 ],
3621 }],
[email protected]2578ea12014-01-17 06:02:513622 ['debug_unwind_tables==1', {
3623 'cflags': ['-funwind-tables'],
3624 }, {
3625 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
3626 }],
[email protected]9dbbabd2014-04-30 23:42:323627 # TODO(mostynb): shuffle clang/gcc_version/binutils_version
3628 # definitions in to the right scope to use them when setting
3629 # linux_use_debug_fission, so it can be used here alone.
3630 ['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:213631 'cflags': ['-gsplit-dwarf'],
[email protected]1c26c6a2014-03-17 14:11:213632 }],
[email protected]da1c8d692011-09-20 20:35:013633 ],
[email protected]5315f2842009-04-28 00:43:273634 },
[email protected]5153767c2009-12-22 01:52:503635 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:013636 'variables': {
3637 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:513638 # Binaries become big and gold is unable to perform GC
3639 # and remove unused sections for some of test targets
3640 # on 32 bit platform.
3641 # (This is currently observed only in chromeos valgrind bots)
3642 # The following flag is to disable --gc-sections linker
3643 # option for these bots.
3644 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:123645
3646 # TODO(bradnelson): reexamine how this is done if we change the
3647 # expansion of configurations
3648 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:013649 },
[email protected]3aacaf952009-04-02 15:34:093650 'cflags': [
[email protected]4c33a9b2014-06-23 22:20:193651 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:533652 # Don't emit the GCC version ident directives, they just end up
3653 # in the .comment section taking up binary size.
3654 '-fno-ident',
3655 # Put data and code in their own sections, so that unused symbols
3656 # can be removed at link time with --gc-sections.
3657 '-fdata-sections',
3658 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:093659 ],
[email protected]c902f2c2010-08-06 20:04:183660 'ldflags': [
3661 # Specifically tell the linker to perform optimizations.
3662 # See http://lwn.net/Articles/192624/ .
3663 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:223664 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:183665 ],
[email protected]1dd529642010-05-15 01:02:513666 'conditions' : [
3667 ['no_gc_sections==0', {
3668 'ldflags': [
3669 '-Wl,--gc-sections',
3670 ],
3671 }],
[email protected]264868d22014-07-10 17:37:373672 ['OS=="android" and target_arch!="arm64"', {
3673 # We don't omit frame pointers on arm64 since they are required
3674 # to correctly unwind stackframes which contain system library
3675 # function frames (crbug.com/391706).
3676 'cflags': [
3677 '-fomit-frame-pointer',
3678 ]
3679 }],
[email protected]da1c8d692011-09-20 20:35:013680 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:583681 'variables': {
3682 'release_optimize%': 's',
3683 },
[email protected]933d0722013-07-03 04:32:493684 'ldflags': [
[email protected]933d0722013-07-03 04:32:493685 # Warn in case of text relocations.
3686 '-Wl,--warn-shared-textrel',
3687 ],
[email protected]da1c8d692011-09-20 20:35:013688 }],
[email protected]7664ab32011-02-01 23:35:253689 ['profiling==1', {
3690 'cflags': [
3691 '-fno-omit-frame-pointer',
3692 '-g',
3693 ],
[email protected]0358c4832013-06-23 14:17:583694 'conditions' : [
3695 ['profiling_full_stack_frames==1', {
3696 'cflags': [
3697 '-fno-inline',
3698 '-fno-optimize-sibling-calls',
3699 ],
3700 }],
3701 ],
[email protected]7664ab32011-02-01 23:35:253702 }],
[email protected]2578ea12014-01-17 06:02:513703 ['release_unwind_tables==1', {
3704 'cflags': ['-funwind-tables'],
3705 }, {
3706 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
[email protected]a637d4382014-01-11 03:12:053707 }],
[email protected]8d726a42012-02-09 03:49:003708 ],
[email protected]3aacaf952009-04-02 15:34:093709 },
3710 },
[email protected]606116d22009-05-06 22:38:233711 'conditions': [
[email protected]04b482602011-09-14 02:36:213712 ['target_arch=="ia32"', {
3713 'target_conditions': [
3714 ['_toolset=="target"', {
3715 'asflags': [
3716 # Needed so that libs with .s files (e.g. libicudata.a)
3717 # are compatible with the general 32-bit-ness.
3718 '-32',
3719 ],
3720 # All floating-point computations on x87 happens in 80-bit
3721 # precision. Because the C and C++ language standards allow
3722 # the compiler to keep the floating-point values in higher
3723 # precision than what's specified in the source and doing so
3724 # is more efficient than constantly rounding up to 64-bit or
3725 # 32-bit precision as specified in the source, the compiler,
3726 # especially in the optimized mode, tries very hard to keep
3727 # values in x87 floating-point stack (in 80-bit precision)
3728 # as long as possible. This has important side effects, that
3729 # the real value used in computation may change depending on
3730 # how the compiler did the optimization - that is, the value
3731 # kept in 80-bit is different than the value rounded down to
3732 # 64-bit or 32-bit. There are possible compiler options to
3733 # make this behavior consistent (e.g. -ffloat-store would keep
3734 # all floating-values in the memory, thus force them to be
3735 # rounded to its original precision) but they have significant
3736 # runtime performance penalty.
3737 #
3738 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
3739 # which keep floating-point values in SSE registers in its
3740 # native precision (32-bit for single precision, and 64-bit
3741 # for double precision values). This means the floating-point
3742 # value used during computation does not change depending on
3743 # how the compiler optimized the code, since the value is
3744 # always kept in its specified precision.
[email protected]6c0d30672014-03-12 00:31:303745 #
3746 # Refer to http://crbug.com/348761 for rationale behind SSE2
3747 # being a minimum requirement for 32-bit Linux builds and
3748 # http://crbug.com/313032 for an example where this has "bit"
3749 # us in the past.
3750 'cflags': [
3751 '-msse2',
3752 '-mfpmath=sse',
3753 '-mmmx', # Allows mmintrin.h for MMX intrinsics.
3754 '-m32',
3755 ],
3756 'ldflags': [
3757 '-m32',
3758 ],
[email protected]04b482602011-09-14 02:36:213759 'conditions': [
[email protected]0a0063c52013-03-29 06:36:213760 # Use gold linker for Android ia32 target.
3761 ['OS=="android"', {
[email protected]0a0063c52013-03-29 06:36:213762 'ldflags': [
3763 '-fuse-ld=gold',
3764 ],
3765 }],
[email protected]04b482602011-09-14 02:36:213766 # Install packages have started cropping up with
3767 # different headers between the 32-bit and 64-bit
3768 # versions, so we have to shadow those differences off
3769 # and make sure a 32-bit-on-64-bit build picks up the
3770 # right files.
[email protected]32594022012-05-10 03:22:283771 # For android build, use NDK headers instead of host headers
3772 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:213773 'include_dirs+': [
3774 '/usr/include32',
3775 ],
3776 }],
3777 ],
[email protected]ffde7932009-05-29 00:39:063778 }],
[email protected]606116d22009-05-06 22:38:233779 ],
3780 }],
[email protected]be0090f22014-03-18 17:43:483781 ['target_arch=="x64"', {
3782 'target_conditions': [
3783 ['_toolset=="target"', {
3784 'conditions': [
3785 # Use gold linker for Android x64 target.
3786 ['OS=="android"', {
[email protected]be0090f22014-03-18 17:43:483787 'ldflags': [
3788 '-fuse-ld=gold',
3789 ],
3790 }],
3791 ],
3792 'cflags': [
3793 '-m64',
3794 '-march=x86-64',
3795 ],
3796 'ldflags': [
3797 '-m64',
3798 ],
3799 }],
3800 ],
3801 }],
[email protected]3dda8a962009-08-10 18:58:073802 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:293803 'target_conditions': [
3804 ['_toolset=="target"', {
[email protected]77c1b29392009-12-04 06:21:293805 'conditions': [
[email protected]d7595862014-08-18 15:41:073806 ['clang==0', {
3807 'cflags_cc': [
3808 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3809 # has changed whenever it encounters a varargs function. This
3810 # silences those warnings, as they are not helpful and
3811 # clutter legitimate warnings.
3812 '-Wno-abi',
3813 ],
3814 }],
[email protected]0c2072e2014-08-18 18:21:183815 ['clang==1 and arm_arch!="" and OS!="android"', {
[email protected]d7595862014-08-18 15:41:073816 'cflags': [
3817 '-target arm-linux-gnueabihf',
[email protected]d7595862014-08-18 15:41:073818 ],
3819 'ldflags': [
3820 '-target arm-linux-gnueabihf',
3821 ],
3822 }],
[email protected]7d6763422013-04-26 12:06:543823 ['arm_arch!=""', {
3824 'cflags': [
3825 '-march=<(arm_arch)',
3826 ],
fdegansd7a59f92014-10-23 11:49:543827 'conditions': [
3828 ['use_lto==1 or use_lto_o2==1', {
3829 'ldflags': [
3830 '-march=<(arm_arch)',
3831 ],
3832 }],
3833 ],
[email protected]7d6763422013-04-26 12:06:543834 }],
[email protected]0c2072e2014-08-18 18:21:183835 ['clang==1 and OS!="android"', {
[email protected]d7595862014-08-18 15:41:073836 'cflags': [
[email protected]0c2072e2014-08-18 18:21:183837 # We need to disable clang's builtin assembler as it can't
3838 # handle several asm files, crbug.com/124610
[email protected]d7595862014-08-18 15:41:073839 '-no-integrated-as',
3840 ],
3841 }],
[email protected]7d6763422013-04-26 12:06:543842 ['arm_tune!=""', {
3843 'cflags': [
3844 '-mtune=<(arm_tune)',
3845 ],
fdegansd7a59f92014-10-23 11:49:543846 'conditions': [
3847 ['use_lto==1 or use_lto_o2==1', {
3848 'ldflags': [
3849 '-mtune=<(arm_tune)',
3850 ],
3851 }],
3852 ],
[email protected]7d6763422013-04-26 12:06:543853 }],
3854 ['arm_fpu!=""', {
3855 'cflags': [
3856 '-mfpu=<(arm_fpu)',
3857 ],
fdegansd7a59f92014-10-23 11:49:543858 'conditions': [
3859 ['use_lto==1 or use_lto_o2==1', {
3860 'ldflags': [
3861 '-mfpu=<(arm_fpu)',
3862 ],
3863 }],
3864 ],
[email protected]7d6763422013-04-26 12:06:543865 }],
3866 ['arm_float_abi!=""', {
3867 'cflags': [
3868 '-mfloat-abi=<(arm_float_abi)',
3869 ],
fdegansd7a59f92014-10-23 11:49:543870 'conditions': [
3871 ['use_lto==1 or use_lto_o2==1', {
3872 'ldflags': [
3873 '-mfloat-abi=<(arm_float_abi)',
3874 ],
3875 }],
3876 ],
[email protected]7d6763422013-04-26 12:06:543877 }],
3878 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293879 'cflags': [
fdegans6b767132014-09-09 10:09:293880 '-mthumb',
3881 ],
fdegansd7a59f92014-10-23 11:49:543882 'conditions': [
3883 ['use_lto==1 or use_lto_o2==1', {
3884 'ldflags': [
3885 '-mthumb',
3886 ],
3887 }],
3888 ],
[email protected]77c1b29392009-12-04 06:21:293889 }],
[email protected]da1c8d692011-09-20 20:35:013890 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533891 # Most of the following flags are derived from what Android
3892 # uses by default when building for arm, reference for which
3893 # can be found in the following file in the Android NDK:
fdegans6b767132014-09-09 10:09:293894 # toolchains/arm-linux-androideabi-4.9/setup.mk
[email protected]7b1112c2012-03-16 22:03:533895 'cflags': [
3896 # The tree-sra optimization (scalar replacement for
3897 # aggregates enabling subsequent optimizations) leads to
3898 # invalid code generation when using the Android NDK's
3899 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433900 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533901 '-fno-tree-sra',
fdegans6b767132014-09-09 10:09:293902 # The following option is disabled to improve binary
3903 # size and performance in gcc 4.9.
[email protected]7557cd42014-05-28 15:32:593904 '-fno-caller-saves',
[email protected]7b1112c2012-03-16 22:03:533905 '-Wno-psabi',
3906 ],
[email protected]ad17e342012-07-17 20:45:483907 # Android now supports .relro sections properly.
3908 # NOTE: While these flags enable the generation of .relro
3909 # sections, the generated libraries can still be loaded on
3910 # older Android platform versions.
3911 'ldflags': [
3912 '-Wl,-z,relro',
3913 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483914 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483915 ],
[email protected]da1c8d692011-09-20 20:35:013916 'conditions': [
fdegansc16332e82014-09-09 13:55:293917 ['gcc_version==48 and clang==0', {
3918 'cflags': [
3919 # The following 5 options are disabled to save on
3920 # binary size in GCC 4.8.
3921 '-fno-partial-inlining',
3922 '-fno-early-inlining',
3923 '-fno-tree-copy-prop',
3924 '-fno-tree-loop-optimize',
3925 '-fno-move-loop-invariants',
3926 ],
3927 }],
[email protected]7d6763422013-04-26 12:06:543928 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223929 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013930 }],
[email protected]4c48ef102012-11-29 22:00:383931 ['profiling==1', {
3932 'cflags': [
[email protected]a0e681cc2014-05-16 16:56:473933 # Thumb code with frame pointer makes chrome crash
3934 # early.
3935 '-marm',
3936 '-mapcs-frame', # Required by -fno-omit-frame-pointer.
3937 # The perf report sometimes incorrectly attributes
3938 # code from tail calls.
3939 '-fno-optimize-sibling-calls',
3940 ],
3941 'cflags!': [
3942 '-fomit-frame-pointer',
[email protected]4c48ef102012-11-29 22:00:383943 ],
3944 }],
[email protected]220ea5932012-08-09 10:44:073945 ['clang==1', {
3946 'cflags!': [
3947 # Clang does not support the following options.
3948 '-mthumb-interwork',
3949 '-finline-limit=64',
3950 '-fno-tree-sra',
[email protected]7557cd42014-05-28 15:32:593951 '-fno-caller-saves',
[email protected]220ea5932012-08-09 10:44:073952 '-Wno-psabi',
3953 ],
[email protected]b763d402014-01-13 18:34:223954 'cflags': [
3955 # TODO(hans) Enable integrated-as (crbug.com/124610).
3956 '-no-integrated-as',
[email protected]f4091d32014-01-23 23:16:353957 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
[email protected]b763d402014-01-13 18:34:223958 ],
[email protected]1afb1102014-01-31 00:04:223959 'ldflags': [
[email protected]2a9c8562014-08-11 18:01:213960 # Let clang find the ld.gold in the NDK.
[email protected]b728310a2014-08-08 20:53:343961 '--gcc-toolchain=<(android_toolchain)/..',
[email protected]1afb1102014-01-31 00:04:223962 ],
[email protected]220ea5932012-08-09 10:44:073963 }],
[email protected]cdc001e2014-01-23 11:07:533964 ['asan==1', {
3965 'cflags': [
3966 '-marm', # Required for frame pointer based stack traces.
3967 ],
3968 }],
[email protected]da1c8d692011-09-20 20:35:013969 ],
3970 }],
[email protected]24641702014-07-03 17:20:153971 ['chromecast==1', {
3972 'cflags': [
3973 # We set arm_arch to "" so that -march compiler option
3974 # is not set. Otherwise a gcc bug that would complain
3975 # about it conflicting with '-mcpu=cortex-a9'. The flag
3976 # '-march=armv7-a' is actually redundant anyway because
3977 # it is enabled by default when we built the toolchain.
3978 # And using '-mcpu=cortex-a9' should be sufficient.
3979 '-mcpu=cortex-a9',
3980 '-funwind-tables',
3981 # Breakpad requires symbols with debugging information
3982 '-g',
3983 ],
3984 'ldflags': [
3985 # We want to statically link libstdc++/libgcc_s.
3986 '-static-libstdc++',
3987 '-static-libgcc',
3988 ],
3989 'cflags!': [
3990 # Some components in Chromium (e.g. v8, skia, ffmpeg)
3991 # define their own cflags for arm builds that could
3992 # conflict with the flags we set here (e.g.
3993 # '-mcpu=cortex-a9'). Remove these flags explicitly.
3994 '-march=armv7-a',
3995 '-mtune=cortex-a8',
3996 ],
3997 }],
[email protected]3dda8a962009-08-10 18:58:073998 ],
3999 }],
4000 ],
4001 }],
[email protected]7a2f984a2014-03-20 18:35:494002 ['target_arch=="arm64"', {
4003 'target_conditions': [
4004 ['_toolset=="target"', {
4005 'conditions': [
4006 ['OS=="android"', {
4007 'cflags!': [
4008 '-fstack-protector', # stack protector is always enabled on arm64.
4009 ],
4010 }],
4011 ],
4012 }],
4013 ],
4014 }],
[email protected]23eea4a42013-04-27 04:10:264015 ['target_arch=="mipsel"', {
4016 'target_conditions': [
4017 ['_toolset=="target"', {
4018 'conditions': [
petarjc8a5da742014-08-27 14:33:364019 ['android_webview_build==0 and mips_arch_variant=="r6"', {
4020 'cflags': ['-mips32r6', '-Wa,-mips32r6'],
4021 'conditions': [
4022 ['OS=="android"', {
4023 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',],
4024 }],
4025 ],
4026 }],
4027 ['android_webview_build==0 and mips_arch_variant=="r2"', {
[email protected]23eea4a42013-04-27 04:10:264028 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:344029 }],
petarjc8a5da742014-08-27 14:33:364030 ['android_webview_build==0 and mips_arch_variant=="r1"', {
[email protected]23eea4a42013-04-27 04:10:264031 'cflags': ['-mips32', '-Wa,-mips32'],
4032 }],
4033 ],
[email protected]23eea4a42013-04-27 04:10:264034 'ldflags': [
[email protected]23eea4a42013-04-27 04:10:264035 '-Wl,--no-keep-memory'
4036 ],
4037 'cflags_cc': [
4038 '-Wno-uninitialized',
4039 ],
4040 }],
4041 ],
4042 }],
petarjc8a5da742014-08-27 14:33:364043 ['target_arch=="mips64el"', {
4044 'target_conditions': [
4045 ['_toolset=="target"', {
4046 'conditions': [
4047 ['android_webview_build==0 and mips_arch_variant=="r6"', {
4048 'cflags': ['-mips64r6', '-Wa,-mips64r6'],
4049 'ldflags': [ '-mips64r6' ],
4050 }],
4051 ['android_webview_build==0 and mips_arch_variant=="r2"', {
4052 'cflags': ['-mips64r2', '-Wa,-mips64r2'],
4053 'ldflags': [ '-mips64r2' ],
4054 }],
4055 ],
4056 'cflags_cc': [
4057 '-Wno-uninitialized',
4058 ],
4059 }],
4060 ],
4061 }],
[email protected]2fb843b2010-08-12 02:11:084062 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:584063 'cflags': [
4064 '-fPIC',
4065 ],
[email protected]d3f692b32011-12-14 19:04:354066 'ldflags': [
4067 '-fPIC',
4068 ],
[email protected]c76723a2010-01-25 23:10:584069 }],
[email protected]ee28c9f2009-09-04 01:53:014070 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:574071 'target_conditions': [
4072 ['_toolset=="target"', {
4073 'cflags': [
4074 '--sysroot=<(sysroot)',
4075 ],
4076 'ldflags': [
4077 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:154078 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:574079 ],
4080 }]]
[email protected]ee28c9f2009-09-04 01:53:014081 }],
[email protected]58680ce2010-09-18 00:09:154082 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:124083 'cflags': [
[email protected]00c83cc2013-07-25 00:55:504084 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:074085 '-Wno-reserved-user-defined-literal',
4086 ],
4087 'cflags_cc': [
thakis7d982512014-10-31 19:40:274088 # gnu++11 instead of c++11 is needed because some code uses
4089 # typeof() (a GNU extension).
4090 # TODO(thakis): Eventually switch this to c++11 instead,
4091 # http://crbug.com/427584
[email protected]8dec02e2013-04-30 21:40:074092 '-std=gnu++11',
4093 ],
4094 }],
[email protected]acad4962014-08-04 19:05:024095 ['clang==0 and host_clang==1', {
4096 'target_conditions': [
4097 ['_toolset=="host"', {
4098 'cflags_cc': [ '-std=gnu++11', ],
4099 }],
4100 ],
4101 }],
[email protected]5d451ad2011-02-11 16:43:464102 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:264103 'cflags': [
[email protected]c872dc52012-05-19 06:36:314104 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:264105 ],
[email protected]5d451ad2011-02-11 16:43:464106 }],
[email protected]4a9ac22e2011-12-02 03:41:534107 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:264108 'cflags': [
4109 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534110 ],
4111 }],
4112 ['clang==1 and clang_add_plugin!=""', {
4113 'cflags': [
[email protected]d23720682011-08-11 00:16:264114 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4115 ],
[email protected]5e781232011-01-28 02:57:594116 }],
[email protected]49110f02013-04-22 22:51:344117 ['clang==1 and target_arch=="ia32"', {
4118 'cflags': [
4119 # Else building libyuv gives clang's register allocator issues,
4120 # see llvm.org/PR15798 / crbug.com/233709
4121 '-momit-leaf-frame-pointer',
hans9df460f2014-10-09 16:08:504122 # Align the stack on 16-byte boundaries, http://crbug.com/418554.
4123 '-mstack-alignment=16',
4124 '-mstackrealign',
[email protected]49110f02013-04-22 22:51:344125 ],
4126 }],
[email protected]2616d45d2012-01-19 03:15:484127 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4128 'cflags': [
4129 # See http://crbug.com/110262
4130 '-fcolor-diagnostics',
4131 ],
4132 }],
[email protected]062522a2013-06-13 15:49:554133 # Common options for AddressSanitizer, LeakSanitizer,
4134 # ThreadSanitizer and MemorySanitizer.
[email protected]0dbe7af92014-06-26 23:31:404135 ['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:544136 'target_conditions': [
4137 ['_toolset=="target"', {
4138 'cflags': [
4139 '-fno-omit-frame-pointer',
4140 '-gline-tables-only',
4141 ],
[email protected]b772fce2014-01-22 09:27:524142 'cflags!': [
4143 '-fomit-frame-pointer',
4144 ],
[email protected]7fd639a2014-05-30 23:59:014145 }],
4146 ],
4147 }],
4148 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
4149 'target_conditions': [
4150 ['_toolset=="target"', {
[email protected]49110f02013-04-22 22:51:344151 'ldflags!': [
4152 # Functions interposed by the sanitizers can make ld think
4153 # that some libraries aren't needed when they actually are,
4154 # http://crbug.com/234010. As workaround, disable --as-needed.
4155 '-Wl,--as-needed',
4156 ],
[email protected]2f047202013-06-14 06:36:394157 'defines': [
4158 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]7a16a1e2014-07-04 04:18:034159 'MEMORY_SANITIZER_INITIAL_SIZE',
[email protected]2f047202013-06-14 06:36:394160 ],
[email protected]cf351c22013-04-19 13:00:544161 }],
4162 ],
4163 }],
[email protected]92799b632011-08-15 14:33:064164 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:424165 'target_conditions': [
4166 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:454167 'cflags': [
[email protected]48688df02012-11-27 21:04:564168 '-fsanitize=address',
earthdok298382332014-10-29 21:35:154169 # TODO(earthdok): Re-enable. http://crbug.com/427202
4170 #'-fsanitize-blacklist=<(asan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:454171 ],
4172 'ldflags': [
[email protected]48688df02012-11-27 21:04:564173 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:454174 ],
[email protected]1ffc3b3962012-05-16 14:08:424175 }],
[email protected]921c7b52011-11-25 10:34:354176 ],
[email protected]eec02d982014-03-21 18:51:174177 'conditions': [
4178 ['OS=="mac"', {
4179 'cflags': [
4180 '-mllvm -asan-globals=0', # http://crbug.com/352073
4181 ],
4182 }],
4183 ],
[email protected]92799b632011-08-15 14:33:064184 }],
[email protected]7fd639a2014-05-30 23:59:014185 ['ubsan==1', {
4186 'target_conditions': [
4187 ['_toolset=="target"', {
4188 'cflags': [
4189 '-fsanitize=undefined',
4190 # -fsanitize=vptr is incompatible with -fno-rtti.
4191 '-fno-sanitize=vptr',
gliderdfb61d82014-11-11 16:28:054192 # Employ the experimental PBQP register allocator to avoid
4193 # slow compilation on files with too many basic blocks.
4194 # See http://crbug.com/426271.
4195 '-mllvm -regalloc=pbqp',
4196 # Speculatively use coalescing to slightly improve the code
4197 # generated by PBQP regallocator. May increase compile time.
4198 '-mllvm -pbqp-coalescing',
[email protected]7fd639a2014-05-30 23:59:014199 ],
4200 'ldflags': [
4201 '-fsanitize=undefined',
4202 # -fsanitize=vptr is incompatible with -fno-rtti.
4203 '-fno-sanitize=vptr',
4204 ],
4205 }],
4206 ],
4207 }],
[email protected]0dbe7af92014-06-26 23:31:404208 ['ubsan_vptr==1', {
4209 'target_conditions': [
4210 ['_toolset=="target"', {
4211 'cflags': [
4212 '-fsanitize=vptr',
[email protected]0dbe7af92014-06-26 23:31:404213 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
[email protected]0dbe7af92014-06-26 23:31:404214 ],
4215 'cflags_cc!': [
4216 '-fno-rtti',
4217 ],
4218 'cflags!': [
4219 '-fno-rtti',
4220 ],
4221 'ldflags': [
[email protected]22e15542014-07-18 23:09:244222 '-fsanitize=vptr',
[email protected]0dbe7af92014-06-26 23:31:404223 ],
4224 'defines': [
4225 'UNDEFINED_SANITIZER',
4226 ],
4227 }],
4228 ],
4229 }],
[email protected]544a18ed2014-01-17 21:01:364230 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034231 'target_conditions': [
4232 ['_toolset=="target"', {
4233 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364234 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034235 ],
4236 }],
4237 ],
4238 }],
earthdok78507b92014-10-23 14:00:134239 ['asan_field_padding!=0', {
4240 'target_conditions': [
4241 ['_toolset=="target"', {
4242 'cflags': [
4243 '-fsanitize-address-field-padding=<(asan_field_padding)',
4244 ],
4245 }],
4246 ],
4247 }],
[email protected]062522a2013-06-13 15:49:554248 ['lsan==1', {
4249 'target_conditions': [
4250 ['_toolset=="target"', {
4251 'cflags': [
4252 '-fsanitize=leak',
4253 ],
4254 'ldflags': [
4255 '-fsanitize=leak',
4256 ],
4257 'defines': [
4258 'LEAK_SANITIZER',
[email protected]f6f65a02013-09-06 05:40:524259 'WTF_USE_LEAK_SANITIZER=1',
[email protected]062522a2013-06-13 15:49:554260 ],
4261 }],
4262 ],
4263 }],
[email protected]c9a829272012-07-04 07:51:124264 ['tsan==1', {
4265 'target_conditions': [
4266 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:454267 'cflags': [
[email protected]927a9d672012-11-09 11:28:204268 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:294269 '-fPIC',
[email protected]3227d8f2014-04-26 00:49:324270 '-fsanitize-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:454271 ],
4272 'ldflags': [
[email protected]927a9d672012-11-09 11:28:204273 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:454274 ],
4275 'defines': [
4276 'THREAD_SANITIZER',
4277 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:164278 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:454279 ],
4280 'target_conditions': [
4281 ['_type=="executable"', {
4282 'ldflags': [
[email protected]c9a829272012-07-04 07:51:124283 '-pie',
[email protected]cb770a4c2012-07-25 20:06:454284 ],
4285 }],
4286 ],
[email protected]c9a829272012-07-04 07:51:124287 }],
4288 ],
4289 }],
[email protected]a10ddd2d2013-02-26 20:06:594290 ['msan==1', {
4291 'target_conditions': [
4292 ['_toolset=="target"', {
4293 'cflags': [
4294 '-fsanitize=memory',
[email protected]a030ab62014-06-23 17:14:154295 '-fsanitize-memory-track-origins=<(msan_track_origins)',
[email protected]a10ddd2d2013-02-26 20:06:594296 '-fPIC',
[email protected]190d4ce62014-01-17 20:24:534297 '-fsanitize-blacklist=<(msan_blacklist)',
[email protected]a10ddd2d2013-02-26 20:06:594298 ],
4299 'ldflags': [
4300 '-fsanitize=memory',
4301 ],
4302 'defines': [
4303 'MEMORY_SANITIZER',
4304 ],
4305 'target_conditions': [
4306 ['_type=="executable"', {
4307 'ldflags': [
4308 '-pie',
4309 ],
4310 }],
4311 ],
4312 }],
4313 ],
4314 }],
[email protected]c8103a42013-11-12 13:41:304315 ['use_instrumented_libraries==1', {
4316 'dependencies': [
4317 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
4318 ],
[email protected]c8103a42013-11-12 13:41:304319 }],
[email protected]22b3f531e2013-12-20 13:07:284320 ['use_custom_libcxx==1', {
4321 'dependencies': [
[email protected]121cbf6e2014-05-05 13:30:424322 '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
[email protected]22b3f531e2013-12-20 13:07:284323 ],
4324 }],
[email protected]8a48f3f2012-12-04 20:14:044325 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:444326 'target_conditions' : [
[email protected]c45dbc52014-05-27 14:02:484327 # crazy_linker has an upstream gyp file we can't edit, and we
4328 # don't want to instrument it.
4329 ['_toolset=="target" and _target_name!="crazy_linker"', {
[email protected]8a6abd12012-05-16 10:04:444330 'cflags': [
4331 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:454332 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:244333 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:454334 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:444335 ],
4336 }],
[email protected]82e9b002013-07-16 21:04:244337 ['_toolset=="target" and OS=="android"', {
4338 'cflags': [
4339 # Avoids errors with current NDK:
4340 # "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:364341 '-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.h',
[email protected]82e9b002013-07-16 21:04:244342 ],
4343 }],
[email protected]8a6abd12012-05-16 10:04:444344 ],
4345 }],
[email protected]ce4367d2013-01-15 16:13:104346 ['linux_dump_symbols==1', {
4347 'cflags': [ '-g' ],
noms277720162014-08-26 15:21:084348 'conditions': [
4349 ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', {
4350 'target_conditions': [
4351 ['_toolset=="target"', {
4352 'ldflags': [
4353 # Attempt to use less memory to prevent the linker from
4354 # running out of address space. Considering installing a
4355 # 64-bit kernel and switching to a 64-bit linker.
4356 '-Wl,--no-keep-memory',
4357 ],
4358 }],
4359 ],
4360 }],
4361 ],
[email protected]cbd5fd52009-08-26 00:14:274362 }],
[email protected]2fa89ef2014-05-07 18:45:594363 ['use_allocator!="tcmalloc"', {
[email protected]61a9b2d82010-02-26 00:31:084364 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:244365 }],
[email protected]8d726a42012-02-09 03:49:004366 ['linux_use_gold_flags==1', {
[email protected]b728310a2014-08-08 20:53:344367 # Newer gccs and clangs support -fuse-ld, use the flag to force gold
4368 # selection.
4369 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
4370 'ldflags': [ '-fuse-ld=gold', ],
4371
[email protected]c5a6fe42013-07-21 14:03:334372 'target_conditions': [
4373 ['_toolset=="target"', {
4374 'ldflags': [
4375 # Experimentation found that using four linking threads
4376 # saved ~20% of link time.
4377 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
4378 # Only apply this to the target linker, since the host
4379 # linker might not be gold, but isn't used much anyway.
[email protected]21ed97e2014-01-14 23:40:554380 # TODO(raymes): Disable threading because gold is frequently
4381 # crashing on the bots: crbug.com/161942.
4382 # '-Wl,--threads',
4383 # '-Wl,--thread-count=4',
[email protected]c5a6fe42013-07-21 14:03:334384 ],
4385 }],
[email protected]68d01e82012-12-08 03:36:324386 ],
[email protected]8d726a42012-02-09 03:49:004387 'conditions': [
4388 ['release_valgrind_build==0', {
4389 'target_conditions': [
4390 ['_toolset=="target"', {
4391 'ldflags': [
Lei Zhangd99e73cf2014-09-24 08:04:494392 '-Wl,--icf=safe',
[email protected]8d726a42012-02-09 03:49:004393 ],
4394 }],
4395 ],
4396 }],
4397 ],
4398 }],
[email protected]f0a58322014-04-16 09:50:234399 ['linux_use_bundled_binutils==1', {
[email protected]9c233692014-04-09 20:20:454400 'cflags': [
4401 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
4402 ],
[email protected]f0a58322014-04-16 09:50:234403 }],
4404 ['linux_use_bundled_gold==1', {
4405 # Put our binutils, which contains gold in the search path. We pass
4406 # the path to gold to the compiler. gyp leaves unspecified what the
4407 # cwd is when running the compiler, so the normal gyp path-munging
4408 # fails us. This hack gets the right path.
[email protected]b07806c12012-02-03 22:44:594409 'ldflags': [
[email protected]9c233692014-04-09 20:20:454410 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
[email protected]b07806c12012-02-03 22:44:594411 ],
4412 }],
[email protected]ebb701b72014-04-24 08:24:514413 # Some binutils 2.23 releases may or may not have new dtags enabled,
4414 # but they are all compatible with --disable-new-dtags,
4415 # because the new dynamic tags are not created by default.
4416 ['binutils_version>=223', {
[email protected]f0a58322014-04-16 09:50:234417 # Newer binutils don't set DT_RPATH unless you disable "new" dtags
4418 # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
4419 # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags
4420 # inside this file to allow usage of --no-as-needed and removal of
4421 # this flag.
[email protected]9c233692014-04-09 20:20:454422 'ldflags': [
4423 '-Wl,--disable-new-dtags',
4424 ],
[email protected]6d4327bf2014-06-23 23:20:464425 }],
[email protected]3d40fa22014-07-31 12:55:014426 ['gcc_version>=47 and clang==0', {
[email protected]6d4327bf2014-06-23 23:20:464427 'target_conditions': [
4428 ['_toolset=="target"', {
4429 'cflags_cc': [
4430 '-std=gnu++11',
4431 # See comment for -Wno-c++11-narrowing.
4432 '-Wno-narrowing',
4433 # TODO(thakis): Remove, http://crbug.com/263960
4434 '-Wno-literal-suffix',
4435 ],
4436 }],
4437 ],
4438 }],
[email protected]acad4962014-08-04 19:05:024439 ['host_gcc_version>=47 and clang==0 and host_clang==0', {
[email protected]6d4327bf2014-06-23 23:20:464440 'target_conditions': [
4441 ['_toolset=="host"', {
4442 'cflags_cc': [
4443 '-std=gnu++11',
4444 # See comment for -Wno-c++11-narrowing.
4445 '-Wno-narrowing',
4446 # TODO(thakis): Remove, http://crbug.com/263960
4447 '-Wno-literal-suffix',
4448 ],
4449 }],
4450 ],
4451 }],
[email protected]606116d22009-05-06 22:38:234452 ],
[email protected]9d384032009-03-20 23:13:264453 },
4454 }],
[email protected]c51e8d52009-12-11 20:04:064455 # FreeBSD-specific options; note that most FreeBSD options are set above,
4456 # with Linux.
4457 ['OS=="freebsd"', {
4458 'target_defaults': {
4459 'ldflags': [
4460 '-Wl,--no-keep-memory',
4461 ],
4462 },
4463 }],
[email protected]da1c8d692011-09-20 20:35:014464 # Android-specific options; note that most are set above with Linux.
4465 ['OS=="android"', {
4466 'variables': {
[email protected]25036722012-12-11 10:36:174467 # This is a unique identifier for a given build. It's used for
4468 # identifying various build artifacts corresponding to a particular
4469 # build of chrome (e.g. where to find archived symbols).
4470 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:014471 'conditions': [
[email protected]da1c8d692011-09-20 20:35:014472 # Figure this out early since it needs symbols from libgcc.a, so it
4473 # has to be before that in the set of libraries.
torne3bc122f2014-10-18 11:10:174474 ['component=="shared_library"', {
4475 'android_stlport_library': 'stlport_shared',
[email protected]da1c8d692011-09-20 20:35:014476 }, {
torne3bc122f2014-10-18 11:10:174477 'android_stlport_library': 'stlport_static',
[email protected]da1c8d692011-09-20 20:35:014478 }],
4479 ],
4480
4481 # Placing this variable here prevents from forking libvpx, used
4482 # by remoting. Remoting is off, so it needn't built,
4483 # so forking it's deps seems like overkill.
4484 # But this variable need defined to properly run gyp.
4485 # A proper solution is to have an OS==android conditional
4486 # in third_party/libvpx/libvpx.gyp to define it.
4487 'libvpx_path': 'lib/linux/arm',
4488 },
4489 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:014490 'variables': {
4491 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:594492 'conditions': [
4493 # If we're using the components build, append "cr" to all shared
4494 # libraries to avoid naming collisions with android system library
4495 # versions with the same name (e.g. skia, icu).
4496 ['component=="shared_library"', {
4497 'android_product_extension': 'cr.so',
4498 }, {
4499 'android_product_extension': 'so',
4500 } ],
4501 ],
[email protected]8a37e4502012-08-14 22:42:554502 },
[email protected]da1c8d692011-09-20 20:35:014503 'target_conditions': [
[email protected]e4865252013-04-04 09:15:594504 ['_type=="shared_library"', {
[email protected]71b4fc32014-08-11 11:27:124505 'product_extension': '<(android_product_extension)',
[email protected]e4865252013-04-04 09:15:594506 }],
4507
[email protected]da1c8d692011-09-20 20:35:014508 # Settings for building device targets using Android's toolchain.
4509 # These are based on the setup.mk file from the Android NDK.
4510 #
4511 # The NDK Android executable link step looks as follows:
4512 # $LDFLAGS
4513 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
4514 # $(PRIVATE_OBJECTS) <-- The .o that we built
4515 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
4516 # $(TARGET_LIBGCC) <-- libgcc.a
4517 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
4518 # $(PRIVATE_LDLIBS) <-- System .so
4519 # $(TARGET_CRTEND_O) <-- crtend.o
4520 #
4521 # For now the above are approximated for executables by adding
4522 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
4523 # of 'libraries'.
4524 #
4525 # The NDK Android shared library link step looks as follows:
4526 # $LDFLAGS
4527 # $(PRIVATE_OBJECTS) <-- The .o that we built
4528 # -l,--whole-archive
4529 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
4530 # -l,--no-whole-archive
4531 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
4532 # $(TARGET_LIBGCC) <-- libgcc.a
4533 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
4534 # $(PRIVATE_LDLIBS) <-- System .so
4535 #
[email protected]ad17e342012-07-17 20:45:484536 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:014537 #
4538 # For both executables and shared libraries, add the proper
4539 # libgcc.a to the start of libraries which puts it in the
4540 # proper spot after .o and .a files get linked in.
4541 #
4542 # TODO: The proper thing to do longer-tem would be proper gyp
4543 # support for a custom link command line.
4544 ['_toolset=="target"', {
4545 'cflags!': [
4546 '-pthread', # Not supported by Android toolchain.
4547 ],
4548 'cflags': [
[email protected]da1c8d692011-09-20 20:35:014549 '-ffunction-sections',
4550 '-funwind-tables',
4551 '-g',
4552 '-fstack-protector',
4553 '-fno-short-enums',
4554 '-finline-limit=64',
4555 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:014556 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:014557 ],
4558 'defines': [
4559 'ANDROID',
4560 '__GNU_SOURCE=1', # Necessary for clone()
4561 'USE_STLPORT=1',
4562 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:174563 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:014564 ],
4565 'ldflags!': [
4566 '-pthread', # Not supported by Android toolchain.
4567 ],
4568 'ldflags': [
[email protected]da1c8d692011-09-20 20:35:014569 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:014570 ],
[email protected]da1c8d692011-09-20 20:35:014571 'conditions': [
[email protected]71b4fc32014-08-11 11:27:124572 ['component=="static_library"', {
4573 'ldflags': [
[email protected]b4193652014-06-09 11:33:384574 '-Wl,--exclude-libs=ALL',
4575 ],
4576 }],
[email protected]220ea5932012-08-09 10:44:074577 ['clang==1', {
4578 'cflags': [
4579 # Work around incompatibilities between bionic and clang
4580 # headers.
4581 '-D__compiler_offsetof=__builtin_offsetof',
4582 '-Dnan=__builtin_nan',
4583 ],
4584 'conditions': [
4585 ['target_arch=="arm"', {
4586 'cflags': [
4587 '-target arm-linux-androideabi',
[email protected]220ea5932012-08-09 10:44:074588 ],
4589 'ldflags': [
4590 '-target arm-linux-androideabi',
4591 ],
4592 }],
4593 ['target_arch=="ia32"', {
4594 'cflags': [
4595 '-target x86-linux-androideabi',
4596 ],
4597 'ldflags': [
4598 '-target x86-linux-androideabi',
4599 ],
4600 }],
[email protected]be0090f22014-03-18 17:43:484601 # Place holder for x64 support, not tested.
4602 # TODO: Enable clang support for Android x64. http://crbug.com/346626
4603 ['target_arch=="x64"', {
4604 'cflags': [
4605 '-target x86_64-linux-androideabi',
4606 ],
4607 'ldflags': [
4608 '-target x86_64-linux-androideabi',
4609 ],
4610 }],
[email protected]220ea5932012-08-09 10:44:074611 ],
4612 }],
[email protected]ed70ed1862012-11-07 12:11:254613 ['asan==1', {
4614 'cflags': [
4615 # Android build relies on -Wl,--gc-sections removing
4616 # unreachable code. ASan instrumentation for globals inhibits
4617 # this and results in a library with unresolvable relocations.
4618 # TODO(eugenis): find a way to reenable this.
4619 '-mllvm -asan-globals=0',
4620 ],
hans51709a22014-10-15 21:20:134621 'conditions': [
4622 ['target_arch=="arm"', {
4623 'ldflags': [
4624 # TODO(hans): The ASan runtime is no longer automatically
4625 # added to the link line when using -nostdlib. Can we
4626 # stop adding -nostdlib? (crbug.com/423429)
4627 '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/lib/clang/3.6.0/lib/linux/libclang_rt.asan-arm-android.so',
4628 ],
4629 }],
4630 ],
[email protected]ed70ed1862012-11-07 12:11:254631 }],
[email protected]d999c3cb2013-03-12 10:22:364632 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:464633 'defines': [
[email protected]f5c7758a2012-07-25 16:17:574634 # The NDK has these things, but doesn't define the constants
4635 # to say that it does. Define them here instead.
4636 'HAVE_SYS_UIO_H',
4637 ],
4638 'cflags': [
4639 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:464640 ],
[email protected]da1c8d692011-09-20 20:35:014641 'ldflags': [
[email protected]5baf7482011-12-13 16:00:524642 '--sysroot=<(android_ndk_sysroot)',
torne3bc122f2014-10-18 11:10:174643 '-nostdlib',
4644 ],
fdegans3572927c2014-11-06 12:28:024645 'variables': {
4646 'conditions': [
4647 ['target_arch=="arm" and arm_thumb==1', {
4648 'thumb_option%': '-mthumb',
4649 }, {
4650 'thumb_option%': '',
4651 }],
4652 ],
4653 },
torne3bc122f2014-10-18 11:10:174654 'libraries': [
4655 '-l<(android_stlport_library)',
4656 # Manually link the libgcc.a that the cross compiler uses.
fdegans3572927c2014-11-06 12:28:024657 '<!(<(android_toolchain)/*-gcc <(thumb_option) -print-libgcc-file-name)',
torne3bc122f2014-10-18 11:10:174658 '-lc',
4659 '-ldl',
4660 '-lm',
[email protected]da1c8d692011-09-20 20:35:014661 ],
4662 }],
[email protected]d999c3cb2013-03-12 10:22:364663 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:084664 'cflags': [
[email protected]04882132012-11-21 12:40:454665 # Android predefines this as 1; undefine it here so Chromium
4666 # can redefine it later to be 2 for chromium code and unset
4667 # for third party code. This works because cflags are added
4668 # before defines.
4669 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:554670 # Disable any additional warnings enabled by the Android build system but which
4671 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:084672 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:554673 '-Wno-extra', # Enabled by -Wextra, but no specific flag
4674 '-Wno-ignored-qualifiers',
4675 '-Wno-type-limits',
[email protected]6c55f1242014-02-12 16:06:564676 '-Wno-unused-but-set-variable',
[email protected]0d7291e2012-10-04 19:16:084677 ],
4678 'cflags_cc': [
[email protected]2f34a202013-03-11 13:59:164679 # Other things unrelated to -Wextra:
4680 '-Wno-non-virtual-dtor',
4681 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:084682 ],
torne3bc122f2014-10-18 11:10:174683 'libraries': [
4684 '-ldl',
4685 ],
[email protected]0d7291e2012-10-04 19:16:084686 }],
[email protected]9577be42013-11-01 15:16:304687 ['android_webview_build==1', {
4688 'target_conditions': [
4689 ['chromium_code==0', {
4690 'cflags': [
4691 # There is a class of warning which:
4692 # 1) Android always enables and also treats as errors
4693 # 2) Chromium ignores in third party code
4694 # So we re-enable those warnings when building Android.
4695 '-Wno-address',
4696 '-Wno-format-security',
4697 '-Wno-return-type',
4698 '-Wno-sequence-point',
4699 ],
4700 'cflags_cc': [
4701 '-Wno-non-virtual-dtor',
4702 ],
4703 }],
[email protected]0d7291e2012-10-04 19:16:084704 ],
4705 }],
[email protected]febd3572012-05-03 09:17:454706 ['target_arch == "arm"', {
4707 'ldflags': [
4708 # Enable identical code folding to reduce size.
4709 '-Wl,--icf=safe',
4710 ],
4711 }],
[email protected]da1c8d692011-09-20 20:35:014712 # NOTE: The stlport header include paths below are specified in
4713 # cflags rather than include_dirs because they need to come
4714 # after include_dirs. Think of them like system headers, but
4715 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
4716 # toolchain (circa Gingerbread) will exhibit strange errors.
4717 # The include ordering here is important; change with caution.
torne3bc122f2014-10-18 11:10:174718 ['android_webview_build==0', {
[email protected]da1c8d692011-09-20 20:35:014719 'cflags': [
[email protected]843ca8c2014-07-09 15:50:324720 '-isystem<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:014721 ],
fdegans3572927c2014-11-06 12:28:024722 'conditions': [
4723 ['target_arch=="arm" and arm_thumb==1', {
4724 'ldflags': [ '-L<(android_stlport_libs_dir)/thumb' ]
4725 }, {
4726 'ldflags': [ '-L<(android_stlport_libs_dir)' ]
4727 }],
[email protected]da1c8d692011-09-20 20:35:014728 ],
torne3bc122f2014-10-18 11:10:174729 }, { # else: android_webview_build!=0
4730 'aosp_build_settings': {
4731 # Specify that we want to statically link stlport from the
4732 # NDK. This will provide all the include and library paths
4733 # automatically at build time, and link the right library.
4734 'LOCAL_NDK_STL_VARIANT': 'stlport_static',
4735 },
[email protected]da1c8d692011-09-20 20:35:014736 }],
4737 ['target_arch=="ia32"', {
4738 # The x86 toolchain currently has problems with stack-protector.
4739 'cflags!': [
4740 '-fstack-protector',
4741 ],
4742 'cflags': [
4743 '-fno-stack-protector',
4744 ],
4745 }],
4746 ],
4747 'target_conditions': [
4748 ['_type=="executable"', {
[email protected]7d2b7cf2014-05-14 15:15:194749 # Force android tools to export the "main" symbol so they can be
4750 # loaded on ICS using the run_pie wrapper. See crbug.com/373219.
4751 # TODO(primiano): remove -fvisibility and -rdynamic flags below
4752 # when ICS support will be dropped.
4753 'cflags': [
4754 '-fPIE',
4755 '-fvisibility=default',
4756 ],
[email protected]da1c8d692011-09-20 20:35:014757 'ldflags': [
4758 '-Bdynamic',
[email protected]da1c8d692011-09-20 20:35:014759 '-Wl,--gc-sections',
4760 '-Wl,-z,nocopyreloc',
[email protected]7d2b7cf2014-05-14 15:15:194761 '-pie',
4762 '-rdynamic',
[email protected]da1c8d692011-09-20 20:35:014763 # crtbegin_dynamic.o should be the last item in ldflags.
4764 '<(android_ndk_lib)/crtbegin_dynamic.o',
4765 ],
4766 'libraries': [
4767 # crtend_android.o needs to be the last item in libraries.
4768 # Do not add any libraries after this!
4769 '<(android_ndk_lib)/crtend_android.o',
4770 ],
4771 }],
[email protected]f5c7758a2012-07-25 16:17:574772 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]7ab8b9be2014-06-12 17:20:424773 'ldflags!': [
4774 '-Wl,--exclude-libs=ALL',
4775 ],
[email protected]da1c8d692011-09-20 20:35:014776 'ldflags': [
4777 '-Wl,-shared,-Bsymbolic',
4778 ],
[email protected]d093fe8b2013-04-30 18:00:234779 'conditions': [
4780 ['android_webview_build==0', {
4781 'ldflags': [
4782 # crtbegin_so.o should be the last item in ldflags.
4783 '<(android_ndk_lib)/crtbegin_so.o',
4784 ],
4785 'libraries': [
4786 # crtend_so.o needs to be the last item in libraries.
4787 # Do not add any libraries after this!
4788 '<(android_ndk_lib)/crtend_so.o',
4789 ],
4790 }],
[email protected]a08029b42012-04-25 03:18:464791 ],
[email protected]da1c8d692011-09-20 20:35:014792 }],
4793 ],
4794 }],
4795 # Settings for building host targets using the system toolchain.
4796 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:124797 'cflags!': [
4798 # Due to issues in Clang build system, using ASan on 32-bit
4799 # binaries on x86_64 host is problematic.
4800 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:564801 '-fsanitize=address',
[email protected]3984aaf2012-02-16 11:42:124802 ],
[email protected]da1c8d692011-09-20 20:35:014803 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:444804 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:014805 '-Wl,-z,noexecstack',
4806 '-Wl,--gc-sections',
4807 '-Wl,-O1',
4808 '-Wl,--as-needed',
[email protected]df240712013-09-02 23:17:224809 '-Wl,--warn-shared-textrel',
4810 '-Wl,--fatal-warnings',
[email protected]da1c8d692011-09-20 20:35:014811 ],
4812 }],
[email protected]0ccf578f2013-03-13 11:13:394813 # Settings for building host targets on mac.
4814 ['_toolset=="host" and host_os=="mac"', {
4815 'ldflags!': [
4816 '-Wl,-z,now',
4817 '-Wl,-z,relro',
4818 ],
4819 }],
[email protected]da1c8d692011-09-20 20:35:014820 ],
4821 },
4822 }],
[email protected]93f21e42010-04-01 00:35:154823 ['OS=="solaris"', {
4824 'cflags!': ['-fvisibility=hidden'],
4825 'cflags_cc!': ['-fvisibility-inlines-hidden'],
4826 }],
[email protected]1e013672012-06-29 22:12:204827 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:554828 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:424829 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:554830 'xcode_settings': {
4831 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:244832 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
4833 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]47c3e852013-09-13 02:22:314834 'COPY_PHASE_STRIP': 'NO',
[email protected]ab2956372009-08-13 18:11:044835 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
4836 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:044837 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
4838 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
4839 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:254840 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
4841 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:044842 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
4843 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
4844 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
4845 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:554846 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:044847 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:554848 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:044849 'WARNING_CFLAGS': [
4850 '-Wall',
4851 '-Wendif-labels',
4852 '-Wextra',
4853 # Don't warn about unused function parameters.
4854 '-Wno-unused-parameter',
4855 # Don't warn about the "struct foo f = {0};" initialization
4856 # pattern.
4857 '-Wno-missing-field-initializers',
4858 ],
[email protected]b3fb8092009-03-12 19:09:244859 'conditions': [
4860 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:594861 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
4862 ],
[email protected]2936b8c2012-10-29 10:57:314863 # Note that the prebuilt Clang binaries should not be used for iOS
4864 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:284865 ['clang==1', {
thakis7d982512014-10-31 19:40:274866 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
[email protected]3e893e0c2012-11-16 16:58:444867 # Warn if automatic synthesis is triggered with
4868 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534869 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:304870 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:284871 'WARNING_CFLAGS': [
[email protected]bb148192014-04-02 03:37:334872 # This warns on selectors from Cocoa headers (-length, -set).
4873 # cfe-dev is currently discussing the merits of this warning.
4874 # TODO(thakis): Reevaluate what to do with this, based one
4875 # cfe-dev discussion.
4876 '-Wno-selector-type-mismatch',
[email protected]ce2cad72014-02-13 18:17:354877 ],
[email protected]ce2cad72014-02-13 18:17:354878 'conditions': [
4879 ['clang_xcode==0', {
4880 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
4881 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]ce2cad72014-02-13 18:17:354882 }],
[email protected]66733172010-09-22 00:09:284883 ],
4884 }],
[email protected]ce2cad72014-02-13 18:17:354885 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:464886 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:314887 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:464888 ],
4889 }],
[email protected]ce2cad72014-02-13 18:17:354890 ['clang==1 and clang_xcode==0 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:594891 'OTHER_CFLAGS': [
4892 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534893 ],
4894 }],
[email protected]ce2cad72014-02-13 18:17:354895 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', {
[email protected]4a9ac22e2011-12-02 03:41:534896 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:594897 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4898 ],
4899 }],
[email protected]2616d45d2012-01-19 03:15:484900 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4901 'OTHER_CFLAGS': [
4902 # See http://crbug.com/110262
4903 '-fcolor-diagnostics',
4904 ],
4905 }],
[email protected]91274072014-04-03 01:49:494906 ['OS=="ios" and target_subarch!="arm32" and \
[email protected]7e0fe4912014-04-09 20:53:004907 "<(GENERATOR)"=="xcode"', {
[email protected]91274072014-04-03 01:49:494908 'OTHER_CFLAGS': [
4909 # TODO(ios): when building Chrome for iOS on 64-bit platform
4910 # with Xcode, the -Wshorted-64-to-32 warning is automatically
4911 # enabled. This cause failures when compiling protobuf code,
4912 # so disable the warning. http://crbug.com/359107
4913 '-Wno-shorten-64-to-32',
4914 ],
4915 }],
[email protected]b3fb8092009-03-12 19:09:244916 ],
[email protected]2f80c312009-02-25 21:26:554917 },
[email protected]34f40892011-09-06 21:53:304918 'conditions': [
4919 ['clang==1', {
4920 'variables': {
4921 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
4922 },
4923 }],
[email protected]921c7b52011-11-25 10:34:354924 ['asan==1', {
4925 'xcode_settings': {
4926 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:564927 '-fsanitize=address',
[email protected]22df2b22014-03-13 10:55:074928 '-mllvm -asan-globals=0', # http://crbug.com/352073
[email protected]14a37352014-05-16 11:39:554929 '-gline-tables-only',
[email protected]921c7b52011-11-25 10:34:354930 ],
[email protected]921c7b52011-11-25 10:34:354931 },
[email protected]921c7b52011-11-25 10:34:354932 }],
[email protected]544a18ed2014-01-17 21:01:364933 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034934 'target_conditions': [
4935 ['_toolset=="target"', {
4936 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364937 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034938 ],
4939 }],
4940 ],
4941 }],
[email protected]34f40892011-09-06 21:53:304942 ],
[email protected]2f80c312009-02-25 21:26:554943 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:554944 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:464945 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:084946 'conditions': [
4947 ['asan==1', {
4948 'xcode_settings': {
4949 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:444950 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:084951 ],
4952 },
4953 }],
[email protected]c9cc9442013-12-28 21:27:444954 ['mac_write_linker_maps==1', {
4955 'xcode_settings': {
4956 'OTHER_LDFLAGS': [
4957 '-Wl,-map,>(_target_name).map',
4958 ],
4959 },
4960 }],
[email protected]4281a4e2012-08-24 19:05:084961 ],
[email protected]5d7dc972009-04-16 15:30:464962 }],
4963 ['_mac_bundle', {
4964 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:314965 'target_conditions': [
4966 ['_type=="executable"', {
4967 'conditions': [
4968 ['asan==1', {
4969 'postbuilds': [
4970 {
4971 'variables': {
4972 # Define copy_asan_dylib_path in a variable ending in
4973 # _path so that gyp understands it's a path and
4974 # performs proper relativization during dict merging.
4975 'copy_asan_dylib_path':
4976 'mac/copy_asan_runtime_dylib.sh',
4977 },
4978 'postbuild_name': 'Copy ASan runtime dylib',
4979 'action': [
4980 '<(copy_asan_dylib_path)',
4981 ],
4982 },
4983 ],
4984 }],
4985 ],
4986 }],
4987 ],
[email protected]87fde4a2009-02-28 00:50:084988 }],
[email protected]2936b8c2012-10-29 10:57:314989 ], # target_conditions
4990 }, # target_defaults
4991 }], # OS=="mac" or OS=="ios"
4992 ['OS=="mac"', {
4993 'target_defaults': {
[email protected]eea7d332014-05-16 11:43:084994 'defines': [
4995 # Prevent Mac OS X AssertMacros.h from defining macros that collide
4996 # with common names, like 'check', 'require', and 'verify'.
4997 # (Included by system header. Also exists on iOS but not included.)
4998 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h
4999 '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0',
5000 ],
[email protected]2936b8c2012-10-29 10:57:315001 'variables': {
5002 # These should end with %, but there seems to be a bug with % in
5003 # variables that are intended to be set to different values in
5004 # different targets, like these.
5005 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:315006 # Strip debugging symbols from the target.
5007 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:375008 'conditions': [
5009 ['asan==1', {
5010 'conditions': [
5011 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:355012 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:375013 }, {
5014 'mac_real_dsym': '<(mac_want_real_dsym)'
5015 }],
5016 ],
5017 }, {
5018 'conditions': [
5019 ['mac_want_real_dsym=="default"', {
5020 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
5021 }, {
5022 'mac_real_dsym': '<(mac_want_real_dsym)'
5023 }],
5024 ],
5025 }],
5026 ],
[email protected]2936b8c2012-10-29 10:57:315027 },
5028 'xcode_settings': {
5029 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
5030 # (Equivalent to -fPIC)
5031 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
5032 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
5033 # Keep pch files below xcodebuild/.
5034 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:395035 'OTHER_CFLAGS': [
5036 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
5037 # xcode_setting, but not until all downstream projects' mac bots are
5038 # using xcode >= 4.6, because that's when the default value of the
5039 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
5040 # setting is a no-op as far as xcode is concerned, but the compiler
5041 # behaves differently based on whether -fno-strict-aliasing is
5042 # specified or not.
5043 '-fno-strict-aliasing', # See http://crbug.com/32204.
5044 ],
[email protected]2936b8c2012-10-29 10:57:315045 },
5046 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:105047 ['_type=="executable"', {
5048 'postbuilds': [
5049 {
5050 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:365051 # code execution when running on Mac OS X 10.7 ("Lion"), and
5052 # ensures that the position-independent executable (PIE) bit
5053 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:105054 'variables': {
[email protected]8c40f322011-08-24 03:33:365055 # Define change_mach_o_flags in a variable ending in _path
5056 # so that GYP understands it's a path and performs proper
5057 # relativization during dict merging.
5058 'change_mach_o_flags_path':
5059 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:175060 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:135061 ],
5062 'target_conditions': [
[email protected]162407f2011-09-08 15:33:175063 ['mac_pie==0 or release_valgrind_build==1', {
5064 # Don't enable PIE if it's unwanted. It's unwanted if
5065 # the target specifies mac_pie=0 or if building for
5066 # Valgrind, because Valgrind doesn't understand slide.
5067 # See the similar mac_pie/release_valgrind_build check
5068 # below.
[email protected]081c0342011-08-24 14:59:135069 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:135070 '--no-pie',
5071 ],
5072 }],
5073 ],
[email protected]6303fed2011-08-11 01:12:105074 },
[email protected]8c40f322011-08-24 03:33:365075 'postbuild_name': 'Change Mach-O Flags',
5076 'action': [
5077 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:135078 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:365079 ],
[email protected]6303fed2011-08-11 01:12:105080 },
5081 ],
treib0b804d02014-09-01 17:06:485082 'conditions': [
5083 ['asan==1', {
5084 'variables': {
jiayl55c7faa2014-09-24 16:25:185085 'asan_saves_file': 'asan.saves',
treib0b804d02014-09-01 17:06:485086 },
5087 'xcode_settings': {
jiayl55c7faa2014-09-24 16:25:185088 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
treib0b804d02014-09-01 17:06:485089 },
5090 }],
5091 ],
[email protected]162407f2011-09-08 15:33:175092 'target_conditions': [
5093 ['mac_pie==1 and release_valgrind_build==0', {
5094 # Turn on position-independence (ASLR) for executables. When
5095 # PIE is on for the Chrome executables, the framework will
5096 # also be subject to ASLR.
5097 # Don't do this when building for Valgrind, because Valgrind
5098 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
5099 # understand slide, and get rid of the Valgrind check.
5100 'xcode_settings': {
5101 'OTHER_LDFLAGS': [
5102 '-Wl,-pie', # Position-independent executable (MH_PIE)
5103 ],
5104 },
5105 }],
5106 ],
[email protected]6a0242bc2011-07-01 00:34:465107 }],
[email protected]9a5e72862010-09-02 16:16:585108 ['(_type=="executable" or _type=="shared_library" or \
5109 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:205110 'target_conditions': [
5111 ['mac_real_dsym == 1', {
5112 # To get a real .dSYM bundle produced by dsymutil, set the
5113 # debug information format to dwarf-with-dsym. Since
5114 # strip_from_xcode will not be used, set Xcode to do the
5115 # stripping as well.
5116 'configurations': {
[email protected]5153767c2009-12-22 01:52:505117 'Release_Base': {
[email protected]24700642009-06-01 16:01:205118 'xcode_settings': {
5119 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
5120 'DEPLOYMENT_POSTPROCESSING': 'YES',
5121 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:075122 'target_conditions': [
[email protected]c2111422010-06-01 18:30:255123 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:075124 # The Xcode default is to strip debugging symbols
5125 # only (-S). Local symbols should be stripped as
5126 # well, which will be handled by -x. Xcode will
5127 # continue to insert -S when stripping even when
5128 # additional flags are added with STRIPFLAGS.
5129 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:405130 }], # _type=="shared_library" or _type=="loadable_module"
treib0b804d02014-09-01 17:06:485131 ['_type=="executable"', {
5132 'conditions': [
5133 ['asan==1', {
5134 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
jiayl55c7faa2014-09-24 16:25:185135 }]
treib0b804d02014-09-01 17:06:485136 ],
5137 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:075138 ], # target_conditions
5139 }, # xcode_settings
5140 }, # configuration "Release"
5141 }, # configurations
[email protected]24700642009-06-01 16:01:205142 }, { # mac_real_dsym != 1
5143 # To get a fast fake .dSYM bundle, use a post-build step to
5144 # produce the .dSYM and strip the executable. strip_from_xcode
5145 # only operates in the Release configuration.
5146 'postbuilds': [
5147 {
5148 'variables': {
5149 # Define strip_from_xcode in a variable ending in _path
5150 # so that gyp understands it's a path and performs proper
5151 # relativization during dict merging.
5152 'strip_from_xcode_path': 'mac/strip_from_xcode',
5153 },
5154 'postbuild_name': 'Strip If Needed',
5155 'action': ['<(strip_from_xcode_path)'],
5156 },
[email protected]e14a9f92009-08-05 19:26:075157 ], # postbuilds
5158 }], # mac_real_dsym
5159 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:585160 }], # (_type=="executable" or _type=="shared_library" or
5161 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:075162 ], # target_conditions
5163 }, # target_defaults
5164 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:205165 ['OS=="ios"', {
5166 'target_defaults': {
5167 'xcode_settings' : {
thakisa90810d2014-11-04 19:41:545168 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
[email protected]ce2cad72014-02-13 18:17:355169
[email protected]ce2cad72014-02-13 18:17:355170 'conditions': [
[email protected]fe329272014-03-12 19:06:575171 # Older Xcodes do not support -Wno-deprecated-register, so pass an
5172 # additional flag to suppress the "unknown compiler option" error.
5173 # Restrict this flag to builds that are either compiling with Xcode
5174 # or compiling with Xcode's Clang. This will allow Ninja builds to
5175 # continue failing on unknown compiler options.
5176 # TODO(rohitrao): This flag is temporary and should be removed as
5177 # soon as the iOS bots are updated to use Xcode 5.1.
[email protected]d04384ab2014-03-13 20:46:015178 ['clang_xcode==1', {
[email protected]fe329272014-03-12 19:06:575179 'WARNING_CFLAGS': [
5180 '-Wno-unknown-warning-option',
5181 ],
5182 }],
5183
5184 # Limit the valid architectures depending on "target_subarch".
5185 # This need to include the "arm" architectures but also the "x86"
5186 # ones (they are used when building for the simulator).
[email protected]ce2cad72014-02-13 18:17:355187 ['target_subarch=="arm32"', {
Stuart Morgan7c31daa2014-08-29 13:59:455188 'VALID_ARCHS': ['armv7', 'i386'],
[email protected]ce2cad72014-02-13 18:17:355189 }],
5190 ['target_subarch=="arm64"', {
5191 'VALID_ARCHS': ['arm64', 'x86_64'],
5192 }],
5193 ['target_subarch=="both"', {
Stuart Morgan7c31daa2014-08-29 13:59:455194 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'],
[email protected]ce2cad72014-02-13 18:17:355195 }],
[email protected]480c6672014-08-04 11:28:065196 ['use_system_libcxx==1', {
5197 'target_conditions': [
5198 # Only use libc++ when building target for iOS not when building
5199 # tools for the host (OS X) as Mac targets OS X SDK 10.6 which
5200 # does not support libc++.
5201 ['_toolset=="target"', {
5202 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
5203 }]
5204 ],
[email protected]7c613ee92014-08-14 21:22:315205 }, {
5206 # The default for deployment target of 7.0+ is libc++, so force
5207 # the old behavior unless libc++ is enabled.
5208 'CLANG_CXX_LIBRARY': 'libstdc++', # -stdlib=libstdc++
[email protected]480c6672014-08-04 11:28:065209 }],
[email protected]ce2cad72014-02-13 18:17:355210 ],
[email protected]1e013672012-06-29 22:12:205211 },
5212 'target_conditions': [
[email protected]296bc452013-05-13 21:29:475213 ['_toolset=="host"', {
5214 'xcode_settings': {
5215 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
5216 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:355217 'VALID_ARCHS': [
5218 'x86_64',
5219 ],
[email protected]c3c372e2013-10-29 22:31:515220 'ARCHS': [
[email protected]ce2cad72014-02-13 18:17:355221 'x86_64',
[email protected]c3c372e2013-10-29 22:31:515222 ],
[email protected]296bc452013-05-13 21:29:475223 },
5224 }],
5225 ['_toolset=="target"', {
5226 'xcode_settings': {
5227 # This section should be for overriding host settings. But,
5228 # since we can't negate the iphone deployment target above, we
5229 # instead set it here for target only.
5230 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:355231 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'],
[email protected]296bc452013-05-13 21:29:475232 },
5233 }],
[email protected]1e013672012-06-29 22:12:205234 ['_type=="executable"', {
5235 'configurations': {
5236 'Release_Base': {
5237 'xcode_settings': {
5238 'DEPLOYMENT_POSTPROCESSING': 'YES',
5239 'STRIP_INSTALLED_PRODUCT': 'YES',
5240 },
5241 },
[email protected]3c6aa862012-11-05 17:11:445242 'Debug_Base': {
5243 'xcode_settings': {
5244 # Remove dSYM to reduce build time.
5245 'DEBUG_INFORMATION_FORMAT': 'dwarf',
5246 },
5247 },
[email protected]1e013672012-06-29 22:12:205248 },
[email protected]c3c372e2013-10-29 22:31:515249 'xcode_settings': {
5250 'conditions': [
5251 ['chromium_ios_signing', {
5252 # iOS SDK wants everything for device signed.
5253 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
5254 }, {
5255 'CODE_SIGNING_REQUIRED': 'NO',
5256 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
5257 }],
5258 ],
5259 },
[email protected]1e013672012-06-29 22:12:205260 }],
5261 ], # target_conditions
5262 }, # target_defaults
5263 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:555264 ['OS=="win"', {
5265 'target_defaults': {
5266 'defines': [
scottmga6675a5f2014-11-15 01:37:475267 '_WIN32_WINNT=0x0603',
5268 'WINVER=0x0603',
[email protected]2f80c312009-02-25 21:26:555269 'WIN32',
5270 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:555271 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:285272 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:555273 '_CRT_RAND_S',
5274 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
5275 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:275276 '_ATL_NO_OPENGL',
[email protected]2b4465502014-07-25 21:02:285277 # _HAS_EXCEPTIONS must match ExceptionHandling in msvs_settings.
5278 '_HAS_EXCEPTIONS=0',
scottmga6675a5f2014-11-15 01:37:475279 # Silence some warnings; we can't switch the the 'recommended'
5280 # versions as they're not available on old OSs.
5281 '_WINSOCK_DEPRECATED_NO_WARNINGS',
[email protected]2f80c312009-02-25 21:26:555282 ],
[email protected]8974e042010-06-21 18:06:525283 'conditions': [
[email protected]2212d272011-12-20 21:37:375284 ['buildtype=="Official"', {
5285 # In official builds, targets can self-select an optimization
5286 # level by defining a variable named 'optimize', and setting it
5287 # to one of
5288 # - "size", optimizes for minimal code size - the default.
5289 # - "speed", optimizes for speed over code size.
5290 # - "max", whole program optimization and link-time code
5291 # generation. This is very expensive and should be used
5292 # sparingly.
5293 'variables': {
5294 'optimize%': 'size',
5295 },
[email protected]72589062014-03-14 16:48:305296 'msvs_settings': {
5297 'VCLinkerTool': {
5298 # Set /LTCG for the official builds.
5299 'LinkTimeCodeGeneration': '1',
5300 },
5301 },
[email protected]2212d272011-12-20 21:37:375302 'target_conditions': [
5303 ['optimize=="size"', {
5304 'msvs_settings': {
5305 'VCCLCompilerTool': {
5306 # 1, optimizeMinSpace, Minimize Size (/O1)
5307 'Optimization': '1',
5308 # 2, favorSize - Favor small code (/Os)
5309 'FavorSizeOrSpeed': '2',
5310 },
5311 },
5312 },
5313 ],
5314 ['optimize=="speed"', {
5315 'msvs_settings': {
5316 'VCCLCompilerTool': {
5317 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
5318 'Optimization': '2',
5319 # 1, favorSpeed - Favor fast code (/Ot)
5320 'FavorSizeOrSpeed': '1',
5321 },
5322 },
5323 },
5324 ],
5325 ['optimize=="max"', {
[email protected]cb875c02014-06-12 18:06:315326 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO
5327 # builds. Probably anything that this would catch that
5328 # wouldn't be caught in a normal build isn't going to
5329 # actually be a bug, so the incremental value of C4702 for
5330 # PGO builds is likely very small.
5331 'msvs_disabled_warnings': [
5332 4702
5333 ],
[email protected]2212d272011-12-20 21:37:375334 'msvs_settings': {
5335 'VCCLCompilerTool': {
5336 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
5337 'Optimization': '2',
5338 # 1, favorSpeed - Favor fast code (/Ot)
5339 'FavorSizeOrSpeed': '1',
5340 # This implies link time code generation.
5341 'WholeProgramOptimization': 'true',
5342 },
5343 },
5344 },
5345 ],
5346 ],
5347 },
5348 ],
scottmga6675a5f2014-11-15 01:37:475349 ['msvs_xtree_patched!=1', {
5350 # If xtree hasn't been patched, then we disable C4702. Otherwise,
5351 # it's enabled. This will generally only be true for system-level
5352 # installed Express users.
5353 'msvs_disabled_warnings': [
5354 4702,
5355 ],
5356 }],
[email protected]3e2648a2011-03-21 20:58:505357 ['secure_atl', {
5358 'defines': [
5359 '_SECURE_ATL',
5360 ],
5361 }],
[email protected]54184ce72012-10-18 07:11:265362 ['msvs_express', {
5363 'configurations': {
5364 'x86_Base': {
5365 'msvs_settings': {
5366 'VCLinkerTool': {
5367 'AdditionalLibraryDirectories':
5368 ['<(windows_driver_kit_path)/lib/ATL/i386'],
5369 },
5370 'VCLibrarianTool': {
5371 'AdditionalLibraryDirectories':
5372 ['<(windows_driver_kit_path)/lib/ATL/i386'],
5373 },
5374 },
5375 },
5376 'x64_Base': {
5377 'msvs_settings': {
5378 'VCLibrarianTool': {
5379 'AdditionalLibraryDirectories':
5380 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
5381 },
5382 'VCLinkerTool': {
5383 'AdditionalLibraryDirectories':
5384 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
5385 },
5386 },
5387 },
5388 },
[email protected]54184ce72012-10-18 07:11:265389 'msvs_settings': {
scottmg4f828c942014-08-29 04:11:075390 'VCCLCompilerTool': {
5391 'AdditionalOptions!': [
5392 '/Zc:inline', # Not supported on non-updated Express.
5393 ],
5394 },
[email protected]54184ce72012-10-18 07:11:265395 'VCLinkerTool': {
5396 # Explicitly required when using the ATL with express
5397 'AdditionalDependencies': ['atlthunk.lib'],
5398
5399 # ATL 8.0 included in WDK 7.1 makes the linker to generate
5400 # almost eight hundred LNK4254 and LNK4078 warnings:
5401 # - warning LNK4254: section 'ATL' (50000040) merged into
5402 # '.rdata' (40000040) with different attributes
5403 # - warning LNK4078: multiple 'ATL' sections found with
5404 # different attributes
5405 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
5406 },
5407 },
5408 'msvs_system_include_dirs': [
5409 '<(windows_driver_kit_path)/inc/atl71',
5410 '<(windows_driver_kit_path)/inc/mfc42',
5411 ],
[email protected]3f3f45f2013-10-28 19:30:435412 }],
[email protected]8974e042010-06-21 18:06:525413 ],
[email protected]5b5ca7cb2009-07-20 23:00:205414 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:055415 '<(windows_sdk_path)/Include/shared',
5416 '<(windows_sdk_path)/Include/um',
5417 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:555418 '$(VSInstallDir)/VC/atlmfc/include',
5419 ],
[email protected]bab6e232013-11-27 22:52:395420 'msvs_cygwin_shell': 0,
[email protected]0a42e9002014-05-24 02:35:265421 'msvs_disabled_warnings': [
[email protected]5a3c1f062014-07-26 00:01:535422 # C4127: conditional expression is constant
5423 # This warning can in theory catch dead code and other problems, but
5424 # triggers in far too many desirable cases where the conditional
5425 # expression is either set by macros or corresponds some legitimate
5426 # compile-time constant expression (due to constant template args,
5427 # conditionals comparing the sizes of different types, etc.). Some of
5428 # these can be worked around, but it's not worth it.
5429 4127,
5430
5431 # C4351: new behavior: elements of array 'array' will be default
5432 # initialized
5433 # This is a silly "warning" that basically just alerts you that the
5434 # compiler is going to actually follow the language spec like it's
5435 # supposed to, instead of not following it like old buggy versions
5436 # did. There's absolutely no reason to turn this on.
5437 4351,
5438
5439 # C4355: 'this': used in base member initializer list
5440 # It's commonly useful to pass |this| to objects in a class'
5441 # initializer list. While this warning can catch real bugs, most of
5442 # the time the constructors in question don't attempt to call methods
5443 # on the passed-in pointer (until later), and annotating every legit
5444 # usage of this is simply more hassle than the warning is worth.
5445 4355,
5446
5447 # C4503: 'identifier': decorated name length exceeded, name was
5448 # truncated
5449 # This only means that some long error messages might have truncated
5450 # identifiers in the presence of lots of templates. It has no effect
5451 # on program correctness and there's no real reason to waste time
5452 # trying to prevent it.
5453 4503,
[email protected]480c6672014-08-04 11:28:065454
[email protected]5a3c1f062014-07-26 00:01:535455 # C4611: interaction between 'function' and C++ object destruction is
5456 # non-portable
5457 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN
5458 # suggests using exceptions instead of setjmp/longjmp for C++, but
5459 # Chromium code compiles without exception support. We therefore have
5460 # to use setjmp/longjmp for e.g. JPEG decode error handling, which
5461 # means we have to turn off this warning (and be careful about how
5462 # object destruction happens in such cases).
5463 4611,
5464
[email protected]942c3a60f2011-05-03 02:04:115465 # TODO(maruel): These warnings are level 4. They will be slowly
5466 # removed as code is fixed.
[email protected]5a3c1f062014-07-26 00:01:535467 4100, # Unreferenced formal parameter
5468 4121, # Alignment of a member was sensitive to packing
5469 4189, # Local variable is initialized but not referenced
5470 4244, # Conversion from 'type1' to 'type2', possible loss of data
5471 4481, # Nonstandard extension used: override specifier 'keyword'
5472 4505, # Unreferenced local function has been removed
5473 4510, # Default constructor could not be generated
5474 4512, # Assignment operator could not be generated
5475 4610, # Object can never be instantiated
scottmga6675a5f2014-11-15 01:37:475476 4996, # 'X': was declared deprecated (for GetVersionEx).
[email protected]942c3a60f2011-05-03 02:04:115477 ],
[email protected]2f80c312009-02-25 21:26:555478 'msvs_settings': {
5479 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:445480 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:555481 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:555482 'BufferSecurityCheck': 'true',
5483 'EnableFunctionLevelLinking': 'true',
5484 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:115485 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:555486 'WarnAsError': 'true',
5487 'DebugInformationFormat': '3',
[email protected]2b4465502014-07-25 21:02:285488 # ExceptionHandling must match _HAS_EXCEPTIONS above.
5489 'ExceptionHandling': '0',
[email protected]2f80c312009-02-25 21:26:555490 },
5491 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:165492 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:375493 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:055494 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:375495 ],
[email protected]2f80c312009-02-25 21:26:555496 },
5497 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:555498 'AdditionalDependencies': [
5499 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:505500 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:555501 'version.lib',
5502 'msimg32.lib',
5503 'ws2_32.lib',
5504 'usp10.lib',
5505 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:085506 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:485507 'winmm.lib',
5508 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:555509 ],
[email protected]a78da50e2010-06-09 21:31:375510 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:055511 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:375512 ],
[email protected]2f80c312009-02-25 21:26:555513 'GenerateDebugInformation': 'true',
5514 'MapFileName': '$(OutDir)\\$(TargetName).map',
5515 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:555516 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:485517 # SubSystem values:
5518 # 0 == not set
5519 # 1 == /SUBSYSTEM:CONSOLE
5520 # 2 == /SUBSYSTEM:WINDOWS
5521 # Most of the executables we'll ever create are tests
5522 # and utilities with console output.
5523 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:555524 },
5525 'VCMIDLTool': {
5526 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:095527 'TypeLibraryName': '$(InputName).tlb',
5528 'OutputDirectory': '$(IntDir)',
5529 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:335530 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:095531 'InterfaceIdentifierFileName': '$(InputName)_i.c',
5532 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:555533 },
5534 'VCResourceCompilerTool': {
5535 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:385536 'AdditionalIncludeDirectories': [
5537 '<(DEPTH)',
5538 '<(SHARED_INTERMEDIATE_DIR)',
5539 ],
[email protected]2f80c312009-02-25 21:26:555540 },
[email protected]5d60b0b2013-07-30 20:24:305541 'target_conditions': [
[email protected]2b52f992014-02-26 19:09:475542 ['_type=="executable"', {
5543 'VCManifestTool': {
5544 'EmbedManifest': 'true',
5545 },
5546 }],
[email protected]5d60b0b2013-07-30 20:24:305547 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
5548 'VCManifestTool': {
5549 'AdditionalManifestFiles': [
5550 '>(win_exe_compatibility_manifest)',
5551 ],
5552 },
5553 }],
[email protected]5d60b0b2013-07-30 20:24:305554 ],
[email protected]8efc26082014-01-24 13:26:355555 'conditions': [
5556 ['clang==1', {
5557 # Building with Clang on Windows is a work in progress and very
5558 # experimental. See crbug.com/82385.
5559 'VCCLCompilerTool': {
5560 'WarnAsError': 'false',
5561 'RuntimeTypeInfo': 'false',
5562 'AdditionalOptions': [
[email protected]49ee7ef2014-04-12 03:07:465563 '-fmsc-version=1800',
[email protected]8efc26082014-01-24 13:26:355564 '/fallback',
5565
5566 # Many files use intrinsics without including this header.
5567 # TODO(hans): Fix those files, or move this to sub-GYPs.
5568 '/FIIntrin.h',
5569
5570 # TODO(hans): Make this list shorter eventually.
5571 '-Qunused-arguments',
5572 '-Wno-c++11-compat-deprecated-writable-strings',
[email protected]8efc26082014-01-24 13:26:355573 '-Wno-deprecated-declarations',
[email protected]8efc26082014-01-24 13:26:355574 '-Wno-empty-body',
5575 '-Wno-enum-conversion',
[email protected]609d1c02014-02-11 02:05:135576 '-Wno-extra-tokens',
5577 '-Wno-ignored-attributes',
[email protected]8efc26082014-01-24 13:26:355578 '-Wno-incompatible-pointer-types',
[email protected]609d1c02014-02-11 02:05:135579 '-Wno-int-to-void-pointer-cast',
5580 '-Wno-invalid-noreturn',
[email protected]8efc26082014-01-24 13:26:355581 '-Wno-logical-op-parentheses',
5582 '-Wno-microsoft',
5583 '-Wno-missing-braces',
[email protected]609d1c02014-02-11 02:05:135584 '-Wno-missing-declarations',
[email protected]8efc26082014-01-24 13:26:355585 '-Wno-msvc-include',
5586 '-Wno-null-dereference',
5587 '-Wno-overloaded-virtual',
5588 '-Wno-parentheses',
5589 '-Wno-pointer-sign',
5590 '-Wno-reorder',
5591 '-Wno-return-type-c-linkage',
5592 '-Wno-self-assign',
[email protected]609d1c02014-02-11 02:05:135593 '-Wno-sometimes-uninitialized',
[email protected]8efc26082014-01-24 13:26:355594 '-Wno-switch',
5595 '-Wno-tautological-compare',
5596 '-Wno-unknown-pragmas',
5597 '-Wno-unsequenced',
5598 '-Wno-unused-function',
5599 '-Wno-unused-private-field',
5600 '-Wno-unused-value',
5601 '-Wno-unused-variable',
Nico Weber58972722014-09-06 20:53:195602 '-Wno-unused-local-typedef', # http://crbug.com/411648
thakis42c03072014-10-31 23:52:285603 '-Wno-inconsistent-missing-override', #http://crbug.com/428099
[email protected]8efc26082014-01-24 13:26:355604 ],
5605 },
5606 }],
[email protected]2a794002014-02-22 00:27:115607 ['asan==1', {
5608 # ASan on Windows is a work in progress and very experimental.
5609 # See crbug.com/345874.
5610 'VCCLCompilerTool': {
5611 'AdditionalOptions': [
5612 '-fsanitize=address',
5613 ],
[email protected]4c1abdb2014-05-16 17:03:575614 'AdditionalIncludeDirectories': [
5615 # MSVC needs to be able to find the sanitizer headers when
5616 # invoked via /fallback. This is critical for using macros
5617 # like ASAN_UNPOISON_MEMORY_REGION in files where we fall
5618 # back.
[email protected]e7a1cba2014-08-04 15:58:295619 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer',
[email protected]4c1abdb2014-05-16 17:03:575620 ],
[email protected]2a794002014-02-22 00:27:115621 },
5622 'VCLinkerTool': {
5623 'AdditionalLibraryDirectories': [
5624 # TODO(hans): If make_clang_dir is absolute, this breaks.
[email protected]e7a1cba2014-08-04 15:58:295625 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows',
[email protected]2a794002014-02-22 00:27:115626 ],
5627 },
5628 'target_conditions': [
timurrrr6e2f3e262014-08-29 16:51:525629 ['component=="shared_library"', {
5630 'VCLinkerTool': {
5631 'AdditionalDependencies': [
5632 'clang_rt.asan_dynamic-i386.lib',
timurrrr1d8adb22014-09-15 18:48:345633 'clang_rt.asan_dynamic_runtime_thunk-i386.lib',
timurrrr6e2f3e262014-08-29 16:51:525634 ],
5635 },
5636 }],
5637 ['_type=="executable" and component=="static_library"', {
[email protected]2a794002014-02-22 00:27:115638 'VCLinkerTool': {
5639 'AdditionalDependencies': [
5640 'clang_rt.asan-i386.lib',
5641 ],
5642 },
5643 }],
timurrrr6e2f3e262014-08-29 16:51:525644 ['(_type=="shared_library" or _type=="loadable_module") and component=="static_library"', {
[email protected]2a794002014-02-22 00:27:115645 'VCLinkerTool': {
5646 'AdditionalDependencies': [
5647 'clang_rt.asan_dll_thunk-i386.lib',
5648 ],
5649 },
5650 }],
5651 ],
5652 }],
[email protected]8efc26082014-01-24 13:26:355653 ],
[email protected]2f80c312009-02-25 21:26:555654 },
5655 },
5656 }],
[email protected]79e2336c2011-05-12 18:18:345657 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:315658 'target_defaults': {
5659 'defines': [
5660 'DISABLE_NACL',
5661 ],
5662 },
5663 }],
[email protected]cfbf9bc2009-12-07 22:07:565664 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:195665 'target_defaults': {
5666 'msvs_settings': {
5667 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:195668 'DelayLoadDLLs': [
5669 'dbghelp.dll',
5670 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:015671 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:195672 'uxtheme.dll',
5673 ],
5674 },
5675 },
[email protected]ef4fa4072009-12-04 22:46:505676 'configurations': {
[email protected]5153767c2009-12-22 01:52:505677 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:505678 'msvs_settings': {
5679 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:165680 'AdditionalOptions': [
5681 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:335682 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:165683 '/ignore:4199',
5684 '/ignore:4221',
5685 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:435686 ],
5687 'conditions': [
[email protected]1612e552014-02-15 04:49:185688 ['syzyasan==0', {
[email protected]c3fcbd122013-06-20 10:47:435689 'AdditionalOptions': ['/largeaddressaware'],
5690 }],
[email protected]1f9471a2010-01-04 06:40:165691 ],
[email protected]ef4fa4072009-12-04 22:46:505692 },
5693 },
5694 },
[email protected]5153767c2009-12-22 01:52:505695 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:505696 'msvs_settings': {
5697 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:165698 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:505699 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:335700 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:165701 '/ignore:4199',
5702 '/ignore:4221',
5703 '/nxcompat',
5704 ],
[email protected]ef4fa4072009-12-04 22:46:505705 },
5706 },
5707 },
5708 },
[email protected]48c7af72009-07-03 22:00:195709 },
5710 }],
[email protected]9821d0d2010-04-16 22:40:375711 ['enable_new_npdevice_api==1', {
5712 'target_defaults': {
5713 'defines': [
5714 'ENABLE_NEW_NPDEVICE_API',
5715 ],
5716 },
5717 }],
[email protected]5f683172013-04-27 01:53:195718 # Don't warn about the "typedef 'foo' locally defined but not used"
fdegans6b767132014-09-09 10:09:295719 # for gcc 4.8 and higher.
[email protected]5f683172013-04-27 01:53:195720 # TODO: remove this flag once all builds work. See crbug.com/227506
[email protected]33668ca62014-07-10 18:01:575721 ['gcc_version>=48 and clang==0', {
[email protected]5f683172013-04-27 01:53:195722 'target_defaults': {
5723 'cflags': [
5724 '-Wno-unused-local-typedefs',
5725 ],
5726 },
5727 }],
[email protected]acad4962014-08-04 19:05:025728 ['gcc_version>=48 and clang==0 and host_clang==1', {
5729 'target_defaults': {
5730 'target_conditions': [
5731 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}],
5732 ],
5733 },
5734 }],
torne981f132f2014-10-09 18:37:205735 # In the android webview build, force host targets to be compiled with clang
5736 # as the hermetic host gcc is very old on some platforms. This is already
5737 # the default on the current development version of AOSP but we force it
torne6c1c4462014-10-15 15:55:585738 # here in case we need to compile against an older release version. We also
5739 # explicitly set it to false for target binaries to avoid causing problems
torne8beb6702014-11-05 12:16:405740 # for the work to enable clang by default in AOSP. We also force the use of
5741 # libstdc++ on host as peculiarities of the android gyp backend mean that
5742 # using libc++ doesn't work, and Chromium doesn't yet require a more modern
5743 # C++ library.
torne981f132f2014-10-09 18:37:205744 ['android_webview_build==1', {
5745 'target_defaults': {
5746 'target_conditions': [
5747 ['_toolset=="host"', {
5748 'aosp_build_settings': {
5749 'LOCAL_CLANG': 'true',
torne8beb6702014-11-05 12:16:405750 'LOCAL_CXX_STL': 'libstdc++',
torne981f132f2014-10-09 18:37:205751 },
torne6c1c4462014-10-15 15:55:585752 }, { # else: _toolset != "host"
5753 'aosp_build_settings': {
5754 'LOCAL_CLANG': 'false',
5755 },
torne981f132f2014-10-09 18:37:205756 }],
5757 ],
5758 },
5759 }],
[email protected]7a4c78e02014-05-12 11:10:165760 # We need a special case to handle the android webview build on mac because
5761 # the host gcc there doesn't accept this flag, but the target gcc may
5762 # require it.
5763 ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', {
5764 'target_defaults': {
5765 'target_conditions': [
[email protected]f2cef302014-05-23 13:34:585766 ['_toolset=="host"', {
[email protected]7a4c78e02014-05-12 11:10:165767 'cflags!': [
5768 '-Wno-unused-local-typedefs',
5769 ],
5770 }],
5771 ],
5772 },
5773 }],
[email protected]ce2cad72014-02-13 18:17:355774 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
5775 'and OS!="win"', {
[email protected]e71a3622013-12-04 07:32:415776 'make_global_settings': [
5777 ['CC', '<(make_clang_dir)/bin/clang'],
5778 ['CXX', '<(make_clang_dir)/bin/clang++'],
5779 ['CC.host', '$(CC)'],
5780 ['CXX.host', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:305781 ],
5782 }],
[email protected]6e354d42014-01-29 01:59:215783 ['clang==1 and OS=="win"', {
5784 'make_global_settings': [
5785 # On Windows, gyp's ninja generator only looks at CC.
5786 ['CC', '<(make_clang_dir)/bin/clang-cl'],
5787 ],
5788 }],
[email protected]615fa6642012-08-14 19:17:075789 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:275790 # Hardcode the compiler names in the Makefile so that
5791 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:115792 'make_global_settings': [
[email protected]e71a3622013-12-04 07:32:415793 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
5794 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
[email protected]acad4962014-08-04 19:05:025795 ['CC.host', '<(host_cc)'],
5796 ['CXX.host', '<(host_cxx)'],
[email protected]d10e2cc2012-03-20 10:45:275797 ],
5798 }],
[email protected]23eea4a42013-04-27 04:10:265799 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:465800 'make_global_settings': [
5801 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
5802 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
[email protected]acad4962014-08-04 19:05:025803 ['CC.host', '<(host_cc)'],
5804 ['CXX.host', '<(host_cxx)'],
[email protected]eb5f1672013-01-31 07:56:465805 ],
5806 }],
[email protected]d69a73b2014-07-29 16:50:445807 ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', {
5808 # Set default ARM cross compiling on linux. These can be overridden
5809 # using CC/CXX/etc environment variables.
5810 'make_global_settings': [
5811 ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
5812 ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
[email protected]acad4962014-08-04 19:05:025813 ['CC.host', '<(host_cc)'],
5814 ['CXX.host', '<(host_cxx)'],
[email protected]d69a73b2014-07-29 16:50:445815 ],
5816 }],
[email protected]e71a3622013-12-04 07:32:415817
5818 # TODO(yyanagisawa): supports GENERATOR==make
5819 # make generator doesn't support CC_wrapper without CC
5820 # in make_global_settings yet.
[email protected]c80075412014-02-27 18:46:265821 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
[email protected]e71a3622013-12-04 07:32:415822 'make_global_settings': [
5823 ['CC_wrapper', '<(gomadir)/gomacc'],
5824 ['CXX_wrapper', '<(gomadir)/gomacc'],
5825 ['CC.host_wrapper', '<(gomadir)/gomacc'],
5826 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
5827 ],
5828 }],
fdegansd7a59f92014-10-23 11:49:545829 ['use_lto==1', {
5830 'target_defaults': {
5831 'target_conditions': [
5832 ['_toolset=="target"', {
5833 'cflags': [
5834 '-flto',
5835 '-ffat-lto-objects',
5836 ],
5837 }],
5838 ],
5839 },
5840 }],
5841 ['use_lto==1 or use_lto_o2==1', {
5842 'target_defaults': {
5843 'target_conditions': [
5844 ['_toolset=="target"', {
5845 'ldflags': [
5846 '-flto=32',
5847 ],
5848 }],
5849 ],
5850 },
5851 }],
[email protected]2f80c312009-02-25 21:26:555852 ],
5853 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:505854 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
5855 # This block adds *project-wide* configuration settings to each project
5856 # file. It's almost always wrong to put things here. Specify your
5857 # custom xcode_settings in target_defaults to add them to targets instead.
5858
[email protected]1e013672012-06-29 22:12:205859 'conditions': [
[email protected]fca3d812012-07-27 00:55:365860 # In an Xcode Project Info window, the "Base SDK for All Configurations"
5861 # setting sets the SDK on a project-wide basis. In order to get the
5862 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
5863 # here at the project level.
[email protected]2c261532012-10-06 00:46:295864 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:365865 'conditions': [
[email protected]2c261532012-10-06 00:46:295866 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:365867 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:295868 }, {
5869 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:365870 }],
5871 ],
[email protected]2c261532012-10-06 00:46:295872 }],
5873 ['OS=="ios"', {
5874 'conditions': [
5875 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:405876 'conditions': [
5877 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]c3c372e2013-10-29 22:31:515878 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:405879 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:385880 }, {
5881 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:405882 }],
5883 ],
[email protected]2c261532012-10-06 00:46:295884 }, {
5885 'SDKROOT': '<(ios_sdk_path)', # -isysroot
5886 }],
5887 ],
[email protected]1e013672012-06-29 22:12:205888 }],
5889 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:205890 # Target both iPhone and iPad.
5891 'TARGETED_DEVICE_FAMILY': '1,2',
[email protected]72c0d3652013-11-05 19:11:425892 }, { # OS!="ios"
5893 'conditions': [
5894 ['target_arch=="x64"', {
5895 'ARCHS': [
5896 'x86_64'
5897 ],
5898 }],
5899 ['target_arch=="ia32"', {
5900 'ARCHS': [
5901 'i386'
5902 ],
5903 }],
5904 ],
[email protected]d64554012013-10-31 18:40:005905 }],
[email protected]1e013672012-06-29 22:12:205906 ],
[email protected]0c8ab452009-11-06 21:57:505907
[email protected]2f80c312009-02-25 21:26:555908 # The Xcode generator will look for an xcode_settings section at the root
5909 # of each dict and use it to apply settings on a file-wide basis. Most
5910 # settings should not be here, they should be in target-specific
5911 # xcode_settings sections, or better yet, should use non-Xcode-specific
5912 # settings in target dicts. SYMROOT is a special case, because many other
5913 # Xcode variables depend on it, including variables such as
5914 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5915 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5916 # files to appear (when present) in the UI as actual files and not red
5917 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5918 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:165919 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:555920 },
[email protected]ee28c9f2009-09-04 01:53:015921}