blob: a6f80683d64cd21f7277842551f027cb89467fae [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
24 # Whether or not we are using the Aura windowing framework.
25 'use_aura%': 0,
26
27 # Whether or not we are building the Ash shell.
28 'use_ash%': 0,
[email protected]c335f4802013-04-06 04:51:2129
[email protected]2a76009b2013-08-07 21:02:3130 # Whether or not we are using CRAS, the ChromeOS Audio Server.
31 'use_cras%': 0,
32
[email protected]ff78e4e2013-05-03 19:19:1533 # Use a raw surface abstraction.
34 'use_ozone%': 0,
[email protected]02968b82013-11-14 02:42:4335
36 # Configure the build for small devices. See crbug.com/318413
37 'embedded%': 0,
[email protected]1731cd42014-03-26 19:10:0238
39 'conditions': [
40 # Compute the architecture that we're building on.
41 ['OS=="win" or OS=="mac" or OS=="ios"', {
42 'host_arch%': 'ia32',
43 }, {
[email protected]d2f389242014-06-06 09:56:4444 'host_arch%': '<!pymod_do_main(detect_host_arch)',
[email protected]1731cd42014-03-26 19:10:0245 }],
46 ],
[email protected]8796d922012-08-07 01:23:1147 },
48 # Copy conditionally-set variables out one scope.
49 'chromeos%': '<(chromeos)',
50 'use_aura%': '<(use_aura)',
51 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:3152 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:1553 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:4354 'embedded%': '<(embedded)',
[email protected]1731cd42014-03-26 19:10:0255 'host_arch%': '<(host_arch)',
[email protected]e72e55b2011-01-06 22:19:3056
[email protected]3fa441d2011-09-18 17:28:5057 # Whether we are using Views Toolkit
58 'toolkit_views%': 0,
59
[email protected]e1b2d732014-03-28 16:20:3260 # Use OpenSSL instead of NSS as the underlying SSL and crypto
61 # implementation. Certificate verification will in most cases be
62 # handled by the OS. If OpenSSL's struct X509 is used to represent
63 # certificates, use_openssl_certs must be set.
[email protected]e0b85a52011-10-06 03:30:4264 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2765
[email protected]e1b2d732014-03-28 16:20:3266 # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*.
67 'use_openssl_certs%': 0,
68
[email protected]7ddea9802012-02-22 23:08:0569 # Disable viewport meta tag by default.
70 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2471
72 # Enable HiDPI support.
73 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4074
[email protected]f1f362b42012-05-15 17:46:5875 # Override buildtype to select the desired build flavor.
76 # Dev - everyday build for development/testing
77 # Official - release build (generally implies additional processing)
78 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
79 # conversion is done), some of the things which are now controlled by
80 # 'branding', such as symbol generation, will need to be refactored
81 # based on 'buildtype' (i.e. we don't care about saving symbols for
82 # non-Official # builds).
83 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1184
[email protected]e2aaaac2013-05-08 07:20:0985 # Override branding to select the desired branding flavor.
86 'branding%': 'Chromium',
87
[email protected]8796d922012-08-07 01:23:1188 'conditions': [
[email protected]2d0505202013-09-16 00:22:5289 # ChromeOS and Windows use Aura and Ash.
[email protected]15119302014-05-20 19:23:5890 ['chromeos==1 or OS=="win" or OS=="linux"', {
[email protected]8796d922012-08-07 01:23:1191 'use_ash%': 1,
[email protected]978a2ae2013-09-13 04:28:0192 'use_aura%': 1,
[email protected]8796d922012-08-07 01:23:1193 }],
[email protected]020648aa2013-06-08 17:16:4794
[email protected]02968b82013-11-14 02:42:4395 # Ozone uses Aura.
96 ['use_ozone==1', {
97 'use_aura%': 1,
98 }],
99
[email protected]7ed44342013-09-30 08:36:13100 # Whether we're a traditional desktop unix.
101 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
102 'desktop_linux%': 1,
103 }, {
104 'desktop_linux%': 0,
105 }],
106
[email protected]02968b82013-11-14 02:42:43107 # Embedded implies ozone.
108 ['embedded==1', {
109 'use_ozone%': 1,
110 }],
[email protected]e71a3622013-12-04 07:32:41111
[email protected]5be60002014-01-13 21:27:42112 ['embedded==1', {
113 'use_system_fontconfig%': 0,
114 }, {
115 'use_system_fontconfig%': 1,
116 }],
[email protected]1731cd42014-03-26 19:10:02117
118 ['OS=="android"', {
119 'target_arch%': 'arm',
120 }, {
121 # Default architecture we're building for is the architecture we're
122 # building on, and possibly sub-architecture (for iOS builds).
123 'target_arch%': '<(host_arch)',
124 }],
[email protected]8796d922012-08-07 01:23:11125 ],
[email protected]bb6aba32011-01-07 19:04:43126 },
127 # Copy conditionally-set variables out one scope.
128 'chromeos%': '<(chromeos)',
[email protected]7ed44342013-09-30 08:36:13129 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58130 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16131 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31132 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15133 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:43134 'embedded%': '<(embedded)',
[email protected]e0b85a52011-10-06 03:30:42135 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:32136 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]5be60002014-01-13 21:27:42137 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]7ddea9802012-02-22 23:08:05138 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24139 'enable_hidpi%': '<(enable_hidpi)',
[email protected]f1f362b42012-05-15 17:46:58140 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09141 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22142 'host_arch%': '<(host_arch)',
[email protected]1731cd42014-03-26 19:10:02143 'target_arch%': '<(target_arch)',
[email protected]94cdbf42012-12-11 19:49:22144
[email protected]ce2cad72014-02-13 18:17:35145 'target_subarch%': '',
[email protected]f1f362b42012-05-15 17:46:58146
[email protected]d999c3cb2013-03-12 10:22:36147 # This is set when building the Android WebView inside the Android
148 # build system, using the 'android' gyp backend. The WebView code is
149 # still built when this is unset, but builds using the normal chromium
150 # build system.
151 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53152
[email protected]7d6763422013-04-26 12:06:54153 # Set ARM architecture version.
154 'arm_version%': 7,
155
[email protected]89dcd662013-12-12 23:06:50156 # Use aurax11 for clipboard implementation. This is true on linux_aura.
157 'use_clipboard_aurax11%': 0,
158
[email protected]e71a3622013-12-04 07:32:41159 # goma settings.
160 # 1 to use goma.
161 # If no gomadir is set, it uses the default gomadir.
162 'use_goma%': 0,
163 'gomadir%': '',
164
[email protected]1731cd42014-03-26 19:10:02165 # The system root for cross-compiles. Default: none.
166 'sysroot%': '',
167 'chroot_cmd%': '',
168
[email protected]03df8362014-06-04 00:17:11169 # The system libdir used for this ABI.
170 'system_libdir%': 'lib',
171
[email protected]e72e55b2011-01-06 22:19:30172 'conditions': [
[email protected]2c858a82013-10-05 01:01:32173 # Ash needs Aura.
174 ['use_aura==0', {
175 'use_ash%': 0,
176 }],
177
[email protected]ab2017e2012-02-07 01:54:50178 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35179 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43180 'toolkit_views%': 1,
181 }, {
182 'toolkit_views%': 0,
183 }],
[email protected]1efbaaa2012-04-24 02:43:24184
[email protected]02968b82013-11-14 02:42:43185 # Embedded builds use aura without ash or views.
186 ['embedded==1', {
187 'use_aura%': 1,
188 'use_ash%': 0,
189 'toolkit_views%': 0,
190 }],
191
[email protected]d2b16e32014-03-06 22:10:49192 # Enable HiDPI on Mac OS, Chrome OS and Windows.
193 ['OS=="mac" or chromeos==1 or OS=="win"', {
[email protected]1efbaaa2012-04-24 02:43:24194 'enable_hidpi%': 1,
195 }],
[email protected]219c7312012-05-10 20:32:40196
[email protected]b11c0cc02014-06-28 05:36:50197 # Enable App Launcher everywhere but mobile.
198 ['OS!="ios" and OS!="android"', {
[email protected]dc4e8b82012-11-15 03:58:16199 'enable_app_list%': 1,
200 }, {
201 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09202 }],
203
[email protected]cb800562012-11-20 22:36:07204 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26205 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07206 }, {
207 'use_default_render_theme%': 0,
208 }],
[email protected]02968b82013-11-14 02:42:43209
210 ['use_ozone==1', {
211 'use_ozone_evdev%': 1,
212 }, {
213 'use_ozone_evdev%': 0,
[email protected]e71a3622013-12-04 07:32:41214 }],
215
216 # Set default gomadir.
217 ['OS=="win"', {
218 'gomadir': 'c:\\goma\\goma-win',
[email protected]91b91292014-01-18 23:54:41219 }, {
[email protected]e71a3622013-12-04 07:32:41220 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
221 }],
[email protected]ce2cad72014-02-13 18:17:35222
223 # Set the default "target_subarch" on iOS. Valid values are "arm32",
224 # "arm64" and "both" (meaning a fat binary).
225 #
226 # TODO(sdefresne): change the default from "arm32" to "both" for
227 # "target_subarch" once http://crbug.com/339477 is fixed.
228 #
229 # TODO(sdefresne): set the "target_arch" to "arm" once compilation
230 # of skia has been fixed for simulator. http://crbug.com/342377
231 ['OS=="ios"', {
232 'target_subarch%': 'arm32',
233 }],
[email protected]e72e55b2011-01-06 22:19:30234 ],
235 },
236
237 # Copy conditionally-set variables out one scope.
238 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30239 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22240 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:35241 'target_subarch%': '<(target_subarch)',
[email protected]bb6aba32011-01-07 19:04:43242 'toolkit_views%': '<(toolkit_views)',
[email protected]d628ab412013-09-07 03:26:37243 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58244 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16245 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31246 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15247 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:48248 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:50249 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]02968b82013-11-14 02:42:43250 'embedded%': '<(embedded)',
[email protected]e0b85a52011-10-06 03:30:42251 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:32252 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]5be60002014-01-13 21:27:42253 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]7ddea9802012-02-22 23:08:05254 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24255 'enable_hidpi%': '<(enable_hidpi)',
[email protected]d999c3cb2013-03-12 10:22:36256 'android_webview_build%': '<(android_webview_build)',
[email protected]e71a3622013-12-04 07:32:41257 'use_goma%': '<(use_goma)',
258 'gomadir%': '<(gomadir)',
[email protected]dc4e8b82012-11-15 03:58:16259 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07260 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22261 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09262 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54263 'arm_version%': '<(arm_version)',
[email protected]1731cd42014-03-26 19:10:02264 'sysroot%': '<(sysroot)',
265 'chroot_cmd%': '<(chroot_cmd)',
[email protected]03df8362014-06-04 00:17:11266 'system_libdir%': '<(system_libdir)',
[email protected]e14a9f92009-08-05 19:26:07267
[email protected]c86fd472013-04-02 19:42:30268 # Set to 1 to enable fast builds. Set to 2 for even faster builds
269 # (it disables debug info for fastest compilation - only for use
270 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30271 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49272
[email protected]19677402014-06-18 13:10:04273 # Set to 1 to not store any build metadata (this isn't working yet but
274 # this flag will help us to get there). See http://crbug.com/314403.
275 # TODO(sebmarchand): Update this comment once this flag guarantee that
276 # there's no build metadata in the build artifacts.
277 'dont_embed_build_metadata%': 0,
[email protected]b9e9992a2014-06-12 21:01:19278
[email protected]c73363762014-04-16 21:11:46279 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
280 # This is useful for parallel compilation tools which can't support /Zi.
281 # Only used on Windows.
282 'win_z7%' : 0,
283
[email protected]1a1505512014-03-10 18:23:38284 # Set to 1 to enable dcheck in release.
[email protected]20960e072011-09-20 20:59:01285 'dcheck_always_on%': 0,
286
[email protected]a1e87422013-07-09 21:47:01287 # Set to 1 to make a build that disables unshipped tracing events.
288 # Note: this setting is ignored if buildtype=="Official".
289 'tracing_like_official_build%': 0,
290
[email protected]77a848262013-02-22 11:17:25291 # Disable image loader component extension by default.
292 'image_loader_extension%': 0,
293
[email protected]7d6763422013-04-26 12:06:54294 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30295 'arm_neon%': 1,
296
[email protected]7d6763422013-04-26 12:06:54297 # Detect NEON support at run-time.
298 'arm_neon_optional%': 0,
299
[email protected]e72e55b2011-01-06 22:19:30300 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03301 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30302
[email protected]d9113542012-07-18 17:11:28303 # Use system libjpeg. Note that the system's libjepg will be used even if
304 # use_libjpeg_turbo is set.
305 'use_system_libjpeg%': 0,
306
[email protected]aa5e01fc2013-03-06 14:06:17307 # By default, component is set to static_library and it can be overriden
308 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53309 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30310
[email protected]bb6aba32011-01-07 19:04:43311 # Set to select the Title Case versions of strings in GRD files.
312 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21313
[email protected]98da0042011-02-02 00:10:27314 # Use translations provided by volunteers at launchpad.net. This
315 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19316 'use_third_party_translations%': 0,
317
[email protected]9a425422011-01-11 00:53:18318 # Remoting compilation is enabled by default. Set to 0 to disable.
319 'remoting%': 1,
320
[email protected]1ec68c42011-06-01 13:56:25321 # Configuration policy is enabled by default. Set to 0 to disable.
322 'configuration_policy%': 1,
323
[email protected]6c521fed2012-11-29 17:00:03324 # Variable safe_browsing is used to control the build time configuration
325 # for safe browsing feature. Safe browsing can be compiled in 3 different
326 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
327 # reporting features without enabling phishing and malware detection. This
328 # is useful to integrate a third party phishing/malware detection to
329 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56330 'safe_browsing%': 1,
331
[email protected]9eb100e2011-10-14 05:08:22332 # Speech input is compiled in by default. Set to 0 to disable.
[email protected]865ae212014-05-07 00:53:50333 # TODO(tommyw): Speech Input doesn't exist anymore. Clarify the scope
334 # of this flag (and probably rename it).
[email protected]9eb100e2011-10-14 05:08:22335 'input_speech%': 1,
336
[email protected]7cce3232011-10-28 10:41:57337 # Notifications are compiled in by default. Set to 0 to disable.
338 'notifications%' : 1,
339
[email protected]970fd4e2012-12-19 11:09:37340 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
341 # regular builds and 1 for ASan builds.
342 'mac_want_real_dsym%': 'default',
343
[email protected]5d451ad2011-02-11 16:43:46344 # If this is set, the clang plugins used on the buildbot will be used.
345 # Run tools/clang/scripts/update.sh to make sure they are compiled.
346 # This causes 'clang_chrome_plugins_flags' to be set.
347 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08348 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46349
[email protected]2e82fa52012-11-27 23:41:44350 # Enable building with ASAN (Clang's -fsanitize=address option).
351 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06352 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
353 'asan%': 0,
[email protected]544a18ed2014-01-17 21:01:36354 # Enable coverage gathering instrumentation in ASan. This flag also
[email protected]a030ab62014-06-23 17:14:15355 # controls coverage granularity (1 for function-level coverage, 2 for
356 # block-level coverage).
[email protected]20a127f2014-01-16 03:25:03357 'asan_coverage%': 0,
[email protected]92799b632011-08-15 14:33:06358
[email protected]1b9654122014-04-28 12:11:15359 # Enable Chromium overrides of the default configurations for various
360 # dynamic tools (like ASan).
361 'use_sanitizer_options%': 1,
362
[email protected]1612e552014-02-15 04:49:18363 # Enable building with SyzyAsan.
364 # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
365 'syzyasan%': 0,
366
[email protected]062522a2013-06-13 15:49:55367 # Enable building with LSan (Clang's -fsanitize=leak option).
368 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
369 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
370 'lsan%': 0,
371
[email protected]7fd639a2014-05-30 23:59:01372 # Enable building with TSan (Clang's -fsanitize=thread option).
[email protected]927a9d672012-11-09 11:28:20373 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12374 # See http://clang.llvm.org/docs/ThreadSanitizer.html
375 'tsan%': 0,
[email protected]0b5ec8bf2014-06-25 21:11:54376 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12377
[email protected]7fd639a2014-05-30 23:59:01378 # Enable building with MSan (Clang's -fsanitize=memory option).
[email protected]a10ddd2d2013-02-26 20:06:59379 # MemorySanitizer only works with clang, but msan=1 implies clang=1
380 # See http://clang.llvm.org/docs/MemorySanitizer.html
381 'msan%': 0,
[email protected]190d4ce62014-01-17 20:24:53382 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
[email protected]a030ab62014-06-23 17:14:15383 # Track where uninitialized memory originates from. From fastest to
384 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2
385 # - track the chain of stores leading from allocation site to use site.
386 'msan_track_origins%': 1,
[email protected]a10ddd2d2013-02-26 20:06:59387
[email protected]7fd639a2014-05-30 23:59:01388 # Enable building with UBSan (Clang's -fsanitize=undefined option).
389 # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
390 # See http://clang.llvm.org/docs/UsersManual.html
391 'ubsan%': 0,
392
[email protected]0dbe7af92014-06-26 23:31:40393 # Enable building with UBsan's vptr (Clang's -fsanitize=vptr -fsanitize=null options).
394 # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1
395 'ubsan_vptr%': 0,
396 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt',
397
[email protected]c8103a42013-11-12 13:41:30398 # Use the dynamic libraries instrumented by one of the sanitizers
399 # instead of the standard system libraries.
400 'use_instrumented_libraries%': 0,
401
[email protected]22b3f531e2013-12-20 13:07:28402 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
403 # stdlibc++ as standard library. This is intended to use for instrumented
404 # builds.
405 'use_custom_libcxx%': 0,
406
[email protected]7ce58b22012-09-26 05:17:25407 # Use a modified version of Clang to intercept allocated types and sizes
408 # for allocated objects. clang_type_profiler=1 implies clang=1.
409 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
410 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
411 'clang_type_profiler%': 0,
412
[email protected]8a6abd12012-05-16 10:04:44413 # Set to true to instrument the code with function call logger.
414 # See src/third_party/cygprofile/cyg-profile.cc for details.
415 'order_profiling%': 0,
416
[email protected]00b0a7f2012-01-25 15:30:46417 # Use the provided profiled order file to link Chrome image with it.
418 # This makes Chrome faster by better using CPU cache when executing code.
419 # This is known as PGO (profile guided optimization).
420 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
421 'order_text_section%' : "",
422
[email protected]1ad5a7b2011-06-24 03:15:13423 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
424 # libraries on linux x86-64 and arm, plus ASLR.
425 'linux_fpic%': 1,
426
[email protected]bd7b6fe2012-03-05 21:02:40427 # Whether one-click signin is enabled or not.
428 'enable_one_click_signin%': 0,
429
[email protected]b56a9e02014-06-20 09:57:04430 # Whether to back up data before sync.
431 'enable_pre_sync_backup%': 0,
432
[email protected]6a3cd37e2012-04-17 17:13:34433 # Enable Chrome browser extensions
434 'enable_extensions%': 1,
435
[email protected]6ee43a72012-12-07 22:44:40436 # Enable Google Now.
[email protected]9a5bb052014-04-17 16:50:56437 'enable_google_now%': 1,
[email protected]6ee43a72012-12-07 22:44:40438
[email protected]1e54c1c2013-08-12 17:16:05439 # Enable printing support and UI. This variable is used to configure
440 # which parts of printing will be built. 0 disables printing completely,
441 # 1 enables it fully, and 2 enables only the codepath to generate a
442 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud
443 # print, UI, etc.
[email protected]658677f2012-06-09 06:04:02444 'enable_printing%': 1,
445
[email protected]75280ad22014-05-20 22:02:25446 # Windows prints using a PDF as the metafile from the renderer.
[email protected]4a473e92014-05-22 18:38:56447 'win_pdf_metafile_for_printing%': 1,
[email protected]75280ad22014-05-20 22:02:25448
[email protected]3b5e88d2013-09-06 11:03:06449 # Set the version of CLD.
450 # 0: Don't specify the version. This option is for the Finch testing.
451 # 1: Use only CLD1.
452 # 2: Use only CLD2.
[email protected]d8ef2362013-10-22 02:10:00453 'cld_version%': 2,
[email protected]3b5e88d2013-09-06 11:03:06454
[email protected]61753f22014-03-19 12:10:59455 # For CLD2, the size of the tables that should be included in the build
[email protected]e5a7a2a2014-03-27 16:16:03456 # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data
457 # tool explicitly.
[email protected]61753f22014-03-19 12:10:59458 # See third_party/cld_2/cld_2.gyp for more information.
459 # 0: Small tables, lower accuracy
460 # 1: Medium tables, medium accuracy
461 # 2: Large tables, high accuracy
462 'cld2_table_size%': 2,
463
[email protected]cf78eec2014-06-24 15:54:26464 # The data acquisition mode for CLD2. Possible values are:
465 # static: CLD2 data is statically linked to the executable.
466 # standalone: CLD2 data is provided in a standalone file that is
467 # bundled with the executable.
468 # component: CLD2 data is provided as a Chrome "component" and is
469 # downloaded via the component updater.
[email protected]916748e2014-06-25 12:57:15470 #
471 # For more information on switching the CLD2 data source, see:
472 # https://sites.google.com/a/chromium.org/dev/developers/how-tos/compact-language-detector-cld-data-source-configuration
[email protected]df0c5ef2014-06-26 08:35:01473 'cld2_data_source%': 'static',
[email protected]fb53e652014-04-30 11:27:19474
[email protected]c6ce08072013-07-31 07:48:53475 # Enable spell checker.
476 'enable_spellcheck%': 1,
477
[email protected]dda90ae2011-07-19 22:07:48478 # Webrtc compilation is enabled by default. Set to 0 to disable.
479 'enable_webrtc%': 1,
480
[email protected]cdb756ef2012-04-05 18:34:53481 # Enables use of the session service, which is enabled by default.
482 # Support for disabling depends on the platform.
483 'enable_session_service%': 1,
484
[email protected]6b40bb582012-03-15 20:50:38485 # Enables theme support, which is enabled by default. Support for
486 # disabling depends on the platform.
487 'enable_themes%': 1,
488
[email protected]57e67ac2013-02-22 03:37:22489 # Enables autofill dialog and associated features; disabled by default.
490 'enable_autofill_dialog%' : 0,
491
[email protected]d3340bf512014-05-22 22:27:58492 # Defaults Wallet integration in Autofill dialog to use production
493 # servers. Unofficial builds won't have the proper API keys.
494 'enable_prod_wallet_service%': 0,
495
[email protected]0acdd772012-04-05 22:53:00496 # Enables support for background apps.
497 'enable_background%': 1,
498
[email protected]44879ed2012-04-06 01:11:02499 # Enable the task manager by default.
500 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45501
[email protected]1a43cc572014-03-07 22:36:32502 # Enables used resource whitelist generation; disabled by default.
503 'enable_resource_whitelist_generation%': 0,
504
[email protected]02494ec2014-05-07 15:05:29505 # Enable FILE support by default.
506 'disable_file_support%': 0,
507
[email protected]9bfe0ab2012-08-30 13:18:11508 # Enable FTP support by default.
509 'disable_ftp_support%': 0,
510
[email protected]847aaab82014-05-07 14:05:46511 # Use native android functions in place of ICU. Not supported by most
512 # components.
513 'use_icu_alternatives_on_android%': 0,
514
[email protected]ef4cb642013-09-14 22:48:02515 # XInput2 multitouch support is enabled by default (use_xi2_mt=2).
516 # Setting to zero value disables XI2 MT. When XI2 MT is enabled,
[email protected]22d6dd72012-05-15 07:29:55517 # the input value also defines the required XI2 minor minimum version.
518 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
[email protected]ef4cb642013-09-14 22:48:02519 'use_xi2_mt%': 2,
[email protected]22d6dd72012-05-15 07:29:55520
[email protected]9061bee82012-01-16 11:45:17521 # Use of precompiled headers on Windows.
522 #
[email protected]9061bee82012-01-16 11:45:17523 # This variable may be explicitly set to 1 (enabled) or 0
524 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
525 # This setting will override the default.
526 #
[email protected]c3340fb32012-12-20 20:45:39527 # See
[email protected]9061bee82012-01-16 11:45:17528 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
529 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16530 'chromium_win_pch%': 0,
531
[email protected]3bb37e62012-04-19 03:40:08532 # Set this to true when building with Clang.
533 # See http://code.google.com/p/chromium/wiki/Clang for details.
534 'clang%': 0,
535
[email protected]18e0f39b2012-01-17 16:47:34536 # Enable plug-in installation by default.
537 'enable_plugin_installation%': 1,
538
[email protected]62424a52012-03-18 03:09:50539 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42540 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35541 # Chrome UI.
542 # TODO(asvitkine): Enable this on all platforms and delete this flag.
543 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50544 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35545
[email protected]a9318c72012-03-01 01:29:47546 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
547 # with one of those tools.
548 'build_for_tool%': '',
549
[email protected]37138132013-01-17 23:08:52550 # If no directory is specified then a temporary directory will be used.
551 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47552 # True if isolate should fail if the isolate files refer to files
553 # that are missing.
554 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56555
[email protected]740ebed2012-06-27 19:14:06556 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12557 'wix_path%': '<(DEPTH)/third_party/wix',
558
[email protected]0850e842013-01-19 03:44:31559 # Managed users are enabled by default.
560 'enable_managed_users%': 1,
561
[email protected]1591c44d2013-07-15 13:28:43562 # Platform natively supports discardable memory.
563 'native_discardable_memory%': 0,
564
565 # Platform sends memory pressure signals natively.
566 'native_memory_pressure_signals%': 0,
567
[email protected]9be0a7f2014-05-08 06:05:33568 'data_reduction_fallback_host%' : '',
[email protected]324856d2014-01-14 11:17:30569 'data_reduction_dev_host%' : '',
[email protected]9be0a7f2014-05-08 06:05:33570 'spdy_proxy_auth_origin%' : '',
[email protected]199def22013-02-21 17:52:29571 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25572 'spdy_proxy_auth_value%' : '',
[email protected]d8dd60e2013-10-08 00:49:43573 'data_reduction_proxy_probe_url%' : '',
[email protected]bec6a992014-06-19 01:03:21574 'data_reduction_proxy_warmup_url%' : '',
[email protected]f4b492e92014-05-31 22:19:48575 'data_reduction_proxy_ssl_origin%' : '',
576 'data_reduction_proxy_alt_origin%' : '',
577 'data_reduction_proxy_alt_fallback_origin%' : '',
[email protected]5e131c9f2013-07-10 19:21:05578 'enable_mdns%' : 0,
[email protected]2188c8d2014-03-21 00:58:56579 'enable_service_discovery%': 0,
[email protected]4b202ae2014-05-23 07:45:36580 'enable_wifi_bootstrapping%': 0,
[email protected]754a2002014-02-14 16:40:34581 'enable_hangout_services_extension%': 0,
[email protected]199def22013-02-21 17:52:29582
[email protected]877090c2014-03-19 15:25:54583 # Enable the Syzygy optimization step.
584 'syzygy_optimize%': 0,
585
[email protected]145eacd2014-05-09 23:18:16586 # Enable hole punching for the protected video.
587 'video_hole%': 0,
588
[email protected]3bdb0992014-05-16 21:30:51589 # Automatically select platforms under ozone. Turn this off to
590 # build only explicitly selected platforms.
591 'ozone_auto_platforms%': 1,
592
[email protected]bb6aba32011-01-07 19:04:43593 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34594 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37595 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34596 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37597 }, {
598 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34599 }],
600
[email protected]df9167b2011-11-14 19:15:25601 # A flag for BSD platforms
602 ['OS=="freebsd" or OS=="openbsd"', {
603 'os_bsd%': 1,
604 }, {
605 'os_bsd%': 0,
606 }],
607
[email protected]c329adf82011-10-05 14:34:57608 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42609 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57610 'use_nss%': 1,
611 }, {
612 'use_nss%': 0,
613 }],
[email protected]e0b85a52011-10-06 03:30:42614
[email protected]e1b2d732014-03-28 16:20:32615 # When OpenSSL is used for SSL and crypto on Unix-like systems, use
616 # OpenSSL's certificate definition.
617 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', {
618 'use_openssl_certs%': 1,
619 }, {
620 'use_openssl_certs%': 0,
621 }],
622
[email protected]49513e02013-11-20 08:36:40623 # libudev usage. This currently only affects the content layer.
[email protected]048ab5f2013-11-22 01:42:47624 ['OS=="linux" and embedded==0', {
[email protected]49513e02013-11-20 08:36:40625 'use_udev%': 1,
626 }, {
627 'use_udev%': 0,
628 }],
629
[email protected]c335f4802013-04-06 04:51:21630 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54631 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34632 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37633 }, {
[email protected]c49ab0c2011-05-18 17:25:37634 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34635 }],
[email protected]9a8175892012-03-20 02:11:58636
[email protected]02968b82013-11-14 02:42:43637 # Flags to use glib.
[email protected]559d8f4f2014-04-23 18:28:51638 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]c335f4802013-04-06 04:51:21639 'use_glib%': 0,
640 }, {
641 'use_glib%': 1,
[email protected]02968b82013-11-14 02:42:43642 }],
643
[email protected]928362a2013-11-19 20:17:16644 # Flags to use pango and cairo.
[email protected]02968b82013-11-14 02:42:43645 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
646 'use_pango%': 0,
[email protected]928362a2013-11-19 20:17:16647 'use_cairo%': 0,
[email protected]02968b82013-11-14 02:42:43648 }, {
[email protected]26bade892013-05-23 21:44:15649 'use_pango%': 1,
[email protected]928362a2013-11-19 20:17:16650 'use_cairo%': 1,
[email protected]c335f4802013-04-06 04:51:21651 }],
652
[email protected]61955d92013-11-13 20:44:52653 # DBus usage.
[email protected]02968b82013-11-14 02:42:43654 ['OS=="linux" and embedded==0', {
[email protected]61955d92013-11-13 20:44:52655 'use_dbus%': 1,
656 }, {
657 'use_dbus%': 0,
658 }],
659
[email protected]efadeacf2011-10-27 19:01:00660 # We always use skia text rendering in Aura on Windows, since GDI
661 # doesn't agree with our BackingStore.
662 # TODO(beng): remove once skia text rendering is on by default.
663 ['use_aura==1 and OS=="win"', {
664 'enable_skia_text%': 1,
665 }],
[email protected]9edeb712011-09-20 21:20:33666
[email protected]63692212010-09-16 00:22:21667 # A flag to enable or disable our compile-time dependency
668 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
669 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49670 # for Linux distributions and for Aura.
[email protected]8370a622014-02-19 08:12:29671 ['OS!="linux" or chromeos==1', {
[email protected]63692212010-09-16 00:22:21672 'use_gnome_keyring%': 0,
673 }, {
674 'use_gnome_keyring%': 1,
675 }],
[email protected]0afe5212010-10-01 18:56:11676
[email protected]ce67da1b62014-04-17 19:20:23677 ['OS=="mac" or OS=="ios"', {
678 # Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43679 'use_titlecase_in_grd_files%': 1,
680 }],
681
[email protected]ff9300872014-01-22 11:09:32682 # Enable loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06683 ['chromeos==1', {
[email protected]77a848262013-02-22 11:17:25684 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50685 }, {
[email protected]77a848262013-02-22 11:17:25686 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51687 }],
[email protected]7de46352011-09-12 15:39:19688
[email protected]c79d1972013-02-06 18:47:29689 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01690 'enable_one_click_signin%': 1,
[email protected]b56a9e02014-06-20 09:57:04691 'enable_pre_sync_backup%': 1,
[email protected]e4b66bf2012-05-29 20:39:51692 }],
693
[email protected]da1c8d692011-09-20 20:35:01694 ['OS=="android"', {
[email protected]55e02302012-08-21 00:50:46695 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40696 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06697 'cld_version%': 1,
[email protected]c6ce08072013-07-31 07:48:53698 'enable_spellcheck%': 0,
[email protected]55e02302012-08-21 00:50:46699 'enable_themes%': 0,
[email protected]48de0fc2012-08-02 11:03:58700 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54701 'arm_neon%': 0,
702 'arm_neon_optional%': 1,
[email protected]1591c44d2013-07-15 13:28:43703 'native_discardable_memory%': 1,
704 'native_memory_pressure_signals%': 1,
[email protected]b25f0032013-08-19 22:26:25705 'enable_printing%': 2,
[email protected]25b8cb32014-01-30 11:04:29706 'enable_task_manager%':0,
[email protected]335b6872014-02-13 20:14:13707 # Set to 1 once we have a notification system for Android.
708 # http://crbug.com/115320
709 'notifications%': 0,
[email protected]145eacd2014-05-09 23:18:16710 'video_hole%': 1,
[email protected]b25f0032013-08-19 22:26:25711 }],
[email protected]b25f0032013-08-19 22:26:25712
[email protected]0d841b7d2013-08-20 20:22:22713 # Android OS includes support for proprietary codecs regardless of
714 # building Chromium or Google Chrome. We also ship Google Chrome with
715 # proprietary codecs.
716 ['OS=="android" or branding=="Chrome"', {
717 'proprietary_codecs%': 1,
[email protected]d80a06192013-08-23 23:33:41718 }, {
719 'proprietary_codecs%': 0,
[email protected]0d841b7d2013-08-20 20:22:22720 }],
721
[email protected]85f29582013-12-16 18:02:04722 ['OS=="mac" or OS=="ios"', {
[email protected]cef6c76f2013-10-30 16:33:30723 'native_discardable_memory%': 1,
724 'native_memory_pressure_signals%': 1,
725 }],
726
[email protected]8f5999e2013-08-10 18:27:05727 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
728 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]d3340bf512014-05-22 22:27:58729 'enable_autofill_dialog%': 1,
730
731 'conditions': [
732 ['buildtype=="Official"', {
733 'enable_prod_wallet_service%': 1,
734 }],
735 ]
[email protected]57e67ac2013-02-22 03:37:22736 }],
737
[email protected]f96d63b2014-04-01 19:22:44738 ['OS=="android"', {
[email protected]118347052013-01-12 08:35:43739 'enable_webrtc%': 1,
740 }],
741
[email protected]0d16f292012-07-02 22:10:48742 ['OS=="ios"', {
[email protected]9bfe0ab2012-08-30 13:18:11743 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24744 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40745 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06746 'cld_version%': 1,
[email protected]c4ac4d12012-09-12 12:02:24747 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44748 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24749 'enable_themes%': 0,
750 'enable_webrtc%': 0,
751 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48752 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44753 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31754 'enable_managed_users%': 0,
[email protected]25b8cb32014-01-30 11:04:29755 'enable_task_manager%': 0,
[email protected]0d16f292012-07-02 22:10:48756 }],
757
[email protected]839d5172011-10-13 17:18:11758 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27759 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01760 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33761 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11762 }, {
[email protected]1ee7c56c2011-10-19 14:51:33763 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11764 }],
[email protected]9061bee82012-01-16 11:45:17765
[email protected]c3340fb32012-12-20 20:45:39766 # Turn precompiled headers on by default.
767 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17768 'chromium_win_pch%': 1
769 }],
[email protected]18e0f39b2012-01-17 16:47:34770
[email protected]321dd1b2014-06-02 21:51:04771 ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', {
[email protected]18e0f39b2012-01-17 16:47:34772 'enable_plugin_installation%': 0,
773 }, {
774 'enable_plugin_installation%': 1,
775 }],
[email protected]b07806c12012-02-03 22:44:59776
[email protected]50d3c4a42014-04-22 08:29:14777 # Whether PPAPI is enabled.
[email protected]693f63c2014-01-17 06:52:19778 ['OS=="android" or OS=="ios" or embedded==1', {
[email protected]6d17f6392012-12-05 05:24:54779 'enable_plugins%': 0,
780 }, {
781 'enable_plugins%': 1,
782 }],
783
[email protected]f0a58322014-04-16 09:50:23784 # linux_use_bundled_gold: whether to use the gold linker binary checked
785 # into third_party/binutils. Force this off via GYP_DEFINES when you
786 # are using a custom toolchain and need to control -B in ldflags.
[email protected]ac296392014-04-29 01:22:10787 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
788 # for component=static_library builds.
[email protected]1e8e7b92013-03-15 07:27:56789 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]f0a58322014-04-16 09:50:23790 'linux_use_bundled_gold%': 1,
[email protected]be239492012-02-09 19:00:17791 }, {
[email protected]f0a58322014-04-16 09:50:23792 'linux_use_bundled_gold%': 0,
793 }],
794
795 # linux_use_bundled_binutils: whether to use the binary binutils
796 # checked into third_party/binutils. These are not multi-arch so cannot
797 # be used except on x86 and x86-64 (the only two architectures which
798 # are currently checke in). Force this off via GYP_DEFINES when you
799 # are using a custom toolchain and need to control -B in cflags.
800 ['OS=="linux" and (target_arch=="x64")', {
801 'linux_use_bundled_binutils%': 1,
802 }, {
803 'linux_use_bundled_binutils%': 0,
[email protected]d1d90a42013-03-26 12:01:34804 }],
805
806 # linux_use_gold_flags: whether to use build flags that rely on gold.
[email protected]fd6d17c2014-04-29 22:01:49807 # On by default for x64 Linux.
808 ['OS=="linux" and target_arch=="x64"', {
[email protected]d1d90a42013-03-26 12:01:34809 'linux_use_gold_flags%': 1,
810 }, {
[email protected]8d726a42012-02-09 03:49:00811 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59812 }],
[email protected]2e22e2f2012-03-15 21:53:10813
[email protected]9dbbabd2014-04-30 23:42:32814 # linux_use_debug_fission: whether to use split DWARF debug info
815 # files. This can reduce link time significantly, but is incompatible
816 # with some utilities such as icecc and ccache. Requires gold and
817 # gcc >= 4.8 or clang.
818 # http://gcc.gnu.org/wiki/DebugFission
819 ['OS=="linux" and target_arch=="x64"', {
820 'linux_use_debug_fission%': 1,
821 }, {
822 'linux_use_debug_fission%': 0,
823 }],
824
[email protected]a95d5302012-11-03 00:02:19825 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32826 'enable_captive_portal_detection%': 0,
827 }, {
828 'enable_captive_portal_detection%': 1,
829 }],
830
[email protected]3bd47e022012-03-22 04:19:12831 # Enable Skia UI text drawing incrementally on different platforms.
832 # http://crbug.com/105550
833 #
834 # On Aura, this allows per-tile painting to be used in the browser
835 # compositor.
[email protected]04b67b62013-09-14 01:32:17836 ['OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12837 'use_canvas_skia%': 1,
838 }],
[email protected]adb44342012-07-23 13:36:12839
[email protected]0753ea42012-08-30 20:15:44840 ['chromeos==1', {
841 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
842 'use_libjpeg_turbo%': 0,
843 }],
844
[email protected]adb44342012-07-23 13:36:12845 ['OS=="android"', {
846 # When building as part of the Android system, use system libraries
847 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36848 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12849 }],
[email protected]8a46f5f2012-12-05 00:47:12850
[email protected]5be161f2013-06-18 11:09:33851 # Do not enable the Settings App on ChromeOS.
852 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12853 'enable_settings_app%': 1,
854 }, {
855 'enable_settings_app%': 0,
856 }],
[email protected]94cdbf42012-12-11 19:49:22857
858 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
859 # Set some defaults for arm/linux chrome builds
[email protected]2fa89ef2014-05-07 18:45:59860 'use_allocator%': 'none',
[email protected]84b00d12f2012-12-14 01:53:43861 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22862 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43863 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22864 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46865
[email protected]42972b62013-08-28 05:46:42866 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
[email protected]e2aaaac2013-05-08 07:20:09867 'conditions': [
868 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43869 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09870 }],
871 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43872 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09873 }],
874 ],
[email protected]42972b62013-08-28 05:46:42875 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e2aaaac2013-05-08 07:20:09876
[email protected]59e85f472013-06-28 18:20:44877 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07878 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28879 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46880 }],
[email protected]5b38a522013-03-20 17:00:47881
882 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01883 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47884 # e.g. base_unittests_run runs the target base_unittests. The test
[email protected]10d8ac32013-10-31 13:34:31885 # target always calls tools/swarming_client/isolate.py. See the script's
[email protected]5b38a522013-03-20 17:00:47886 # --help for more information and the valid --mode values. Meant to be
887 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01888 # TODO(maruel): Remove the conditions as more configurations are
889 # supported.
890 # NOTE: The check for disable_nacl==0 and component=="static_library"
891 # can't be used here because these variables are not defined yet, but it
892 # is still not supported.
[email protected]e51e35652013-12-19 02:39:08893 ['OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47894 'test_isolation_mode%': 'check',
895 }, {
896 'test_isolation_mode%': 'noop',
897 }],
[email protected]9d5cb982014-06-24 23:37:20898 # Whether Android build uses OpenMAX DL FFT.
899 ['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")', {
900 # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel.
[email protected]353fa4a2014-05-02 17:36:22901 # When enabled, this will also enable WebAudio support on
[email protected]9d5cb982014-06-24 23:37:20902 # Android for these architectures. Default is enabled. Whether
[email protected]353fa4a2014-05-02 17:36:22903 # WebAudio is actually available depends on runtime settings
904 # and flags.
[email protected]330f3a32013-04-23 05:47:58905 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53906 }, {
907 'use_openmax_dl_fft%': 0,
908 }],
[email protected]5e131c9f2013-07-10 19:21:05909 ['OS=="win" or OS=="linux"', {
910 'enable_mdns%' : 1,
[email protected]2abbc1a2013-08-07 22:09:06911 }],
912
913 # Turns on compiler optimizations in V8 in Debug build, except
914 # on android_clang, where we're hitting a weird linker error.
915 # TODO(dpranke): http://crbug.com/266155 .
916 ['OS=="android"', {
[email protected]6268e01b42013-10-19 22:44:19917 'v8_optimized_debug%': 1,
[email protected]2abbc1a2013-08-07 22:09:06918 }, {
[email protected]6268e01b42013-10-19 22:44:19919 'v8_optimized_debug%': 2,
[email protected]2abbc1a2013-08-07 22:09:06920 }],
[email protected]02968b82013-11-14 02:42:43921
922 # Disable various features by default on embedded.
923 ['embedded==1', {
924 'remoting%': 0,
925 'enable_printing%': 0,
926 }],
[email protected]b390dd7d2014-03-20 14:49:41927
[email protected]7ef66c62014-03-20 18:20:00928 # By default, use ICU data file (icudtl.dat) on all platforms
929 # except when building Android WebView.
930 # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium).
[email protected]7cd31432014-05-10 12:16:52931 # Set the data reduction proxy origin for Android Webview.
[email protected]7ef66c62014-03-20 18:20:00932 ['android_webview_build==0', {
933 'icu_use_data_file_flag%' : 1,
[email protected]7cd31432014-05-10 12:16:52934 'spdy_proxy_auth_origin%': '',
935 'data_reduction_proxy_probe_url%': '',
[email protected]bec6a992014-06-19 01:03:21936 'data_reduction_proxy_warmup_url%': '',
[email protected]7cd31432014-05-10 12:16:52937 'data_reduction_dev_host%': '',
938 'data_reduction_fallback_host%': '',
[email protected]7ef66c62014-03-20 18:20:00939 }, {
940 'icu_use_data_file_flag%' : 0,
[email protected]7cd31432014-05-10 12:16:52941 'spdy_proxy_auth_origin%': 'https://proxy.googlezip.net:443/',
942 'data_reduction_proxy_probe_url%': 'http://check.googlezip.net/connect',
[email protected]bec6a992014-06-19 01:03:21943 'data_reduction_proxy_warmup_url%': 'http://www.gstatic.com/generate_204',
[email protected]7cd31432014-05-10 12:16:52944 'data_reduction_dev_host%': 'http://proxy-dev.googlezip.net:80/',
945 'data_reduction_fallback_host%': 'http://compress.googlezip.net:80/',
[email protected]7ef66c62014-03-20 18:20:00946 }],
[email protected]4b202ae2014-05-23 07:45:36947 ['OS=="win" or OS=="mac"', {
948 'enable_wifi_bootstrapping%' : 1,
949 }],
[email protected]b3f23ba2010-04-26 22:58:17950 ],
[email protected]2b113652012-09-17 17:01:39951
[email protected]a3a720f2013-04-25 19:35:42952 # Set this to 1 to enable use of concatenated impulse responses
953 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26954 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42955
[email protected]f2817cf2013-05-16 11:39:54956 # You can set the variable 'use_official_google_api_keys' to 1
957 # to use the Google-internal file containing official API keys
958 # for Google Chrome even in a developer build. Setting this
959 # variable explicitly to 1 will cause your build to fail if the
960 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39961 #
[email protected]f2817cf2013-05-16 11:39:54962 # The variable is documented here, but not handled in this file;
963 # see //google_apis/determine_use_official_keys.gypi for the
964 # implementation.
[email protected]2b113652012-09-17 17:01:39965 #
[email protected]f2817cf2013-05-16 11:39:54966 # Set the variable to 0 to not use the internal file, even when
967 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39968 #
[email protected]f2817cf2013-05-16 11:39:54969 # Leave it unset in your include.gypi to have the variable
970 # implicitly set to 1 if you have
971 # src/google_apis/internal/google_chrome_api_keys.h in your
972 # checkout, and implicitly set to 0 if not.
973 #
974 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39975 # was explicitly set to 1, i.e. they always use official keys,
976 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54977 #
978 # NOTE: You MUST NOT explicitly set the variable to 2 in your
979 # include.gypi or by other means. Due to subtleties of GYP, this
980 # is not the same as leaving the variable unset, even though its
981 # default value in
982 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39983
984 # Set these to bake the specified API keys and OAuth client
985 # IDs/secrets into your build.
986 #
987 # If you create a build without values baked in, you can instead
988 # set environment variables to provide the keys at runtime (see
989 # src/google_apis/google_api_keys.h for details). Features that
990 # require server-side APIs may fail to work if no keys are
991 # provided.
992 #
993 # Note that if you are building an official build or if
994 # use_official_google_api_keys has been set to 1 (explicitly or
995 # implicitly), these values will be ignored and the official
996 # keys will be used instead.
997 'google_api_key%': '',
998 'google_default_client_id%': '',
999 'google_default_client_secret%': '',
[email protected]d33d2222014-06-04 15:39:581000 # Native Client is enabled by default.
1001 'disable_nacl%': '0',
[email protected]e14a9f92009-08-05 19:26:071002 },
1003
[email protected]e72e55b2011-01-06 22:19:301004 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:071005 'branding%': '<(branding)',
1006 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:271007 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:351008 'target_subarch%': '<(target_subarch)',
[email protected]cf185b32010-01-12 04:29:591009 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:441010 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:331011 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:581012 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:161013 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:311014 'use_cras%': '<(use_cras)',
[email protected]e0b85a52011-10-06 03:30:421015 'use_openssl%': '<(use_openssl)',
[email protected]e1b2d732014-03-28 16:20:321016 'use_openssl_certs%': '<(use_openssl_certs)',
[email protected]c329adf82011-10-05 14:34:571017 'use_nss%': '<(use_nss)',
[email protected]49513e02013-11-20 08:36:401018 'use_udev%': '<(use_udev)',
[email protected]df9167b2011-11-14 19:15:251019 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:341020 'os_posix%': '<(os_posix)',
[email protected]61955d92013-11-13 20:44:521021 'use_dbus%': '<(use_dbus)',
[email protected]258dca42011-09-21 00:17:191022 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:151023 'use_pango%': '<(use_pango)',
[email protected]928362a2013-11-19 20:17:161024 'use_cairo%': '<(use_cairo)',
[email protected]ff78e4e2013-05-03 19:19:151025 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:481026 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:501027 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]5be60002014-01-13 21:27:421028 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]d628ab412013-09-07 03:26:371029 'desktop_linux%': '<(desktop_linux)',
[email protected]79e2336c2011-05-12 18:18:341030 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:211031 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:111032 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:441033 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:051034 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:241035 'enable_hidpi%': '<(enable_hidpi)',
[email protected]f56797b2011-09-25 00:04:351036 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]77a848262013-02-22 11:17:251037 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:541038 'fastbuild%': '<(fastbuild)',
[email protected]19677402014-06-18 13:10:041039 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)',
[email protected]c73363762014-04-16 21:11:461040 'win_z7%': '<(win_z7)',
[email protected]20960e072011-09-20 20:59:011041 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a1e87422013-07-09 21:47:011042 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]7d6763422013-04-26 12:06:541043 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:431044 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:541045 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:231046 'sysroot%': '<(sysroot)',
[email protected]a23d7142014-02-14 16:58:451047 'chroot_cmd%': '<(chroot_cmd)',
[email protected]945361a2011-09-30 04:38:431048 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:521049 'component%': '<(component)',
[email protected]1a43cc572014-03-07 22:36:321050 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)',
[email protected]bb6aba32011-01-07 19:04:431051 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:171052 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:181053 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:401054 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]b56a9e02014-06-20 09:57:041055 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)',
[email protected]dda90ae2011-07-19 22:07:481056 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:161057 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:251058 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:561059 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:221060 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:571061 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:461062 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:371063 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:061064 'asan%': '<(asan)',
[email protected]20a127f2014-01-16 03:25:031065 'asan_coverage%': '<(asan_coverage)',
[email protected]1b9654122014-04-28 12:11:151066 'use_sanitizer_options%': '<(use_sanitizer_options)',
[email protected]1612e552014-02-15 04:49:181067 'syzyasan%': '<(syzyasan)',
[email protected]877090c2014-03-19 15:25:541068 'syzygy_optimize%': '<(syzygy_optimize)',
[email protected]062522a2013-06-13 15:49:551069 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:591070 'msan%': '<(msan)',
[email protected]190d4ce62014-01-17 20:24:531071 'msan_blacklist%': '<(msan_blacklist)',
[email protected]a030ab62014-06-23 17:14:151072 'msan_track_origins%': '<(msan_track_origins)',
[email protected]c9a829272012-07-04 07:51:121073 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:161074 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7fd639a2014-05-30 23:59:011075 'ubsan%': '<(ubsan)',
[email protected]0dbe7af92014-06-26 23:31:401076 'ubsan_vptr%': '<(ubsan_vptr)',
1077 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)',
[email protected]c8103a42013-11-12 13:41:301078 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
[email protected]22b3f531e2013-12-20 13:07:281079 'use_custom_libcxx%': '<(use_custom_libcxx)',
[email protected]7ce58b22012-09-26 05:17:251080 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:441081 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:461082 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:341083 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:341084 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:541085 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:531086 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:381087 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:221088 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]d3340bf512014-05-22 22:27:581089 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)',
[email protected]0acdd772012-04-05 22:53:001090 'enable_background%': '<(enable_background)',
[email protected]f0a58322014-04-16 09:50:231091 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)',
1092 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)',
[email protected]8d726a42012-02-09 03:49:001093 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9dbbabd2014-04-30 23:42:321094 'linux_use_debug_fission%': '<(linux_use_debug_fission)',
[email protected]62424a52012-03-18 03:09:501095 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:331096 'test_isolation_mode%': '<(test_isolation_mode)',
1097 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:471098 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]658677f2012-06-09 06:04:021099 'enable_printing%': '<(enable_printing)',
[email protected]75280ad22014-05-20 22:02:251100 'win_pdf_metafile_for_printing%': '<(win_pdf_metafile_for_printing)',
[email protected]c6ce08072013-07-31 07:48:531101 'enable_spellcheck%': '<(enable_spellcheck)',
[email protected]6ee43a72012-12-07 22:44:401102 'enable_google_now%': '<(enable_google_now)',
[email protected]3b5e88d2013-09-06 11:03:061103 'cld_version%': '<(cld_version)',
[email protected]61753f22014-03-19 12:10:591104 'cld2_table_size%': '<(cld2_table_size)',
[email protected]cf78eec2014-06-24 15:54:261105 'cld2_data_source%': '<(cld2_data_source)',
[email protected]e6026962012-06-14 21:28:321106 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]02494ec2014-05-07 15:05:291107 'disable_file_support%': '<(disable_file_support)',
[email protected]9bfe0ab2012-08-30 13:18:111108 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]847aaab82014-05-07 14:05:461109 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)',
[email protected]44879ed2012-04-06 01:11:021110 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:061111 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:121112 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:441113 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:121114 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:361115 'android_webview_build%': '<(android_webview_build)',
[email protected]7ef66c62014-03-20 18:20:001116 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)',
[email protected]5660f192013-04-02 16:55:461117 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:071118 'create_standalone_apk%': 1,
[email protected]dc4e8b82012-11-15 03:58:161119 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:071120 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:161121 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:391122 'google_api_key%': '<(google_api_key)',
1123 'google_default_client_id%': '<(google_default_client_id)',
1124 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:311125 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:431126 'native_discardable_memory%': '<(native_discardable_memory)',
1127 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]3f0ed2172013-11-04 20:27:291128 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)',
[email protected]324856d2014-01-14 11:17:301129 'data_reduction_dev_host%': '<(data_reduction_dev_host)',
[email protected]199def22013-02-21 17:52:291130 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
1131 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:251132 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]d8dd60e2013-10-08 00:49:431133 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)',
[email protected]bec6a992014-06-19 01:03:211134 'data_reduction_proxy_warmup_url%': '<(data_reduction_proxy_warmup_url)',
[email protected]f4b492e92014-05-31 22:19:481135 'data_reduction_proxy_ssl_origin%' : '<(data_reduction_proxy_ssl_origin)',
1136 'data_reduction_proxy_alt_origin%' : '<(data_reduction_proxy_alt_origin)',
1137 'data_reduction_proxy_alt_fallback_origin%' : '<(data_reduction_proxy_alt_fallback_origin)',
[email protected]5e131c9f2013-07-10 19:21:051138 'enable_mdns%' : '<(enable_mdns)',
[email protected]2188c8d2014-03-21 00:58:561139 'enable_service_discovery%' : '<(enable_service_discovery)',
[email protected]4b202ae2014-05-23 07:45:361140 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)',
[email protected]754a2002014-02-14 16:40:341141 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)',
[email protected]6268e01b42013-10-19 22:44:191142 'v8_optimized_debug%': '<(v8_optimized_debug)',
[email protected]d80a06192013-08-23 23:33:411143 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]e71a3622013-12-04 07:32:411144 'use_goma%': '<(use_goma)',
1145 'gomadir%': '<(gomadir)',
[email protected]145eacd2014-05-09 23:18:161146 'video_hole%': '<(video_hole)',
[email protected]01971642012-03-07 14:39:561147
[email protected]2f325672012-10-31 23:29:371148 # Use system protobuf instead of bundled one.
1149 'use_system_protobuf%': 0,
1150
[email protected]371e1092011-10-12 20:37:361151 # Use system yasm instead of bundled one.
1152 'use_system_yasm%': 0,
1153
[email protected]ea02e962013-04-26 11:18:161154 # Use system ICU instead of bundled one.
1155 'use_system_icu%' : 0,
1156
[email protected]cd00bd862012-02-29 00:40:361157 # Default to enabled PIE; this is important for ASLR but we may need to be
1158 # able to turn it off for various reasons.
1159 'linux_disable_pie%': 0,
1160
[email protected]caa95c82009-11-23 22:39:321161 # The release channel that this build targets. This is used to restrict
1162 # channel-specific build options, like which installer packages to create.
1163 # The default is 'all', which does no channel-specific filtering.
1164 'channel%': 'all',
1165
[email protected]b3fb8092009-03-12 19:09:241166 # Override chromium_mac_pch and set it to 0 to suppress the use of
1167 # precompiled headers on the Mac. Prefix header injection may still be
1168 # used, but prefix headers will not be precompiled. This is useful when
1169 # using distcc to distribute a build to compile slaves that don't
1170 # share the same compiler executable as the system driving the compilation,
1171 # because precompiled headers rely on pointers into a specific compiler
1172 # executable's image. Setting this to 0 is needed to use an experimental
1173 # Linux-Mac cross compiler distcc farm.
1174 'chromium_mac_pch%': 1,
1175
[email protected]27b687ec42012-03-26 22:22:151176 # The default value for mac_strip in target_defaults. This cannot be
1177 # set there, per the comment about variable% in a target_defaults.
[email protected]70d0f782013-11-14 06:22:291178 'mac_strip_release%': 0,
[email protected]27b687ec42012-03-26 22:22:151179
[email protected]c0a12772013-08-22 00:08:311180 # Set to 1 to enable java code coverage. Instruments classes during build
1181 # to produce .ec files during runtime.
1182 'emma_coverage%': 0,
1183
[email protected]9662d922013-10-04 22:02:441184 # EMMA filter string consisting of a list of inclusion/exclusion patterns
1185 # separated with whitespace and/or comma. Only has effect if
1186 # 'emma_coverage=1'.
1187 'emma_filter%': '',
1188
[email protected]22860352013-12-11 03:02:101189 # Set to 1 to enable running Android lint on java/class files.
[email protected]2219b752014-01-10 22:42:571190 'android_lint%': 0,
[email protected]22860352013-12-11 03:02:101191
[email protected]7477ea6f2009-12-22 23:28:151192 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:471193 # environment variable, the libcmt shim it uses sometimes gets in
1194 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
1195 # 'win_use_allocator_shim': 0,
1196 # 'win_release_RuntimeLibrary': 2
1197 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:521198 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:111199
[email protected]e5b2eaa2009-04-14 01:39:121200 # TODO(bradnelson): eliminate this when possible.
1201 # To allow local gyp files to prevent release.vsprops from being included.
1202 # Yes(1) means include release.vsprops.
1203 # Once all vsprops settings are migrated into gyp, this can go away.
1204 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:231205
[email protected]cbd5fd52009-08-26 00:14:271206 # TODO(bradnelson): eliminate this when possible.
1207 # To allow local gyp files to override additional linker options for msvs.
1208 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:191209 'msvs_use_common_linker_extras%': 1,
1210
[email protected]1ffb6502009-06-02 07:46:241211 # TODO(sgk): eliminate this if possible.
1212 # It would be nicer to support this via a setting in 'target_defaults'
1213 # in chrome/app/locales/locales.gypi overriding the setting in the
1214 # 'Debug' configuration in the 'target_defaults' dict below,
1215 # but that doesn't work as we'd like.
1216 'msvs_debug_link_incremental%': '2',
1217
[email protected]1f790ef2011-01-11 20:45:361218 # Needed for some of the largest modules.
1219 'msvs_debug_link_nonincremental%': '1',
1220
[email protected]6f390be2012-08-16 18:57:101221 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:061222 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:261223 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:061224
[email protected]1ff64292013-07-18 20:37:151225 # Experimental setting to break chrome.dll into multiple pieces based on
1226 # process type.
1227 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:021228
[email protected]72589062014-03-14 16:48:301229 # Experimental setting to optimize Chrome's DLLs with PGO.
1230 'chrome_pgo_phase%': '0',
1231
[email protected]c54b41cb2012-08-24 20:58:241232 # The default settings for third party code for treating
1233 # warnings-as-errors. Ideally, this would not be required, however there
1234 # is some third party code that takes a long time to fix/roll. So, this
1235 # flag allows us to have warnings as errors in general to prevent
1236 # regressions in most modules, while working on the bits that are
1237 # remaining.
[email protected]9a5bb052014-04-17 16:50:561238 'win_third_party_warn_as_error%': 'true',
[email protected]c54b41cb2012-08-24 20:58:241239
[email protected]3bb37e62012-04-19 03:40:081240 # Clang stuff.
1241 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:241242 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:151243
[email protected]d04384ab2014-03-13 20:46:011244 # Control which version of clang to use when building for iOS. If set to
1245 # '1', uses the version of clang that ships with Xcode. If set to '0', uses
1246 # the version of clang that ships with the Chromium source. This variable
1247 # is automatically set to '1' when using the Xcode generator.
[email protected]ce2cad72014-02-13 18:17:351248 'clang_xcode%': 0,
1249
[email protected]5e781232011-01-28 02:57:591250 # These two variables can be set in GYP_DEFINES while running
1251 # |gclient runhooks| to let clang run a plugin in every compilation.
1252 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1253 # Example:
[email protected]93120fe2011-02-03 20:46:421254 # 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:591255
1256 'clang_load%': '',
1257 'clang_add_plugin%': '',
1258
[email protected]c9cc9442013-12-28 21:27:441259 # Tell ld64 to write map files describing binary layout. Useful
1260 # for looking at what contributes to binary size, e.g. with
1261 # https://github.com/nico/bloat
1262 'mac_write_linker_maps%': 0,
1263
[email protected]da1c8d692011-09-20 20:35:011264 # The default type of gtest.
1265 'gtest_target_type%': 'executable',
1266
[email protected]7664ab32011-02-01 23:35:251267 # Enable sampling based profiler.
1268 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1269 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:581270 # Profile without optimizing out stack frames when profiling==1.
1271 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:251272
[email protected]36532f332010-08-25 00:22:011273 # And if we want to dump symbols for Breakpad-enabled builds.
[email protected]8ebfecb2013-11-14 05:30:311274 'linux_dump_symbols%': 0,
[email protected]36532f332010-08-25 00:22:011275 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:031276 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:491277 # Strip the test binaries needed for Linux reliability tests.
1278 'linux_strip_reliability_tests%': 0,
[email protected]2578ea12014-01-17 06:02:511279 # If we want stack unwind support for backtrace().
1280 'debug_unwind_tables%': 1,
1281 'release_unwind_tables%': 1,
[email protected]05cb6962009-10-01 23:29:031282
[email protected]8d949f1a02014-04-10 14:01:571283 # Override where to find binutils
1284 'binutils_version%': 0,
1285 'binutils_dir%': '',
1286
[email protected]46ce5b562010-06-16 18:39:531287 # Enable TCMalloc.
[email protected]2fa89ef2014-05-07 18:45:591288 # Default of 'use_allocator' is set to 'none' if OS=='android' later.
1289 'use_allocator%': 'tcmalloc',
[email protected]01699e22009-11-11 19:24:241290
[email protected]556c5d72010-06-10 05:45:011291 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1292 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:351293 # Set to 1 to link against gsettings APIs instead of using dlopen().
1294 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:011295
[email protected]23eea4a42013-04-27 04:10:261296 # Default arch variant for MIPS.
[email protected]63c82782014-02-02 16:10:281297 'mips_arch_variant%': 'mips32r1',
[email protected]23eea4a42013-04-27 04:10:261298
[email protected]a63e8d22013-03-23 16:17:081299 # Enable use of OpenMAX DL FFT routines.
1300 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341301
[email protected]9821d0d2010-04-16 22:40:371302 # Enable new NPDevice API.
1303 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501304
1305 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:141306 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:501307
[email protected]e72e55b2011-01-06 22:19:301308 # .gyp files or targets should set chromium_code to 1 if they build
1309 # Chromium-specific code, as opposed to external code. This variable is
1310 # used to control such things as the set of warnings to enable, and
1311 # whether warnings are treated as errors.
1312 'chromium_code%': 0,
1313
[email protected]41300ff2014-04-07 08:17:251314 # Disable fatal linker warnings, similarly to how we make it possible
1315 # to disable -Werror (e.g. for different toolchain versions).
1316 'disable_fatal_linker_warnings%': 0,
1317
[email protected]8d726a42012-02-09 03:49:001318 'release_valgrind_build%': 0,
1319
[email protected]b1eb341c2011-11-09 18:46:071320 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1321 'enable_wexit_time_destructors%': 0,
1322
[email protected]d69acbc2014-02-10 21:14:461323 # Build libpeerconnection as a static library by default.
1324 'libpeer_target_type%': 'static_library',
1325
[email protected]9e1149d72012-07-24 01:27:171326 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1327 'internal_gles2_conform_tests%': 0,
1328
[email protected]5c18edd2013-11-19 22:04:111329 # Set to 1 to compile the filter fuzzer.
1330 'internal_filter_fuzzer%': 0,
1331
[email protected]e72e55b2011-01-06 22:19:301332 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1333 # so Cocoa is happy (http://crbug.com/20441).
1334 'locales': [
1335 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1336 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1337 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411338 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301339 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1340 'vi', 'zh-CN', 'zh-TW',
1341 ],
1342
[email protected]cc0322d2011-07-24 09:29:191343 # Pseudo locales are special locales which are used for testing and
1344 # debugging. They don't get copied to the final app. For more info,
1345 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1346 'pseudo_locales': [
1347 'fake-bidi',
1348 ],
1349
[email protected]bb6aba32011-01-07 19:04:431350 'grit_defines': [],
1351
[email protected]bd3bd442011-03-28 07:58:511352 # If debug_devtools is set to 1, JavaScript files for DevTools are
1353 # stored as is and loaded from disk. Otherwise, a concatenated file
1354 # is stored in resources.pak. It is still possible to load JS files
1355 # from disk by passing --debug-devtools cmdline switch.
1356 'debug_devtools%': 0,
1357
[email protected]464750f2011-10-24 23:16:181358 # The Java Bridge is not compiled in by default.
1359 'java_bridge%': 0,
1360
[email protected]1e013672012-06-29 22:12:201361 # Code signing for iOS binaries. The bots need to be able to disable this.
1362 'chromium_ios_signing%': 1,
1363
[email protected]33e1c372011-12-14 16:32:071364 # This flag is only used when disable_nacl==0 and disables all those
1365 # subcomponents which would require the installation of a native_client
1366 # untrusted toolchain.
1367 'disable_nacl_untrusted%': 0,
1368
[email protected]407dfa632011-12-23 11:59:351369 # Disable Dart by default.
1370 'enable_dart%': 0,
1371
[email protected]d33d2222014-06-04 15:39:581372 # Copy out the setting of disable_nacl.
1373 'disable_nacl%': '<(disable_nacl)',
[email protected]836285f22012-04-03 16:19:261374
[email protected]1e40ba002013-03-07 22:07:331375 # Portable Native Client is enabled by default.
1376 'disable_pnacl%': 0,
1377
[email protected]fa9d4e262012-08-21 04:39:001378 # Whether to build full debug version for Debug configuration on Android.
1379 # Compared to full debug version, the default Debug configuration on Android
1380 # has no full v8 debug, has size optimization and linker gc section, so that
1381 # we can build a debug version with acceptable size and performance.
1382 'android_full_debug%': 0,
1383
[email protected]65885272012-10-05 23:55:501384 # Sets the default version name and code for Android app, by default we
1385 # do a developer build.
1386 'android_app_version_name%': 'Developer Build',
1387 'android_app_version_code%': 0,
1388
[email protected]014d1ff12013-07-02 01:52:331389 # Contains data about the attached devices for gyp_managed_install.
1390 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1391
[email protected]dd0ef2f2014-04-16 21:52:491392 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")',
1393 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")',
[email protected]49ae3e52012-04-12 09:50:121394
[email protected]1f8d9402012-07-06 22:47:561395 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1396 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051397
[email protected]fd6d8822012-12-08 06:56:111398 # Whether we are using the rlz library or not. Platforms like Android send
1399 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221400 'enable_rlz%': 0,
1401
[email protected]3b4038e2013-07-28 08:59:541402 # Turns on the i18n support in V8.
1403 'v8_enable_i18n_support': 1,
1404
[email protected]6a694912014-01-17 14:17:401405 # Compile d8 for the host toolset.
1406 'v8_toolset_for_d8': 'host',
1407
[email protected]b64e5212014-04-04 21:09:161408 # Compiles v8 without its platform library.
1409 'v8_use_default_platform': 0,
1410
[email protected]d98df122013-08-12 13:56:431411 # Use the chromium skia by default.
1412 'use_system_skia%': '0',
1413
[email protected]2c14260f2013-09-11 11:48:221414 # Use brlapi from brltty for braille display support.
1415 'use_brlapi%': 0,
1416
[email protected]c66b5aa2013-09-12 13:29:411417 # Relative path to icu.gyp from this file.
1418 'icu_gyp_path': '../third_party/icu/icu.gyp',
1419
[email protected]8c64e282013-11-28 16:05:141420 # IPC fuzzer is disabled by default.
1421 'enable_ipc_fuzzer%': 0,
1422
[email protected]f35bcea82013-12-04 04:37:061423
[email protected]1eec679e2013-12-13 22:10:271424 # Force disable libstdc++ debug mode.
1425 'disable_glibcxx_debug%': 0,
1426
[email protected]8063669f2014-04-01 01:50:291427 # Set to 1 to compile with MSE support for MPEG2 TS
1428 'enable_mpeg2ts_stream_parser%': 0,
1429
[email protected]ec13bd72014-04-16 19:04:301430 # Support ChromeOS touchpad gestures with ozone.
1431 'use_evdev_gestures%': 0,
1432
[email protected]3bdb0992014-05-16 21:30:511433 # Default ozone platform (if no --ozone-platform flag).
1434 'ozone_platform%': "",
1435
1436 # Ozone platforms to include in the build.
1437 'ozone_platform_caca%': 0,
1438 'ozone_platform_dri%': 0,
1439 'ozone_platform_egltest%': 0,
[email protected]26ce20d52014-05-29 17:22:501440 'ozone_platform_gbm%': 0,
[email protected]3bdb0992014-05-16 21:30:511441 'ozone_platform_ozonex%': 0,
1442 'ozone_platform_test%': 0,
1443
[email protected]54d5b0652014-05-22 08:52:051444 # Chrome OS: whether to build ChromeVox from sources in the Chromium
1445 # repository rather than using precompiled JavaScript in
1446 # chrome/third_party/chromevox. This is still experimental.
[email protected]d7a6ba72014-06-26 18:00:551447 'use_migrated_chromevox%': 1,
[email protected]54d5b0652014-05-22 08:52:051448
[email protected]b3819c2e2014-05-18 14:13:071449 # Chrome OS: whether to also build the upcoming version of
1450 # ChromeVox, which can then be enabled via a command-line switch.
1451 'use_chromevox_next%': 0,
1452
[email protected]912c55c2009-07-31 23:33:551453 'conditions': [
[email protected]877090c2014-03-19 15:25:541454 # Enable the Syzygy optimization step for the official builds.
1455 ['OS=="win" and buildtype=="Official" and syzyasan!=1', {
1456 'syzygy_optimize%': 1,
1457 }, {
1458 'syzygy_optimize%': 0,
1459 }],
[email protected]9c233692014-04-09 20:20:451460 # Get binutils version so we can enable debug fission if we can.
1461 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1462 'conditions': [
1463 # compiler_version doesn't work with clang
1464 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so
1465 # compiler_version works with clang.
1466 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1467 # that it takes effect here.
[email protected]0dbe7af92014-06-26 23:31:401468 ['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:161469 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)',
[email protected]9c233692014-04-09 20:20:451470 }],
1471 # On Android we know the binutils version in the toolchain.
1472 ['OS=="android"', {
1473 'binutils_version%': 222,
1474 }],
[email protected]f0a58322014-04-16 09:50:231475 ['host_arch=="x64"', {
1476 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1477 }],
1478 ['host_arch=="ia32"', {
1479 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
1480 }],
[email protected]9c233692014-04-09 20:20:451481 # Our version of binutils in third_party/binutils
[email protected]f0a58322014-04-16 09:50:231482 ['linux_use_bundled_binutils==1', {
[email protected]9c233692014-04-09 20:20:451483 'binutils_version%': 224,
[email protected]9c233692014-04-09 20:20:451484 }],
1485 ],
1486 }, {
1487 'binutils_version%': 0,
1488 }],
[email protected]5f683172013-04-27 01:53:191489 # The version of GCC in use, set later in platforms that use GCC and have
1490 # not explicitly chosen to build with clang. Currently, this means all
1491 # platforms except Windows, Mac and iOS.
1492 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1493 # it takes effect here.
[email protected]0dbe7af92014-06-26 23:31:401494 ['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:491495 'conditions': [
1496 ['OS=="android"', {
[email protected]707ad51b2014-04-23 08:20:161497 # We directly set the gcc versions since we know what we use.
[email protected]7557cd42014-05-28 15:32:591498 'gcc_version%': 48,
[email protected]ffa01d22014-01-14 00:14:491499 }, {
[email protected]707ad51b2014-04-23 08:20:161500 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)',
[email protected]ffa01d22014-01-14 00:14:491501 }],
[email protected]313fcf632014-05-27 13:58:591502 ['android_webview_build==1', {
1503 # Android WebView uses a hermetic toolchain even for host, so set it
1504 # manually here.
1505 'conditions': [
1506 ['host_os=="mac"', {
1507 'host_gcc_version%': 42,
1508 }, { # linux
1509 'host_gcc_version%': 46,
1510 }],
1511 ],
1512 }, { # android_webview_build!=1
1513 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)',
1514 }],
[email protected]ffa01d22014-01-14 00:14:491515 ],
[email protected]5f683172013-04-27 01:53:191516 }, {
[email protected]707ad51b2014-04-23 08:20:161517 'host_gcc_version%': 0,
[email protected]5f683172013-04-27 01:53:191518 'gcc_version%': 0,
1519 }],
[email protected]dd0ef2f2014-04-16 21:52:491520 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', {
[email protected]1f8d9402012-07-06 22:47:561521 'windows_sdk_path%': '<(windows_sdk_default_path)',
1522 }, {
1523 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1524 }],
[email protected]dd0ef2f2014-04-16 21:52:491525 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', {
[email protected]1f8d9402012-07-06 22:47:561526 'directx_sdk_path%': '<(directx_sdk_default_path)',
1527 }, {
1528 'directx_sdk_path%': '$(DXSDK_DIR)',
1529 }],
[email protected]54184ce72012-10-18 07:11:261530 ['OS=="win"', {
1531 'windows_driver_kit_path%': '$(WDK_DIR)',
1532 }],
[email protected]1e013672012-06-29 22:12:201533 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]cbd5fd52009-08-26 00:14:271534 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461535 ['target_arch=="mipsel"', {
1536 'werror%': '',
1537 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461538 'nacl_untrusted_build%': 0,
[email protected]2fa89ef2014-05-07 18:45:591539 'use_allocator%': 'none',
[email protected]59e85f472013-06-28 18:20:441540 }],
1541 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461542 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281543 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461544 }],
[email protected]4c9cc6c2009-10-01 18:54:571545 # All Chrome builds have breakpad symbols, but only process the
1546 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081547 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571548 'linux_dump_symbols%': 1,
[email protected]2578ea12014-01-17 06:02:511549
1550 # Omit unwind support in official release builds to save space. We
1551 # can use breakpad for these builds.
1552 'release_unwind_tables%': 0,
[email protected]ac296392014-04-29 01:22:101553
1554 'conditions': [
1555 # For official builds, use a 64-bit linker to avoid running out
1556 # of address space. The buildbots should have a 64-bit kernel
1557 # and a 64-bit libc installed.
1558 ['host_arch=="ia32" and target_arch=="ia32"', {
1559 'linux_use_bundled_gold%': '1',
1560 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1561 }],
1562 ],
[email protected]4c9cc6c2009-10-01 18:54:571563 }],
[email protected]cbd5fd52009-08-26 00:14:271564 ],
[email protected]1e013672012-06-29 22:12:201565 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481566 ['OS=="ios"', {
1567 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191568 'enable_background%': 0,
[email protected]7ef66c62014-03-20 18:20:001569 'icu_use_data_file_flag%': 1,
[email protected]f87e5f72014-03-06 22:46:451570 'input_speech%': 0,
[email protected]4e3996f92012-07-17 10:41:131571 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471572 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411573 'locales==': [
[email protected]47cf7a32013-09-03 22:16:391574 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
1575 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb',
1576 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk',
1577 'vi', 'zh-CN', 'zh-TW',
[email protected]b6fbd6742013-03-15 11:15:411578 ],
[email protected]57871bc2012-08-20 16:28:121579
1580 # The Mac SDK is set for iOS builds and passed through to Mac
1581 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1582 # overridden from the command line the same way it is for a Mac build.
1583 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291584
[email protected]523f128d2013-08-06 17:36:111585 # iOS SDK and deployment target support. The |ios_sdk| value is left
1586 # blank so that when it is set in the project files it will be the
1587 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1588 # causes Xcode to spit out a warning for every single project file for
1589 # not using the "current" SDK.
[email protected]2c261532012-10-06 00:46:291590 'ios_sdk%': '',
1591 'ios_sdk_path%': '',
[email protected]523f128d2013-08-06 17:36:111592 'ios_deployment_target%': '6.0',
[email protected]fcd634182012-10-09 10:50:321593
1594 'conditions': [
1595 # ios_product_name is set to the name of the .app bundle as it should
1596 # appear on disk.
1597 ['branding=="Chrome"', {
1598 'ios_product_name%': 'Chrome',
1599 }, { # else: branding!="Chrome"
1600 'ios_product_name%': 'Chromium',
1601 }],
1602 ['branding=="Chrome" and buildtype=="Official"', {
1603 'ios_breakpad%': 1,
1604 }, { # else: branding!="Chrome" or buildtype!="Official"
1605 'ios_breakpad%': 0,
1606 }],
1607 ],
1608 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011609 ['OS=="android"', {
1610 # Location of Android NDK.
1611 'variables': {
1612 'variables': {
[email protected]1ffa4b62014-02-19 18:20:221613 # Unfortunately we have to use absolute paths to the SDK/NDK because
1614 # they're passed to ant which uses a different relative path from
1615 # gyp.
1616 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
[email protected]93c03932014-04-10 13:42:461617 'android_ndk_experimental_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk_experimental/',
[email protected]1ffa4b62014-02-19 18:20:221618 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1619 'android_host_arch%': '<!(uname -m)',
1620 # Android API-level of the SDK used for compilation.
1621 'android_sdk_version%': '19',
1622 'android_sdk_build_tools_version%': '19.0.0',
1623 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
[email protected]da1c8d692011-09-20 20:35:011624 },
[email protected]5061d152013-01-16 17:45:571625 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011626 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571627 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041628 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221629 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]625eb032014-02-13 21:48:251630 'host_os%': '<(host_os)',
[email protected]5061d152013-01-16 17:45:571631
[email protected]e20a8ad2013-03-18 15:05:041632 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]aeaf01212014-02-19 00:52:521633 # Android SDK build tools (e.g. dx, aapt, aidl)
1634 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)',
[email protected]5061d152013-01-16 17:45:571635
[email protected]5cfec2b2013-03-05 20:54:331636 # Android API level 14 is ICS (Android 4.0) which is the minimum
1637 # platform requirement for Chrome on Android, we use it for native
1638 # code compilation.
[email protected]5061d152013-01-16 17:45:571639 'conditions': [
1640 ['target_arch == "ia32"', {
1641 'android_app_abi%': 'x86',
1642 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331643 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]bda44542014-04-29 08:54:161644 'android_ndk_lib_dir%': 'usr/lib',
[email protected]7557cd42014-05-28 15:32:591645 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]5061d152013-01-16 17:45:571646 }],
[email protected]be0090f22014-03-18 17:43:481647 ['target_arch == "x64"', {
1648 'android_app_abi%': 'x86_64',
[email protected]93c03932014-04-10 13:42:461649 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/android-x86_64/gdbserver/gdbserver',
1650 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platforms/android-20/arch-x86_64',
[email protected]bda44542014-04-29 08:54:161651 'android_ndk_lib_dir%': 'usr/lib64',
[email protected]93c03932014-04-10 13:42:461652 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
1653 'android_stlport_root': '<(android_ndk_experimental_root)/sources/cxx-stl/stlport',
[email protected]be0090f22014-03-18 17:43:481654 }],
[email protected]5061d152013-01-16 17:45:571655 ['target_arch=="arm"', {
1656 'conditions': [
[email protected]7d6763422013-04-26 12:06:541657 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571658 'android_app_abi%': 'armeabi',
1659 }, {
1660 'android_app_abi%': 'armeabi-v7a',
1661 }],
1662 ],
1663 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331664 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]bda44542014-04-29 08:54:161665 'android_ndk_lib_dir%': 'usr/lib',
[email protected]7557cd42014-05-28 15:32:591666 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]5061d152013-01-16 17:45:571667 }],
[email protected]7a2f984a2014-03-20 18:35:491668 ['target_arch == "arm64"', {
[email protected]fa846092014-03-25 04:01:001669 'android_app_abi%': 'arm64-v8a',
[email protected]93c03932014-04-10 13:42:461670 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/android-arm64/gdbserver/gdbserver',
1671 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platforms/android-20/arch-arm64',
[email protected]bda44542014-04-29 08:54:161672 'android_ndk_lib_dir%': 'usr/lib',
[email protected]67220a12014-04-24 10:15:331673 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]93c03932014-04-10 13:42:461674 'android_stlport_root': '<(android_ndk_experimental_root)/sources/cxx-stl/stlport',
[email protected]7a2f984a2014-03-20 18:35:491675 }],
[email protected]23eea4a42013-04-27 04:10:261676 ['target_arch == "mipsel"', {
1677 'android_app_abi%': 'mips',
1678 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1679 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]bda44542014-04-29 08:54:161680 'android_ndk_lib_dir%': 'usr/lib',
[email protected]7557cd42014-05-28 15:32:591681 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]23eea4a42013-04-27 04:10:261682 }],
[email protected]5061d152013-01-16 17:45:571683 ],
[email protected]da1c8d692011-09-20 20:35:011684 },
[email protected]5061d152013-01-16 17:45:571685 # Copy conditionally-set variables out one scope.
1686 'android_app_abi%': '<(android_app_abi)',
1687 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011688 'android_ndk_root%': '<(android_ndk_root)',
[email protected]941c6ab2014-03-24 04:07:341689 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571690 'android_sdk_root%': '<(android_sdk_root)',
1691 'android_sdk_version%': '<(android_sdk_version)',
1692 'android_toolchain%': '<(android_toolchain)',
1693
[email protected]da1c8d692011-09-20 20:35:011694 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
[email protected]bda44542014-04-29 08:54:161695 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)',
[email protected]6bfda61f2013-08-09 06:48:181696 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]e20a8ad2013-03-18 15:05:041697 'android_sdk%': '<(android_sdk)',
1698 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011699
[email protected]225ec632013-04-03 18:20:221700 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221701 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221702 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]625eb032014-02-13 21:48:251703 'host_os%': '<(host_os)',
[email protected]225ec632013-04-03 18:20:221704
[email protected]c0f76312012-08-16 13:52:041705 # Location of the "strip" binary, used by both gyp and scripts.
1706 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1707
[email protected]225ec632013-04-03 18:20:221708 # Location of the "readelf" binary.
1709 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1710
[email protected]d8621ce2013-02-22 00:37:331711 # Determines whether we should optimize JNI generation at the cost of
1712 # breaking assumptions in the build system that when inputs have changed
1713 # the outputs should always change as well. This is meant purely for
1714 # developer builds, to avoid spurious re-linking of native files.
1715 'optimize_jni_generation%': 0,
1716
[email protected]da1c8d692011-09-20 20:35:011717 # Always uses openssl.
1718 'use_openssl%': 1,
[email protected]e1b2d732014-03-28 16:20:321719 'use_openssl_certs%': 1,
[email protected]da1c8d692011-09-20 20:35:011720
1721 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]23a30e62012-12-01 03:39:071722 'safe_browsing%': 2,
[email protected]9eb100e2011-10-14 05:08:221723 'input_speech%': 0,
[email protected]464750f2011-10-24 23:16:181724 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581725 'build_ffmpegsumo%': 0,
[email protected]2fa89ef2014-05-07 18:45:591726 'use_allocator%': 'none',
[email protected]658677f2012-06-09 06:04:021727
[email protected]ad17e342012-07-17 20:45:481728 # Disable Native Client.
1729 'disable_nacl%': 1,
1730
[email protected]58242012012-04-12 16:14:311731 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001732 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111733
[email protected]cdb756ef2012-04-05 18:34:531734 # Sessions are store separately in the Java side.
1735 'enable_session_service%': 0,
1736
[email protected]ad17e342012-07-17 20:45:481737 'p2p_apis%' : 0,
1738
[email protected]48de0fc2012-08-02 11:03:581739 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011740
1741 # Uses system APIs for decoding audio and video.
1742 'use_libffmpeg%': '0',
1743
[email protected]adb44342012-07-23 13:36:121744 # When building as part of the Android system, use system libraries
1745 # where possible to reduce ROM size.
1746 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361747 'use_system_sqlite%': 0, # '<(android_webview_build)',
1748 'use_system_expat%': '<(android_webview_build)',
1749 'use_system_icu%': '<(android_webview_build)',
1750 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121751
[email protected]da1c8d692011-09-20 20:35:011752 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361753 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011754 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121755 ['android_webview_build==1', {
1756 # When building the WebView in the Android tree, jarjar will remap all
1757 # the class names, so the JNI generator needs to know this.
1758 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1759 }],
[email protected]e14a9f92009-08-05 19:26:071760 ['OS=="mac"', {
[email protected]70d0f782013-11-14 06:22:291761 'conditions': [
1762 # All Chrome builds have breakpad symbols, but only process the
1763 # symbols from official builds.
1764 ['(branding=="Chrome" and buildtype=="Official")', {
1765 'mac_strip_release%': 1,
1766 }],
[email protected]22860352013-12-11 03:02:101767 ],
[email protected]296bc452013-05-13 21:29:471768 }], # OS=="mac"
1769 ['OS=="mac" or OS=="ios"', {
[email protected]d04384ab2014-03-13 20:46:011770 'clang%': 1,
1771
[email protected]2c261532012-10-06 00:46:291772 'variables': {
1773 # Mac OS X SDK and deployment target support. The SDK identifies
1774 # the version of the system headers that will be used, and
1775 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1776 # macro. "Maximum allowed" refers to the operating system version
1777 # whose APIs are available in the headers. The deployment target
1778 # identifies the minimum system version that the built products are
1779 # expected to function on. It corresponds to the
1780 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1781 # macros are available, #include <AvailabilityMacros.h>. Additional
1782 # documentation on these macros is available at
1783 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1784 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1785 # deployment target to 10.6. Other projects, such as O3D, may
1786 # override these defaults.
1787
1788 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1789 # about that is at least the specified version. In official builds,
1790 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1791 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1792 # path to the SDK; when set to a non-empty string, SDK detection
1793 # based on mac_sdk_min will be bypassed entirely.
1794 'mac_sdk_min%': '10.6',
1795 'mac_sdk_path%': '',
1796
1797 'mac_deployment_target%': '10.6',
1798 },
1799
1800 'mac_sdk_min': '<(mac_sdk_min)',
1801 'mac_sdk_path': '<(mac_sdk_path)',
1802 'mac_deployment_target': '<(mac_deployment_target)',
1803
[email protected]794fb4782011-12-14 19:10:561804 # Compile in Breakpad support by default so that it can be
1805 # tested, even if it is not enabled by default at runtime.
1806 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071807 'conditions': [
1808 # mac_product_name is set to the name of the .app bundle as it should
1809 # appear on disk. This duplicates data from
1810 # chrome/app/theme/chromium/BRANDING and
1811 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1812 # these names into the build system.
1813 ['branding=="Chrome"', {
1814 'mac_product_name%': 'Google Chrome',
1815 }, { # else: branding!="Chrome"
1816 'mac_product_name%': 'Chromium',
1817 }],
1818
[email protected]e14a9f92009-08-05 19:26:071819 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291820 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
[email protected]794fb4782011-12-14 19:10:561821 # Enable uploading crash dumps.
1822 'mac_breakpad_uploads%': 1,
1823 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071824 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561825 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071826 'mac_keystone%': 1,
1827 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291828 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561829 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071830 'mac_breakpad%': 0,
1831 'mac_keystone%': 0,
1832 }],
1833 ],
[email protected]296bc452013-05-13 21:29:471834 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551835 ['OS=="win"', {
1836 'conditions': [
[email protected]a7a15f32013-08-06 06:09:431837 # This is the architecture convention used in WinSDK paths.
1838 ['target_arch=="ia32"', {
1839 'winsdk_arch%': 'x86',
1840 },{
1841 'winsdk_arch%': '<(target_arch)',
1842 }],
[email protected]8974e042010-06-21 18:06:521843 ['component=="shared_library"', {
1844 'win_use_allocator_shim%': 0,
[email protected]45b7c522013-08-21 06:58:221845 },{
1846 # Turn on multiple dll by default on Windows when in static_library.
1847 'chrome_multiple_dll%': 1,
[email protected]8974e042010-06-21 18:06:521848 }],
[email protected]2a794002014-02-22 00:27:111849 ['asan==1', {
1850 'win_use_allocator_shim%': 0,
1851 }],
[email protected]fa0f16e2012-08-20 22:30:041852 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101853 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041854 # Not enabled for component=static_library because some targets
1855 # are too large and the toolchain fails due to the size of the
1856 # .obj files.
[email protected]6f390be2012-08-16 18:57:101857 'incremental_chrome_dll%': 1,
1858 }],
[email protected]a96cf1422013-11-08 08:55:411859 # Don't do incremental linking for large modules on 32-bit or when
1860 # component=static_library as the toolchain fails due to the size of
1861 # the .ilk files.
1862 ['MSVS_OS_BITS==32 or component=="static_library"', {
[email protected]10bb8c92009-08-07 21:16:031863 'msvs_large_module_debug_link_mode%': '1', # No
1864 },{
1865 'msvs_large_module_debug_link_mode%': '2', # Yes
1866 }],
[email protected]49ee7ef2014-04-12 03:07:461867 ['MSVS_VERSION=="2013e"', {
[email protected]3e2648a2011-03-21 20:58:501868 'msvs_express%': 1,
1869 'secure_atl%': 0,
1870 },{
1871 'msvs_express%': 0,
1872 'secure_atl%': 1,
1873 }],
[email protected]912c55c2009-07-31 23:33:551874 ],
[email protected]ef4fa4072009-12-04 22:46:501875 'nacl_win64_defines': [
1876 # This flag is used to minimize dependencies when building
1877 # Native Client loader for 64-bit Windows.
1878 'NACL_WIN64',
1879 ],
[email protected]912c55c2009-07-31 23:33:551880 }],
[email protected]bb6aba32011-01-07 19:04:431881
[email protected]a35aa362012-10-30 13:55:071882 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441883 'use_cups%': 1,
1884 }, {
1885 'use_cups%': 0,
1886 }],
[email protected]bb6aba32011-01-07 19:04:431887
[email protected]693f63c2014-01-17 06:52:191888 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
[email protected]280755c2013-05-23 10:44:351889 'enable_pepper_cdms%': 1,
1890 }, {
1891 'enable_pepper_cdms%': 0,
1892 }],
1893
[email protected]4b556cf2014-06-10 23:21:531894 ['OS=="android"', {
1895 'enable_browser_cdms%': 1,
1896 }, {
1897 'enable_browser_cdms%': 0,
1898 }],
1899
[email protected]eb5f1672013-01-31 07:56:461900 # Native Client glibc toolchain is enabled
1901 # by default except on arm and mips.
1902 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321903 'disable_glibc%': 1,
1904 }, {
1905 'disable_glibc%': 0,
1906 }],
1907
[email protected]19fe8f0b2010-12-07 07:27:271908 # Set the relative path from this file to the GYP file of the JPEG
1909 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281910 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1911 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271912 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281913 }, {
1914 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1915 }],
[email protected]bb6aba32011-01-07 19:04:431916
[email protected]abcc9ac2011-05-16 20:04:351917 # Options controlling the use of GConf (the classic GNOME configuration
1918 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]02968b82013-11-14 02:42:431919 ['chromeos==1 or embedded==1', {
[email protected]1c6fe29302011-01-20 22:14:311920 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351921 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311922 }, {
1923 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351924 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311925 }],
1926
[email protected]4de39f82011-03-28 12:01:291927 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291928 ['branding=="Chrome"', {
1929 # TODO(mmoss) The .grd files look for _google_chrome, but for
1930 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291931 'grit_defines': ['-D', '_google_chrome',
1932 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291933 }, {
[email protected]4de39f82011-03-28 12:01:291934 'grit_defines': ['-D', '_chromium',
1935 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291936 }],
[email protected]bb6aba32011-01-07 19:04:431937 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131938 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431939 }],
[email protected]d628ab412013-09-07 03:26:371940 ['desktop_linux==1', {
1941 'grit_defines': ['-D', 'desktop_linux'],
1942 }],
[email protected]bb6aba32011-01-07 19:04:431943 ['toolkit_views==1', {
1944 'grit_defines': ['-D', 'toolkit_views'],
1945 }],
[email protected]8dd791d2011-09-16 16:37:301946 ['use_aura==1', {
1947 'grit_defines': ['-D', 'use_aura'],
1948 }],
[email protected]ed329be2012-01-03 22:02:161949 ['use_ash==1', {
1950 'grit_defines': ['-D', 'use_ash'],
1951 }],
[email protected]c329adf82011-10-05 14:34:571952 ['use_nss==1', {
1953 'grit_defines': ['-D', 'use_nss'],
1954 }],
[email protected]ff78e4e2013-05-03 19:19:151955 ['use_ozone==1', {
1956 'grit_defines': ['-D', 'use_ozone'],
1957 }],
[email protected]77a848262013-02-22 11:17:251958 ['image_loader_extension==1', {
1959 'grit_defines': ['-D', 'image_loader_extension'],
1960 }],
[email protected]9a425422011-01-11 00:53:181961 ['remoting==1', {
1962 'grit_defines': ['-D', 'remoting'],
1963 }],
[email protected]bb6aba32011-01-07 19:04:431964 ['use_titlecase_in_grd_files==1', {
1965 'grit_defines': ['-D', 'use_titlecase'],
1966 }],
[email protected]00dc155832011-02-01 18:51:191967 ['use_third_party_translations==1', {
1968 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121969 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161970 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1971 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121972 ],
[email protected]00dc155832011-02-01 18:51:191973 }],
[email protected]da1c8d692011-09-20 20:35:011974 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171975 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571976 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]da1c8d692011-09-20 20:35:011977 }],
[email protected]cc1f0572013-07-31 05:41:031978 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:231979 'grit_defines': ['-D', 'scale_factors=2x'],
1980 }],
[email protected]ad563d02012-10-03 10:37:031981 ['OS == "ios"', {
1982 'grit_defines': [
[email protected]033346902013-08-20 01:01:121983 '-t', 'ios',
[email protected]ad563d02012-10-03 10:37:031984 # iOS uses a whitelist to filter resources.
1985 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1986 ],
[email protected]b4530c82013-05-09 09:20:011987
[email protected]d04384ab2014-03-13 20:46:011988 # Enable host builds when generating with ninja-ios.
[email protected]b4530c82013-05-09 09:20:011989 'conditions': [
1990 ['"<(GENERATOR)"=="ninja"', {
[email protected]b4530c82013-05-09 09:20:011991 'host_os%': "mac",
[email protected]ce2cad72014-02-13 18:17:351992 }],
[email protected]d04384ab2014-03-13 20:46:011993
1994 # TODO(sdefresne): Remove the target_subarch check once Apple has
1995 # upstreamed the support for "arm64". http://crbug.com/341453
1996 ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', {
[email protected]ce2cad72014-02-13 18:17:351997 'clang_xcode%': 1,
1998 }],
[email protected]b4530c82013-05-09 09:20:011999 ],
[email protected]ad563d02012-10-03 10:37:032000 }],
[email protected]6a3cd37e2012-04-17 17:13:342001 ['enable_extensions==1', {
2002 'grit_defines': ['-D', 'enable_extensions'],
2003 }],
[email protected]6ab4ef92013-12-09 08:43:172004 ['enable_plugins!=0', {
[email protected]6ab4ef92013-12-09 08:43:172005 'grit_defines': ['-D', 'enable_plugins'],
2006 }],
[email protected]1e54c1c2013-08-12 17:16:052007 ['enable_printing!=0', {
[email protected]658677f2012-06-09 06:04:022008 'grit_defines': ['-D', 'enable_printing'],
2009 }],
[email protected]b429eb19b2014-01-27 21:07:502010 ['enable_printing==1', {
2011 'grit_defines': ['-D', 'enable_full_printing'],
2012 }],
[email protected]c2aad542012-07-31 20:40:332013 ['enable_themes==1', {
2014 'grit_defines': ['-D', 'enable_themes'],
2015 }],
[email protected]ef1dd5062012-12-17 06:41:332016 ['enable_app_list==1', {
2017 'grit_defines': ['-D', 'enable_app_list'],
2018 }],
[email protected]dc4e8b82012-11-15 03:58:162019 ['enable_settings_app==1', {
2020 'grit_defines': ['-D', 'enable_settings_app'],
2021 }],
[email protected]5411d8202013-01-30 01:32:152022 ['enable_google_now==1', {
2023 'grit_defines': ['-D', 'enable_google_now'],
2024 }],
[email protected]a3a720f2013-04-25 19:35:422025 ['use_concatenated_impulse_responses==1', {
2026 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
2027 }],
[email protected]f66ddbd2013-06-27 14:17:042028 ['enable_webrtc==1', {
2029 'grit_defines': ['-D', 'enable_webrtc'],
2030 }],
[email protected]754a2002014-02-14 16:40:342031 ['enable_hangout_services_extension==1', {
2032 'grit_defines': ['-D', 'enable_hangout_services_extension'],
2033 }],
[email protected]25b8cb32014-01-30 11:04:292034 ['enable_task_manager==1', {
2035 'grit_defines': ['-D', 'enable_task_manager'],
2036 }],
[email protected]335b6872014-02-13 20:14:132037 ['notifications==1', {
2038 'grit_defines': ['-D', 'enable_notifications'],
2039 }],
[email protected]4b202ae2014-05-23 07:45:362040 ['enable_wifi_bootstrapping==1', {
2041 'grit_defines': ['-D', 'enable_wifi_bootstrapping'],
2042 }],
[email protected]2b9e68e2014-04-15 12:51:252043 ['enable_resource_whitelist_generation==1 and OS!="win"', {
[email protected]e4fdab92014-04-04 00:52:222044 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelisted_resource_{numeric_id}") {numeric_id}'],
[email protected]1a43cc572014-03-07 22:36:322045 }],
[email protected]2b9e68e2014-04-15 12:51:252046 ['enable_resource_whitelist_generation==1 and OS=="win"', {
2047 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'],
2048 }],
[email protected]2188c8d2014-03-21 00:58:562049 ['enable_mdns==1 or OS=="mac"', {
2050 'grit_defines': ['-D', 'enable_service_discovery'],
2051 'enable_service_discovery%': 1
2052 }],
[email protected]3bb37e62012-04-19 03:40:082053 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:072054 'clang_chrome_plugins_flags': [
2055 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:312056 ],
[email protected]5d451ad2011-02-11 16:43:462057 }],
[email protected]e12b37ec2014-06-16 11:21:172058 ['asan==1 or msan==1 or lsan==1 or tsan==1', {
[email protected]92799b632011-08-15 14:33:062059 'clang%': 1,
[email protected]3a0278b12014-05-20 15:37:582060 'use_allocator%': 'none',
[email protected]92799b632011-08-15 14:33:062061 }],
[email protected]7fd639a2014-05-30 23:59:012062 ['ubsan==1', {
2063 'clang%': 1,
2064 }],
[email protected]0dbe7af92014-06-26 23:31:402065 ['ubsan_vptr==1', {
2066 'clang%': 1,
2067 }],
[email protected]f5d8c222012-08-29 17:47:022068 ['asan==1 and OS=="mac"', {
[email protected]57db18a2014-05-28 18:48:292069 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
2070 # runtime is fully adopted. See http://crbug.com/242503.
2071 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:022072 }],
[email protected]c9a829272012-07-04 07:51:122073 ['tsan==1', {
[email protected]193149c2014-04-08 23:56:092074 'use_custom_libcxx%': 1,
[email protected]c9a829272012-07-04 07:51:122075 }],
[email protected]a10ddd2d2013-02-26 20:06:592076 ['msan==1', {
[email protected]e12b37ec2014-06-16 11:21:172077 # Use a just-built, MSan-instrumented libc++ instead of the system-wide
2078 # libstdc++. This is required to avoid false positive reports whenever
2079 # the C++ standard library is used.
2080 'use_custom_libcxx%': 1,
2081 # Running the V8-generated code on an ARM simulator is a powerful hack
2082 # that allows the tool to see the memory accesses from JITted code.
2083 # Without this flag, JS code causes false positive reports from MSan.
2084 'v8_target_arch': 'arm64',
[email protected]a10ddd2d2013-02-26 20:06:592085 }],
[email protected]c9a829272012-07-04 07:51:122086
[email protected]7ce58b22012-09-26 05:17:252087 ['OS=="linux" and clang_type_profiler==1', {
2088 'clang%': 1,
2089 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:322090 'conditions': [
2091 ['host_arch=="x64"', {
2092 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
2093 }],
2094 ['host_arch=="ia32"', {
2095 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
2096 # Clang in this directory at your own risk if needed for some
2097 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
2098 # usage). Any failure by this compiler should not close the tree.
2099 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
2100 }],
2101 ],
[email protected]7ce58b22012-09-26 05:17:252102 }],
2103
[email protected]85a75e572014-05-06 20:13:382104 ['OS=="win"', {
2105 # The Clang plugins don't currently work on Windows.
2106 # TODO(hans): One day, this will work. (crbug.com/82385)
2107 'clang_use_chrome_plugins%': 0,
2108 }],
2109
[email protected]a9318c72012-03-01 01:29:472110 # On valgrind bots, override the optimizer settings so we don't inline too
2111 # much and make the stacks harder to figure out.
2112 #
2113 # TODO(rnk): Kill off variables that no one else uses and just implement
2114 # them under a build_for_tool== condition.
2115 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
2116 # gcc flags
2117 'mac_debug_optimization': '1',
2118 'mac_release_optimization': '1',
2119 'release_optimize': '1',
2120 'no_gc_sections': 1,
2121 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
2122 '-fno-builtin -fno-optimize-sibling-calls',
2123 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
2124 '-fno-builtin -fno-optimize-sibling-calls',
2125
2126 # MSVS flags for TSan on Pin and Windows.
2127 'win_debug_RuntimeChecks': '0',
2128 'win_debug_disable_iterator_debugging': '1',
2129 'win_debug_Optimization': '1',
2130 'win_debug_InlineFunctionExpansion': '0',
2131 'win_release_InlineFunctionExpansion': '0',
2132 'win_release_OmitFramePointers': '0',
2133
[email protected]2fa89ef2014-05-07 18:45:592134 'use_allocator': 'tcmalloc',
[email protected]a9318c72012-03-01 01:29:472135 'release_valgrind_build': 1,
2136 'werror': '',
2137 'component': 'static_library',
2138 'use_system_zlib': 0,
2139 }],
2140
2141 # Build tweaks for DrMemory.
2142 # TODO(rnk): Combine with tsan config to share the builder.
2143 # http://crbug.com/108155
2144 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:472145 # These runtime checks force initialization of stack vars which blocks
2146 # DrMemory's uninit detection.
2147 'win_debug_RuntimeChecks': '0',
[email protected]49605d42013-10-18 13:58:172148 # Iterator debugging is slow.
[email protected]a9318c72012-03-01 01:29:472149 'win_debug_disable_iterator_debugging': '1',
2150 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:162151 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
2152 # /O2 and /Ob0 (disable inline) cannot be used together because of a
2153 # compiler bug, so we use /Ob1 instead.
2154 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:472155 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:502156 # Ditto for debug, to support bumping win_debug_Optimization.
2157 'win_debug_InlineFunctionExpansion': 0,
2158 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:472159 # Keep the code under #ifndef NVALGRIND.
2160 'release_valgrind_build': 1,
2161 }],
[email protected]b6a5ac92012-10-29 18:17:222162
[email protected]fcc89bf2013-10-30 17:37:212163 # Enable RLZ on Win, Mac, iOS and ChromeOS.
2164 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:222165 'enable_rlz%': 1,
2166 }],
[email protected]7d6763422013-04-26 12:06:542167
2168 # Set default compiler flags depending on ARM version.
[email protected]7d6763422013-04-26 12:06:542169 ['arm_version==6 and android_webview_build==0', {
2170 'arm_arch%': 'armv6',
2171 'arm_tune%': '',
[email protected]70f970d2013-12-16 14:11:382172 'arm_fpu%': 'vfp',
2173 'arm_float_abi%': 'softfp',
[email protected]7d6763422013-04-26 12:06:542174 'arm_thumb%': 0,
2175 }],
2176 ['arm_version==7 and android_webview_build==0', {
2177 'arm_arch%': 'armv7-a',
[email protected]7557cd42014-05-28 15:32:592178 'arm_tune%': 'generic-armv7-a',
[email protected]7d6763422013-04-26 12:06:542179 'conditions': [
2180 ['arm_neon==1', {
2181 'arm_fpu%': 'neon',
2182 }, {
2183 'arm_fpu%': 'vfpv3-d16',
2184 }],
2185 ],
[email protected]3f85dac32013-10-29 02:38:462186 # Change the default to hard once the armhf transition is complete.
[email protected]7d6763422013-04-26 12:06:542187 'arm_float_abi%': 'softfp',
2188 'arm_thumb%': 1,
2189 }],
2190
2191 ['android_webview_build==1', {
2192 # The WebView build gets its cpu-specific flags from the Android build system.
2193 'arm_arch%': '',
2194 'arm_tune%': '',
2195 'arm_fpu%': '',
2196 'arm_float_abi%': '',
2197 'arm_thumb%': 0,
2198 }],
[email protected]5ac4b902013-10-22 17:21:292199
2200 # Enable brlapi by default for chromeos.
2201 [ 'chromeos==1', {
2202 'use_brlapi%': 1,
2203 }],
[email protected]f93c2c92013-10-31 18:22:442204
[email protected]3bdb0992014-05-16 21:30:512205 ['use_ozone==1 and ozone_auto_platforms==1', {
2206 # Use test as the default platform.
2207 'ozone_platform%': 'test',
[email protected]4814ed22013-11-01 05:37:262208
[email protected]3bdb0992014-05-16 21:30:512209 # Build all platforms whose deps are in install-build-deps.sh.
2210 # Only these platforms will be compile tested by buildbots.
[email protected]4814ed22013-11-01 05:37:262211 'ozone_platform_dri%': 1,
2212 'ozone_platform_test%': 1,
[email protected]3bdb0992014-05-16 21:30:512213 'ozone_platform_egltest%': 1,
2214 }],
2215
2216 ['use_ozone==1 and ozone_auto_platforms==1 and chromeos==1', {
2217 # Use dri as the default platform.
2218 'ozone_platform%': 'dri',
[email protected]f93c2c92013-10-31 18:22:442219 }],
[email protected]da7aed42013-12-17 22:28:312220
2221 ['desktop_linux==1 and use_aura==1 and use_x11==1', {
2222 'use_clipboard_aurax11%': 1,
2223 }],
2224
[email protected]e71a3622013-12-04 07:32:412225 ['OS=="win" and use_goma==1', {
2226 # goma doesn't support pch yet.
2227 'chromium_win_pch': 0,
2228 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
2229 'conditions': [
[email protected]c73363762014-04-16 21:11:462230 ['win_z7==0', {
2231 'fastbuild': 1,
[email protected]e71a3622013-12-04 07:32:412232 }],
2233 ],
2234 }],
[email protected]8efc26082014-01-24 13:26:352235
[email protected]2a794002014-02-22 00:27:112236 ['OS=="win" and (clang==1 or asan==1)', {
[email protected]8efc26082014-01-24 13:26:352237 'chromium_win_pch': 0,
2238 }],
2239
[email protected]9f7615ee2013-12-19 21:38:382240 # The seccomp-bpf sandbox is only supported on three architectures
2241 # currently.
2242 # Do not disable seccomp_bpf anywhere without talking to
2243 # [email protected]!
2244 ['((OS=="linux" or OS=="android") and '
2245 '(target_arch=="ia32" or target_arch=="x64" or '
2246 'target_arch=="arm"))', {
2247 'use_seccomp_bpf%': 1,
2248 }, {
2249 'use_seccomp_bpf%': 0,
2250 }],
[email protected]912c55c2009-07-31 23:33:552251 ],
[email protected]a9318c72012-03-01 01:29:472252
[email protected]6a502252013-12-13 11:49:092253 # The path to the ANGLE library.
2254 'angle_path': '<(DEPTH)/third_party/angle',
[email protected]c91dc722013-06-12 22:53:012255
[email protected]35958422011-09-28 02:03:592256 # List of default apps to install in new profiles. The first list contains
2257 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:062258 # contains the destination location for each of the files. When a crx
2259 # is added or removed from the list, the chrome/browser/resources/
2260 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:592261 'default_apps_list': [
2262 'browser/resources/default_apps/external_extensions.json',
2263 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062264 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592265 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002266 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232267 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592268 ],
2269 'default_apps_list_linux_dest': [
2270 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
2271 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062272 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592273 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002274 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232275 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592276 ],
[email protected]2f80c312009-02-25 21:26:552277 },
2278 'target_defaults': {
[email protected]1c966092009-08-20 21:19:262279 'variables': {
[email protected]a6e22132010-02-10 20:43:182280 # The condition that operates on chromium_code is in a target_conditions
2281 # section, and will not have access to the default fallback value of
2282 # chromium_code at the top of this file, or to the chromium_code
2283 # variable placed at the root variables scope of .gyp files, because
2284 # those variables are not set at target scope. As a workaround,
2285 # if chromium_code is not set at target scope, define it in target scope
2286 # to contain whatever value it has during early variable expansion.
2287 # That's enough to make it available during target conditional
2288 # processing.
2289 'chromium_code%': '<(chromium_code)',
2290
[email protected]7cd58be2014-03-21 12:39:562291 'component%': '<(component)',
2292
[email protected]7e0d664a2009-12-03 21:07:472293 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
2294 'win_release_Optimization%': '2', # 2 = /Os
2295 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:332296
2297 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:242298 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:112299 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:242300 # Tri-state: blank is default, 1 on, 0 off
2301 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:332302
[email protected]6b0507b2010-05-07 07:41:212303 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
2304 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:332305
[email protected]6b0507b2010-05-07 07:41:212306 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:152307 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
2308 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:332309
[email protected]fac10d12010-11-08 16:00:312310 # VS inserts quite a lot of extra checks to algorithms like
2311 # std::partial_sort in Debug build which make them O(N^2)
2312 # instead of O(N*logN). This is particularly slow under memory
2313 # tools like ThreadSanitizer so we want it to be disablable.
2314 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
[email protected]907cb98d2014-02-23 07:19:552315 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:472316
[email protected]5d60b0b2013-07-30 20:24:302317 # An application manifest fragment to declare compatibility settings for
2318 # 'executable' targets. Ignored in other target type.
2319 'win_exe_compatibility_manifest%':
2320 '<(DEPTH)\\build\\win\\compatibility.manifest',
2321
[email protected]ffd984b12009-09-11 19:37:002322 'release_extra_cflags%': '',
2323 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:002324
2325 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:522326
[email protected]ef5c5f1b2011-12-17 02:16:242327 # the non-qualified versions are widely assumed to be *nix-only
2328 'win_release_extra_cflags%': '',
2329 'win_debug_extra_cflags%': '',
2330
[email protected]b1eb341c2011-11-09 18:46:072331 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
2332 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
2333
[email protected]ef3326702011-10-06 18:06:442334 # Only used by Windows build for now. Can be used to build into a
2335 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
2336 # output files in src/build/VS2010_{Debug,Release}.
2337 'build_dir_prefix%': '',
2338
[email protected]9ac2db692012-06-08 01:01:572339 # Targets are by default not nacl untrusted code.
2340 'nacl_untrusted_build%': 0,
2341
[email protected]9c55d9d2012-11-15 23:28:442342 'pnacl_compile_flags': [
[email protected]7dcd93c2013-11-02 02:05:532343 # pnacl uses the clang compiler so we need to suppress all the
[email protected]9c55d9d2012-11-15 23:28:442344 # same warnings as we do for clang.
2345 # TODO(sbc): Remove these if/when they are removed from the clang
2346 # build.
2347 '-Wno-unused-function',
2348 '-Wno-char-subscripts',
2349 '-Wno-c++11-extensions',
2350 '-Wno-unnamed-type-template-args',
2351 ],
2352
[email protected]8974e042010-06-21 18:06:522353 'conditions': [
2354 ['OS=="win" and component=="shared_library"', {
2355 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:162356 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2357 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:522358 }, {
2359 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2360 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2361 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2362 }],
[email protected]1e013672012-06-29 22:12:202363 ['OS=="ios"', {
2364 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2365 'mac_release_optimization%': 's', # Use -Os unless overridden
2366 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2367 }, {
2368 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2369 'mac_release_optimization%': '3', # Use -O3 unless overridden
2370 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2371 }],
[email protected]625eb032014-02-13 21:48:252372 ['OS=="android"', {
2373 'host_os%': '<(host_os)', # See comment above chromium_code.
2374 }],
[email protected]8974e042010-06-21 18:06:522375 ],
[email protected]1c966092009-08-20 21:19:262376 },
[email protected]c91dc722013-06-12 22:53:012377 'defines': [
[email protected]6d84e0b2013-12-05 12:16:132378 # Don't use deprecated V8 APIs anywhere.
2379 'V8_DEPRECATION_WARNINGS',
[email protected]b8db0972014-03-07 11:26:592380 # Temporary suppression until Blink code can be removed.
2381 'BLINK_SCALE_FILTERS_AT_RECORD_TIME',
[email protected]c91dc722013-06-12 22:53:012382 ],
[email protected]97865022014-06-13 23:18:042383 'include_dirs': [
2384 '<(SHARED_INTERMEDIATE_DIR)',
2385 ],
[email protected]32aa8cc2009-03-04 21:36:392386 'conditions': [
[email protected]d808e212013-03-12 14:06:162387 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:312388 'dependencies': [
2389 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
2390 ],
2391 }],
[email protected]2fa89ef2014-05-07 18:45:592392 ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', {
[email protected]7ce58b22012-09-26 05:17:252393 'cflags_cc!': ['-fno-rtti'],
2394 'cflags_cc+': [
2395 '-frtti',
2396 '-gline-tables-only',
2397 '-fintercept-allocation-functions',
2398 ],
2399 'defines': ['TYPE_PROFILING'],
2400 'dependencies': [
2401 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
2402 ],
2403 }],
[email protected]b0c45722013-01-23 04:47:322404 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
2405 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
2406 # See http://crbug.com/162818.
2407 'cflags+': ['-Wno-sentinel'],
2408 }],
[email protected]32aa8cc2009-03-04 21:36:392409 ['branding=="Chrome"', {
2410 'defines': ['GOOGLE_CHROME_BUILD'],
2411 }, { # else: branding!="Chrome"
2412 'defines': ['CHROMIUM_BUILD'],
2413 }],
[email protected]286d9a12012-05-30 16:20:382414 ['OS=="mac" and component=="shared_library"', {
2415 'xcode_settings': {
2416 'DYLIB_INSTALL_NAME_BASE': '@rpath',
2417 'LD_RUNPATH_SEARCH_PATHS': [
2418 # For unbundled binaries.
2419 '@loader_path/.',
2420 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
2421 '@loader_path/../../..',
2422 ],
2423 },
2424 }],
[email protected]6fcbf9d2014-05-09 22:01:282425 ['clang==1 and OS!="win"', {
2426 # This is here so that all files get recompiled after a clang roll and
2427 # when turning clang on or off.
2428 # (defines are passed via the command line, and build systems rebuild
2429 # things when their commandline changes). Nothing should ever read this
2430 # define.
2431 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'],
2432 }],
[email protected]b6a5ac92012-10-29 18:17:222433 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:172434 'defines': ['ENABLE_RLZ'],
2435 }],
[email protected]63e39a282011-07-13 20:41:282436 ['component=="shared_library"', {
2437 'defines': ['COMPONENT_BUILD'],
2438 }],
[email protected]06c756182010-04-27 18:31:312439 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:172440 'defines': ['TOOLKIT_VIEWS=1'],
2441 }],
[email protected]1ee7c56c2011-10-19 14:51:332442 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:112443 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
2444 }],
[email protected]41423092011-08-25 15:39:582445 ['use_aura==1', {
2446 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:352447 }],
[email protected]ed329be2012-01-03 22:02:162448 ['use_ash==1', {
2449 'defines': ['USE_ASH=1'],
2450 }],
[email protected]928362a2013-11-19 20:17:162451 ['use_cairo==1', {
2452 'defines': ['USE_CAIRO=1'],
2453 }],
[email protected]2a76009b2013-08-07 21:02:312454 ['use_cras==1', {
2455 'defines': ['USE_CRAS=1'],
2456 }],
[email protected]6ec70cc72013-11-20 05:33:462457 ['use_glib==1', {
2458 'defines': ['USE_GLIB=1'],
2459 }],
[email protected]ff78e4e2013-05-03 19:19:152460 ['use_ozone==1', {
2461 'defines': ['USE_OZONE=1'],
2462 }],
[email protected]cb800562012-11-20 22:36:072463 ['use_default_render_theme==1', {
2464 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
2465 }],
[email protected]e190d272012-08-30 17:36:442466 ['use_libjpeg_turbo==1', {
2467 'defines': ['USE_LIBJPEG_TURBO=1'],
2468 }],
[email protected]2fa2f2d82013-04-29 18:13:122469 ['use_x11==1', {
2470 'defines': ['USE_X11=1'],
2471 }],
[email protected]89dcd662013-12-12 23:06:502472 ['use_clipboard_aurax11==1', {
2473 'defines': ['USE_CLIPBOARD_AURAX11=1'],
2474 }],
[email protected]bd7b6fe2012-03-05 21:02:402475 ['enable_one_click_signin==1', {
2476 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2477 }],
[email protected]b56a9e02014-06-20 09:57:042478 ['enable_pre_sync_backup==1', {
2479 'defines': ['ENABLE_PRE_SYNC_BACKUP'],
2480 }],
[email protected]23485ba2013-09-15 00:50:002481 ['use_xi2_mt!=0 and use_x11==1', {
[email protected]f56797b2011-09-25 00:04:352482 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
2483 }],
[email protected]77a848262013-02-22 11:17:252484 ['image_loader_extension==1', {
2485 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2486 }],
[email protected]7664ab32011-02-01 23:35:252487 ['profiling==1', {
2488 'defines': ['ENABLE_PROFILING=1'],
2489 }],
[email protected]542bf24a2010-06-11 23:08:172490 ['remoting==1', {
2491 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:002492 }],
[email protected]5b87e782012-02-09 18:19:322493 ['enable_webrtc==1', {
2494 'defines': ['ENABLE_WEBRTC=1'],
2495 }],
[email protected]d01120e62010-05-10 17:04:482496 ['proprietary_codecs==1', {
2497 'defines': ['USE_PROPRIETARY_CODECS'],
2498 }],
[email protected]7ddea9802012-02-22 23:08:052499 ['enable_viewport==1', {
2500 'defines': ['ENABLE_VIEWPORT'],
2501 }],
[email protected]280755c2013-05-23 10:44:352502 ['enable_pepper_cdms==1', {
2503 'defines': ['ENABLE_PEPPER_CDMS'],
2504 }],
[email protected]4b556cf2014-06-10 23:21:532505 ['enable_browser_cdms==1', {
2506 'defines': ['ENABLE_BROWSER_CDMS'],
2507 }],
[email protected]f31e2e52011-07-14 16:01:192508 ['configuration_policy==1', {
2509 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2510 }],
[email protected]7cce3232011-10-28 10:41:572511 ['notifications==1', {
2512 'defines': ['ENABLE_NOTIFICATIONS'],
2513 }],
[email protected]1efbaaa2012-04-24 02:43:242514 ['enable_hidpi==1', {
2515 'defines': ['ENABLE_HIDPI=1'],
2516 }],
[email protected]cef6c76f2013-10-30 16:33:302517 ['native_discardable_memory==1', {
2518 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
2519 }],
2520 ['native_memory_pressure_signals==1', {
2521 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
2522 }],
[email protected]49513e02013-11-20 08:36:402523 ['use_udev==1', {
2524 'defines': ['USE_UDEV'],
2525 }],
[email protected]9c1949e2009-10-02 19:59:542526 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:312527 'xcode_settings': {
2528 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2529 },
[email protected]9c1949e2009-10-02 19:59:542530 'conditions': [
[email protected]0dbe7af92014-06-26 23:31:402531 ['clang==1 and asan==0 and msan==0 and tsan==0 and ubsan_vptr==0', {
[email protected]c86fd472013-04-02 19:42:302532 # Clang creates chubby debug information, which makes linking very
2533 # slow. For now, don't create debug information with clang. See
2534 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432535 'conditions': [
2536 ['OS=="linux"', {
2537 'variables': {
2538 'debug_extra_cflags': '-g0',
2539 },
2540 }],
2541 # Android builds symbols on release by default, disable them.
2542 ['OS=="android"', {
2543 'variables': {
2544 'debug_extra_cflags': '-g0',
2545 'release_extra_cflags': '-g0',
2546 },
2547 }],
2548 ],
2549 }, { # else clang!=1
2550 'conditions': [
[email protected]c86fd472013-04-02 19:42:302551 ['OS=="win" and fastbuild==2', {
2552 # Completely disable debug information.
2553 'msvs_settings': {
2554 'VCLinkerTool': {
2555 'GenerateDebugInformation': 'false',
2556 },
2557 'VCCLCompilerTool': {
2558 'DebugInformationFormat': '0',
2559 },
2560 },
2561 }],
2562 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432563 'msvs_settings': {
2564 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312565 # This tells the linker to generate .pdbs, so that
2566 # we can get meaningful stack traces.
2567 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432568 },
2569 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312570 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432571 'DebugInformationFormat': '0',
2572 },
2573 },
2574 }],
[email protected]c86fd472013-04-02 19:42:302575 ['OS=="linux" and fastbuild==2', {
2576 'variables': {
2577 'debug_extra_cflags': '-g0',
2578 },
2579 }],
2580 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432581 'variables': {
2582 'debug_extra_cflags': '-g1',
2583 },
2584 }],
[email protected]c86fd472013-04-02 19:42:302585 ['OS=="android" and fastbuild==2', {
2586 'variables': {
2587 'debug_extra_cflags': '-g0',
2588 'release_extra_cflags': '-g0',
2589 },
2590 }],
2591 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432592 'variables': {
2593 'debug_extra_cflags': '-g1',
2594 'release_extra_cflags': '-g1',
2595 },
2596 }],
2597 ],
2598 }], # clang!=1
2599 ],
[email protected]9c1949e2009-10-02 19:59:542600 }], # fastbuild!=0
[email protected]19677402014-06-18 13:10:042601 ['dont_embed_build_metadata==1', {
[email protected]b9e9992a2014-06-12 21:01:192602 'defines': [
[email protected]19677402014-06-18 13:10:042603 'DONT_EMBED_BUILD_METADATA',
[email protected]b9e9992a2014-06-12 21:01:192604 ],
[email protected]19677402014-06-18 13:10:042605 }], # dont_embed_build_metadata==1
[email protected]20960e072011-09-20 20:59:012606 ['dcheck_always_on!=0', {
2607 'defines': ['DCHECK_ALWAYS_ON=1'],
2608 }], # dcheck_always_on!=0
[email protected]a1e87422013-07-09 21:47:012609 ['tracing_like_official_build!=0', {
2610 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2611 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472612 ['win_use_allocator_shim==0', {
2613 'conditions': [
2614 ['OS=="win"', {
2615 'defines': ['NO_TCMALLOC'],
2616 }],
2617 ],
2618 }],
[email protected]ed154592010-04-29 00:18:502619 ['enable_eglimage==1', {
2620 'defines': [
2621 'ENABLE_EGLIMAGE=1',
2622 ],
2623 }],
[email protected]6c65f2b2014-05-07 08:57:462624 ['asan==1', {
2625 'defines': [
2626 'ADDRESS_SANITIZER',
2627 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2628 ],
2629 }],
[email protected]1612e552014-02-15 04:49:182630 ['syzyasan==1', {
2631 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
[email protected]696de4e62012-11-21 21:18:542632 'msvs_settings': {
2633 'VCLinkerTool': {
2634 'Profile': 'true',
2635 },
2636 },
[email protected]2f047202013-06-14 06:36:392637 'defines': [
[email protected]aee2f332014-03-27 15:08:042638 'SYZYASAN',
[email protected]2f047202013-06-14 06:36:392639 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2640 ],
[email protected]1612e552014-02-15 04:49:182641 }],
[email protected]4e4d6042010-08-26 18:34:382642 ['OS=="win"', {
2643 'defines': [
2644 '__STD_C',
2645 '_CRT_SECURE_NO_DEPRECATE',
2646 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102647 # This define is required to pull in the new Win8 interfaces from
2648 # system headers like ShObjIdl.h.
2649 'NTDDI_VERSION=0x06020000',
[email protected]37416742013-11-12 07:13:332650 # This is required for ATL to use XP-safe versions of its functions.
2651 '_USING_V110_SDK71_',
[email protected]4e4d6042010-08-26 18:34:382652 ],
2653 'include_dirs': [
2654 '<(DEPTH)/third_party/wtl/include',
2655 ],
[email protected]9619e65d2012-05-23 19:06:522656 'conditions': [
2657 ['win_z7!=0', {
2658 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092659 # Generates debug info when win_z7=1
2660 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2661 'VCLinkerTool': {
2662 'GenerateDebugInformation': 'true',
2663 },
[email protected]9619e65d2012-05-23 19:06:522664 'VCCLCompilerTool': {
2665 'DebugInformationFormat': '1',
2666 }
2667 }
2668 }],
2669 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382670 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022671 ['enable_task_manager==1', {
2672 'defines': [
2673 'ENABLE_TASK_MANAGER=1',
2674 ],
2675 }],
[email protected]6a3cd37e2012-04-17 17:13:342676 ['enable_extensions==1', {
2677 'defines': [
2678 'ENABLE_EXTENSIONS=1',
2679 ],
2680 }],
[email protected]13eb97d2012-01-05 01:07:122681 ['OS=="win" and branding=="Chrome"', {
2682 'defines': ['ENABLE_SWIFTSHADER'],
2683 }],
[email protected]407dfa632011-12-23 11:59:352684 ['enable_dart==1', {
2685 'defines': ['WEBKIT_USING_DART=1'],
2686 }],
[email protected]18e0f39b2012-01-17 16:47:342687 ['enable_plugin_installation==1', {
2688 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2689 }],
[email protected]6d17f6392012-12-05 05:24:542690 ['enable_plugins==1', {
2691 'defines': ['ENABLE_PLUGINS=1'],
2692 }],
[email protected]cdb756ef2012-04-05 18:34:532693 ['enable_session_service==1', {
2694 'defines': ['ENABLE_SESSION_SERVICE=1'],
2695 }],
[email protected]6b40bb582012-03-15 20:50:382696 ['enable_themes==1', {
2697 'defines': ['ENABLE_THEMES=1'],
2698 }],
[email protected]57e67ac2013-02-22 03:37:222699 ['enable_autofill_dialog==1', {
2700 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2701 }],
[email protected]d3340bf512014-05-22 22:27:582702 ['enable_prod_wallet_service==1', {
2703 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'],
2704 }],
[email protected]0acdd772012-04-05 22:53:002705 ['enable_background==1', {
2706 'defines': ['ENABLE_BACKGROUND=1'],
2707 }],
[email protected]6ee43a72012-12-07 22:44:402708 ['enable_google_now==1', {
2709 'defines': ['ENABLE_GOOGLE_NOW=1'],
2710 }],
[email protected]3b5e88d2013-09-06 11:03:062711 ['cld_version!=0', {
2712 'defines': ['CLD_VERSION=<(cld_version)'],
2713 }],
[email protected]cf78eec2014-06-24 15:54:262714 ['cld2_data_source=="static"', {
2715 'defines': ['CLD_DATA_FROM_STATIC'],
2716 }, {
2717 # CLD2 headers use this #define to control the visibility of dynamic
2718 # mode functions. We use these functions, so we must define here for
2719 # our #includes to work right.
2720 'defines': ['CLD2_DYNAMIC_MODE'],
[email protected]e5a7a2a2014-03-27 16:16:032721 }],
[email protected]cf78eec2014-06-24 15:54:262722 ['cld2_data_source=="standalone"', {
2723 'defines': ['CLD_DATA_FROM_STANDALONE'],
2724 }],
2725 ['cld2_data_source=="component"', {
2726 'defines': ['CLD_DATA_FROM_COMPONENT'],
[email protected]fb53e652014-04-30 11:27:192727 }],
[email protected]658677f2012-06-09 06:04:022728 ['enable_printing==1', {
[email protected]1e54c1c2013-08-12 17:16:052729 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
2730 }],
2731 ['enable_printing==2', {
[email protected]658677f2012-06-09 06:04:022732 'defines': ['ENABLE_PRINTING=1'],
2733 }],
[email protected]4a473e92014-05-22 18:38:562734 ['OS=="win" and win_pdf_metafile_for_printing==1', {
[email protected]75280ad22014-05-20 22:02:252735 'defines': ['WIN_PDF_METAFILE_FOR_PRINTING=1'],
2736 }],
[email protected]c6ce08072013-07-31 07:48:532737 ['enable_spellcheck==1', {
2738 'defines': ['ENABLE_SPELLCHECK=1'],
2739 }],
[email protected]e6026962012-06-14 21:28:322740 ['enable_captive_portal_detection==1', {
2741 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2742 }],
[email protected]dc4e8b82012-11-15 03:58:162743 ['enable_app_list==1', {
2744 'defines': ['ENABLE_APP_LIST=1'],
2745 }],
2746 ['enable_settings_app==1', {
2747 'defines': ['ENABLE_SETTINGS_APP=1'],
2748 }],
[email protected]02494ec2014-05-07 15:05:292749 ['disable_file_support==1', {
2750 'defines': ['DISABLE_FILE_SUPPORT=1'],
2751 }],
[email protected]9bfe0ab2012-08-30 13:18:112752 ['disable_ftp_support==1', {
2753 'defines': ['DISABLE_FTP_SUPPORT=1'],
2754 }],
[email protected]847aaab82014-05-07 14:05:462755 ['use_icu_alternatives_on_android==1', {
2756 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'],
2757 }],
[email protected]0850e842013-01-19 03:44:312758 ['enable_managed_users==1', {
2759 'defines': ['ENABLE_MANAGED_USERS=1'],
2760 }],
[email protected]3f0ed2172013-11-04 20:27:292761 ['data_reduction_fallback_host != ""', {
2762 'defines': [
2763 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'],
2764 }],
[email protected]324856d2014-01-14 11:17:302765 ['data_reduction_dev_host != ""', {
2766 'defines': [
2767 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'],
2768 }],
[email protected]199def22013-02-21 17:52:292769 ['spdy_proxy_auth_origin != ""', {
2770 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2771 }],
2772 ['spdy_proxy_auth_property != ""', {
2773 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2774 }],
[email protected]f37e9412013-05-27 23:18:252775 ['spdy_proxy_auth_value != ""', {
2776 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2777 }],
[email protected]d8dd60e2013-10-08 00:49:432778 ['data_reduction_proxy_probe_url != ""', {
2779 'defines': [
2780 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'],
2781 }],
[email protected]bec6a992014-06-19 01:03:212782 ['data_reduction_proxy_warmup_url != ""', {
2783 'defines': [
2784 'DATA_REDUCTION_PROXY_WARMUP_URL="<(data_reduction_proxy_warmup_url)"'],
2785 }],
[email protected]f4b492e92014-05-31 22:19:482786 ['data_reduction_proxy_ssl_origin != ""', {
2787 'defines': [
2788 'DATA_REDUCTION_PROXY_SSL_ORIGIN="<(data_reduction_proxy_ssl_origin)"'],
2789 }],
2790 ['data_reduction_proxy_alt_origin != ""', {
2791 'defines': [
2792 'DATA_REDUCTION_PROXY_ALT_ORIGIN="<(data_reduction_proxy_alt_origin)"'],
2793 }],
2794 ['data_reduction_proxy_alt_fallback_origin != ""', {
2795 'defines': [
2796 'DATA_REDUCTION_PROXY_ALT_FALLBACK_ORIGIN="<(data_reduction_proxy_alt_fallback_origin)"'],
2797 }],
[email protected]5cbeb502013-04-23 19:25:272798 ['enable_mdns==1', {
2799 'defines': ['ENABLE_MDNS=1'],
[email protected]b9171622013-10-01 22:05:232800 }],
[email protected]2188c8d2014-03-21 00:58:562801 ['enable_service_discovery==1', {
2802 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ],
2803 }],
[email protected]4b202ae2014-05-23 07:45:362804 ['enable_wifi_bootstrapping==1', {
2805 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ],
2806 }],
[email protected]754a2002014-02-14 16:40:342807 ['enable_hangout_services_extension==1', {
2808 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'],
2809 }],
[email protected]8c64e282013-11-28 16:05:142810 ['enable_ipc_fuzzer==1', {
2811 'defines': ['ENABLE_IPC_FUZZER=1'],
2812 }],
[email protected]8b4efe92014-02-21 16:08:202813 ['video_hole==1', {
2814 'defines': ['VIDEO_HOLE=1'],
2815 }],
[email protected]a6e22132010-02-10 20:43:182816 ], # conditions for 'target_defaults'
2817 'target_conditions': [
[email protected]e1b2d732014-03-28 16:20:322818 ['<(use_openssl)==1', {
[email protected]ad9449f92014-03-12 09:34:102819 'defines': ['USE_OPENSSL=1'],
2820 }],
[email protected]e1b2d732014-03-28 16:20:322821 ['<(use_openssl_certs)==1', {
2822 'defines': ['USE_OPENSSL_CERTS=1'],
2823 }],
2824 ['>(nacl_untrusted_build)==1', {
2825 'defines': [
2826 'USE_OPENSSL=1',
2827 'USE_OPENSSL_CERTS=1',
2828 ],
2829 }],
[email protected]ad9449f92014-03-12 09:34:102830 ['<(use_nss)==1 and >(nacl_untrusted_build)==0', {
2831 'defines': ['USE_NSS=1'],
2832 }],
[email protected]02517012014-06-13 09:28:412833 ['<(chromeos)==1 and >(nacl_untrusted_build)==0', {
2834 'defines': ['OS_CHROMEOS=1'],
2835 }],
[email protected]b1eb341c2011-11-09 18:46:072836 ['enable_wexit_time_destructors==1', {
2837 'conditions': [
2838 [ 'clang==1', {
2839 'cflags': [
2840 '-Wexit-time-destructors',
2841 ],
2842 'xcode_settings': {
2843 'WARNING_CFLAGS': [
2844 '-Wexit-time-destructors',
2845 ],
2846 },
2847 }],
2848 ],
2849 }],
[email protected]c14d8e772010-02-09 22:06:152850 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282851 'conditions': [
[email protected]1e013672012-06-29 22:12:202852 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332853 # We don't want to get warnings from third-party code,
2854 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282855 'cflags!': [
2856 '-Wall',
2857 '-Wextra',
[email protected]d8543312010-02-10 17:43:282858 ],
[email protected]167ec822011-10-24 22:05:272859 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002860 # Don't warn about hash_map in third-party code.
2861 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272862 ],
2863 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332864 # Don't warn about printf format problems.
2865 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222866 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002867 ],
[email protected]d16bd642011-07-25 23:59:182868 'cflags_cc!': [
[email protected]f58fa2c2013-12-06 08:06:202869 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453).
[email protected]d16bd642011-07-25 23:59:182870 '-Wsign-compare',
2871 ]
[email protected]d8543312010-02-10 17:43:282872 }],
[email protected]82dd5eb32012-08-18 04:24:322873 # TODO: Fix all warnings on chromeos too.
2874 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2875 'cflags!': [
2876 '-Werror',
2877 ],
2878 }],
[email protected]bc073c062012-01-13 06:28:032879 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112880 'cflags': [
2881 # Don't warn about ignoring the return value from e.g. close().
2882 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032883 # BSD systems do not support this option, since they are usually
2884 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112885 '-Wno-unused-result',
2886 ],
2887 }],
[email protected]d8543312010-02-10 17:43:282888 [ 'OS=="win"', {
2889 'defines': [
2890 '_CRT_SECURE_NO_DEPRECATE',
2891 '_CRT_NONSTDC_NO_WARNINGS',
2892 '_CRT_NONSTDC_NO_DEPRECATE',
2893 '_SCL_SECURE_NO_DEPRECATE',
2894 ],
2895 'msvs_disabled_warnings': [4800],
2896 'msvs_settings': {
2897 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112898 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242899 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282900 'Detect64BitPortabilityProblems': 'false',
2901 },
2902 },
[email protected]c54b41cb2012-08-24 20:58:242903 'conditions': [
2904 ['buildtype=="Official"', {
2905 'msvs_settings': {
2906 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2907 }
2908 }],
[email protected]8efc26082014-01-24 13:26:352909 ['clang==1', {
2910 'msvs_settings': {
2911 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2912 }
2913 }],
[email protected]c54b41cb2012-08-24 20:58:242914 ],
[email protected]d8543312010-02-10 17:43:282915 }],
[email protected]0915c3b2012-11-22 17:24:072916 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422917 [ 'OS=="win" and component=="shared_library"', {
2918 'msvs_disabled_warnings': [
2919 4251, # class 'std::xx' needs to have dll-interface.
2920 ],
2921 }],
[email protected]1e013672012-06-29 22:12:202922 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282923 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062924 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282925 },
[email protected]3a352c362012-05-08 19:45:492926 'conditions': [
2927 ['buildtype=="Official"', {
2928 'xcode_settings': {
2929 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2930 },
2931 }],
2932 ],
[email protected]d8543312010-02-10 17:43:282933 }],
[email protected]1e013672012-06-29 22:12:202934 [ 'OS=="ios"', {
2935 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222936 # TODO(ios): Fix remaining warnings in third-party code, then
2937 # remove this; the Mac cleanup didn't get everything that's
2938 # flagged in an iOS build.
2939 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202940 'RUN_CLANG_STATIC_ANALYZER': 'NO',
[email protected]5a2637d02013-11-12 17:01:172941 # Several internal ios directories generate numerous warnings for
2942 # -Wobjc-missing-property-synthesis.
2943 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
[email protected]1e013672012-06-29 22:12:202944 },
2945 }],
[email protected]c14d8e772010-02-09 22:06:152946 ],
2947 }, {
[email protected]a5c598152012-01-27 04:55:132948 'includes': [
2949 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2950 'filename_rules.gypi',
2951 ],
[email protected]41af4f82012-11-08 00:09:312952 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152953 # C99 macros on Mac and Linux.
2954 'defines': [
[email protected]41af4f82012-11-08 00:09:312955 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152956 '__STDC_FORMAT_MACROS',
2957 ],
2958 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152959 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072960 # turn on warnings for signed/unsigned mismatch on chromium code.
2961 'msvs_settings': {
2962 'VCCLCompilerTool': {
2963 'AdditionalOptions': ['/we4389'],
2964 },
2965 },
[email protected]c14d8e772010-02-09 22:06:152966 }],
[email protected]63e39a282011-07-13 20:41:282967 ['OS=="win" and component=="shared_library"', {
2968 'msvs_disabled_warnings': [
2969 4251, # class 'std::xx' needs to have dll-interface.
2970 ],
2971 }],
[email protected]c14d8e772010-02-09 22:06:152972 ],
2973 }],
[email protected]a6e22132010-02-10 20:43:182974 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552975 'default_configuration': 'Debug',
2976 'configurations': {
[email protected]5153767c2009-12-22 01:52:502977 # VCLinkerTool LinkIncremental values below:
2978 # 0 == default
2979 # 1 == /INCREMENTAL:NO
2980 # 2 == /INCREMENTAL
2981 # Debug links incremental, Release does not.
2982 #
[email protected]7b99801e2010-11-03 17:26:232983 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502984 #
2985 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562986 'abstract': 1,
2987 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512988 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562989 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2990 'CharacterSet': '1',
2991 },
[email protected]f59e1302013-02-15 13:48:402992 # Add the default import libs.
2993 'msvs_settings':{
2994 'VCLinkerTool': {
2995 'AdditionalDependencies': [
2996 'kernel32.lib',
2997 'gdi32.lib',
2998 'winspool.lib',
2999 'comdlg32.lib',
3000 'advapi32.lib',
3001 'shell32.lib',
3002 'ole32.lib',
3003 'oleaut32.lib',
3004 'user32.lib',
3005 'uuid.lib',
3006 'odbc32.lib',
3007 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:393008 'delayimp.lib',
[email protected]48293fb2013-12-04 04:02:033009 'credui.lib',
3010 'netapi32.lib',
[email protected]f59e1302013-02-15 13:48:403011 ],
3012 },
3013 },
[email protected]5153767c2009-12-22 01:52:503014 },
3015 'x86_Base': {
3016 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:503017 'msvs_settings': {
3018 'VCLinkerTool': {
[email protected]388484f02014-02-06 09:49:213019 'MinimumRequiredVersion': '5.01', # XP.
[email protected]ef4fa4072009-12-04 22:46:503020 'TargetMachine': '1',
3021 },
[email protected]2d584a92013-11-12 22:44:393022 'VCLibrarianTool': {
3023 'TargetMachine': '1',
3024 },
[email protected]ef4fa4072009-12-04 22:46:503025 },
[email protected]2fa40782009-11-01 21:17:343026 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:563027 },
[email protected]5153767c2009-12-22 01:52:503028 'x64_Base': {
3029 'abstract': 1,
3030 'msvs_configuration_platform': 'x64',
3031 'msvs_settings': {
3032 'VCLinkerTool': {
[email protected]68c88b02014-06-04 17:16:043033 # Make sure to understand http://crbug.com/361720 if you want to
3034 # increase this.
3035 'MinimumRequiredVersion': '5.02', # Server 2003.
[email protected]5153767c2009-12-22 01:52:503036 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:503037 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:053038 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:503039 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:053040 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:363041 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
3042 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:503043 },
[email protected]d26b4418ab2010-03-24 22:06:353044 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:503045 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:053046 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:503047 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:053048 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]2d584a92013-11-12 22:44:393049 'TargetMachine': '17', # x64
[email protected]5153767c2009-12-22 01:52:503050 },
3051 },
[email protected]5153767c2009-12-22 01:52:503052 },
3053 'Debug_Base': {
3054 'abstract': 1,
[email protected]14339762011-04-05 07:36:583055 'defines': [
3056 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3057 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3058 ],
[email protected]1c966092009-08-20 21:19:263059 'xcode_settings': {
[email protected]d5d593a2009-08-28 23:23:293060 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:493061 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:493062 '<@(debug_extra_cflags)',
3063 ],
[email protected]1c966092009-08-20 21:19:263064 },
[email protected]bb05e452009-10-29 21:24:563065 'msvs_settings': {
3066 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:473067 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:563068 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:213069 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:473070 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:153071 'conditions': [
3072 # According to MSVS, InlineFunctionExpansion=0 means
3073 # "default inlining", not "/Ob0".
3074 # Thus, we have to handle InlineFunctionExpansion==0 separately.
3075 ['win_debug_InlineFunctionExpansion==0', {
3076 'AdditionalOptions': ['/Ob0'],
3077 }],
3078 ['win_debug_InlineFunctionExpansion!=""', {
3079 'InlineFunctionExpansion':
3080 '<(win_debug_InlineFunctionExpansion)',
3081 }],
[email protected]fac10d12010-11-08 16:00:313082 ['win_debug_disable_iterator_debugging==1', {
3083 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
3084 }],
[email protected]ef5c5f1b2011-12-17 02:16:243085
3086 # if win_debug_OmitFramePointers is blank, leave as default
3087 ['win_debug_OmitFramePointers==1', {
3088 'OmitFramePointers': 'true',
3089 }],
3090 ['win_debug_OmitFramePointers==0', {
3091 'OmitFramePointers': 'false',
3092 # The above is not sufficient (http://crbug.com/106711): it
3093 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
3094 # perform FPO regardless, so we must explicitly disable.
3095 # We still want the false setting above to avoid having
3096 # "/Oy /Oy-" and warnings about overriding.
3097 'AdditionalOptions': ['/Oy-'],
3098 }],
[email protected]2ae6e022010-05-07 13:19:153099 ],
[email protected]ef5c5f1b2011-12-17 02:16:243100 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:563101 },
3102 'VCLinkerTool': {
3103 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:333104 # ASLR makes debugging with windbg difficult because Chrome.exe and
3105 # Chrome.dll share the same base name. As result, windbg will
3106 # name the Chrome.dll module like chrome_<base address>, where
3107 # <base address> typically changes with each launch. This in turn
3108 # means that breakpoints in Chrome.dll don't stick from one launch
3109 # to the next. For this reason, we turn ASLR off in debug builds.
3110 # Note that this is a three-way bool, where 0 means to pick up
3111 # the default setting, 1 is off and 2 is on.
3112 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:563113 },
3114 'VCResourceCompilerTool': {
3115 'PreprocessorDefinitions': ['_DEBUG'],
3116 },
3117 },
[email protected]2f80c312009-02-25 21:26:553118 'conditions': [
[email protected]78204c92012-09-14 04:42:553119 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:543120 'target_conditions': [
3121 ['_toolset=="target"', {
3122 'cflags': [
3123 '<@(debug_extra_cflags)',
3124 ],
3125 }],
[email protected]bb05e452009-10-29 21:24:563126 ],
[email protected]2f80c312009-02-25 21:26:553127 }],
[email protected]1eec679e2013-12-13 22:10:273128 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', {
[email protected]a8d94b42013-12-10 18:52:223129 # Enable libstdc++ debugging facilities to help catch problems
3130 # early, see http://crbug.com/65151 .
3131 # TODO(phajdan.jr): Should we enable this for all of POSIX?
3132 'defines': ['_GLIBCXX_DEBUG=1',],
3133 }],
[email protected]330ba6d2014-03-06 05:41:363134 ['release_valgrind_build==0', {
[email protected]56cca4e2011-07-01 21:33:353135 'xcode_settings': {
3136 'OTHER_CFLAGS': [
3137 '-fstack-protector-all', # Implies -fstack-protector
3138 ],
3139 },
3140 }],
[email protected]2f80c312009-02-25 21:26:553141 ],
3142 },
[email protected]5153767c2009-12-22 01:52:503143 'Release_Base': {
3144 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:553145 'defines': [
3146 'NDEBUG',
3147 ],
[email protected]1c966092009-08-20 21:19:263148 'xcode_settings': {
3149 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
3150 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:003151 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:263152 },
[email protected]bb05e452009-10-29 21:24:563153 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:473154 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:473155 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:153156 'conditions': [
[email protected]2212d272011-12-20 21:37:373157 # In official builds, each target will self-select
3158 # an optimization level.
3159 ['buildtype!="Official"', {
3160 'Optimization': '<(win_release_Optimization)',
3161 },
3162 ],
[email protected]2ae6e022010-05-07 13:19:153163 # According to MSVS, InlineFunctionExpansion=0 means
3164 # "default inlining", not "/Ob0".
3165 # Thus, we have to handle InlineFunctionExpansion==0 separately.
3166 ['win_release_InlineFunctionExpansion==0', {
3167 'AdditionalOptions': ['/Ob0'],
3168 }],
3169 ['win_release_InlineFunctionExpansion!=""', {
3170 'InlineFunctionExpansion':
3171 '<(win_release_InlineFunctionExpansion)',
3172 }],
[email protected]626d2d22011-10-11 15:47:333173
[email protected]ef5c5f1b2011-12-17 02:16:243174 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:333175 ['win_release_OmitFramePointers==1', {
3176 'OmitFramePointers': 'true',
3177 }],
3178 ['win_release_OmitFramePointers==0', {
3179 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:243180 # The above is not sufficient (http://crbug.com/106711): it
3181 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
3182 # perform FPO regardless, so we must explicitly disable.
3183 # We still want the false setting above to avoid having
3184 # "/Oy /Oy-" and warnings about overriding.
3185 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:333186 }],
[email protected]2ae6e022010-05-07 13:19:153187 ],
[email protected]ef5c5f1b2011-12-17 02:16:243188 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:473189 },
[email protected]bb05e452009-10-29 21:24:563190 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:343191 # LinkIncremental is a tri-state boolean, where 0 means default
3192 # (i.e., inherit from parent solution), 1 means false, and
3193 # 2 means true.
[email protected]bb05e452009-10-29 21:24:563194 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:343195 # This corresponds to the /PROFILE flag which ensures the PDB
3196 # file contains FIXUP information (growing the PDB file by about
3197 # 5%) but does not otherwise alter the output binary. This
3198 # information is used by the Syzygy optimization tool when
3199 # decomposing the release image.
3200 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:563201 },
3202 },
[email protected]2f80c312009-02-25 21:26:553203 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:163204 ['msvs_use_common_release', {
3205 'includes': ['release.gypi'],
3206 }],
[email protected]7bdd7d7c2012-11-01 10:36:163207 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:583208 'defines': [
3209 'NVALGRIND',
3210 'DYNAMIC_ANNOTATIONS_ENABLED=0',
3211 ],
[email protected]ee857512010-05-14 08:24:423212 }, {
[email protected]14339762011-04-05 07:36:583213 'defines': [
[email protected]2f047202013-06-14 06:36:393214 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:583215 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3216 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3217 ],
[email protected]92822e82009-09-18 14:26:563218 }],
[email protected]7e0d664a2009-12-03 21:07:473219 ['win_use_allocator_shim==0', {
3220 'defines': ['NO_TCMALLOC'],
3221 }],
[email protected]8b225222014-02-18 22:54:443222 # _FORTIFY_SOURCE isn't really supported by Clang now, see
3223 # http://llvm.org/bugs/show_bug.cgi?id=16821.
3224 # TODO(glider): once the bug is fixed, disable source fortification
3225 # under the sanitizer tools only.
3226 ['os_posix==1 and (OS!="linux" or clang!=1)', {
[email protected]9577be42013-11-01 15:16:303227 'target_conditions': [
3228 ['chromium_code==1', {
3229 # Non-chromium code is not guaranteed to compile cleanly
3230 # with _FORTIFY_SOURCE. Also, fortified build may fail
3231 # when optimizations are disabled, so only do that for Release
3232 # build.
3233 'defines': [
3234 '_FORTIFY_SOURCE=2',
3235 ],
3236 }],
[email protected]37305ae2012-12-11 01:54:583237 ],
3238 }],
[email protected]7df38122012-11-05 23:54:433239 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:543240 'target_conditions': [
3241 ['_toolset=="target"', {
3242 'cflags': [
3243 '<@(release_extra_cflags)',
3244 ],
[email protected]9082bba2014-05-20 06:50:213245 'conditions': [
3246 ['enable_resource_whitelist_generation==1', {
3247 'cflags': [
3248 '-Wunknown-pragmas -Wno-error=unknown-pragmas',
3249 ],
3250 }],
3251 ],
[email protected]d8e3b122012-05-31 23:07:543252 }],
[email protected]bb05e452009-10-29 21:24:563253 ],
3254 }],
[email protected]b64ec822013-05-23 12:57:413255 ['OS=="ios"', {
3256 'defines': [
3257 'NS_BLOCK_ASSERTIONS=1',
3258 ],
3259 }],
[email protected]2f80c312009-02-25 21:26:553260 ],
3261 },
[email protected]5153767c2009-12-22 01:52:503262 #
3263 # Concrete configurations
3264 #
3265 'Debug': {
3266 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
3267 },
3268 'Release': {
3269 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:503270 },
[email protected]f926fa0a2009-08-04 22:50:133271 'conditions': [
[email protected]8125fba72014-02-26 14:32:583272 [ 'OS=="ios"', {
3273 'Profile': {
3274 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
3275 'target_conditions': [
3276 [ '_type=="executable"', {
3277 # To get a real .dSYM bundle produced by dsymutil, set the
3278 # debug information format to dwarf-with-dsym. Since
3279 # strip_from_xcode will not be used, set Xcode to do the
3280 # stripping as well.
3281 'xcode_settings': {
3282 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3283 'DEPLOYMENT_POSTPROCESSING': 'YES',
3284 'STRIP_INSTALLED_PRODUCT': 'YES',
3285 },
3286 }],
3287 ],
3288 },
3289 }],
[email protected]f926fa0a2009-08-04 22:50:133290 [ 'OS=="win"', {
3291 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:503292 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:503293 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:303294 },
3295 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:503296 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:303297 },
[email protected]f926fa0a2009-08-04 22:50:133298 }],
3299 ],
[email protected]2f80c312009-02-25 21:26:553300 },
3301 },
3302 'conditions': [
[email protected]41300ff2014-04-07 08:17:253303 ['os_posix==1', {
3304 'target_defaults': {
3305 'ldflags': [
3306 '-Wl,-z,now',
3307 '-Wl,-z,relro',
3308 ],
3309 },
3310 }],
[email protected]713d6e4a2014-03-28 18:18:203311 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
[email protected]453a8ad32014-05-20 17:32:493312 ['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:253313 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:253314 'ldflags': [
[email protected]a89c460c2014-03-17 13:42:133315 '-Wl,--fatal-warnings',
[email protected]43539ec2012-11-20 22:35:253316 ],
[email protected]43539ec2012-11-20 22:35:253317 },
3318 }],
[email protected]d2ca75c2013-02-01 05:47:173319 ['os_posix==1 and chromeos==0', {
3320 # Chrome OS enables -fstack-protector-strong via its build wrapper,
3321 # and we want to avoid overriding this, so stack-protector is only
3322 # enabled when not building on Chrome OS.
3323 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
3324 # supports it.
3325 'target_defaults': {
3326 'cflags': [
3327 '-fstack-protector',
3328 '--param=ssp-buffer-size=4',
3329 ],
3330 },
3331 }],
[email protected]1e013672012-06-29 22:12:203332 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:263333 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:273334 # Enable -Werror by default, but put it in a variable so it can
3335 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
3336 'variables': {
[email protected]cbbb3472012-01-25 18:32:313337 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:203338 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:273339 },
[email protected]6863896f2012-01-25 17:51:363340 'defines': [
3341 '_FILE_OFFSET_BITS=64',
3342 ],
[email protected]9d384032009-03-20 23:13:263343 'cflags': [
[email protected]1bba09c2009-08-13 12:53:163344 '<(werror)', # See note above about the werror variable.
3345 '-pthread',
3346 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:293347 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:163348 '-Wall',
[email protected]0fa17082010-03-26 00:48:053349 # TODO(evan): turn this back on once all the builds work.
3350 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:203351 # Don't warn about unused function params. We use those everywhere.
3352 '-Wno-unused-parameter',
3353 # Don't warn about the "struct foo f = {0};" initialization pattern.
3354 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:123355 # Don't export any symbols (for example, to plugins we dlopen()).
3356 # Note: this is *required* to make some plugins work.
3357 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:353358 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:243359 ],
3360 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:223361 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:243362 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:363363 # Make inline functions have hidden visiblity by default.
3364 # Surprisingly, not covered by -fvisibility=hidden.
3365 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:173366 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
[email protected]f58fa2c2013-12-06 08:06:203367 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453)
[email protected]554abd902011-07-25 04:03:173368 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:263369 ],
[email protected]a6cf87e2009-04-03 04:07:383370 'ldflags': [
[email protected]138241f2010-03-30 23:53:103371 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:263372 ],
[email protected]1e013672012-06-29 22:12:203373 'libraries' : [
3374 '<(libraries_for_target)',
3375 ],
[email protected]3aacaf952009-04-02 15:34:093376 'configurations': {
[email protected]5153767c2009-12-22 01:52:503377 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:313378 'variables': {
3379 'debug_optimize%': '0',
3380 },
[email protected]3aacaf952009-04-02 15:34:093381 'defines': [
3382 '_DEBUG',
3383 ],
3384 'cflags': [
[email protected]95ad2032012-08-24 00:49:253385 '-O>(debug_optimize)',
[email protected]5f43f77f2014-03-19 13:53:163386 '-g',
[email protected]3aacaf952009-04-02 15:34:093387 ],
[email protected]da1c8d692011-09-20 20:35:013388 'conditions' : [
[email protected]3f05e912013-04-11 20:38:343389 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:343390 'ldflags': [
[email protected]933d0722013-07-03 04:32:493391 # Warn in case of text relocations.
3392 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:343393 ],
3394 }],
[email protected]fa9d4e262012-08-21 04:39:003395 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:553396 # Some configurations are copied from Release_Base to reduce
3397 # the binary size.
3398 'variables': {
3399 'debug_optimize%': 's',
3400 },
[email protected]da1c8d692011-09-20 20:35:013401 'cflags': [
[email protected]8a37e4502012-08-14 22:42:553402 '-fomit-frame-pointer',
3403 '-fdata-sections',
3404 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:013405 ],
[email protected]8a37e4502012-08-14 22:42:553406 'ldflags': [
3407 '-Wl,-O1',
3408 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:553409 ],
[email protected]da1c8d692011-09-20 20:35:013410 }],
[email protected]d4c0ec5b2013-03-10 03:07:453411 ['OS=="linux" and target_arch=="ia32"', {
3412 'ldflags': [
3413 '-Wl,--no-as-needed',
3414 ],
3415 }],
[email protected]2578ea12014-01-17 06:02:513416 ['debug_unwind_tables==1', {
3417 'cflags': ['-funwind-tables'],
3418 }, {
3419 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
3420 }],
[email protected]9dbbabd2014-04-30 23:42:323421 # TODO(mostynb): shuffle clang/gcc_version/binutils_version
3422 # definitions in to the right scope to use them when setting
3423 # linux_use_debug_fission, so it can be used here alone.
3424 ['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:213425 'cflags': ['-gsplit-dwarf'],
[email protected]1c26c6a2014-03-17 14:11:213426 }],
[email protected]da1c8d692011-09-20 20:35:013427 ],
[email protected]5315f2842009-04-28 00:43:273428 },
[email protected]5153767c2009-12-22 01:52:503429 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:013430 'variables': {
3431 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:513432 # Binaries become big and gold is unable to perform GC
3433 # and remove unused sections for some of test targets
3434 # on 32 bit platform.
3435 # (This is currently observed only in chromeos valgrind bots)
3436 # The following flag is to disable --gc-sections linker
3437 # option for these bots.
3438 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:123439
3440 # TODO(bradnelson): reexamine how this is done if we change the
3441 # expansion of configurations
3442 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:013443 },
[email protected]3aacaf952009-04-02 15:34:093444 'cflags': [
[email protected]4c33a9b2014-06-23 22:20:193445 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:533446 # Don't emit the GCC version ident directives, they just end up
3447 # in the .comment section taking up binary size.
3448 '-fno-ident',
3449 # Put data and code in their own sections, so that unused symbols
3450 # can be removed at link time with --gc-sections.
3451 '-fdata-sections',
3452 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:093453 ],
[email protected]c902f2c2010-08-06 20:04:183454 'ldflags': [
3455 # Specifically tell the linker to perform optimizations.
3456 # See http://lwn.net/Articles/192624/ .
3457 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:223458 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:183459 ],
[email protected]1dd529642010-05-15 01:02:513460 'conditions' : [
3461 ['no_gc_sections==0', {
3462 'ldflags': [
3463 '-Wl,--gc-sections',
3464 ],
3465 }],
[email protected]da1c8d692011-09-20 20:35:013466 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:583467 'variables': {
3468 'release_optimize%': 's',
3469 },
[email protected]da1c8d692011-09-20 20:35:013470 'cflags': [
3471 '-fomit-frame-pointer',
3472 ],
[email protected]933d0722013-07-03 04:32:493473 'ldflags': [
[email protected]933d0722013-07-03 04:32:493474 # Warn in case of text relocations.
3475 '-Wl,--warn-shared-textrel',
3476 ],
[email protected]da1c8d692011-09-20 20:35:013477 }],
[email protected]ecf7b6482010-10-13 09:15:203478 ['clang==1', {
3479 'cflags!': [
3480 '-fno-ident',
3481 ],
3482 }],
[email protected]7664ab32011-02-01 23:35:253483 ['profiling==1', {
3484 'cflags': [
3485 '-fno-omit-frame-pointer',
3486 '-g',
3487 ],
[email protected]0358c4832013-06-23 14:17:583488 'conditions' : [
3489 ['profiling_full_stack_frames==1', {
3490 'cflags': [
3491 '-fno-inline',
3492 '-fno-optimize-sibling-calls',
3493 ],
3494 }],
3495 ],
[email protected]7664ab32011-02-01 23:35:253496 }],
[email protected]2578ea12014-01-17 06:02:513497 ['release_unwind_tables==1', {
3498 'cflags': ['-funwind-tables'],
3499 }, {
3500 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
[email protected]a637d4382014-01-11 03:12:053501 }],
[email protected]8d726a42012-02-09 03:49:003502 ],
[email protected]3aacaf952009-04-02 15:34:093503 },
3504 },
[email protected]606116d22009-05-06 22:38:233505 'conditions': [
[email protected]04b482602011-09-14 02:36:213506 ['target_arch=="ia32"', {
3507 'target_conditions': [
3508 ['_toolset=="target"', {
3509 'asflags': [
3510 # Needed so that libs with .s files (e.g. libicudata.a)
3511 # are compatible with the general 32-bit-ness.
3512 '-32',
3513 ],
3514 # All floating-point computations on x87 happens in 80-bit
3515 # precision. Because the C and C++ language standards allow
3516 # the compiler to keep the floating-point values in higher
3517 # precision than what's specified in the source and doing so
3518 # is more efficient than constantly rounding up to 64-bit or
3519 # 32-bit precision as specified in the source, the compiler,
3520 # especially in the optimized mode, tries very hard to keep
3521 # values in x87 floating-point stack (in 80-bit precision)
3522 # as long as possible. This has important side effects, that
3523 # the real value used in computation may change depending on
3524 # how the compiler did the optimization - that is, the value
3525 # kept in 80-bit is different than the value rounded down to
3526 # 64-bit or 32-bit. There are possible compiler options to
3527 # make this behavior consistent (e.g. -ffloat-store would keep
3528 # all floating-values in the memory, thus force them to be
3529 # rounded to its original precision) but they have significant
3530 # runtime performance penalty.
3531 #
3532 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
3533 # which keep floating-point values in SSE registers in its
3534 # native precision (32-bit for single precision, and 64-bit
3535 # for double precision values). This means the floating-point
3536 # value used during computation does not change depending on
3537 # how the compiler optimized the code, since the value is
3538 # always kept in its specified precision.
[email protected]6c0d30672014-03-12 00:31:303539 #
3540 # Refer to http://crbug.com/348761 for rationale behind SSE2
3541 # being a minimum requirement for 32-bit Linux builds and
3542 # http://crbug.com/313032 for an example where this has "bit"
3543 # us in the past.
3544 'cflags': [
3545 '-msse2',
3546 '-mfpmath=sse',
3547 '-mmmx', # Allows mmintrin.h for MMX intrinsics.
3548 '-m32',
3549 ],
3550 'ldflags': [
3551 '-m32',
3552 ],
[email protected]04b482602011-09-14 02:36:213553 'conditions': [
[email protected]0a0063c52013-03-29 06:36:213554 # Use gold linker for Android ia32 target.
3555 ['OS=="android"', {
[email protected]0a0063c52013-03-29 06:36:213556 'ldflags': [
3557 '-fuse-ld=gold',
3558 ],
3559 }],
[email protected]04b482602011-09-14 02:36:213560 # Install packages have started cropping up with
3561 # different headers between the 32-bit and 64-bit
3562 # versions, so we have to shadow those differences off
3563 # and make sure a 32-bit-on-64-bit build picks up the
3564 # right files.
[email protected]32594022012-05-10 03:22:283565 # For android build, use NDK headers instead of host headers
3566 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:213567 'include_dirs+': [
3568 '/usr/include32',
3569 ],
3570 }],
3571 ],
[email protected]ffde7932009-05-29 00:39:063572 }],
[email protected]606116d22009-05-06 22:38:233573 ],
3574 }],
[email protected]be0090f22014-03-18 17:43:483575 ['target_arch=="x64"', {
3576 'target_conditions': [
3577 ['_toolset=="target"', {
3578 'conditions': [
3579 # Use gold linker for Android x64 target.
3580 ['OS=="android"', {
[email protected]be0090f22014-03-18 17:43:483581 'ldflags': [
3582 '-fuse-ld=gold',
3583 ],
3584 }],
3585 ],
3586 'cflags': [
3587 '-m64',
3588 '-march=x86-64',
3589 ],
3590 'ldflags': [
3591 '-m64',
3592 ],
3593 }],
3594 ],
3595 }],
[email protected]3dda8a962009-08-10 18:58:073596 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:293597 'target_conditions': [
3598 ['_toolset=="target"', {
3599 'cflags_cc': [
3600 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3601 # has changed whenever it encounters a varargs function. This
3602 # silences those warnings, as they are not helpful and
3603 # clutter legitimate warnings.
3604 '-Wno-abi',
3605 ],
3606 'conditions': [
[email protected]7d6763422013-04-26 12:06:543607 ['arm_arch!=""', {
3608 'cflags': [
3609 '-march=<(arm_arch)',
3610 ],
3611 }],
3612 ['arm_tune!=""', {
3613 'cflags': [
3614 '-mtune=<(arm_tune)',
3615 ],
3616 }],
3617 ['arm_fpu!=""', {
3618 'cflags': [
3619 '-mfpu=<(arm_fpu)',
3620 ],
3621 }],
3622 ['arm_float_abi!=""', {
3623 'cflags': [
3624 '-mfloat-abi=<(arm_float_abi)',
3625 ],
3626 }],
3627 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293628 'cflags': [
3629 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:293630 ]
3631 }],
[email protected]da1c8d692011-09-20 20:35:013632 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533633 # Most of the following flags are derived from what Android
3634 # uses by default when building for arm, reference for which
3635 # can be found in the following file in the Android NDK:
[email protected]7557cd42014-05-28 15:32:593636 # toolchains/arm-linux-androideabi-4.8/setup.mk
[email protected]7b1112c2012-03-16 22:03:533637 'cflags': [
3638 # The tree-sra optimization (scalar replacement for
3639 # aggregates enabling subsequent optimizations) leads to
3640 # invalid code generation when using the Android NDK's
3641 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433642 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533643 '-fno-tree-sra',
[email protected]7557cd42014-05-28 15:32:593644 # The following 6 options are disabled to save on
3645 # binary size in gcc 4.8.
3646 # TODO(fdegans) Reevaluate when we upgrade GCC.
3647 '-fno-partial-inlining',
3648 '-fno-early-inlining',
3649 '-fno-tree-copy-prop',
3650 '-fno-tree-loop-optimize',
3651 '-fno-move-loop-invariants',
3652 '-fno-caller-saves',
[email protected]7b1112c2012-03-16 22:03:533653 '-Wno-psabi',
3654 ],
[email protected]ad17e342012-07-17 20:45:483655 # Android now supports .relro sections properly.
3656 # NOTE: While these flags enable the generation of .relro
3657 # sections, the generated libraries can still be loaded on
3658 # older Android platform versions.
3659 'ldflags': [
3660 '-Wl,-z,relro',
3661 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483662 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483663 ],
[email protected]da1c8d692011-09-20 20:35:013664 'conditions': [
[email protected]7d6763422013-04-26 12:06:543665 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223666 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013667 }],
[email protected]4c48ef102012-11-29 22:00:383668 ['profiling==1', {
3669 'cflags': [
[email protected]a0e681cc2014-05-16 16:56:473670 # Thumb code with frame pointer makes chrome crash
3671 # early.
3672 '-marm',
3673 '-mapcs-frame', # Required by -fno-omit-frame-pointer.
3674 # The perf report sometimes incorrectly attributes
3675 # code from tail calls.
3676 '-fno-optimize-sibling-calls',
3677 ],
3678 'cflags!': [
3679 '-fomit-frame-pointer',
[email protected]4c48ef102012-11-29 22:00:383680 ],
3681 }],
[email protected]220ea5932012-08-09 10:44:073682 ['clang==1', {
3683 'cflags!': [
3684 # Clang does not support the following options.
3685 '-mthumb-interwork',
3686 '-finline-limit=64',
3687 '-fno-tree-sra',
[email protected]7557cd42014-05-28 15:32:593688 '-fno-partial-inlining',
3689 '-fno-early-inlining',
3690 '-fno-tree-copy-prop',
3691 '-fno-tree-loop-optimize',
3692 '-fno-move-loop-invariants',
3693 '-fno-caller-saves',
[email protected]220ea5932012-08-09 10:44:073694 '-Wno-psabi',
3695 ],
[email protected]b763d402014-01-13 18:34:223696 'cflags': [
3697 # TODO(hans) Enable integrated-as (crbug.com/124610).
3698 '-no-integrated-as',
[email protected]f4091d32014-01-23 23:16:353699 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
[email protected]b763d402014-01-13 18:34:223700 ],
3701
[email protected]7d899e9a2013-10-12 06:02:423702 'ldflags!': [
3703 # Clang does not support the following options.
3704 '-fuse-ld=gold',
3705 ],
[email protected]1afb1102014-01-31 00:04:223706 'ldflags': [
3707 # As long as -fuse-ld=gold doesn't work, add a dummy directory
3708 # with an 'ld' that redirects to gold, so that clang uses gold.
[email protected]ac15ff0c2014-05-13 19:32:483709 '-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-androideabi-gold',
[email protected]1afb1102014-01-31 00:04:223710 ],
[email protected]220ea5932012-08-09 10:44:073711 }],
[email protected]cdc001e2014-01-23 11:07:533712 ['asan==1', {
3713 'cflags': [
3714 '-marm', # Required for frame pointer based stack traces.
3715 ],
3716 }],
[email protected]da1c8d692011-09-20 20:35:013717 ],
3718 }],
[email protected]3dda8a962009-08-10 18:58:073719 ],
3720 }],
3721 ],
3722 }],
[email protected]7a2f984a2014-03-20 18:35:493723 ['target_arch=="arm64"', {
3724 'target_conditions': [
3725 ['_toolset=="target"', {
3726 'conditions': [
3727 ['OS=="android"', {
3728 'cflags!': [
3729 '-fstack-protector', # stack protector is always enabled on arm64.
3730 ],
3731 }],
3732 ],
3733 }],
3734 ],
3735 }],
[email protected]23eea4a42013-04-27 04:10:263736 ['target_arch=="mipsel"', {
3737 'target_conditions': [
3738 ['_toolset=="target"', {
3739 'conditions': [
[email protected]3a626e02013-06-27 12:58:343740 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263741 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343742 }],
3743 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263744 'cflags': ['-mips32', '-Wa,-mips32'],
3745 }],
3746 ],
3747 'cflags': [
3748 '-EL',
3749 '-mhard-float',
3750 ],
3751 'ldflags': [
3752 '-EL',
3753 '-Wl,--no-keep-memory'
3754 ],
3755 'cflags_cc': [
3756 '-Wno-uninitialized',
3757 ],
3758 }],
3759 ],
3760 }],
[email protected]2fb843b2010-08-12 02:11:083761 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583762 'cflags': [
3763 '-fPIC',
3764 ],
[email protected]d3f692b32011-12-14 19:04:353765 'ldflags': [
3766 '-fPIC',
3767 ],
[email protected]c76723a2010-01-25 23:10:583768 }],
[email protected]ee28c9f2009-09-04 01:53:013769 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573770 'target_conditions': [
3771 ['_toolset=="target"', {
3772 'cflags': [
3773 '--sysroot=<(sysroot)',
3774 ],
3775 'ldflags': [
3776 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153777 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573778 ],
3779 }]]
[email protected]ee28c9f2009-09-04 01:53:013780 }],
[email protected]58680ce2010-09-18 00:09:153781 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123782 'cflags': [
3783 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073784
[email protected]7ddcb1d2013-04-19 04:52:533785 # Don't die on dtoa code that uses a char as an array index.
3786 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073787
[email protected]64bbd6c2013-11-12 05:05:413788 # TODO(thakis): This used to be implied by -Wno-unused-function,
3789 # which we no longer use. Check if it makes sense to remove
3790 # this as well. http://crbug.com/316352
3791 '-Wno-unneeded-internal-declaration',
[email protected]9242c7642012-01-29 09:02:103792
3793 # Warns on switches on enums that cover all enum values but
3794 # also contain a default: branch. Chrome is full of that.
3795 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513796
3797 # Warns when a const char[] is converted to bool.
3798 '-Wstring-conversion',
[email protected]ce889c22013-07-16 22:37:183799
3800 # C++11-related flags:
3801
[email protected]8dec02e2013-04-30 21:40:073802 # This warns on using ints as initializers for floats in
3803 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3804 # which happens in several places in chrome code. Not sure if
3805 # this is worth fixing.
3806 '-Wno-c++11-narrowing',
3807
[email protected]00c83cc2013-07-25 00:55:503808 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:073809 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243810
3811 # Clang considers the `register` keyword as deprecated, but e.g.
3812 # code generated by flex (used in angle) contains that keyword.
3813 # http://crbug.com/255186
3814 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073815 ],
[email protected]ce889c22013-07-16 22:37:183816 'cflags!': [
3817 # Clang doesn't seem to know know this flag.
3818 '-mfpmath=sse',
3819 ],
[email protected]8dec02e2013-04-30 21:40:073820 'cflags_cc': [
3821 # See the comment in the Mac section for what it takes to move
3822 # this to -std=c++11.
3823 '-std=gnu++11',
3824 ],
3825 }],
[email protected]5d451ad2011-02-11 16:43:463826 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263827 'cflags': [
[email protected]c872dc52012-05-19 06:36:313828 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263829 ],
[email protected]5d451ad2011-02-11 16:43:463830 }],
[email protected]4a9ac22e2011-12-02 03:41:533831 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263832 'cflags': [
3833 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533834 ],
3835 }],
3836 ['clang==1 and clang_add_plugin!=""', {
3837 'cflags': [
[email protected]d23720682011-08-11 00:16:263838 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3839 ],
[email protected]5e781232011-01-28 02:57:593840 }],
[email protected]49110f02013-04-22 22:51:343841 ['clang==1 and target_arch=="ia32"', {
3842 'cflags': [
3843 # Else building libyuv gives clang's register allocator issues,
3844 # see llvm.org/PR15798 / crbug.com/233709
3845 '-momit-leaf-frame-pointer',
3846 ],
3847 }],
[email protected]2616d45d2012-01-19 03:15:483848 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3849 'cflags': [
3850 # See http://crbug.com/110262
3851 '-fcolor-diagnostics',
3852 ],
3853 }],
[email protected]062522a2013-06-13 15:49:553854 # Common options for AddressSanitizer, LeakSanitizer,
3855 # ThreadSanitizer and MemorySanitizer.
[email protected]0dbe7af92014-06-26 23:31:403856 ['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:543857 'target_conditions': [
3858 ['_toolset=="target"', {
3859 'cflags': [
3860 '-fno-omit-frame-pointer',
3861 '-gline-tables-only',
3862 ],
[email protected]b772fce2014-01-22 09:27:523863 'cflags!': [
3864 '-fomit-frame-pointer',
3865 ],
[email protected]7fd639a2014-05-30 23:59:013866 }],
3867 ],
3868 }],
3869 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
3870 'target_conditions': [
3871 ['_toolset=="target"', {
[email protected]49110f02013-04-22 22:51:343872 'ldflags!': [
3873 # Functions interposed by the sanitizers can make ld think
3874 # that some libraries aren't needed when they actually are,
3875 # http://crbug.com/234010. As workaround, disable --as-needed.
3876 '-Wl,--as-needed',
3877 ],
[email protected]2f047202013-06-14 06:36:393878 'defines': [
3879 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3880 ],
[email protected]cf351c22013-04-19 13:00:543881 }],
3882 ],
[email protected]05b59c92014-04-15 18:39:203883 # TODO(glider): enable the default options on other systems.
3884 'conditions': [
[email protected]1b9654122014-04-28 12:11:153885 ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or target_arch!="ia32")', {
[email protected]05b59c92014-04-15 18:39:203886 'dependencies': [
3887 '<(DEPTH)/base/base.gyp:sanitizer_options',
3888 ],
3889 }],
3890 ],
[email protected]cf351c22013-04-19 13:00:543891 }],
[email protected]92799b632011-08-15 14:33:063892 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423893 'target_conditions': [
3894 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453895 'cflags': [
[email protected]48688df02012-11-27 21:04:563896 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563897 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453898 ],
3899 'ldflags': [
[email protected]48688df02012-11-27 21:04:563900 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453901 ],
[email protected]1ffc3b3962012-05-16 14:08:423902 }],
[email protected]921c7b52011-11-25 10:34:353903 ],
[email protected]eec02d982014-03-21 18:51:173904 'conditions': [
3905 ['OS=="mac"', {
3906 'cflags': [
3907 '-mllvm -asan-globals=0', # http://crbug.com/352073
3908 ],
3909 }],
3910 ],
[email protected]92799b632011-08-15 14:33:063911 }],
[email protected]7fd639a2014-05-30 23:59:013912 ['ubsan==1', {
3913 'target_conditions': [
3914 ['_toolset=="target"', {
3915 'cflags': [
3916 '-fsanitize=undefined',
3917 # -fsanitize=vptr is incompatible with -fno-rtti.
3918 '-fno-sanitize=vptr',
3919 '-w', # http://crbug.com/162783
3920 ],
3921 'ldflags': [
3922 '-fsanitize=undefined',
3923 # -fsanitize=vptr is incompatible with -fno-rtti.
3924 '-fno-sanitize=vptr',
3925 ],
3926 }],
3927 ],
3928 }],
[email protected]0dbe7af92014-06-26 23:31:403929 ['ubsan_vptr==1', {
3930 'target_conditions': [
3931 ['_toolset=="target"', {
3932 'cflags': [
3933 '-fsanitize=vptr',
3934 '-fsanitize=null', # Avoid dereferences on null pointer objects.
3935 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
3936 '-w', # http://crbug.com/162783
3937 ],
3938 'cflags_cc!': [
3939 '-fno-rtti',
3940 ],
3941 'cflags!': [
3942 '-fno-rtti',
3943 ],
3944 'ldflags': [
3945 '-fsanitize=vptr', # -fsanitize=null is not necessary.
3946 ],
3947 'defines': [
3948 'UNDEFINED_SANITIZER',
3949 ],
3950 }],
3951 ],
3952 }],
[email protected]544a18ed2014-01-17 21:01:363953 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:033954 'target_conditions': [
3955 ['_toolset=="target"', {
3956 'cflags': [
[email protected]544a18ed2014-01-17 21:01:363957 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:033958 ],
3959 }],
3960 ],
3961 }],
[email protected]062522a2013-06-13 15:49:553962 ['lsan==1', {
3963 'target_conditions': [
3964 ['_toolset=="target"', {
3965 'cflags': [
3966 '-fsanitize=leak',
3967 ],
3968 'ldflags': [
3969 '-fsanitize=leak',
3970 ],
3971 'defines': [
3972 'LEAK_SANITIZER',
[email protected]f6f65a02013-09-06 05:40:523973 'WTF_USE_LEAK_SANITIZER=1',
[email protected]062522a2013-06-13 15:49:553974 ],
3975 }],
3976 ],
3977 }],
[email protected]c9a829272012-07-04 07:51:123978 ['tsan==1', {
3979 'target_conditions': [
3980 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453981 'cflags': [
[email protected]927a9d672012-11-09 11:28:203982 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293983 '-fPIC',
[email protected]3227d8f2014-04-26 00:49:323984 '-fsanitize-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453985 ],
3986 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203987 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453988 ],
3989 'defines': [
3990 'THREAD_SANITIZER',
3991 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163992 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453993 ],
3994 'target_conditions': [
3995 ['_type=="executable"', {
3996 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123997 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453998 ],
3999 }],
4000 ],
[email protected]c9a829272012-07-04 07:51:124001 }],
4002 ],
4003 }],
[email protected]a10ddd2d2013-02-26 20:06:594004 ['msan==1', {
4005 'target_conditions': [
4006 ['_toolset=="target"', {
4007 'cflags': [
4008 '-fsanitize=memory',
[email protected]a030ab62014-06-23 17:14:154009 '-fsanitize-memory-track-origins=<(msan_track_origins)',
[email protected]a10ddd2d2013-02-26 20:06:594010 '-fPIC',
[email protected]190d4ce62014-01-17 20:24:534011 '-fsanitize-blacklist=<(msan_blacklist)',
[email protected]a10ddd2d2013-02-26 20:06:594012 ],
4013 'ldflags': [
4014 '-fsanitize=memory',
4015 ],
4016 'defines': [
4017 'MEMORY_SANITIZER',
4018 ],
4019 'target_conditions': [
4020 ['_type=="executable"', {
4021 'ldflags': [
4022 '-pie',
4023 ],
4024 }],
4025 ],
4026 }],
4027 ],
4028 }],
[email protected]c8103a42013-11-12 13:41:304029 ['use_instrumented_libraries==1', {
4030 'dependencies': [
4031 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
4032 ],
[email protected]c8103a42013-11-12 13:41:304033 }],
[email protected]22b3f531e2013-12-20 13:07:284034 ['use_custom_libcxx==1', {
4035 'dependencies': [
[email protected]121cbf6e2014-05-05 13:30:424036 '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
[email protected]22b3f531e2013-12-20 13:07:284037 ],
4038 }],
[email protected]8a48f3f2012-12-04 20:14:044039 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:444040 'target_conditions' : [
[email protected]c45dbc52014-05-27 14:02:484041 # crazy_linker has an upstream gyp file we can't edit, and we
4042 # don't want to instrument it.
4043 ['_toolset=="target" and _target_name!="crazy_linker"', {
[email protected]8a6abd12012-05-16 10:04:444044 'cflags': [
4045 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:454046 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:244047 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:454048 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:444049 ],
4050 }],
[email protected]82e9b002013-07-16 21:04:244051 ['_toolset=="target" and OS=="android"', {
4052 'cflags': [
4053 # Avoids errors with current NDK:
4054 # "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"
4055 '-finstrument-functions-exclude-file-list=arm_neon.h',
4056 ],
4057 }],
[email protected]8a6abd12012-05-16 10:04:444058 ],
4059 }],
[email protected]ce4367d2013-01-15 16:13:104060 ['linux_dump_symbols==1', {
4061 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:254062 'conditions': [
[email protected]ac296392014-04-29 01:22:104063 ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', {
[email protected]c50c8d72012-11-15 00:29:254064 'target_conditions': [
4065 ['_toolset=="target"', {
4066 'ldflags': [
[email protected]ac296392014-04-29 01:22:104067 # Attempt to use less memory to prevent the linker from
4068 # running out of address space. Considering installing a
4069 # 64-bit kernel and switching to a 64-bit linker.
[email protected]567370a32013-03-01 00:11:234070 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:254071 ],
4072 }],
4073 ],
4074 }],
4075 ],
[email protected]cbd5fd52009-08-26 00:14:274076 }],
[email protected]2fa89ef2014-05-07 18:45:594077 ['use_allocator!="tcmalloc"', {
[email protected]61a9b2d82010-02-26 00:31:084078 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:244079 }],
[email protected]8d726a42012-02-09 03:49:004080 ['linux_use_gold_flags==1', {
[email protected]c5a6fe42013-07-21 14:03:334081 'target_conditions': [
4082 ['_toolset=="target"', {
4083 'ldflags': [
4084 # Experimentation found that using four linking threads
4085 # saved ~20% of link time.
4086 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
4087 # Only apply this to the target linker, since the host
4088 # linker might not be gold, but isn't used much anyway.
[email protected]21ed97e2014-01-14 23:40:554089 # TODO(raymes): Disable threading because gold is frequently
4090 # crashing on the bots: crbug.com/161942.
4091 # '-Wl,--threads',
4092 # '-Wl,--thread-count=4',
[email protected]c5a6fe42013-07-21 14:03:334093 ],
4094 }],
[email protected]68d01e82012-12-08 03:36:324095 ],
[email protected]8d726a42012-02-09 03:49:004096 'conditions': [
4097 ['release_valgrind_build==0', {
4098 'target_conditions': [
4099 ['_toolset=="target"', {
4100 'ldflags': [
[email protected]ffc46162014-01-16 12:19:494101 # There seems to be a conflict of --icf and -pie
4102 # in gold which can generate crashy binaries. As
[email protected]3b09cec52014-05-15 00:33:414103 # a security measure, -pie takes precedence for
[email protected]ffc46162014-01-16 12:19:494104 # now.
4105 #'-Wl,--icf=safe',
4106 '-Wl,--icf=none',
[email protected]8d726a42012-02-09 03:49:004107 ],
4108 }],
4109 ],
4110 }],
[email protected]bab9ae32014-04-11 08:05:114111 # Newer gcc's support -fuse-ld, use the flag to force gold
4112 # selection.
4113 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
4114 # TODO(mithro): Watch for clang support at following thread:
4115 # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-support-to-clang-td4032180.html
4116 ['gcc_version>=48', {
[email protected]707ad51b2014-04-23 08:20:164117 'target_conditions': [
4118 ['_toolset=="target"', {
[email protected]707ad51b2014-04-23 08:20:164119 'ldflags': [
4120 '-fuse-ld=gold',
4121 ],
4122 }],
[email protected]bab9ae32014-04-11 08:05:114123 ],
[email protected]707ad51b2014-04-23 08:20:164124 }],
4125 ['host_gcc_version>=48', {
4126 'target_conditions': [
4127 ['_toolset=="host"', {
[email protected]707ad51b2014-04-23 08:20:164128 'ldflags': [
4129 '-fuse-ld=gold',
4130 ],
4131 }],
[email protected]bab9ae32014-04-11 08:05:114132 ],
[email protected]707ad51b2014-04-23 08:20:164133 }],
[email protected]8d726a42012-02-09 03:49:004134 ],
4135 }],
[email protected]f0a58322014-04-16 09:50:234136 ['linux_use_bundled_binutils==1', {
[email protected]9c233692014-04-09 20:20:454137 'cflags': [
4138 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
4139 ],
[email protected]f0a58322014-04-16 09:50:234140 }],
4141 ['linux_use_bundled_gold==1', {
4142 # Put our binutils, which contains gold in the search path. We pass
4143 # the path to gold to the compiler. gyp leaves unspecified what the
4144 # cwd is when running the compiler, so the normal gyp path-munging
4145 # fails us. This hack gets the right path.
[email protected]b07806c12012-02-03 22:44:594146 'ldflags': [
[email protected]9c233692014-04-09 20:20:454147 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
[email protected]b07806c12012-02-03 22:44:594148 ],
4149 }],
[email protected]ebb701b72014-04-24 08:24:514150 # Some binutils 2.23 releases may or may not have new dtags enabled,
4151 # but they are all compatible with --disable-new-dtags,
4152 # because the new dynamic tags are not created by default.
4153 ['binutils_version>=223', {
[email protected]f0a58322014-04-16 09:50:234154 # Newer binutils don't set DT_RPATH unless you disable "new" dtags
4155 # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
4156 # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags
4157 # inside this file to allow usage of --no-as-needed and removal of
4158 # this flag.
[email protected]9c233692014-04-09 20:20:454159 'ldflags': [
4160 '-Wl,--disable-new-dtags',
4161 ],
[email protected]6d4327bf2014-06-23 23:20:464162 }],
4163 ['gcc_version>=48', {
4164 'target_conditions': [
4165 ['_toolset=="target"', {
4166 'cflags_cc': [
4167 '-std=gnu++11',
4168 # See comment for -Wno-c++11-narrowing.
4169 '-Wno-narrowing',
4170 # TODO(thakis): Remove, http://crbug.com/263960
4171 '-Wno-literal-suffix',
4172 ],
4173 }],
4174 ],
4175 }],
4176 ['host_gcc_version>=48', {
4177 'target_conditions': [
4178 ['_toolset=="host"', {
4179 'cflags_cc': [
4180 '-std=gnu++11',
4181 # See comment for -Wno-c++11-narrowing.
4182 '-Wno-narrowing',
4183 # TODO(thakis): Remove, http://crbug.com/263960
4184 '-Wno-literal-suffix',
4185 ],
4186 }],
4187 ],
4188 }],
[email protected]606116d22009-05-06 22:38:234189 ],
[email protected]9d384032009-03-20 23:13:264190 },
4191 }],
[email protected]c51e8d52009-12-11 20:04:064192 # FreeBSD-specific options; note that most FreeBSD options are set above,
4193 # with Linux.
4194 ['OS=="freebsd"', {
4195 'target_defaults': {
4196 'ldflags': [
4197 '-Wl,--no-keep-memory',
4198 ],
4199 },
4200 }],
[email protected]da1c8d692011-09-20 20:35:014201 # Android-specific options; note that most are set above with Linux.
4202 ['OS=="android"', {
4203 'variables': {
[email protected]25036722012-12-11 10:36:174204 # This is a unique identifier for a given build. It's used for
4205 # identifying various build artifacts corresponding to a particular
4206 # build of chrome (e.g. where to find archived symbols).
4207 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:014208 'conditions': [
[email protected]da1c8d692011-09-20 20:35:014209 # Use shared stlport library when system one used.
4210 # Figure this out early since it needs symbols from libgcc.a, so it
4211 # has to be before that in the set of libraries.
4212 ['use_system_stlport==1', {
4213 'android_stlport_library': 'stlport',
4214 }, {
[email protected]806b5232012-11-19 21:19:044215 'conditions': [
4216 ['component=="shared_library"', {
4217 'android_stlport_library': 'stlport_shared',
4218 }, {
4219 'android_stlport_library': 'stlport_static',
4220 }],
4221 ],
[email protected]da1c8d692011-09-20 20:35:014222 }],
4223 ],
4224
4225 # Placing this variable here prevents from forking libvpx, used
4226 # by remoting. Remoting is off, so it needn't built,
4227 # so forking it's deps seems like overkill.
4228 # But this variable need defined to properly run gyp.
4229 # A proper solution is to have an OS==android conditional
4230 # in third_party/libvpx/libvpx.gyp to define it.
4231 'libvpx_path': 'lib/linux/arm',
4232 },
4233 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:014234 'variables': {
4235 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:594236 'conditions': [
4237 # If we're using the components build, append "cr" to all shared
4238 # libraries to avoid naming collisions with android system library
4239 # versions with the same name (e.g. skia, icu).
4240 ['component=="shared_library"', {
4241 'android_product_extension': 'cr.so',
4242 }, {
4243 'android_product_extension': 'so',
4244 } ],
4245 ],
[email protected]8a37e4502012-08-14 22:42:554246 },
[email protected]da1c8d692011-09-20 20:35:014247 'target_conditions': [
[email protected]e4865252013-04-04 09:15:594248 ['_type=="shared_library"', {
[email protected]b4193652014-06-09 11:33:384249 'product_extension': '<(android_product_extension)',
[email protected]e4865252013-04-04 09:15:594250 }],
4251
[email protected]da1c8d692011-09-20 20:35:014252 # Settings for building device targets using Android's toolchain.
4253 # These are based on the setup.mk file from the Android NDK.
4254 #
4255 # The NDK Android executable link step looks as follows:
4256 # $LDFLAGS
4257 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
4258 # $(PRIVATE_OBJECTS) <-- The .o that we built
4259 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
4260 # $(TARGET_LIBGCC) <-- libgcc.a
4261 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
4262 # $(PRIVATE_LDLIBS) <-- System .so
4263 # $(TARGET_CRTEND_O) <-- crtend.o
4264 #
4265 # For now the above are approximated for executables by adding
4266 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
4267 # of 'libraries'.
4268 #
4269 # The NDK Android shared library link step looks as follows:
4270 # $LDFLAGS
4271 # $(PRIVATE_OBJECTS) <-- The .o that we built
4272 # -l,--whole-archive
4273 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
4274 # -l,--no-whole-archive
4275 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
4276 # $(TARGET_LIBGCC) <-- libgcc.a
4277 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
4278 # $(PRIVATE_LDLIBS) <-- System .so
4279 #
[email protected]ad17e342012-07-17 20:45:484280 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:014281 #
4282 # For both executables and shared libraries, add the proper
4283 # libgcc.a to the start of libraries which puts it in the
4284 # proper spot after .o and .a files get linked in.
4285 #
4286 # TODO: The proper thing to do longer-tem would be proper gyp
4287 # support for a custom link command line.
4288 ['_toolset=="target"', {
4289 'cflags!': [
4290 '-pthread', # Not supported by Android toolchain.
4291 ],
4292 'cflags': [
[email protected]da1c8d692011-09-20 20:35:014293 '-ffunction-sections',
4294 '-funwind-tables',
4295 '-g',
4296 '-fstack-protector',
4297 '-fno-short-enums',
4298 '-finline-limit=64',
4299 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:014300 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:014301 ],
4302 'defines': [
4303 'ANDROID',
4304 '__GNU_SOURCE=1', # Necessary for clone()
4305 'USE_STLPORT=1',
4306 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:174307 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:014308 ],
4309 'ldflags!': [
4310 '-pthread', # Not supported by Android toolchain.
4311 ],
4312 'ldflags': [
4313 '-nostdlib',
4314 '-Wl,--no-undefined',
[email protected]b4193652014-06-09 11:33:384315 # Don't export symbols from statically linked libraries.
4316 '-Wl,--exclude-libs=ALL',
[email protected]da1c8d692011-09-20 20:35:014317 ],
[email protected]a0e48b02011-11-22 07:53:014318 'libraries': [
4319 '-l<(android_stlport_library)',
4320 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:044321 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:014322 '-lc',
4323 '-ldl',
[email protected]a0e48b02011-11-22 07:53:014324 '-lm',
[email protected]da1c8d692011-09-20 20:35:014325 ],
4326 'conditions': [
[email protected]b4193652014-06-09 11:33:384327 ['component=="shared_library"', {
4328 'ldflags!': [
4329 '-Wl,--exclude-libs=ALL',
4330 ],
4331 }],
[email protected]220ea5932012-08-09 10:44:074332 ['clang==1', {
4333 'cflags': [
4334 # Work around incompatibilities between bionic and clang
4335 # headers.
4336 '-D__compiler_offsetof=__builtin_offsetof',
4337 '-Dnan=__builtin_nan',
4338 ],
4339 'conditions': [
4340 ['target_arch=="arm"', {
4341 'cflags': [
4342 '-target arm-linux-androideabi',
[email protected]220ea5932012-08-09 10:44:074343 ],
4344 'ldflags': [
4345 '-target arm-linux-androideabi',
4346 ],
4347 }],
4348 ['target_arch=="ia32"', {
4349 'cflags': [
4350 '-target x86-linux-androideabi',
4351 ],
4352 'ldflags': [
4353 '-target x86-linux-androideabi',
4354 ],
4355 }],
[email protected]be0090f22014-03-18 17:43:484356 # Place holder for x64 support, not tested.
4357 # TODO: Enable clang support for Android x64. http://crbug.com/346626
4358 ['target_arch=="x64"', {
4359 'cflags': [
4360 '-target x86_64-linux-androideabi',
4361 ],
4362 'ldflags': [
4363 '-target x86_64-linux-androideabi',
4364 ],
4365 }],
[email protected]220ea5932012-08-09 10:44:074366 ],
4367 }],
[email protected]ed70ed1862012-11-07 12:11:254368 ['asan==1', {
4369 'cflags': [
4370 # Android build relies on -Wl,--gc-sections removing
4371 # unreachable code. ASan instrumentation for globals inhibits
4372 # this and results in a library with unresolvable relocations.
4373 # TODO(eugenis): find a way to reenable this.
4374 '-mllvm -asan-globals=0',
4375 ],
4376 }],
[email protected]d999c3cb2013-03-12 10:22:364377 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:464378 'defines': [
[email protected]f5c7758a2012-07-25 16:17:574379 # The NDK has these things, but doesn't define the constants
4380 # to say that it does. Define them here instead.
4381 'HAVE_SYS_UIO_H',
4382 ],
4383 'cflags': [
4384 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:464385 ],
[email protected]da1c8d692011-09-20 20:35:014386 'ldflags': [
[email protected]5baf7482011-12-13 16:00:524387 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:014388 ],
4389 }],
[email protected]d999c3cb2013-03-12 10:22:364390 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:084391 'include_dirs': [
4392 # OpenAL headers from the Android tree.
4393 '<(android_src)/frameworks/wilhelm/include',
4394 ],
4395 'cflags': [
[email protected]04882132012-11-21 12:40:454396 # Android predefines this as 1; undefine it here so Chromium
4397 # can redefine it later to be 2 for chromium code and unset
4398 # for third party code. This works because cflags are added
4399 # before defines.
4400 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:554401 # Disable any additional warnings enabled by the Android build system but which
4402 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:084403 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:554404 '-Wno-extra', # Enabled by -Wextra, but no specific flag
4405 '-Wno-ignored-qualifiers',
4406 '-Wno-type-limits',
[email protected]6c55f1242014-02-12 16:06:564407 '-Wno-unused-but-set-variable',
[email protected]0d7291e2012-10-04 19:16:084408 ],
4409 'cflags_cc': [
[email protected]2f34a202013-03-11 13:59:164410 # Other things unrelated to -Wextra:
4411 '-Wno-non-virtual-dtor',
4412 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:084413 ],
4414 }],
[email protected]9577be42013-11-01 15:16:304415 ['android_webview_build==1', {
4416 'target_conditions': [
4417 ['chromium_code==0', {
4418 'cflags': [
4419 # There is a class of warning which:
4420 # 1) Android always enables and also treats as errors
4421 # 2) Chromium ignores in third party code
4422 # So we re-enable those warnings when building Android.
4423 '-Wno-address',
4424 '-Wno-format-security',
4425 '-Wno-return-type',
4426 '-Wno-sequence-point',
4427 ],
4428 'cflags_cc': [
4429 '-Wno-non-virtual-dtor',
4430 ],
4431 }],
[email protected]0d7291e2012-10-04 19:16:084432 ],
4433 }],
[email protected]febd3572012-05-03 09:17:454434 ['target_arch == "arm"', {
4435 'ldflags': [
4436 # Enable identical code folding to reduce size.
4437 '-Wl,--icf=safe',
4438 ],
4439 }],
[email protected]da1c8d692011-09-20 20:35:014440 # NOTE: The stlport header include paths below are specified in
4441 # cflags rather than include_dirs because they need to come
4442 # after include_dirs. Think of them like system headers, but
4443 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
4444 # toolchain (circa Gingerbread) will exhibit strange errors.
4445 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:514446 ['use_system_stlport==1', {
4447 'cflags': [
4448 # For libstdc++/include, which is used by stlport.
4449 '-I<(android_src)/bionic',
4450 '-I<(android_src)/external/stlport/stlport',
4451 ],
4452 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:014453 'cflags': [
[email protected]4ca013ad2014-06-27 20:43:574454 '-isystem<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:014455 ],
[email protected]225ec632013-04-03 18:20:224456 'ldflags': [
4457 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:014458 ],
4459 }],
4460 ['target_arch=="ia32"', {
4461 # The x86 toolchain currently has problems with stack-protector.
4462 'cflags!': [
4463 '-fstack-protector',
4464 ],
4465 'cflags': [
4466 '-fno-stack-protector',
4467 ],
4468 }],
4469 ],
4470 'target_conditions': [
4471 ['_type=="executable"', {
[email protected]7d2b7cf2014-05-14 15:15:194472 # Force android tools to export the "main" symbol so they can be
4473 # loaded on ICS using the run_pie wrapper. See crbug.com/373219.
4474 # TODO(primiano): remove -fvisibility and -rdynamic flags below
4475 # when ICS support will be dropped.
4476 'cflags': [
4477 '-fPIE',
4478 '-fvisibility=default',
4479 ],
[email protected]da1c8d692011-09-20 20:35:014480 'ldflags': [
4481 '-Bdynamic',
[email protected]da1c8d692011-09-20 20:35:014482 '-Wl,--gc-sections',
4483 '-Wl,-z,nocopyreloc',
[email protected]7d2b7cf2014-05-14 15:15:194484 '-pie',
4485 '-rdynamic',
[email protected]da1c8d692011-09-20 20:35:014486 # crtbegin_dynamic.o should be the last item in ldflags.
4487 '<(android_ndk_lib)/crtbegin_dynamic.o',
4488 ],
4489 'libraries': [
4490 # crtend_android.o needs to be the last item in libraries.
4491 # Do not add any libraries after this!
4492 '<(android_ndk_lib)/crtend_android.o',
4493 ],
4494 }],
[email protected]f5c7758a2012-07-25 16:17:574495 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]7ab8b9be2014-06-12 17:20:424496 'ldflags!': [
4497 '-Wl,--exclude-libs=ALL',
4498 ],
[email protected]da1c8d692011-09-20 20:35:014499 'ldflags': [
4500 '-Wl,-shared,-Bsymbolic',
4501 ],
[email protected]d093fe8b2013-04-30 18:00:234502 'conditions': [
4503 ['android_webview_build==0', {
4504 'ldflags': [
4505 # crtbegin_so.o should be the last item in ldflags.
4506 '<(android_ndk_lib)/crtbegin_so.o',
4507 ],
4508 'libraries': [
4509 # crtend_so.o needs to be the last item in libraries.
4510 # Do not add any libraries after this!
4511 '<(android_ndk_lib)/crtend_so.o',
4512 ],
4513 }],
[email protected]a08029b42012-04-25 03:18:464514 ],
[email protected]da1c8d692011-09-20 20:35:014515 }],
4516 ],
4517 }],
4518 # Settings for building host targets using the system toolchain.
4519 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:124520 'cflags!': [
4521 # Due to issues in Clang build system, using ASan on 32-bit
4522 # binaries on x86_64 host is problematic.
4523 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:564524 '-fsanitize=address',
4525 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:124526 ],
[email protected]da1c8d692011-09-20 20:35:014527 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:444528 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:014529 '-Wl,-z,noexecstack',
4530 '-Wl,--gc-sections',
4531 '-Wl,-O1',
4532 '-Wl,--as-needed',
[email protected]df240712013-09-02 23:17:224533 '-Wl,--warn-shared-textrel',
4534 '-Wl,--fatal-warnings',
[email protected]da1c8d692011-09-20 20:35:014535 ],
4536 }],
[email protected]0ccf578f2013-03-13 11:13:394537 # Settings for building host targets on mac.
4538 ['_toolset=="host" and host_os=="mac"', {
4539 'ldflags!': [
4540 '-Wl,-z,now',
4541 '-Wl,-z,relro',
4542 ],
4543 }],
[email protected]da1c8d692011-09-20 20:35:014544 ],
4545 },
4546 }],
[email protected]93f21e42010-04-01 00:35:154547 ['OS=="solaris"', {
4548 'cflags!': ['-fvisibility=hidden'],
4549 'cflags_cc!': ['-fvisibility-inlines-hidden'],
4550 }],
[email protected]1e013672012-06-29 22:12:204551 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:554552 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:424553 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:554554 'xcode_settings': {
4555 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:244556 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
4557 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]47c3e852013-09-13 02:22:314558 'COPY_PHASE_STRIP': 'NO',
[email protected]ab2956372009-08-13 18:11:044559 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
4560 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:044561 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
4562 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
4563 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:254564 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
4565 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:044566 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
4567 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
4568 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
4569 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:554570 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:044571 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:554572 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:044573 'WARNING_CFLAGS': [
4574 '-Wall',
4575 '-Wendif-labels',
4576 '-Wextra',
4577 # Don't warn about unused function parameters.
4578 '-Wno-unused-parameter',
4579 # Don't warn about the "struct foo f = {0};" initialization
4580 # pattern.
4581 '-Wno-missing-field-initializers',
4582 ],
[email protected]b3fb8092009-03-12 19:09:244583 'conditions': [
4584 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:594585 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
4586 ],
[email protected]2936b8c2012-10-29 10:57:314587 # Note that the prebuilt Clang binaries should not be used for iOS
4588 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:284589 ['clang==1', {
[email protected]9e0756c2013-09-01 01:37:024590 # gnu++11 instead of c++11 is needed because some code uses
4591 # typeof() (a GNU extension).
4592 # TODO(thakis): Eventually switch this to c++11 instead of
4593 # gnu++11 (once typeof can be removed, which is blocked on c++11
4594 # being available everywhere).
4595 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11
[email protected]3e893e0c2012-11-16 16:58:444596 # Warn if automatic synthesis is triggered with
4597 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534598 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:304599 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:284600 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:074601 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:524602
4603 # This warns on using ints as initializers for floats in
4604 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
4605 # which happens in several places in chrome code. Not sure if
4606 # this is worth fixing.
4607 '-Wno-c++11-narrowing',
4608
[email protected]66733172010-09-22 00:09:284609 # Don't die on dtoa code that uses a char as an array index.
4610 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4611 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:074612
[email protected]a6aef302013-11-09 04:18:214613 # TODO(thakis): This used to be implied by -Wno-unused-function,
4614 # which we no longer use. Check if it makes sense to remove
4615 # this as well. http://crbug.com/316352
4616 '-Wno-unneeded-internal-declaration',
[email protected]9242c7642012-01-29 09:02:104617
4618 # Warns on switches on enums that cover all enum values but
4619 # also contain a default: branch. Chrome is full of that.
4620 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:514621
4622 # Warns when a const char[] is converted to bool.
4623 '-Wstring-conversion',
[email protected]d04384ab2014-03-13 20:46:014624
4625 # Clang considers the `register` keyword as deprecated, but
4626 # e.g. code generated by flex (used in angle) contains that
4627 # keyword. http://crbug.com/255186
4628 '-Wno-deprecated-register',
[email protected]dcd0b952014-03-26 00:14:354629
[email protected]bb148192014-04-02 03:37:334630 # This warns on selectors from Cocoa headers (-length, -set).
4631 # cfe-dev is currently discussing the merits of this warning.
4632 # TODO(thakis): Reevaluate what to do with this, based one
4633 # cfe-dev discussion.
4634 '-Wno-selector-type-mismatch',
[email protected]ce2cad72014-02-13 18:17:354635 ],
[email protected]361b47c2013-07-02 15:13:244636
[email protected]ce2cad72014-02-13 18:17:354637 'conditions': [
4638 ['clang_xcode==0', {
4639 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
4640 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]ce2cad72014-02-13 18:17:354641 }],
[email protected]66733172010-09-22 00:09:284642 ],
4643 }],
[email protected]ce2cad72014-02-13 18:17:354644 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:464645 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:314646 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:464647 ],
4648 }],
[email protected]ce2cad72014-02-13 18:17:354649 ['clang==1 and clang_xcode==0 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:594650 'OTHER_CFLAGS': [
4651 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534652 ],
4653 }],
[email protected]ce2cad72014-02-13 18:17:354654 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', {
[email protected]4a9ac22e2011-12-02 03:41:534655 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:594656 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4657 ],
4658 }],
[email protected]2616d45d2012-01-19 03:15:484659 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4660 'OTHER_CFLAGS': [
4661 # See http://crbug.com/110262
4662 '-fcolor-diagnostics',
4663 ],
4664 }],
[email protected]91274072014-04-03 01:49:494665 ['OS=="ios" and target_subarch!="arm32" and \
[email protected]7e0fe4912014-04-09 20:53:004666 "<(GENERATOR)"=="xcode"', {
[email protected]91274072014-04-03 01:49:494667 'OTHER_CFLAGS': [
4668 # TODO(ios): when building Chrome for iOS on 64-bit platform
4669 # with Xcode, the -Wshorted-64-to-32 warning is automatically
4670 # enabled. This cause failures when compiling protobuf code,
4671 # so disable the warning. http://crbug.com/359107
4672 '-Wno-shorten-64-to-32',
4673 ],
4674 }],
[email protected]b3fb8092009-03-12 19:09:244675 ],
[email protected]2f80c312009-02-25 21:26:554676 },
[email protected]34f40892011-09-06 21:53:304677 'conditions': [
4678 ['clang==1', {
4679 'variables': {
4680 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
4681 },
4682 }],
[email protected]921c7b52011-11-25 10:34:354683 ['asan==1', {
4684 'xcode_settings': {
4685 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:564686 '-fsanitize=address',
[email protected]22df2b22014-03-13 10:55:074687 '-mllvm -asan-globals=0', # http://crbug.com/352073
[email protected]48688df02012-11-27 21:04:564688 '-w', # http://crbug.com/162783
[email protected]14a37352014-05-16 11:39:554689 '-gline-tables-only',
[email protected]921c7b52011-11-25 10:34:354690 ],
[email protected]921c7b52011-11-25 10:34:354691 },
[email protected]921c7b52011-11-25 10:34:354692 }],
[email protected]544a18ed2014-01-17 21:01:364693 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034694 'target_conditions': [
4695 ['_toolset=="target"', {
4696 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364697 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034698 ],
4699 }],
4700 ],
4701 }],
[email protected]34f40892011-09-06 21:53:304702 ],
[email protected]2f80c312009-02-25 21:26:554703 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:554704 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:464705 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:084706 'conditions': [
4707 ['asan==1', {
4708 'xcode_settings': {
4709 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:444710 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:084711 ],
4712 },
4713 }],
[email protected]c9cc9442013-12-28 21:27:444714 ['mac_write_linker_maps==1', {
4715 'xcode_settings': {
4716 'OTHER_LDFLAGS': [
4717 '-Wl,-map,>(_target_name).map',
4718 ],
4719 },
4720 }],
[email protected]4281a4e2012-08-24 19:05:084721 ],
[email protected]5d7dc972009-04-16 15:30:464722 }],
4723 ['_mac_bundle', {
4724 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:314725 'target_conditions': [
4726 ['_type=="executable"', {
4727 'conditions': [
4728 ['asan==1', {
4729 'postbuilds': [
4730 {
4731 'variables': {
4732 # Define copy_asan_dylib_path in a variable ending in
4733 # _path so that gyp understands it's a path and
4734 # performs proper relativization during dict merging.
4735 'copy_asan_dylib_path':
4736 'mac/copy_asan_runtime_dylib.sh',
4737 },
4738 'postbuild_name': 'Copy ASan runtime dylib',
4739 'action': [
4740 '<(copy_asan_dylib_path)',
4741 ],
4742 },
4743 ],
4744 }],
4745 ],
4746 }],
4747 ],
[email protected]87fde4a2009-02-28 00:50:084748 }],
[email protected]2936b8c2012-10-29 10:57:314749 ], # target_conditions
4750 }, # target_defaults
4751 }], # OS=="mac" or OS=="ios"
4752 ['OS=="mac"', {
4753 'target_defaults': {
[email protected]eea7d332014-05-16 11:43:084754 'defines': [
4755 # Prevent Mac OS X AssertMacros.h from defining macros that collide
4756 # with common names, like 'check', 'require', and 'verify'.
4757 # (Included by system header. Also exists on iOS but not included.)
4758 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h
4759 '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0',
4760 ],
[email protected]2936b8c2012-10-29 10:57:314761 'variables': {
4762 # These should end with %, but there seems to be a bug with % in
4763 # variables that are intended to be set to different values in
4764 # different targets, like these.
4765 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:314766 # Strip debugging symbols from the target.
4767 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:374768 'conditions': [
4769 ['asan==1', {
4770 'conditions': [
4771 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:354772 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:374773 }, {
4774 'mac_real_dsym': '<(mac_want_real_dsym)'
4775 }],
4776 ],
4777 }, {
4778 'conditions': [
4779 ['mac_want_real_dsym=="default"', {
4780 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
4781 }, {
4782 'mac_real_dsym': '<(mac_want_real_dsym)'
4783 }],
4784 ],
4785 }],
4786 ],
[email protected]2936b8c2012-10-29 10:57:314787 },
4788 'xcode_settings': {
4789 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
4790 # (Equivalent to -fPIC)
4791 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
4792 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4793 # Keep pch files below xcodebuild/.
4794 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:394795 'OTHER_CFLAGS': [
4796 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
4797 # xcode_setting, but not until all downstream projects' mac bots are
4798 # using xcode >= 4.6, because that's when the default value of the
4799 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4800 # setting is a no-op as far as xcode is concerned, but the compiler
4801 # behaves differently based on whether -fno-strict-aliasing is
4802 # specified or not.
4803 '-fno-strict-aliasing', # See http://crbug.com/32204.
4804 ],
[email protected]2936b8c2012-10-29 10:57:314805 },
4806 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:104807 ['_type=="executable"', {
4808 'postbuilds': [
4809 {
4810 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:364811 # code execution when running on Mac OS X 10.7 ("Lion"), and
4812 # ensures that the position-independent executable (PIE) bit
4813 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:104814 'variables': {
[email protected]8c40f322011-08-24 03:33:364815 # Define change_mach_o_flags in a variable ending in _path
4816 # so that GYP understands it's a path and performs proper
4817 # relativization during dict merging.
4818 'change_mach_o_flags_path':
4819 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:174820 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:134821 ],
4822 'target_conditions': [
[email protected]162407f2011-09-08 15:33:174823 ['mac_pie==0 or release_valgrind_build==1', {
4824 # Don't enable PIE if it's unwanted. It's unwanted if
4825 # the target specifies mac_pie=0 or if building for
4826 # Valgrind, because Valgrind doesn't understand slide.
4827 # See the similar mac_pie/release_valgrind_build check
4828 # below.
[email protected]081c0342011-08-24 14:59:134829 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134830 '--no-pie',
4831 ],
4832 }],
4833 ],
[email protected]6303fed2011-08-11 01:12:104834 },
[email protected]8c40f322011-08-24 03:33:364835 'postbuild_name': 'Change Mach-O Flags',
4836 'action': [
4837 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134838 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364839 ],
[email protected]6303fed2011-08-11 01:12:104840 },
4841 ],
[email protected]57db18a2014-05-28 18:48:294842 'conditions': [
4843 ['asan==1', {
4844 'variables': {
4845 'asan_saves_file': 'asan.saves',
4846 },
4847 'xcode_settings': {
4848 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
4849 },
4850 }],
4851 ],
[email protected]162407f2011-09-08 15:33:174852 'target_conditions': [
4853 ['mac_pie==1 and release_valgrind_build==0', {
4854 # Turn on position-independence (ASLR) for executables. When
4855 # PIE is on for the Chrome executables, the framework will
4856 # also be subject to ASLR.
4857 # Don't do this when building for Valgrind, because Valgrind
4858 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4859 # understand slide, and get rid of the Valgrind check.
4860 'xcode_settings': {
4861 'OTHER_LDFLAGS': [
4862 '-Wl,-pie', # Position-independent executable (MH_PIE)
4863 ],
4864 },
4865 }],
4866 ],
[email protected]6a0242bc2011-07-01 00:34:464867 }],
[email protected]9a5e72862010-09-02 16:16:584868 ['(_type=="executable" or _type=="shared_library" or \
4869 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204870 'target_conditions': [
4871 ['mac_real_dsym == 1', {
4872 # To get a real .dSYM bundle produced by dsymutil, set the
4873 # debug information format to dwarf-with-dsym. Since
4874 # strip_from_xcode will not be used, set Xcode to do the
4875 # stripping as well.
4876 'configurations': {
[email protected]5153767c2009-12-22 01:52:504877 'Release_Base': {
[email protected]24700642009-06-01 16:01:204878 'xcode_settings': {
4879 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4880 'DEPLOYMENT_POSTPROCESSING': 'YES',
4881 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074882 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254883 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074884 # The Xcode default is to strip debugging symbols
4885 # only (-S). Local symbols should be stripped as
4886 # well, which will be handled by -x. Xcode will
4887 # continue to insert -S when stripping even when
4888 # additional flags are added with STRIPFLAGS.
4889 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404890 }], # _type=="shared_library" or _type=="loadable_module"
[email protected]57db18a2014-05-28 18:48:294891 ['_type=="executable"', {
4892 'conditions': [
4893 ['asan==1', {
4894 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4895 }]
4896 ],
4897 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074898 ], # target_conditions
4899 }, # xcode_settings
4900 }, # configuration "Release"
4901 }, # configurations
[email protected]24700642009-06-01 16:01:204902 }, { # mac_real_dsym != 1
4903 # To get a fast fake .dSYM bundle, use a post-build step to
4904 # produce the .dSYM and strip the executable. strip_from_xcode
4905 # only operates in the Release configuration.
4906 'postbuilds': [
4907 {
4908 'variables': {
4909 # Define strip_from_xcode in a variable ending in _path
4910 # so that gyp understands it's a path and performs proper
4911 # relativization during dict merging.
4912 'strip_from_xcode_path': 'mac/strip_from_xcode',
4913 },
4914 'postbuild_name': 'Strip If Needed',
4915 'action': ['<(strip_from_xcode_path)'],
4916 },
[email protected]e14a9f92009-08-05 19:26:074917 ], # postbuilds
4918 }], # mac_real_dsym
4919 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584920 }], # (_type=="executable" or _type=="shared_library" or
4921 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074922 ], # target_conditions
4923 }, # target_defaults
4924 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204925 ['OS=="ios"', {
4926 'target_defaults': {
4927 'xcode_settings' : {
[email protected]e31ef5b2013-05-21 11:08:494928 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4929 # section above).
4930 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]ce2cad72014-02-13 18:17:354931
[email protected]ce2cad72014-02-13 18:17:354932 'conditions': [
[email protected]fe329272014-03-12 19:06:574933 # Older Xcodes do not support -Wno-deprecated-register, so pass an
4934 # additional flag to suppress the "unknown compiler option" error.
4935 # Restrict this flag to builds that are either compiling with Xcode
4936 # or compiling with Xcode's Clang. This will allow Ninja builds to
4937 # continue failing on unknown compiler options.
4938 # TODO(rohitrao): This flag is temporary and should be removed as
4939 # soon as the iOS bots are updated to use Xcode 5.1.
[email protected]d04384ab2014-03-13 20:46:014940 ['clang_xcode==1', {
[email protected]fe329272014-03-12 19:06:574941 'WARNING_CFLAGS': [
4942 '-Wno-unknown-warning-option',
4943 ],
4944 }],
4945
4946 # Limit the valid architectures depending on "target_subarch".
4947 # This need to include the "arm" architectures but also the "x86"
4948 # ones (they are used when building for the simulator).
[email protected]ce2cad72014-02-13 18:17:354949 ['target_subarch=="arm32"', {
4950 'VALID_ARCHS': ['armv7', 'i386'],
4951 }],
4952 ['target_subarch=="arm64"', {
4953 'VALID_ARCHS': ['arm64', 'x86_64'],
4954 }],
4955 ['target_subarch=="both"', {
4956 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'],
4957 }],
4958 ],
[email protected]1e013672012-06-29 22:12:204959 },
4960 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474961 ['_toolset=="host"', {
4962 'xcode_settings': {
4963 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4964 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:354965 'VALID_ARCHS': [
4966 'x86_64',
4967 ],
[email protected]c3c372e2013-10-29 22:31:514968 'ARCHS': [
[email protected]ce2cad72014-02-13 18:17:354969 'x86_64',
[email protected]c3c372e2013-10-29 22:31:514970 ],
[email protected]296bc452013-05-13 21:29:474971 },
4972 }],
4973 ['_toolset=="target"', {
4974 'xcode_settings': {
4975 # This section should be for overriding host settings. But,
4976 # since we can't negate the iphone deployment target above, we
4977 # instead set it here for target only.
4978 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:354979 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'],
[email protected]296bc452013-05-13 21:29:474980 },
4981 }],
[email protected]1e013672012-06-29 22:12:204982 ['_type=="executable"', {
4983 'configurations': {
4984 'Release_Base': {
4985 'xcode_settings': {
4986 'DEPLOYMENT_POSTPROCESSING': 'YES',
4987 'STRIP_INSTALLED_PRODUCT': 'YES',
4988 },
4989 },
[email protected]3c6aa862012-11-05 17:11:444990 'Debug_Base': {
4991 'xcode_settings': {
4992 # Remove dSYM to reduce build time.
4993 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4994 },
4995 },
[email protected]1e013672012-06-29 22:12:204996 },
[email protected]c3c372e2013-10-29 22:31:514997 'xcode_settings': {
4998 'conditions': [
4999 ['chromium_ios_signing', {
5000 # iOS SDK wants everything for device signed.
5001 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
5002 }, {
5003 'CODE_SIGNING_REQUIRED': 'NO',
5004 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
5005 }],
5006 ],
5007 },
[email protected]1e013672012-06-29 22:12:205008 }],
5009 ], # target_conditions
5010 }, # target_defaults
5011 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:555012 ['OS=="win"', {
5013 'target_defaults': {
5014 'defines': [
[email protected]8e345da2012-07-01 22:10:305015 '_WIN32_WINNT=0x0602',
5016 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:555017 'WIN32',
5018 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:555019 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:285020 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:555021 '_CRT_RAND_S',
5022 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
5023 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:275024 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:555025 ],
[email protected]8974e042010-06-21 18:06:525026 'conditions': [
[email protected]2212d272011-12-20 21:37:375027 ['buildtype=="Official"', {
5028 # In official builds, targets can self-select an optimization
5029 # level by defining a variable named 'optimize', and setting it
5030 # to one of
5031 # - "size", optimizes for minimal code size - the default.
5032 # - "speed", optimizes for speed over code size.
5033 # - "max", whole program optimization and link-time code
5034 # generation. This is very expensive and should be used
5035 # sparingly.
5036 'variables': {
5037 'optimize%': 'size',
5038 },
[email protected]72589062014-03-14 16:48:305039 'msvs_settings': {
5040 'VCLinkerTool': {
5041 # Set /LTCG for the official builds.
5042 'LinkTimeCodeGeneration': '1',
5043 },
5044 },
[email protected]2212d272011-12-20 21:37:375045 'target_conditions': [
5046 ['optimize=="size"', {
5047 'msvs_settings': {
5048 'VCCLCompilerTool': {
5049 # 1, optimizeMinSpace, Minimize Size (/O1)
5050 'Optimization': '1',
5051 # 2, favorSize - Favor small code (/Os)
5052 'FavorSizeOrSpeed': '2',
5053 },
5054 },
5055 },
5056 ],
5057 ['optimize=="speed"', {
5058 'msvs_settings': {
5059 'VCCLCompilerTool': {
5060 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
5061 'Optimization': '2',
5062 # 1, favorSpeed - Favor fast code (/Ot)
5063 'FavorSizeOrSpeed': '1',
5064 },
5065 },
5066 },
5067 ],
5068 ['optimize=="max"', {
[email protected]cb875c02014-06-12 18:06:315069 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO
5070 # builds. Probably anything that this would catch that
5071 # wouldn't be caught in a normal build isn't going to
5072 # actually be a bug, so the incremental value of C4702 for
5073 # PGO builds is likely very small.
5074 'msvs_disabled_warnings': [
5075 4702
5076 ],
[email protected]2212d272011-12-20 21:37:375077 'msvs_settings': {
5078 'VCCLCompilerTool': {
5079 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
5080 'Optimization': '2',
5081 # 1, favorSpeed - Favor fast code (/Ot)
5082 'FavorSizeOrSpeed': '1',
5083 # This implies link time code generation.
5084 'WholeProgramOptimization': 'true',
5085 },
5086 },
5087 },
5088 ],
5089 ],
5090 },
5091 ],
[email protected]0ecd06f2014-05-23 22:11:035092 ['component=="static_library"', {
5093 'defines': [
5094 '_HAS_EXCEPTIONS=0',
5095 ],
5096 }],
[email protected]3e2648a2011-03-21 20:58:505097 ['secure_atl', {
5098 'defines': [
5099 '_SECURE_ATL',
5100 ],
5101 }],
[email protected]54184ce72012-10-18 07:11:265102 ['msvs_express', {
5103 'configurations': {
5104 'x86_Base': {
5105 'msvs_settings': {
5106 'VCLinkerTool': {
5107 'AdditionalLibraryDirectories':
5108 ['<(windows_driver_kit_path)/lib/ATL/i386'],
5109 },
5110 'VCLibrarianTool': {
5111 'AdditionalLibraryDirectories':
5112 ['<(windows_driver_kit_path)/lib/ATL/i386'],
5113 },
5114 },
5115 },
5116 'x64_Base': {
5117 'msvs_settings': {
5118 'VCLibrarianTool': {
5119 'AdditionalLibraryDirectories':
5120 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
5121 },
5122 'VCLinkerTool': {
5123 'AdditionalLibraryDirectories':
5124 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
5125 },
5126 },
5127 },
5128 },
[email protected]0a42e9002014-05-24 02:35:265129 # https://code.google.com/p/chromium/issues/detail?id=372451#c20
5130 # Warning 4702 ("Unreachable code") should be re-enabled once
5131 # Express users are updated to VS2013 Update 2.
5132 'msvs_disabled_warnings': [
5133 4702
5134 ],
[email protected]54184ce72012-10-18 07:11:265135 'msvs_settings': {
5136 'VCLinkerTool': {
5137 # Explicitly required when using the ATL with express
5138 'AdditionalDependencies': ['atlthunk.lib'],
5139
5140 # ATL 8.0 included in WDK 7.1 makes the linker to generate
5141 # almost eight hundred LNK4254 and LNK4078 warnings:
5142 # - warning LNK4254: section 'ATL' (50000040) merged into
5143 # '.rdata' (40000040) with different attributes
5144 # - warning LNK4078: multiple 'ATL' sections found with
5145 # different attributes
5146 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
5147 },
5148 },
5149 'msvs_system_include_dirs': [
5150 '<(windows_driver_kit_path)/inc/atl71',
5151 '<(windows_driver_kit_path)/inc/mfc42',
5152 ],
[email protected]3f3f45f2013-10-28 19:30:435153 }],
[email protected]8974e042010-06-21 18:06:525154 ],
[email protected]5b5ca7cb2009-07-20 23:00:205155 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:055156 '<(windows_sdk_path)/Include/shared',
5157 '<(windows_sdk_path)/Include/um',
5158 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:555159 '$(VSInstallDir)/VC/atlmfc/include',
5160 ],
[email protected]bab6e232013-11-27 22:52:395161 'msvs_cygwin_shell': 0,
[email protected]0a42e9002014-05-24 02:35:265162 'msvs_disabled_warnings': [
5163 4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:115164 # TODO(maruel): These warnings are level 4. They will be slowly
5165 # removed as code is fixed.
5166 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]0a42e9002014-05-24 02:35:265167 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4706,
[email protected]942c3a60f2011-05-03 02:04:115168 ],
[email protected]2f80c312009-02-25 21:26:555169 'msvs_settings': {
5170 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:445171 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:555172 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:555173 'BufferSecurityCheck': 'true',
5174 'EnableFunctionLevelLinking': 'true',
5175 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:115176 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:555177 'WarnAsError': 'true',
5178 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:585179 'conditions': [
[email protected]8974e042010-06-21 18:06:525180 ['component=="shared_library"', {
5181 'ExceptionHandling': '1', # /EHsc
5182 }, {
5183 'ExceptionHandling': '0',
5184 }],
[email protected]3fef6e62009-07-31 19:58:585185 ],
[email protected]2f80c312009-02-25 21:26:555186 },
5187 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:165188 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:375189 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:055190 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:375191 ],
[email protected]2f80c312009-02-25 21:26:555192 },
5193 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:555194 'AdditionalDependencies': [
5195 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:505196 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:555197 'version.lib',
5198 'msimg32.lib',
5199 'ws2_32.lib',
5200 'usp10.lib',
5201 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:085202 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:485203 'winmm.lib',
5204 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:555205 ],
[email protected]a78da50e2010-06-09 21:31:375206 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:055207 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:375208 ],
[email protected]2f80c312009-02-25 21:26:555209 'GenerateDebugInformation': 'true',
5210 'MapFileName': '$(OutDir)\\$(TargetName).map',
5211 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:555212 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:485213 # SubSystem values:
5214 # 0 == not set
5215 # 1 == /SUBSYSTEM:CONSOLE
5216 # 2 == /SUBSYSTEM:WINDOWS
5217 # Most of the executables we'll ever create are tests
5218 # and utilities with console output.
5219 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:555220 },
5221 'VCMIDLTool': {
5222 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:095223 'TypeLibraryName': '$(InputName).tlb',
5224 'OutputDirectory': '$(IntDir)',
5225 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:335226 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:095227 'InterfaceIdentifierFileName': '$(InputName)_i.c',
5228 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:555229 },
5230 'VCResourceCompilerTool': {
5231 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:385232 'AdditionalIncludeDirectories': [
5233 '<(DEPTH)',
5234 '<(SHARED_INTERMEDIATE_DIR)',
5235 ],
[email protected]2f80c312009-02-25 21:26:555236 },
[email protected]5d60b0b2013-07-30 20:24:305237 'target_conditions': [
[email protected]2b52f992014-02-26 19:09:475238 ['_type=="executable"', {
5239 'VCManifestTool': {
5240 'EmbedManifest': 'true',
5241 },
5242 }],
[email protected]5d60b0b2013-07-30 20:24:305243 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
5244 'VCManifestTool': {
5245 'AdditionalManifestFiles': [
5246 '>(win_exe_compatibility_manifest)',
5247 ],
5248 },
5249 }],
[email protected]5d60b0b2013-07-30 20:24:305250 ],
[email protected]8efc26082014-01-24 13:26:355251 'conditions': [
5252 ['clang==1', {
5253 # Building with Clang on Windows is a work in progress and very
5254 # experimental. See crbug.com/82385.
5255 'VCCLCompilerTool': {
5256 'WarnAsError': 'false',
5257 'RuntimeTypeInfo': 'false',
5258 'AdditionalOptions': [
[email protected]49ee7ef2014-04-12 03:07:465259 '-fmsc-version=1800',
[email protected]8efc26082014-01-24 13:26:355260 '/fallback',
5261
5262 # Many files use intrinsics without including this header.
5263 # TODO(hans): Fix those files, or move this to sub-GYPs.
5264 '/FIIntrin.h',
5265
5266 # TODO(hans): Make this list shorter eventually.
5267 '-Qunused-arguments',
5268 '-Wno-c++11-compat-deprecated-writable-strings',
5269 '-Wno-char-subscripts',
5270 '-Wno-deprecated-declarations',
5271 '-Wno-deprecated-register',
5272 '-Wno-empty-body',
5273 '-Wno-enum-conversion',
[email protected]609d1c02014-02-11 02:05:135274 '-Wno-extra-tokens',
5275 '-Wno-ignored-attributes',
[email protected]8efc26082014-01-24 13:26:355276 '-Wno-incompatible-pointer-types',
[email protected]609d1c02014-02-11 02:05:135277 '-Wno-int-to-void-pointer-cast',
5278 '-Wno-invalid-noreturn',
[email protected]8efc26082014-01-24 13:26:355279 '-Wno-logical-op-parentheses',
5280 '-Wno-microsoft',
5281 '-Wno-missing-braces',
[email protected]609d1c02014-02-11 02:05:135282 '-Wno-missing-declarations',
[email protected]8efc26082014-01-24 13:26:355283 '-Wno-msvc-include',
5284 '-Wno-null-dereference',
5285 '-Wno-overloaded-virtual',
5286 '-Wno-parentheses',
5287 '-Wno-pointer-sign',
5288 '-Wno-reorder',
5289 '-Wno-return-type-c-linkage',
5290 '-Wno-self-assign',
[email protected]609d1c02014-02-11 02:05:135291 '-Wno-sometimes-uninitialized',
[email protected]8efc26082014-01-24 13:26:355292 '-Wno-switch',
5293 '-Wno-tautological-compare',
5294 '-Wno-unknown-pragmas',
5295 '-Wno-unsequenced',
5296 '-Wno-unused-function',
5297 '-Wno-unused-private-field',
5298 '-Wno-unused-value',
5299 '-Wno-unused-variable',
5300 '-ferror-limit=1',
5301 ],
5302 },
5303 }],
[email protected]2a794002014-02-22 00:27:115304 ['asan==1', {
5305 # ASan on Windows is a work in progress and very experimental.
5306 # See crbug.com/345874.
5307 'VCCLCompilerTool': {
5308 'AdditionalOptions': [
5309 '-fsanitize=address',
5310 ],
[email protected]4c1abdb2014-05-16 17:03:575311 'AdditionalIncludeDirectories': [
5312 # MSVC needs to be able to find the sanitizer headers when
5313 # invoked via /fallback. This is critical for using macros
5314 # like ASAN_UNPOISON_MEMORY_REGION in files where we fall
5315 # back.
5316 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5.0/include_sanitizer',
5317 ],
[email protected]2a794002014-02-22 00:27:115318 },
5319 'VCLinkerTool': {
5320 'AdditionalLibraryDirectories': [
5321 # TODO(hans): If make_clang_dir is absolute, this breaks.
[email protected]fd9ad772014-05-02 21:47:195322 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5.0/lib/windows',
[email protected]2a794002014-02-22 00:27:115323 ],
5324 },
5325 'target_conditions': [
5326 ['_type=="executable"', {
5327 'VCLinkerTool': {
5328 'AdditionalDependencies': [
5329 'clang_rt.asan-i386.lib',
5330 ],
5331 },
5332 }],
5333 ['_type=="shared_library" or _type=="loadable_module"', {
5334 'VCLinkerTool': {
5335 'AdditionalDependencies': [
5336 'clang_rt.asan_dll_thunk-i386.lib',
5337 ],
5338 },
5339 }],
5340 ],
5341 }],
[email protected]8efc26082014-01-24 13:26:355342 ],
[email protected]2f80c312009-02-25 21:26:555343 },
5344 },
5345 }],
[email protected]79e2336c2011-05-12 18:18:345346 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:315347 'target_defaults': {
5348 'defines': [
5349 'DISABLE_NACL',
5350 ],
5351 },
5352 }],
[email protected]cfbf9bc2009-12-07 22:07:565353 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:195354 'target_defaults': {
5355 'msvs_settings': {
5356 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:195357 'DelayLoadDLLs': [
5358 'dbghelp.dll',
5359 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:015360 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:195361 'uxtheme.dll',
5362 ],
5363 },
5364 },
[email protected]ef4fa4072009-12-04 22:46:505365 'configurations': {
[email protected]5153767c2009-12-22 01:52:505366 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:505367 'msvs_settings': {
5368 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:165369 'AdditionalOptions': [
5370 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:335371 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:165372 '/ignore:4199',
5373 '/ignore:4221',
5374 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:435375 ],
5376 'conditions': [
[email protected]1612e552014-02-15 04:49:185377 ['syzyasan==0', {
[email protected]c3fcbd122013-06-20 10:47:435378 'AdditionalOptions': ['/largeaddressaware'],
5379 }],
[email protected]1f9471a2010-01-04 06:40:165380 ],
[email protected]ef4fa4072009-12-04 22:46:505381 },
5382 },
5383 },
[email protected]5153767c2009-12-22 01:52:505384 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:505385 'msvs_settings': {
5386 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:165387 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:505388 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:335389 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:165390 '/ignore:4199',
5391 '/ignore:4221',
5392 '/nxcompat',
5393 ],
[email protected]ef4fa4072009-12-04 22:46:505394 },
5395 },
5396 },
5397 },
[email protected]48c7af72009-07-03 22:00:195398 },
5399 }],
[email protected]9821d0d2010-04-16 22:40:375400 ['enable_new_npdevice_api==1', {
5401 'target_defaults': {
5402 'defines': [
5403 'ENABLE_NEW_NPDEVICE_API',
5404 ],
5405 },
5406 }],
[email protected]5f683172013-04-27 01:53:195407 # Don't warn about the "typedef 'foo' locally defined but not used"
5408 # for gcc 4.8.
5409 # TODO: remove this flag once all builds work. See crbug.com/227506
5410 ['gcc_version>=48', {
5411 'target_defaults': {
5412 'cflags': [
5413 '-Wno-unused-local-typedefs',
5414 ],
5415 },
5416 }],
[email protected]7a4c78e02014-05-12 11:10:165417 # We need a special case to handle the android webview build on mac because
5418 # the host gcc there doesn't accept this flag, but the target gcc may
5419 # require it.
5420 ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', {
5421 'target_defaults': {
5422 'target_conditions': [
[email protected]f2cef302014-05-23 13:34:585423 ['_toolset=="host"', {
[email protected]7a4c78e02014-05-12 11:10:165424 'cflags!': [
5425 '-Wno-unused-local-typedefs',
5426 ],
5427 }],
5428 ],
5429 },
5430 }],
[email protected]ce2cad72014-02-13 18:17:355431 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
5432 'and OS!="win"', {
[email protected]e71a3622013-12-04 07:32:415433 'make_global_settings': [
5434 ['CC', '<(make_clang_dir)/bin/clang'],
5435 ['CXX', '<(make_clang_dir)/bin/clang++'],
5436 ['CC.host', '$(CC)'],
5437 ['CXX.host', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:305438 ],
5439 }],
[email protected]6e354d42014-01-29 01:59:215440 ['clang==1 and OS=="win"', {
5441 'make_global_settings': [
5442 # On Windows, gyp's ninja generator only looks at CC.
5443 ['CC', '<(make_clang_dir)/bin/clang-cl'],
5444 ],
5445 }],
[email protected]615fa6642012-08-14 19:17:075446 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:275447 # Hardcode the compiler names in the Makefile so that
5448 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:115449 'make_global_settings': [
[email protected]e71a3622013-12-04 07:32:415450 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
5451 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
5452 ['CC.host', '<!(which gcc)'],
5453 ['CXX.host', '<!(which g++)'],
[email protected]d10e2cc2012-03-20 10:45:275454 ],
5455 }],
[email protected]23eea4a42013-04-27 04:10:265456 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:465457 'make_global_settings': [
5458 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
5459 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
[email protected]eb5f1672013-01-31 07:56:465460 ['CC.host', '<!(which gcc)'],
5461 ['CXX.host', '<!(which g++)'],
[email protected]eb5f1672013-01-31 07:56:465462 ],
5463 }],
[email protected]e71a3622013-12-04 07:32:415464
5465 # TODO(yyanagisawa): supports GENERATOR==make
5466 # make generator doesn't support CC_wrapper without CC
5467 # in make_global_settings yet.
[email protected]c80075412014-02-27 18:46:265468 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
[email protected]e71a3622013-12-04 07:32:415469 'make_global_settings': [
5470 ['CC_wrapper', '<(gomadir)/gomacc'],
5471 ['CXX_wrapper', '<(gomadir)/gomacc'],
5472 ['CC.host_wrapper', '<(gomadir)/gomacc'],
5473 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
5474 ],
5475 }],
[email protected]2f80c312009-02-25 21:26:555476 ],
5477 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:505478 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
5479 # This block adds *project-wide* configuration settings to each project
5480 # file. It's almost always wrong to put things here. Specify your
5481 # custom xcode_settings in target_defaults to add them to targets instead.
5482
[email protected]1e013672012-06-29 22:12:205483 'conditions': [
[email protected]fca3d812012-07-27 00:55:365484 # In an Xcode Project Info window, the "Base SDK for All Configurations"
5485 # setting sets the SDK on a project-wide basis. In order to get the
5486 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
5487 # here at the project level.
[email protected]2c261532012-10-06 00:46:295488 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:365489 'conditions': [
[email protected]2c261532012-10-06 00:46:295490 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:365491 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:295492 }, {
5493 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:365494 }],
5495 ],
[email protected]2c261532012-10-06 00:46:295496 }],
5497 ['OS=="ios"', {
5498 'conditions': [
5499 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:405500 'conditions': [
5501 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]c3c372e2013-10-29 22:31:515502 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:405503 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:385504 }, {
5505 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:405506 }],
5507 ],
[email protected]2c261532012-10-06 00:46:295508 }, {
5509 'SDKROOT': '<(ios_sdk_path)', # -isysroot
5510 }],
5511 ],
[email protected]1e013672012-06-29 22:12:205512 }],
5513 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:205514 # Target both iPhone and iPad.
5515 'TARGETED_DEVICE_FAMILY': '1,2',
[email protected]72c0d3652013-11-05 19:11:425516 }, { # OS!="ios"
5517 'conditions': [
5518 ['target_arch=="x64"', {
5519 'ARCHS': [
5520 'x86_64'
5521 ],
5522 }],
5523 ['target_arch=="ia32"', {
5524 'ARCHS': [
5525 'i386'
5526 ],
5527 }],
5528 ],
[email protected]d64554012013-10-31 18:40:005529 }],
[email protected]1e013672012-06-29 22:12:205530 ],
[email protected]0c8ab452009-11-06 21:57:505531
[email protected]2f80c312009-02-25 21:26:555532 # The Xcode generator will look for an xcode_settings section at the root
5533 # of each dict and use it to apply settings on a file-wide basis. Most
5534 # settings should not be here, they should be in target-specific
5535 # xcode_settings sections, or better yet, should use non-Xcode-specific
5536 # settings in target dicts. SYMROOT is a special case, because many other
5537 # Xcode variables depend on it, including variables such as
5538 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5539 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5540 # files to appear (when present) in the UI as actual files and not red
5541 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5542 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:165543 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:555544 },
[email protected]ee28c9f2009-09-04 01:53:015545}