blob: c90d15bb9bae08d61d7e26631751e6588b31f27c [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': {
20 # Whether we're building a ChromeOS build.
21 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3022
[email protected]3fa441d2011-09-18 17:28:5023 # Whether we are using Views Toolkit
24 'toolkit_views%': 0,
25
[email protected]ed329be2012-01-03 22:02:1626 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5827 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2828
[email protected]ed329be2012-01-03 22:02:1629 # Whether or not we are building the Ash shell.
30 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4231
32 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
33 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2734
35 # Disable Virtual keyboard support by default.
36 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4837
[email protected]7ddea9802012-02-22 23:08:0538 # Disable viewport meta tag by default.
39 'enable_viewport%': 0,
[email protected]bb6aba32011-01-07 19:04:4340 },
41 # Copy conditionally-set variables out one scope.
42 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5843 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1644 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4245 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2746 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0547 'enable_viewport%': '<(enable_viewport)',
[email protected]e72e55b2011-01-06 22:19:3048
[email protected]e72e55b2011-01-06 22:19:3049 # Compute the architecture that we're building on.
50 'conditions': [
[email protected]177cd082011-10-04 18:36:3851 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3752 'host_arch%': 'ia32',
53 }, {
[email protected]79e2336c2011-05-12 18:18:3454 # This handles the Unix platforms for which there is some support.
55 # Anything else gets passed through, which probably won't work very
56 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3057 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3458 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
[email protected]e72e55b2011-01-06 22:19:3059 }],
[email protected]1353a092012-01-13 03:34:2860
[email protected]838a3cd2012-03-19 16:10:5561 # Chromeos implies ash.
[email protected]5f887612012-03-01 21:34:0662 ['chromeos==1', {
63 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1664 'use_aura%': 1,
65 }],
[email protected]bb6aba32011-01-07 19:04:4366
[email protected]5f887612012-03-01 21:34:0667 # For now, Windows *AND* Linux builds that |use_aura| should also
68 # imply using ash. This rule should be removed for the future when
69 # both Linux and Windows are using the aura windows without the ash
70 # interface.
71 ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', {
72 'use_ash%': 1,
73 }],
74
[email protected]ab2017e2012-02-07 01:54:5075 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:3576 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4377 'toolkit_views%': 1,
78 }, {
79 'toolkit_views%': 0,
80 }],
[email protected]e72e55b2011-01-06 22:19:3081 ],
82 },
83
84 # Copy conditionally-set variables out one scope.
85 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:3086 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4387 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:5888 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1689 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4290 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2791 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0592 'enable_viewport%': '<(enable_viewport)',
[email protected]023d8242011-11-22 01:25:2793
[email protected]8fb0ef02011-05-20 00:53:5094 # We used to provide a variable for changing how libraries were built.
95 # This variable remains until we can clean up all the users.
96 # This needs to be one nested variables dict in so that dependent
97 # gyp files can make use of it in their outer variables. (Yikes!)
98 # http://code.google.com/p/chromium/issues/detail?id=83308
99 'library%': 'static_library',
100
[email protected]e14a9f92009-08-05 19:26:07101 # Override branding to select the desired branding flavor.
102 'branding%': 'Chromium',
103
104 # Override buildtype to select the desired build flavor.
105 # Dev - everyday build for development/testing
106 # Official - release build (generally implies additional processing)
107 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
108 # conversion is done), some of the things which are now controlled by
109 # 'branding', such as symbol generation, will need to be refactored based
110 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
111 # builds).
112 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27113
[email protected]e72e55b2011-01-06 22:19:30114 # Default architecture we're building for is the architecture we're
115 # building on.
116 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17117
[email protected]e72e55b2011-01-06 22:19:30118 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
119 # are built under a chromium full build (1) or a webkit.org chromium
120 # build (0).
121 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52122
[email protected]e72e55b2011-01-06 22:19:30123 # Set to 1 to enable fast builds. It disables debug info for fastest
124 # compilation.
125 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49126
[email protected]20960e072011-09-20 20:59:01127 # Set to 1 to enable dcheck in release without having to use the flag.
128 'dcheck_always_on%': 0,
129
[email protected]464750f2011-10-24 23:16:18130 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51131 'file_manager_extension%': 0,
132
[email protected]5f16f8a2012-03-14 07:38:23133 # Disable WebUI TaskManager by default.
134 'webui_task_manager%': 0,
[email protected]8b2e9f392011-08-05 04:00:47135
[email protected]e72e55b2011-01-06 22:19:30136 # Python version.
[email protected]a43c5a02011-05-27 06:54:51137 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17138
[email protected]e72e55b2011-01-06 22:19:30139 # Set ARM-v7 compilation flags
140 'armv7%': 0,
141
142 # Set Neon compilation flags (only meaningful if armv7==1).
143 'arm_neon%': 1,
144
145 # The system root for cross-compiles. Default: none.
146 'sysroot%': '',
147
[email protected]945361a2011-09-30 04:38:43148 # The system libdir used for this ABI.
149 'system_libdir%': 'lib',
150
[email protected]e72e55b2011-01-06 22:19:30151 # On Linux, we build with sse2 for Chromium builds.
152 'disable_sse2%': 0,
153
154 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03155 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30156
157 # Variable 'component' is for cases where we would like to build some
158 # components as dynamic shared libraries but still need variable
159 # 'library' for static libraries.
160 # By default, component is set to whatever library is set to and
161 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53162 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30163
[email protected]bb6aba32011-01-07 19:04:43164 # Set to select the Title Case versions of strings in GRD files.
165 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21166
[email protected]98da0042011-02-02 00:10:27167 # Use translations provided by volunteers at launchpad.net. This
168 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19169 'use_third_party_translations%': 0,
170
[email protected]9a425422011-01-11 00:53:18171 # Remoting compilation is enabled by default. Set to 0 to disable.
172 'remoting%': 1,
173
[email protected]a026daa2011-04-20 15:49:51174 # P2P APIs are compiled in by default. Set to 0 to disable.
175 # Also note that this should be enabled for remoting to compile.
176 'p2p_apis%': 1,
177
[email protected]1ec68c42011-06-01 13:56:25178 # Configuration policy is enabled by default. Set to 0 to disable.
179 'configuration_policy%': 1,
180
[email protected]4b58e7d2011-07-11 10:22:56181 # Safe browsing is compiled in by default. Set to 0 to disable.
182 'safe_browsing%': 1,
183
[email protected]9eb100e2011-10-14 05:08:22184 # Speech input is compiled in by default. Set to 0 to disable.
185 'input_speech%': 1,
186
[email protected]7cce3232011-10-28 10:41:57187 # Notifications are compiled in by default. Set to 0 to disable.
188 'notifications%' : 1,
189
[email protected]5d451ad2011-02-11 16:43:46190 # If this is set, the clang plugins used on the buildbot will be used.
191 # Run tools/clang/scripts/update.sh to make sure they are compiled.
192 # This causes 'clang_chrome_plugins_flags' to be set.
193 # Has no effect if 'clang' is not set as well.
194 'clang_use_chrome_plugins%': 0,
195
[email protected]f36f3742011-11-21 13:12:14196 # Enable building with ASAN (Clang's -faddress-sanitizer option).
197 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06198 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
199 'asan%': 0,
[email protected]3cfa96a62012-02-28 07:27:58200 'asan_blacklist%': '<(PRODUCT_DIR)/../../third_party/asan/ignore.txt',
[email protected]92799b632011-08-15 14:33:06201
[email protected]00b0a7f2012-01-25 15:30:46202 # Use the provided profiled order file to link Chrome image with it.
203 # This makes Chrome faster by better using CPU cache when executing code.
204 # This is known as PGO (profile guided optimization).
205 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
206 'order_text_section%' : "",
207
[email protected]1ad5a7b2011-06-24 03:15:13208 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
209 # libraries on linux x86-64 and arm, plus ASLR.
210 'linux_fpic%': 1,
211
[email protected]bd7b6fe2012-03-05 21:02:40212 # Whether one-click signin is enabled or not.
213 'enable_one_click_signin%': 0,
214
[email protected]c6a1f94172011-07-05 02:35:00215 # Enable navigator.registerProtocolHandler and supporting UI.
216 'enable_register_protocol_handler%': 1,
217
[email protected]5ffb0a42012-01-27 09:36:11218 # Enable Web Intents support in WebKit, dispatching of intents,
219 # and extensions Web Intents support.
220 'enable_web_intents%': 1,
221
222 # Enable Web Intents web content registration via HTML element
223 # and WebUI managing such registrations.
224 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01225
[email protected]dda90ae2011-07-19 22:07:48226 # Webrtc compilation is enabled by default. Set to 0 to disable.
227 'enable_webrtc%': 1,
228
[email protected]67c125d2011-10-11 18:58:22229 # PPAPI by default does not support plugins making calls off the main
230 # thread. Set to 1 to turn on experimental support for out-of-process
231 # plugins to make call of the main thread.
232 'enable_pepper_threading%': 0,
233
[email protected]6b40bb582012-03-15 20:50:38234 # Enables theme support, which is enabled by default. Support for
235 # disabling depends on the platform.
236 'enable_themes%': 1,
237
[email protected]f56797b2011-09-25 00:04:35238 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
239 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
240 # the input value also defines the required XI2 minor minimum version.
241 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
242 'use_xi2_mt%': 0,
243
[email protected]9061bee82012-01-16 11:45:17244 # Use of precompiled headers on Windows.
245 #
246 # This is on by default in VS 2010, but off by default for VS
247 # 2008 because of complications that it can cause with our
248 # trybots etc.
249 #
250 # This variable may be explicitly set to 1 (enabled) or 0
251 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
252 # This setting will override the default.
253 #
254 # Note that a setting of 1 is probably suitable for most or all
255 # Windows developers using VS 2008, since precompiled headers
256 # provide a build speedup of 20-25%. There are a couple of
257 # small workarounds you may need to use when using VS 2008 (but
258 # not 2010), see
259 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
260 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16261 'chromium_win_pch%': 0,
262
[email protected]18e0f39b2012-01-17 16:47:34263 # Enable plug-in installation by default.
264 'enable_plugin_installation%': 1,
265
[email protected]62424a52012-03-18 03:09:50266 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42267 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35268 # Chrome UI.
269 # TODO(asvitkine): Enable this on all platforms and delete this flag.
270 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50271 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35272
[email protected]a9318c72012-03-01 01:29:47273 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
274 # with one of those tools.
275 'build_for_tool%': '',
276
[email protected]01971642012-03-07 14:39:56277 # Whether tests targets should be run, archived or just have the
278 # dependencies verified. All the tests targets have the '_run' suffix,
279 # e.g. base_unittests_run runs the target base_unittests. The test target
280 # always calls tools/isolate/isolate.py. See the script's --help for more
281 # information and the valid --mode values. Meant to be overriden with
282 # GYP_DEFINES.
283 'tests_run%': 'check',
284
[email protected]bb6aba32011-01-07 19:04:43285 'conditions': [
[email protected]33423fa2011-09-23 18:18:14286 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
287 # the 'conditions' clause. Initial attempts resulted in chromium and
288 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22289 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21290 'use_skia%': 1,
[email protected]e4dbede82011-09-16 16:11:07291 # Mac uses clang by default, so turn on the plugin as well.
292 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22293 }, {
294 'use_skia%': 1,
295 }],
296
[email protected]79e2336c2011-05-12 18:18:34297 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37298 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34299 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37300 }, {
301 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34302 }],
303
[email protected]df9167b2011-11-14 19:15:25304 # A flag for BSD platforms
305 ['OS=="freebsd" or OS=="openbsd"', {
306 'os_bsd%': 1,
307 }, {
308 'os_bsd%': 0,
309 }],
310
[email protected]c329adf82011-10-05 14:34:57311 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42312 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57313 'use_nss%': 1,
314 }, {
315 'use_nss%': 0,
316 }],
[email protected]e0b85a52011-10-06 03:30:42317
[email protected]258dca42011-09-21 00:17:19318 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01319 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19320 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34321 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37322 }, {
[email protected]258dca42011-09-21 00:17:19323 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37324 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34325 }],
[email protected]9a8175892012-03-20 02:11:58326
327 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]17b11af2012-03-21 21:46:17328 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
[email protected]9a8175892012-03-20 02:11:58329 'toolkit_uses_gtk%': 1,
330 }, {
331 'toolkit_uses_gtk%': 0,
332 }],
333
[email protected]efadeacf2011-10-27 19:01:00334 # We always use skia text rendering in Aura on Windows, since GDI
335 # doesn't agree with our BackingStore.
336 # TODO(beng): remove once skia text rendering is on by default.
337 ['use_aura==1 and OS=="win"', {
338 'enable_skia_text%': 1,
339 }],
[email protected]9edeb712011-09-20 21:20:33340
[email protected]63692212010-09-16 00:22:21341 # A flag to enable or disable our compile-time dependency
342 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
343 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49344 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50345 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21346 'use_gnome_keyring%': 0,
347 }, {
348 'use_gnome_keyring%': 1,
349 }],
[email protected]0afe5212010-10-01 18:56:11350
[email protected]bb6aba32011-01-07 19:04:43351 ['toolkit_views==0 or OS=="mac"', {
352 # GTK+ and Mac wants Title Case strings
353 'use_titlecase_in_grd_files%': 1,
354 }],
355
[email protected]1b4209f2011-01-07 00:25:40356 # Enable some hacks to support Flapper only on Chrome OS.
357 ['chromeos==1', {
358 'enable_flapper_hacks%': 1,
[email protected]3d38d8e2011-04-16 20:48:51359 }, {
[email protected]c5582412012-02-05 20:16:21360 'enable_flapper_hacks%': 0,
[email protected]ab2017e2012-02-07 01:54:50361 }],
362
[email protected]5f887612012-03-01 21:34:06363 # Enable file manager extension on Chrome OS.
364 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50365 'file_manager_extension%': 1,
366 }, {
[email protected]3d38d8e2011-04-16 20:48:51367 'file_manager_extension%': 0,
368 }],
[email protected]7de46352011-09-12 15:39:19369
[email protected]febc41db2012-03-24 02:44:43370 # Enable WebUI TaskManager on Chrome OS or Aura.
371 ['chromeos==1 or use_aura==1', {
372 'webui_task_manager%': 1,
[email protected]5f16f8a2012-03-14 07:38:23373 }],
374
[email protected]42eb4832012-03-22 01:02:46375 # For now one-click signin is enabled only for windows and mac
376 # since the UI is not yet complete for other platforms.
377 ['OS=="win" or OS=="mac"', {
[email protected]bd7b6fe2012-03-05 21:02:40378 'enable_one_click_signin%': 1,
379 }],
380
[email protected]da1c8d692011-09-20 20:35:01381 ['OS=="android"', {
382 'proprietary_codecs%': 1,
383 'enable_webrtc%': 0,
384 }],
[email protected]839d5172011-10-13 17:18:11385
386 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27387 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01388 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33389 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11390 }, {
[email protected]1ee7c56c2011-10-19 14:51:33391 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11392 }],
[email protected]9061bee82012-01-16 11:45:17393
394 # Turn precompiled headers on by default for VS 2010.
395 ['OS=="win" and MSVS_VERSION=="2010"', {
396 'chromium_win_pch%': 1
397 }],
[email protected]18e0f39b2012-01-17 16:47:34398
[email protected]ab2017e2012-02-07 01:54:50399 ['use_aura==1 or chromeos==1', {
[email protected]18e0f39b2012-01-17 16:47:34400 'enable_plugin_installation%': 0,
401 }, {
402 'enable_plugin_installation%': 1,
403 }],
[email protected]b07806c12012-02-03 22:44:59404
[email protected]8d726a42012-02-09 03:49:00405 # linux_use_gold_binary: whether to use the binary checked into
406 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40407 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51408 'linux_use_gold_binary%': 1,
409 }, {
410 'linux_use_gold_binary%': 0,
411 }],
412
[email protected]be239492012-02-09 19:00:17413 # linux_use_gold_flags: whether to use build flags that rely on gold.
414 # On by default for x64 Linux. Temporarily off for ChromeOS as
415 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40416 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17417 'linux_use_gold_flags%': 1,
418 }, {
[email protected]8d726a42012-02-09 03:49:00419 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59420 }],
[email protected]2e22e2f2012-03-15 21:53:10421
422 # Enable automation on platforms other than Android.
423 ['OS=="android"', {
424 'enable_automation%': 0,
425 }, {
426 'enable_automation%': 1,
427 }],
[email protected]3bd47e022012-03-22 04:19:12428
429 # Enable Skia UI text drawing incrementally on different platforms.
430 # http://crbug.com/105550
431 #
432 # On Aura, this allows per-tile painting to be used in the browser
433 # compositor.
434 ['use_aura==1', {
435 'use_canvas_skia%': 1,
436 }],
[email protected]b3f23ba2010-04-26 22:58:17437 ],
[email protected]e14a9f92009-08-05 19:26:07438 },
439
[email protected]e72e55b2011-01-06 22:19:30440 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07441 'branding%': '<(branding)',
442 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27443 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59444 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50445 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44446 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33447 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58448 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16449 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42450 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57451 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25452 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34453 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19454 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34455 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22456 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34457 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21458 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11459 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40460 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22461 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44462 'chromeos%': '<(chromeos)',
[email protected]2cc81d32011-10-04 17:03:18463 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05464 'enable_viewport%': '<(enable_viewport)',
[email protected]f56797b2011-09-25 00:04:35465 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20466 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47467 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21468 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54469 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01470 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36471 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43472 'armv7%': '<(armv7)',
473 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23474 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43475 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22476 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52477 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43478 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17479 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18480 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40481 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48482 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16483 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51484 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25485 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56486 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22487 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57488 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46489 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06490 'asan%': '<(asan)',
[email protected]3cfa96a62012-02-28 07:27:58491 'asan_blacklist%': '<(asan_blacklist)',
[email protected]00b0a7f2012-01-25 15:30:46492 'order_text_section%': '<(order_text_section)',
[email protected]365dd5b92011-05-26 01:30:56493 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07494 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11495 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34496 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6b40bb582012-03-15 20:50:38497 'enable_themes%': '<(enable_themes)',
[email protected]b07806c12012-02-03 22:44:59498 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00499 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50500 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]01971642012-03-07 14:39:56501 'tests_run%': '<(tests_run)',
[email protected]2e22e2f2012-03-15 21:53:10502 'enable_automation%': '<(enable_automation)',
[email protected]01971642012-03-07 14:39:56503
[email protected]4076d2f2011-08-11 18:20:22504 # Whether to build for Wayland display server
505 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39506
[email protected]371e1092011-10-12 20:37:36507 # Use system yasm instead of bundled one.
508 'use_system_yasm%': 0,
509
[email protected]cd00bd862012-02-29 00:40:36510 # Default to enabled PIE; this is important for ASLR but we may need to be
511 # able to turn it off for various reasons.
512 'linux_disable_pie%': 0,
513
[email protected]caa95c82009-11-23 22:39:32514 # The release channel that this build targets. This is used to restrict
515 # channel-specific build options, like which installer packages to create.
516 # The default is 'all', which does no channel-specific filtering.
517 'channel%': 'all',
518
[email protected]b3fb8092009-03-12 19:09:24519 # Override chromium_mac_pch and set it to 0 to suppress the use of
520 # precompiled headers on the Mac. Prefix header injection may still be
521 # used, but prefix headers will not be precompiled. This is useful when
522 # using distcc to distribute a build to compile slaves that don't
523 # share the same compiler executable as the system driving the compilation,
524 # because precompiled headers rely on pointers into a specific compiler
525 # executable's image. Setting this to 0 is needed to use an experimental
526 # Linux-Mac cross compiler distcc farm.
527 'chromium_mac_pch%': 1,
528
[email protected]3224dcd2009-09-16 17:31:25529 # Mac OS X SDK and deployment target support.
530 # The SDK identifies the version of the system headers that will be used,
531 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
532 # "Maximum allowed" refers to the operating system version whose APIs are
533 # available in the headers.
534 # The deployment target identifies the minimum system version that the
535 # built products are expected to function on. It corresponds to the
536 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
537 # To ensure these macros are available, #include <AvailabilityMacros.h>.
538 # Additional documentation on these macros is available at
539 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
540 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
541 # deployment target to 10.5. Other projects, such as O3D, may override
542 # these defaults.
543 'mac_sdk%': '10.5',
544 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59545
[email protected]f5ecbba12009-04-03 04:35:18546 # Set to 1 to enable code coverage. In addition to build changes
547 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
548 # project file called "coverage".
549 # Currently ignored on Windows.
550 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49551
[email protected]7477ea6f2009-12-22 23:28:15552 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47553 # environment variable, the libcmt shim it uses sometimes gets in
554 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
555 # 'win_use_allocator_shim': 0,
556 # 'win_release_RuntimeLibrary': 2
557 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52558 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11559
[email protected]95ff8082009-11-13 22:21:01560 # Whether usage of OpenMAX is enabled.
561 'enable_openmax%': 0,
562
[email protected]d01120e62010-05-10 17:04:48563 # Whether proprietary audio/video codecs are assumed to be included with
564 # this build (only meaningful if branding!=Chrome).
565 'proprietary_codecs%': 0,
566
[email protected]e5b2eaa2009-04-14 01:39:12567 # TODO(bradnelson): eliminate this when possible.
568 # To allow local gyp files to prevent release.vsprops from being included.
569 # Yes(1) means include release.vsprops.
570 # Once all vsprops settings are migrated into gyp, this can go away.
571 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23572
[email protected]cbd5fd52009-08-26 00:14:27573 # TODO(bradnelson): eliminate this when possible.
574 # To allow local gyp files to override additional linker options for msvs.
575 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19576 'msvs_use_common_linker_extras%': 1,
577
[email protected]1ffb6502009-06-02 07:46:24578 # TODO(sgk): eliminate this if possible.
579 # It would be nicer to support this via a setting in 'target_defaults'
580 # in chrome/app/locales/locales.gypi overriding the setting in the
581 # 'Debug' configuration in the 'target_defaults' dict below,
582 # but that doesn't work as we'd like.
583 'msvs_debug_link_incremental%': '2',
584
[email protected]1f790ef2011-01-11 20:45:36585 # Needed for some of the largest modules.
586 'msvs_debug_link_nonincremental%': '1',
587
[email protected]5ab8f482011-08-18 18:30:06588 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
589 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51590 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06591
[email protected]573136142009-07-15 22:48:37592 # This is the location of the sandbox binary. Chrome looks for this before
593 # running the zygote process. If found, and SUID, it will be used to
594 # sandbox the zygote process and, thus, all renderer processes.
595 'linux_sandbox_path%': '',
596
[email protected]ad6d2c42009-09-15 20:13:38597 # Set this to true to enable SELinux support.
598 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57599
[email protected]58680ce2010-09-18 00:09:15600 # Set this to true when building with Clang.
601 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15602 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24603 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15604
[email protected]5e781232011-01-28 02:57:59605 # These two variables can be set in GYP_DEFINES while running
606 # |gclient runhooks| to let clang run a plugin in every compilation.
607 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
608 # Example:
[email protected]93120fe2011-02-03 20:46:42609 # 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:59610
611 'clang_load%': '',
612 'clang_add_plugin%': '',
613
[email protected]da1c8d692011-09-20 20:35:01614 # The default type of gtest.
615 'gtest_target_type%': 'executable',
616
[email protected]7664ab32011-02-01 23:35:25617 # Enable sampling based profiler.
618 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
619 'profiling%': '0',
620
[email protected]93b373502011-08-16 19:06:22621 # Enable strict glibc debug mode.
622 'glibcxx_debug%': 0,
623
[email protected]36532f332010-08-25 00:22:01624 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
625 'linux_breakpad%': 0,
626 # And if we want to dump symbols for Breakpad-enabled builds.
627 'linux_dump_symbols%': 0,
628 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03629 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49630 # Strip the test binaries needed for Linux reliability tests.
631 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03632
[email protected]46ce5b562010-06-16 18:39:53633 # Enable TCMalloc.
634 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24635
[email protected]39ca7de2010-04-16 08:04:03636 # Disable TCMalloc's debugallocation.
637 'linux_use_debugallocation%': 0,
638
[email protected]d8b60602010-03-26 09:41:22639 # Disable TCMalloc's heapchecker.
640 'linux_use_heapchecker%': 0,
641
[email protected]64e2d4a42010-08-27 10:13:21642 # Disable shadow stack keeping used by heapcheck to unwind the stacks
643 # better.
644 'linux_keep_shadow_stacks%': 0,
645
[email protected]556c5d72010-06-10 05:45:01646 # Set to 1 to link against libgnome-keyring instead of using dlopen().
647 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35648 # Set to 1 to link against gsettings APIs instead of using dlopen().
649 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01650
[email protected]77c1b29392009-12-04 06:21:29651 # Set Thumb compilation flags.
652 'arm_thumb%': 0,
653
[email protected]53e0f642010-03-05 01:41:56654 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
655 # arm_neon==0).
656 'arm_fpu%': 'vfpv3',
657
[email protected]9821d0d2010-04-16 22:40:37658 # Enable new NPDevice API.
659 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50660
661 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14662 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50663
[email protected]6f51b27e2010-06-22 20:43:53664 # Enable a variable used elsewhere throughout the GYP files to determine
665 # whether to compile in the sources for the GPU plugin / process.
666 'enable_gpu%': 1,
667
[email protected]e72e55b2011-01-06 22:19:30668 # .gyp files or targets should set chromium_code to 1 if they build
669 # Chromium-specific code, as opposed to external code. This variable is
670 # used to control such things as the set of warnings to enable, and
671 # whether warnings are treated as errors.
672 'chromium_code%': 0,
673
[email protected]8d726a42012-02-09 03:49:00674 'release_valgrind_build%': 0,
675
[email protected]b1eb341c2011-11-09 18:46:07676 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
677 'enable_wexit_time_destructors%': 0,
678
[email protected]e72e55b2011-01-06 22:19:30679 # Set to 1 to compile with the built in pdf viewer.
680 'internal_pdf%': 0,
681
682 # This allows to use libcros from the current system, ie. /usr/lib/
683 # The cros_api will be pulled in as a static library, and all headers
684 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43685 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30686
[email protected]e72e55b2011-01-06 22:19:30687 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
688 # so Cocoa is happy (http://crbug.com/20441).
689 'locales': [
690 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
691 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
692 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19693 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30694 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
695 'vi', 'zh-CN', 'zh-TW',
696 ],
697
[email protected]cc0322d2011-07-24 09:29:19698 # Pseudo locales are special locales which are used for testing and
699 # debugging. They don't get copied to the final app. For more info,
700 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
701 'pseudo_locales': [
702 'fake-bidi',
703 ],
704
[email protected]bb6aba32011-01-07 19:04:43705 'grit_defines': [],
706
[email protected]bd3bd442011-03-28 07:58:51707 # If debug_devtools is set to 1, JavaScript files for DevTools are
708 # stored as is and loaded from disk. Otherwise, a concatenated file
709 # is stored in resources.pak. It is still possible to load JS files
710 # from disk by passing --debug-devtools cmdline switch.
711 'debug_devtools%': 0,
712
[email protected]464750f2011-10-24 23:16:18713 # The Java Bridge is not compiled in by default.
714 'java_bridge%': 0,
715
[email protected]33e1c372011-12-14 16:32:07716 # This flag is only used when disable_nacl==0 and disables all those
717 # subcomponents which would require the installation of a native_client
718 # untrusted toolchain.
719 'disable_nacl_untrusted%': 0,
720
[email protected]407dfa632011-12-23 11:59:35721 # Disable Dart by default.
722 'enable_dart%': 0,
723
[email protected]ff10b132012-02-29 22:53:30724 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
725 'msbuild_toolset%': '',
726
[email protected]912c55c2009-07-31 23:33:55727 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11728 # Used to disable Native Client at compile time, for platforms where it
729 # isn't supported (ARM)
[email protected]33e1c372011-12-14 16:32:07730 ['target_arch=="arm" and chromeos == 1', {
[email protected]f0c4fce2011-10-20 18:16:11731 'disable_nacl%': 1,
732 }, {
733 'disable_nacl%': 0,
734 }],
[email protected]da1c8d692011-09-20 20:35:01735 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10736 # This will set gcc_version to XY if you are running gcc X.Y.*.
737 # This is used to tweak build flags for gcc 4.4.
738 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23739 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43740 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27741 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10742 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27743 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27744 }],
[email protected]4c9cc6c2009-10-01 18:54:57745 # All Chrome builds have breakpad symbols, but only process the
746 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08747 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57748 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57749 }],
[email protected]cbd5fd52009-08-26 00:14:27750 ],
[email protected]da1c8d692011-09-20 20:35:01751 }], # os_posix==1 and OS!="mac" and OS!="android"
752 ['OS=="android"', {
753 # Location of Android NDK.
754 'variables': {
755 'variables': {
756 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
[email protected]febc41db2012-03-24 02:44:43757 'target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43758
[email protected]da1c8d692011-09-20 20:35:01759 # Switch between different build types, currently only '0' is
760 # supported.
761 'android_build_type%': 0,
762 },
763 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febc41db2012-03-24 02:44:43764 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)',
[email protected]da1c8d692011-09-20 20:35:01765 'android_build_type%': '<(android_build_type)',
766 },
767 'android_ndk_root%': '<(android_ndk_root)',
768 'android_ndk_sysroot': '<(android_ndk_sysroot)',
769 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
770 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
771
772 # Uses Android's crash report system
773 'linux_breakpad%': 0,
774
775 # Always uses openssl.
776 'use_openssl%': 1,
777
778 'proprietary_codecs%': '<(proprietary_codecs)',
779 'safe_browsing%': 0,
780 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22781 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56782 'enable_web_intents%': 0,
[email protected]464750f2011-10-24 23:16:18783 'java_bridge%': 1,
[email protected]6b40bb582012-03-15 20:50:38784 # Android does not support themes.
785 'enable_themes%': 0,
[email protected]5fd2e842012-03-01 00:29:11786
787 # Set to 1 once we have a notification system for Android.
788 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57789 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01790
791 # Builds the gtest targets as a shared_library.
[email protected]c6911392012-03-24 04:44:41792 # TODO(michaelbai): Use the fixed value 'shared_library' once it
793 # is fully supported.
794 'gtest_target_type%': '<(gtest_target_type)',
[email protected]da1c8d692011-09-20 20:35:01795
796 # Uses system APIs for decoding audio and video.
797 'use_libffmpeg%': '0',
798
799 # Always use the chromium skia. The use_system_harfbuzz needs to
800 # match use_system_skia.
801 'use_system_skia%': '0',
802 'use_system_harfbuzz%': '0',
803
804 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28805 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01806
807 # Choose static link by build type.
808 'conditions': [
809 ['android_build_type==0', {
810 'static_link_system_icu%': 1,
811 }, {
812 'static_link_system_icu%': 0,
813 }],
814 ],
815 # Enable to use system sqlite.
816 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16817 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01818 'use_system_libjpeg%': '<(android_build_type)',
819 # Enable to use the system libexpat.
820 'use_system_libexpat%': '<(android_build_type)',
821 # Enable to use the system stlport, otherwise statically
822 # link the NDK one?
823 'use_system_stlport%': '<(android_build_type)',
824 # Copy it out one scope.
825 'android_build_type%': '<(android_build_type)',
826 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07827 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11828 # Enable clang on mac by default!
829 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56830 # Compile in Breakpad support by default so that it can be
831 # tested, even if it is not enabled by default at runtime.
832 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07833 'conditions': [
834 # mac_product_name is set to the name of the .app bundle as it should
835 # appear on disk. This duplicates data from
836 # chrome/app/theme/chromium/BRANDING and
837 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
838 # these names into the build system.
839 ['branding=="Chrome"', {
840 'mac_product_name%': 'Google Chrome',
841 }, { # else: branding!="Chrome"
842 'mac_product_name%': 'Chromium',
843 }],
844
[email protected]e14a9f92009-08-05 19:26:07845 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56846 # Enable uploading crash dumps.
847 'mac_breakpad_uploads%': 1,
848 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07849 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56850 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07851 'mac_keystone%': 1,
852 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56853 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07854 'mac_breakpad%': 0,
855 'mac_keystone%': 0,
856 }],
857 ],
858 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43859
[email protected]912c55c2009-07-31 23:33:55860 ['OS=="win"', {
861 'conditions': [
[email protected]8974e042010-06-21 18:06:52862 ['component=="shared_library"', {
863 'win_use_allocator_shim%': 0,
864 }],
[email protected]2212d272011-12-20 21:37:37865 # Whether to use multiple cores to compile with visual studio. This is
866 # optional because it sometimes causes corruption on VS 2005.
867 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55868 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13869 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55870 },{
871 'msvs_multi_core_compile%': 1,
872 }],
[email protected]10bb8c92009-08-07 21:16:03873 # Don't do incremental linking for large modules on 32-bit.
874 ['MSVS_OS_BITS==32', {
875 'msvs_large_module_debug_link_mode%': '1', # No
876 },{
877 'msvs_large_module_debug_link_mode%': '2', # Yes
878 }],
[email protected]3e2648a2011-03-21 20:58:50879 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
880 'msvs_express%': 1,
881 'secure_atl%': 0,
882 },{
883 'msvs_express%': 0,
884 'secure_atl%': 1,
885 }],
[email protected]912c55c2009-07-31 23:33:55886 ],
[email protected]ef4fa4072009-12-04 22:46:50887 'nacl_win64_defines': [
888 # This flag is used to minimize dependencies when building
889 # Native Client loader for 64-bit Windows.
890 'NACL_WIN64',
891 ],
[email protected]912c55c2009-07-31 23:33:55892 }],
[email protected]bb6aba32011-01-07 19:04:43893
[email protected]79e2336c2011-05-12 18:18:34894 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44895 'use_cups%': 1,
896 }, {
897 'use_cups%': 0,
898 }],
[email protected]bb6aba32011-01-07 19:04:43899
[email protected]19fe8f0b2010-12-07 07:27:27900 # Set the relative path from this file to the GYP file of the JPEG
901 # library used by Chromium.
902 ['use_libjpeg_turbo==1', {
903 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
904 }, {
905 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
906 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43907
[email protected]abcc9ac2011-05-16 20:04:35908 # Options controlling the use of GConf (the classic GNOME configuration
909 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31910 ['chromeos==1', {
911 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35912 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31913 }, {
914 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35915 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31916 }],
917
[email protected]4de39f82011-03-28 12:01:29918 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29919 ['branding=="Chrome"', {
920 # TODO(mmoss) The .grd files look for _google_chrome, but for
921 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29922 'grit_defines': ['-D', '_google_chrome',
923 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29924 }, {
[email protected]4de39f82011-03-28 12:01:29925 'grit_defines': ['-D', '_chromium',
926 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29927 }],
[email protected]bb6aba32011-01-07 19:04:43928 ['chromeos==1', {
929 'grit_defines': ['-D', 'chromeos'],
930 }],
931 ['toolkit_views==1', {
932 'grit_defines': ['-D', 'toolkit_views'],
933 }],
[email protected]8dd791d2011-09-16 16:37:30934 ['use_aura==1', {
935 'grit_defines': ['-D', 'use_aura'],
936 }],
[email protected]ed329be2012-01-03 22:02:16937 ['use_ash==1', {
938 'grit_defines': ['-D', 'use_ash'],
939 }],
[email protected]c329adf82011-10-05 14:34:57940 ['use_nss==1', {
941 'grit_defines': ['-D', 'use_nss'],
942 }],
[email protected]2cc81d32011-10-04 17:03:18943 ['use_virtual_keyboard==1', {
944 'grit_defines': ['-D', 'use_virtual_keyboard'],
945 }],
[email protected]e47c32032011-03-01 19:26:20946 ['file_manager_extension==1', {
947 'grit_defines': ['-D', 'file_manager_extension'],
948 }],
[email protected]8b2e9f392011-08-05 04:00:47949 ['webui_task_manager==1', {
950 'grit_defines': ['-D', 'webui_task_manager'],
951 }],
[email protected]9a425422011-01-11 00:53:18952 ['remoting==1', {
953 'grit_defines': ['-D', 'remoting'],
954 }],
[email protected]bb6aba32011-01-07 19:04:43955 ['use_titlecase_in_grd_files==1', {
956 'grit_defines': ['-D', 'use_titlecase'],
957 }],
[email protected]00dc155832011-02-01 18:51:19958 ['use_third_party_translations==1', {
959 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12960 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16961 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
962 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12963 ],
[email protected]00dc155832011-02-01 18:51:19964 }],
[email protected]da1c8d692011-09-20 20:35:01965 ['OS=="android"', {
966 'grit_defines': ['-D', 'android'],
967 }],
[email protected]5d451ad2011-02-11 16:43:46968 ['clang_use_chrome_plugins==1', {
969 'clang_chrome_plugins_flags':
970 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
971 }],
[email protected]cfa2e1102011-04-27 22:30:23972
[email protected]452da69e2011-05-24 02:36:05973 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27974 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23975 'use_ibus%': 1,
976 }, {
977 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56978 }],
979
980 ['enable_register_protocol_handler==1', {
981 'grit_defines': ['-D', 'enable_register_protocol_handler'],
982 }],
[email protected]92799b632011-08-15 14:33:06983
[email protected]5ffb0a42012-01-27 09:36:11984 ['enable_web_intents_tag==1', {
985 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:07986 }],
987
[email protected]92799b632011-08-15 14:33:06988 ['asan==1', {
989 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20990 # Do not use Chrome plugins for Clang. The Clang version in
991 # third_party/asan may be different from the default one.
992 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06993 }],
[email protected]a9318c72012-03-01 01:29:47994
995 # On valgrind bots, override the optimizer settings so we don't inline too
996 # much and make the stacks harder to figure out.
997 #
998 # TODO(rnk): Kill off variables that no one else uses and just implement
999 # them under a build_for_tool== condition.
1000 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1001 # gcc flags
1002 'mac_debug_optimization': '1',
1003 'mac_release_optimization': '1',
1004 'release_optimize': '1',
1005 'no_gc_sections': 1,
1006 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1007 '-fno-builtin -fno-optimize-sibling-calls',
1008 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1009 '-fno-builtin -fno-optimize-sibling-calls',
1010
1011 # MSVS flags for TSan on Pin and Windows.
1012 'win_debug_RuntimeChecks': '0',
1013 'win_debug_disable_iterator_debugging': '1',
1014 'win_debug_Optimization': '1',
1015 'win_debug_InlineFunctionExpansion': '0',
1016 'win_release_InlineFunctionExpansion': '0',
1017 'win_release_OmitFramePointers': '0',
1018
1019 'linux_use_tcmalloc': 1,
1020 'release_valgrind_build': 1,
1021 'werror': '',
1022 'component': 'static_library',
1023 'use_system_zlib': 0,
1024 }],
1025
1026 # Build tweaks for DrMemory.
1027 # TODO(rnk): Combine with tsan config to share the builder.
1028 # http://crbug.com/108155
1029 ['build_for_tool=="drmemory"', {
1030 # DrMemory can't handle the debug CRT dll, so build static.
1031 'component': 'static_library',
1032 # These runtime checks force initialization of stack vars which blocks
1033 # DrMemory's uninit detection.
1034 'win_debug_RuntimeChecks': '0',
1035 # Iterator debugging is slow.
1036 'win_debug_disable_iterator_debugging': '1',
1037 # Try to disable optimizations that mess up stacks in a release build.
1038 'win_release_InlineFunctionExpansion': '0',
1039 'win_release_OmitFramePointers': '0',
1040 # Keep the code under #ifndef NVALGRIND.
1041 'release_valgrind_build': 1,
1042 }],
[email protected]912c55c2009-07-31 23:33:551043 ],
[email protected]a9318c72012-03-01 01:29:471044
[email protected]35958422011-09-28 02:03:591045 # List of default apps to install in new profiles. The first list contains
1046 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061047 # contains the destination location for each of the files. When a crx
1048 # is added or removed from the list, the chrome/browser/resources/
1049 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591050 'default_apps_list': [
1051 'browser/resources/default_apps/external_extensions.json',
1052 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061053 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591054 'browser/resources/default_apps/youtube.crx',
1055 ],
1056 'default_apps_list_linux_dest': [
1057 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1058 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061059 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591060 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1061 ],
[email protected]2f80c312009-02-25 21:26:551062 },
1063 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261064 'variables': {
[email protected]a6e22132010-02-10 20:43:181065 # The condition that operates on chromium_code is in a target_conditions
1066 # section, and will not have access to the default fallback value of
1067 # chromium_code at the top of this file, or to the chromium_code
1068 # variable placed at the root variables scope of .gyp files, because
1069 # those variables are not set at target scope. As a workaround,
1070 # if chromium_code is not set at target scope, define it in target scope
1071 # to contain whatever value it has during early variable expansion.
1072 # That's enough to make it available during target conditional
1073 # processing.
1074 'chromium_code%': '<(chromium_code)',
1075
[email protected]7e0d664a2009-12-03 21:07:471076 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291077 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001078 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331079
[email protected]7e0d664a2009-12-03 21:07:471080 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1081 'win_release_Optimization%': '2', # 2 = /Os
1082 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331083
1084 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241085 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:331086 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:241087 # Tri-state: blank is default, 1 on, 0 off
1088 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331089
[email protected]6b0507b2010-05-07 07:41:211090 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1091 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331092
[email protected]6b0507b2010-05-07 07:41:211093 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151094 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1095 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331096
[email protected]fac10d12010-11-08 16:00:311097 # VS inserts quite a lot of extra checks to algorithms like
1098 # std::partial_sort in Debug build which make them O(N^2)
1099 # instead of O(N*logN). This is particularly slow under memory
1100 # tools like ThreadSanitizer so we want it to be disablable.
1101 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1102 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471103
[email protected]ffd984b12009-09-11 19:37:001104 'release_extra_cflags%': '',
1105 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001106
1107 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521108
[email protected]ef5c5f1b2011-12-17 02:16:241109 # the non-qualified versions are widely assumed to be *nix-only
1110 'win_release_extra_cflags%': '',
1111 'win_debug_extra_cflags%': '',
1112
[email protected]b1eb341c2011-11-09 18:46:071113 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1114 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1115
[email protected]ef3326702011-10-06 18:06:441116 # Only used by Windows build for now. Can be used to build into a
1117 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1118 # output files in src/build/VS2010_{Debug,Release}.
1119 'build_dir_prefix%': '',
1120
[email protected]8974e042010-06-21 18:06:521121 'conditions': [
1122 ['OS=="win" and component=="shared_library"', {
1123 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161124 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1125 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521126 }, {
1127 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1128 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1129 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1130 }],
1131 ],
[email protected]1c966092009-08-20 21:19:261132 },
[email protected]32aa8cc2009-03-04 21:36:391133 'conditions': [
[email protected]ff10b132012-02-29 22:53:301134 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1135 'msbuild_toolset': '<(msbuild_toolset)',
1136 }],
[email protected]32aa8cc2009-03-04 21:36:391137 ['branding=="Chrome"', {
1138 'defines': ['GOOGLE_CHROME_BUILD'],
1139 }, { # else: branding!="Chrome"
1140 'defines': ['CHROMIUM_BUILD'],
1141 }],
[email protected]63e39a282011-07-13 20:41:281142 ['component=="shared_library"', {
1143 'defines': ['COMPONENT_BUILD'],
1144 }],
[email protected]5cba9ff72011-11-16 21:55:181145 ['component=="shared_library" and incremental_chrome_dll==1', {
1146 # TODO(dpranke): We can't incrementally link chrome when
1147 # content is being built as a DLL because chrome links in
1148 # webkit_glue and webkit_glue depends on symbols defined in
1149 # content. We can remove this when we fix glue.
1150 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
1151 'defines': ['COMPILE_CONTENT_STATICALLY'],
1152 }],
[email protected]06c756182010-04-27 18:31:311153 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171154 'defines': ['TOOLKIT_VIEWS=1'],
1155 }],
[email protected]1ee7c56c2011-10-19 14:51:331156 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111157 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1158 }],
[email protected]41423092011-08-25 15:39:581159 ['use_aura==1', {
1160 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351161 }],
[email protected]ed329be2012-01-03 22:02:161162 ['use_ash==1', {
1163 'defines': ['USE_ASH=1'],
1164 }],
[email protected]c329adf82011-10-05 14:34:571165 ['use_nss==1', {
1166 'defines': ['USE_NSS=1'],
1167 }],
[email protected]bd7b6fe2012-03-05 21:02:401168 ['enable_one_click_signin==1', {
1169 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1170 }],
[email protected]9d43e372011-09-22 19:39:521171 ['toolkit_uses_gtk==1', {
1172 'defines': ['TOOLKIT_USES_GTK=1'],
1173 }],
[email protected]a47aa892011-11-22 03:12:311174 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1175 # TODO(erg): We are progressively sealing up use of deprecated features
1176 # in gtk in preparation for an eventual porting to gtk3.
1177 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1178 }],
[email protected]fdc5bed2010-01-09 01:16:571179 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291180 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501181 }],
[email protected]2cc81d32011-10-04 17:03:181182 ['use_virtual_keyboard==1', {
1183 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1184 }],
[email protected]f56797b2011-09-25 00:04:351185 ['use_xi2_mt!=0', {
1186 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1187 }],
[email protected]236754a2011-07-28 17:38:231188 ['use_wayland==1', {
1189 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1190 }],
[email protected]e47c32032011-03-01 19:26:201191 ['file_manager_extension==1', {
1192 'defines': ['FILE_MANAGER_EXTENSION=1'],
1193 }],
[email protected]8b2e9f392011-08-05 04:00:471194 ['webui_task_manager==1', {
1195 'defines': ['WEBUI_TASK_MANAGER=1'],
1196 }],
[email protected]7664ab32011-02-01 23:35:251197 ['profiling==1', {
1198 'defines': ['ENABLE_PROFILING=1'],
1199 }],
[email protected]93b373502011-08-16 19:06:221200 ['OS=="linux" and glibcxx_debug==1', {
1201 'defines': ['_GLIBCXX_DEBUG=1',],
1202 'cflags_cc!': ['-fno-rtti'],
1203 'cflags_cc+': ['-frtti', '-g'],
1204 }],
[email protected]542bf24a2010-06-11 23:08:171205 ['remoting==1', {
1206 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001207 }],
[email protected]5b87e782012-02-09 18:19:321208 ['enable_webrtc==1', {
1209 'defines': ['ENABLE_WEBRTC=1'],
1210 }],
[email protected]a026daa2011-04-20 15:49:511211 ['p2p_apis==1', {
1212 'defines': ['ENABLE_P2P_APIS=1'],
1213 }],
[email protected]d01120e62010-05-10 17:04:481214 ['proprietary_codecs==1', {
1215 'defines': ['USE_PROPRIETARY_CODECS'],
1216 }],
[email protected]1b4209f2011-01-07 00:25:401217 ['enable_flapper_hacks==1', {
1218 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1219 }],
[email protected]67c125d2011-10-11 18:58:221220 ['enable_pepper_threading==1', {
1221 'defines': ['ENABLE_PEPPER_THREADING'],
1222 }],
[email protected]7ddea9802012-02-22 23:08:051223 ['enable_viewport==1', {
1224 'defines': ['ENABLE_VIEWPORT'],
1225 }],
[email protected]f31e2e52011-07-14 16:01:191226 ['configuration_policy==1', {
1227 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1228 }],
[email protected]9eb100e2011-10-14 05:08:221229 ['input_speech==1', {
1230 'defines': ['ENABLE_INPUT_SPEECH'],
1231 }],
[email protected]7cce3232011-10-28 10:41:571232 ['notifications==1', {
1233 'defines': ['ENABLE_NOTIFICATIONS'],
1234 }],
[email protected]9c1949e2009-10-02 19:59:541235 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171236
[email protected]9c1949e2009-10-02 19:59:541237 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141238 # For Windows and Mac, we don't genererate debug information.
1239 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541240 'msvs_settings': {
1241 'VCLinkerTool': {
1242 'GenerateDebugInformation': 'false',
1243 },
1244 'VCCLCompilerTool': {
1245 'DebugInformationFormat': '0',
1246 }
[email protected]da4d4ea2011-09-22 20:23:141247 },
1248 'xcode_settings': {
1249 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1250 },
[email protected]1cc2fa72010-07-03 08:49:241251 }, { # else: OS != "win", generate less debug information.
1252 'variables': {
1253 'debug_extra_cflags': '-g1',
1254 },
[email protected]37c84192010-04-14 21:37:401255 }],
[email protected]aecc4d12011-01-19 05:32:331256 # Clang creates chubby debug information, which makes linking very
1257 # slow. For now, don't create debug information with clang. See
1258 # http://crbug.com/70000
1259 ['OS=="linux" and clang==1', {
1260 'variables': {
1261 'debug_extra_cflags': '-g0',
1262 },
1263 }],
[email protected]9c1949e2009-10-02 19:59:541264 ], # conditions for fastbuild.
1265 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011266 ['dcheck_always_on!=0', {
1267 'defines': ['DCHECK_ALWAYS_ON=1'],
1268 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381269 ['selinux==1', {
1270 'defines': ['CHROMIUM_SELINUX=1'],
1271 }],
[email protected]7e0d664a2009-12-03 21:07:471272 ['win_use_allocator_shim==0', {
1273 'conditions': [
1274 ['OS=="win"', {
1275 'defines': ['NO_TCMALLOC'],
1276 }],
1277 ],
1278 }],
[email protected]43f28f832010-02-03 02:28:481279 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151280 'defines': [
1281 'ENABLE_GPU=1',
1282 ],
1283 }],
[email protected]b1c2a5542010-10-08 12:44:401284 ['use_openssl==1', {
1285 'defines': [
1286 'USE_OPENSSL=1',
1287 ],
1288 }],
[email protected]ed154592010-04-29 00:18:501289 ['enable_eglimage==1', {
1290 'defines': [
1291 'ENABLE_EGLIMAGE=1',
1292 ],
1293 }],
[email protected]7d7564a12011-06-21 19:20:221294 ['use_skia==1', {
1295 'defines': [
1296 'USE_SKIA=1',
1297 ],
1298 }],
[email protected]f5ecbba12009-04-03 04:35:181299 ['coverage!=0', {
1300 'conditions': [
1301 ['OS=="mac"', {
1302 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041303 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1304 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471305 },
[email protected]e4fb84c2009-12-28 20:45:431306 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101307 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431308 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181309 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431310 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181311 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471312 }],
1313 ],
1314 }],
[email protected]da1c8d692011-09-20 20:35:011315 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181316 'cflags': [ '-ftest-coverage',
1317 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001318 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181319 }],
[email protected]e8f6ff42009-07-07 18:20:531320 # Finally, for Windows, we simply turn on profiling.
1321 ['OS=="win"', {
1322 'msvs_settings': {
1323 'VCLinkerTool': {
1324 'Profile': 'true',
1325 },
[email protected]10bb8c92009-08-07 21:16:031326 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531327 # /Z7, not /Zi, so coverage is happyb
1328 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161329 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531330 }
1331 }
1332 }], # OS==win
1333 ], # conditions for coverage
1334 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381335 ['OS=="win"', {
1336 'defines': [
1337 '__STD_C',
1338 '_CRT_SECURE_NO_DEPRECATE',
1339 '_SCL_SECURE_NO_DEPRECATE',
1340 ],
1341 'include_dirs': [
1342 '<(DEPTH)/third_party/wtl/include',
1343 ],
1344 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561345 ['enable_register_protocol_handler==1', {
1346 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191347 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561348 ],
1349 }],
[email protected]41ed4e82011-08-25 23:02:071350 ['enable_web_intents==1', {
1351 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471352 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071353 ],
1354 }],
[email protected]13eb97d2012-01-05 01:07:121355 ['OS=="win" and branding=="Chrome"', {
1356 'defines': ['ENABLE_SWIFTSHADER'],
1357 }],
[email protected]407dfa632011-12-23 11:59:351358 ['enable_dart==1', {
1359 'defines': ['WEBKIT_USING_DART=1'],
1360 }],
[email protected]18e0f39b2012-01-17 16:47:341361 ['enable_plugin_installation==1', {
1362 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1363 }],
[email protected]6b40bb582012-03-15 20:50:381364 ['enable_themes==1', {
1365 'defines': ['ENABLE_THEMES=1'],
1366 }],
[email protected]2e22e2f2012-03-15 21:53:101367 ['enable_automation==1', {
1368 'defines': ['ENABLE_AUTOMATION=1'],
1369 }],
[email protected]a6e22132010-02-10 20:43:181370 ], # conditions for 'target_defaults'
1371 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071372 ['enable_wexit_time_destructors==1', {
1373 'conditions': [
1374 [ 'clang==1', {
1375 'cflags': [
1376 '-Wexit-time-destructors',
1377 ],
1378 'xcode_settings': {
1379 'WARNING_CFLAGS': [
1380 '-Wexit-time-destructors',
1381 ],
1382 },
1383 }],
1384 ],
1385 }],
[email protected]c14d8e772010-02-09 22:06:151386 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281387 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341388 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331389 # We don't want to get warnings from third-party code,
1390 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281391 'cflags!': [
1392 '-Wall',
1393 '-Wextra',
1394 '-Werror',
1395 ],
[email protected]167ec822011-10-24 22:05:271396 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001397 # Don't warn about hash_map in third-party code.
1398 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271399 ],
1400 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331401 # Don't warn about printf format problems.
1402 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221403 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001404 ],
[email protected]d16bd642011-07-25 23:59:181405 'cflags_cc!': [
1406 # TODO(fischman): remove this.
1407 # http://code.google.com/p/chromium/issues/detail?id=90453
1408 '-Wsign-compare',
1409 ]
[email protected]d8543312010-02-10 17:43:281410 }],
[email protected]bc073c062012-01-13 06:28:031411 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111412 'cflags': [
1413 # Don't warn about ignoring the return value from e.g. close().
1414 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031415 # BSD systems do not support this option, since they are usually
1416 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111417 '-Wno-unused-result',
1418 ],
1419 }],
[email protected]d8543312010-02-10 17:43:281420 [ 'OS=="win"', {
1421 'defines': [
1422 '_CRT_SECURE_NO_DEPRECATE',
1423 '_CRT_NONSTDC_NO_WARNINGS',
1424 '_CRT_NONSTDC_NO_DEPRECATE',
1425 '_SCL_SECURE_NO_DEPRECATE',
1426 ],
1427 'msvs_disabled_warnings': [4800],
1428 'msvs_settings': {
1429 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111430 'WarningLevel': '3',
1431 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281432 'Detect64BitPortabilityProblems': 'false',
1433 },
1434 },
1435 }],
[email protected]ea47b6a2011-07-17 19:39:421436 # TODO(darin): Unfortunately, some third_party code depends on base/
1437 [ 'OS=="win" and component=="shared_library"', {
1438 'msvs_disabled_warnings': [
1439 4251, # class 'std::xx' needs to have dll-interface.
1440 ],
1441 }],
[email protected]d8543312010-02-10 17:43:281442 [ 'OS=="mac"', {
1443 'xcode_settings': {
1444 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061445 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281446 },
1447 }],
[email protected]c14d8e772010-02-09 22:06:151448 ],
1449 }, {
[email protected]a5c598152012-01-27 04:55:131450 'includes': [
1451 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1452 'filename_rules.gypi',
1453 ],
[email protected]c14d8e772010-02-09 22:06:151454 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1455 # C99 macros on Mac and Linux.
1456 'defines': [
1457 '__STDC_FORMAT_MACROS',
1458 ],
1459 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151460 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071461 # turn on warnings for signed/unsigned mismatch on chromium code.
1462 'msvs_settings': {
1463 'VCCLCompilerTool': {
1464 'AdditionalOptions': ['/we4389'],
1465 },
1466 },
[email protected]c14d8e772010-02-09 22:06:151467 }],
[email protected]63e39a282011-07-13 20:41:281468 ['OS=="win" and component=="shared_library"', {
1469 'msvs_disabled_warnings': [
1470 4251, # class 'std::xx' needs to have dll-interface.
1471 ],
1472 }],
[email protected]c14d8e772010-02-09 22:06:151473 ],
1474 }],
[email protected]a6e22132010-02-10 20:43:181475 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551476 'default_configuration': 'Debug',
1477 'configurations': {
[email protected]5153767c2009-12-22 01:52:501478 # VCLinkerTool LinkIncremental values below:
1479 # 0 == default
1480 # 1 == /INCREMENTAL:NO
1481 # 2 == /INCREMENTAL
1482 # Debug links incremental, Release does not.
1483 #
[email protected]7b99801e2010-11-03 17:26:231484 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501485 #
1486 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561487 'abstract': 1,
1488 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511489 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561490 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1491 'CharacterSet': '1',
1492 },
[email protected]5153767c2009-12-22 01:52:501493 },
1494 'x86_Base': {
1495 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501496 'msvs_settings': {
1497 'VCLinkerTool': {
1498 'TargetMachine': '1',
1499 },
1500 },
[email protected]2fa40782009-11-01 21:17:341501 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561502 },
[email protected]5153767c2009-12-22 01:52:501503 'x64_Base': {
1504 'abstract': 1,
1505 'msvs_configuration_platform': 'x64',
1506 'msvs_settings': {
1507 'VCLinkerTool': {
1508 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501509 'AdditionalLibraryDirectories!':
1510 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1511 'AdditionalLibraryDirectories':
1512 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1513 },
[email protected]d26b4418ab2010-03-24 22:06:351514 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501515 'AdditionalLibraryDirectories!':
1516 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1517 'AdditionalLibraryDirectories':
1518 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1519 },
1520 },
1521 'defines': [
1522 # Not sure if tcmalloc works on 64-bit Windows.
1523 'NO_TCMALLOC',
1524 ],
1525 },
1526 'Debug_Base': {
1527 'abstract': 1,
[email protected]14339762011-04-05 07:36:581528 'defines': [
1529 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1530 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1531 ],
[email protected]1c966092009-08-20 21:19:261532 'xcode_settings': {
1533 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291534 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491535 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491536 '<@(debug_extra_cflags)',
1537 ],
[email protected]1c966092009-08-20 21:19:261538 },
[email protected]bb05e452009-10-29 21:24:561539 'msvs_settings': {
1540 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471541 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561542 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211543 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471544 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151545 'conditions': [
1546 # According to MSVS, InlineFunctionExpansion=0 means
1547 # "default inlining", not "/Ob0".
1548 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1549 ['win_debug_InlineFunctionExpansion==0', {
1550 'AdditionalOptions': ['/Ob0'],
1551 }],
1552 ['win_debug_InlineFunctionExpansion!=""', {
1553 'InlineFunctionExpansion':
1554 '<(win_debug_InlineFunctionExpansion)',
1555 }],
[email protected]fac10d12010-11-08 16:00:311556 ['win_debug_disable_iterator_debugging==1', {
1557 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1558 }],
[email protected]ef5c5f1b2011-12-17 02:16:241559
1560 # if win_debug_OmitFramePointers is blank, leave as default
1561 ['win_debug_OmitFramePointers==1', {
1562 'OmitFramePointers': 'true',
1563 }],
1564 ['win_debug_OmitFramePointers==0', {
1565 'OmitFramePointers': 'false',
1566 # The above is not sufficient (http://crbug.com/106711): it
1567 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1568 # perform FPO regardless, so we must explicitly disable.
1569 # We still want the false setting above to avoid having
1570 # "/Oy /Oy-" and warnings about overriding.
1571 'AdditionalOptions': ['/Oy-'],
1572 }],
[email protected]2ae6e022010-05-07 13:19:151573 ],
[email protected]ef5c5f1b2011-12-17 02:16:241574 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561575 },
1576 'VCLinkerTool': {
1577 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331578 # ASLR makes debugging with windbg difficult because Chrome.exe and
1579 # Chrome.dll share the same base name. As result, windbg will
1580 # name the Chrome.dll module like chrome_<base address>, where
1581 # <base address> typically changes with each launch. This in turn
1582 # means that breakpoints in Chrome.dll don't stick from one launch
1583 # to the next. For this reason, we turn ASLR off in debug builds.
1584 # Note that this is a three-way bool, where 0 means to pick up
1585 # the default setting, 1 is off and 2 is on.
1586 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561587 },
1588 'VCResourceCompilerTool': {
1589 'PreprocessorDefinitions': ['_DEBUG'],
1590 },
1591 },
[email protected]2f80c312009-02-25 21:26:551592 'conditions': [
[email protected]bb05e452009-10-29 21:24:561593 ['OS=="linux"', {
1594 'cflags': [
1595 '<@(debug_extra_cflags)',
1596 ],
[email protected]2f80c312009-02-25 21:26:551597 }],
[email protected]56cca4e2011-07-01 21:33:351598 ['release_valgrind_build==0', {
1599 'xcode_settings': {
1600 'OTHER_CFLAGS': [
1601 '-fstack-protector-all', # Implies -fstack-protector
1602 ],
1603 },
1604 }],
[email protected]2f80c312009-02-25 21:26:551605 ],
1606 },
[email protected]5153767c2009-12-22 01:52:501607 'Release_Base': {
1608 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551609 'defines': [
1610 'NDEBUG',
1611 ],
[email protected]1c966092009-08-20 21:19:261612 'xcode_settings': {
1613 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1614 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001615 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261616 },
[email protected]bb05e452009-10-29 21:24:561617 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471618 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471619 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151620 'conditions': [
[email protected]2212d272011-12-20 21:37:371621 # In official builds, each target will self-select
1622 # an optimization level.
1623 ['buildtype!="Official"', {
1624 'Optimization': '<(win_release_Optimization)',
1625 },
1626 ],
[email protected]2ae6e022010-05-07 13:19:151627 # According to MSVS, InlineFunctionExpansion=0 means
1628 # "default inlining", not "/Ob0".
1629 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1630 ['win_release_InlineFunctionExpansion==0', {
1631 'AdditionalOptions': ['/Ob0'],
1632 }],
1633 ['win_release_InlineFunctionExpansion!=""', {
1634 'InlineFunctionExpansion':
1635 '<(win_release_InlineFunctionExpansion)',
1636 }],
[email protected]626d2d22011-10-11 15:47:331637
[email protected]ef5c5f1b2011-12-17 02:16:241638 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331639 ['win_release_OmitFramePointers==1', {
1640 'OmitFramePointers': 'true',
1641 }],
1642 ['win_release_OmitFramePointers==0', {
1643 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241644 # The above is not sufficient (http://crbug.com/106711): it
1645 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1646 # perform FPO regardless, so we must explicitly disable.
1647 # We still want the false setting above to avoid having
1648 # "/Oy /Oy-" and warnings about overriding.
1649 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331650 }],
[email protected]2ae6e022010-05-07 13:19:151651 ],
[email protected]ef5c5f1b2011-12-17 02:16:241652 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471653 },
[email protected]bb05e452009-10-29 21:24:561654 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341655 # LinkIncremental is a tri-state boolean, where 0 means default
1656 # (i.e., inherit from parent solution), 1 means false, and
1657 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561658 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341659 # This corresponds to the /PROFILE flag which ensures the PDB
1660 # file contains FIXUP information (growing the PDB file by about
1661 # 5%) but does not otherwise alter the output binary. This
1662 # information is used by the Syzygy optimization tool when
1663 # decomposing the release image.
1664 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561665 },
1666 },
[email protected]2f80c312009-02-25 21:26:551667 'conditions': [
[email protected]92822e82009-09-18 14:26:561668 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581669 'defines': [
1670 'NVALGRIND',
1671 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1672 ],
[email protected]ee857512010-05-14 08:24:421673 }, {
[email protected]14339762011-04-05 07:36:581674 'defines': [
1675 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1676 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1677 ],
[email protected]92822e82009-09-18 14:26:561678 }],
[email protected]7e0d664a2009-12-03 21:07:471679 ['win_use_allocator_shim==0', {
1680 'defines': ['NO_TCMALLOC'],
1681 }],
[email protected]bb05e452009-10-29 21:24:561682 ['OS=="linux"', {
1683 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001684 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561685 ],
1686 }],
[email protected]2f80c312009-02-25 21:26:551687 ],
1688 },
[email protected]5153767c2009-12-22 01:52:501689 #
1690 # Concrete configurations
1691 #
1692 'Debug': {
1693 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1694 },
1695 'Release': {
1696 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1697 'conditions': [
1698 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161699 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501700 }],
1701 ]
1702 },
[email protected]f926fa0a2009-08-04 22:50:131703 'conditions': [
1704 [ 'OS=="win"', {
1705 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501706 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501707 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301708 },
1709 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501710 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301711 },
[email protected]f926fa0a2009-08-04 22:50:131712 }],
1713 ],
[email protected]2f80c312009-02-25 21:26:551714 },
1715 },
1716 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341717 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261718 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271719 # Enable -Werror by default, but put it in a variable so it can
1720 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1721 'variables': {
[email protected]cbbb3472012-01-25 18:32:311722 'werror%': '-Werror',
[email protected]5315f2842009-04-28 00:43:271723 },
[email protected]6863896f2012-01-25 17:51:361724 'defines': [
1725 '_FILE_OFFSET_BITS=64',
1726 ],
[email protected]9d384032009-03-20 23:13:261727 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161728 '<(werror)', # See note above about the werror variable.
1729 '-pthread',
1730 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291731 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161732 '-Wall',
[email protected]0fa17082010-03-26 00:48:051733 # TODO(evan): turn this back on once all the builds work.
1734 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201735 # Don't warn about unused function params. We use those everywhere.
1736 '-Wno-unused-parameter',
1737 # Don't warn about the "struct foo f = {0};" initialization pattern.
1738 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121739 # Don't export any symbols (for example, to plugins we dlopen()).
1740 # Note: this is *required* to make some plugins work.
1741 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351742 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241743 ],
1744 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221745 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241746 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361747 # Make inline functions have hidden visiblity by default.
1748 # Surprisingly, not covered by -fvisibility=hidden.
1749 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171750 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1751 # so we specify it explicitly.
1752 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181753 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171754 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261755 ],
[email protected]a6cf87e2009-04-03 04:07:381756 'ldflags': [
[email protected]138241f2010-03-30 23:53:101757 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261758 ],
[email protected]3aacaf952009-04-02 15:34:091759 'configurations': {
[email protected]5153767c2009-12-22 01:52:501760 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311761 'variables': {
1762 'debug_optimize%': '0',
1763 },
[email protected]3aacaf952009-04-02 15:34:091764 'defines': [
1765 '_DEBUG',
1766 ],
1767 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041768 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091769 '-g',
1770 ],
[email protected]da1c8d692011-09-20 20:35:011771 'conditions' : [
1772 ['OS=="android"', {
1773 'cflags': [
1774 '-fno-omit-frame-pointer',
1775 ],
1776 }],
1777 ],
1778 'target_conditions' : [
1779 ['_toolset=="target"', {
1780 'conditions': [
1781 ['OS=="android" and debug_optimize==0', {
1782 'cflags': [
1783 '-mlong-calls', # Needed when compiling with -O0
1784 ],
1785 }],
1786 ['arm_thumb==1', {
1787 'cflags': [
1788 '-marm',
1789 ],
1790 }],
1791 ],
1792 }],
1793 ],
[email protected]5315f2842009-04-28 00:43:271794 },
[email protected]5153767c2009-12-22 01:52:501795 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011796 'variables': {
1797 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511798 # Binaries become big and gold is unable to perform GC
1799 # and remove unused sections for some of test targets
1800 # on 32 bit platform.
1801 # (This is currently observed only in chromeos valgrind bots)
1802 # The following flag is to disable --gc-sections linker
1803 # option for these bots.
1804 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121805
1806 # TODO(bradnelson): reexamine how this is done if we change the
1807 # expansion of configurations
1808 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011809 },
[email protected]3aacaf952009-04-02 15:34:091810 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041811 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531812 # Don't emit the GCC version ident directives, they just end up
1813 # in the .comment section taking up binary size.
1814 '-fno-ident',
1815 # Put data and code in their own sections, so that unused symbols
1816 # can be removed at link time with --gc-sections.
1817 '-fdata-sections',
1818 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091819 ],
[email protected]c902f2cba2010-08-06 20:04:181820 'ldflags': [
1821 # Specifically tell the linker to perform optimizations.
1822 # See http://lwn.net/Articles/192624/ .
1823 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221824 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181825 ],
[email protected]1dd529642010-05-15 01:02:511826 'conditions' : [
1827 ['no_gc_sections==0', {
1828 'ldflags': [
1829 '-Wl,--gc-sections',
1830 ],
1831 }],
[email protected]da1c8d692011-09-20 20:35:011832 ['OS=="android"', {
1833 'cflags': [
1834 '-fomit-frame-pointer',
1835 ],
1836 }],
[email protected]ecf7b6482010-10-13 09:15:201837 ['clang==1', {
1838 'cflags!': [
1839 '-fno-ident',
1840 ],
1841 }],
[email protected]7664ab32011-02-01 23:35:251842 ['profiling==1', {
1843 'cflags': [
1844 '-fno-omit-frame-pointer',
1845 '-g',
1846 ],
1847 }],
[email protected]8d726a42012-02-09 03:49:001848 ],
[email protected]3aacaf952009-04-02 15:34:091849 },
1850 },
[email protected]601b540222009-04-03 21:32:041851 'variants': {
1852 'coverage': {
1853 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1854 'ldflags': ['-fprofile-arcs'],
1855 },
1856 'profile': {
1857 'cflags': ['-pg', '-g'],
1858 'ldflags': ['-pg'],
1859 },
1860 'symbols': {
1861 'cflags': ['-g'],
1862 },
1863 },
[email protected]606116d22009-05-06 22:38:231864 'conditions': [
[email protected]04b482602011-09-14 02:36:211865 ['target_arch=="ia32"', {
1866 'target_conditions': [
1867 ['_toolset=="target"', {
1868 'asflags': [
1869 # Needed so that libs with .s files (e.g. libicudata.a)
1870 # are compatible with the general 32-bit-ness.
1871 '-32',
1872 ],
1873 # All floating-point computations on x87 happens in 80-bit
1874 # precision. Because the C and C++ language standards allow
1875 # the compiler to keep the floating-point values in higher
1876 # precision than what's specified in the source and doing so
1877 # is more efficient than constantly rounding up to 64-bit or
1878 # 32-bit precision as specified in the source, the compiler,
1879 # especially in the optimized mode, tries very hard to keep
1880 # values in x87 floating-point stack (in 80-bit precision)
1881 # as long as possible. This has important side effects, that
1882 # the real value used in computation may change depending on
1883 # how the compiler did the optimization - that is, the value
1884 # kept in 80-bit is different than the value rounded down to
1885 # 64-bit or 32-bit. There are possible compiler options to
1886 # make this behavior consistent (e.g. -ffloat-store would keep
1887 # all floating-values in the memory, thus force them to be
1888 # rounded to its original precision) but they have significant
1889 # runtime performance penalty.
1890 #
1891 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1892 # which keep floating-point values in SSE registers in its
1893 # native precision (32-bit for single precision, and 64-bit
1894 # for double precision values). This means the floating-point
1895 # value used during computation does not change depending on
1896 # how the compiler optimized the code, since the value is
1897 # always kept in its specified precision.
1898 'conditions': [
1899 ['branding=="Chromium" and disable_sse2==0', {
1900 'cflags': [
1901 '-march=pentium4',
1902 '-msse2',
1903 '-mfpmath=sse',
1904 ],
1905 }],
1906 # ChromeOS targets Pinetrail, which is sse3, but most of the
1907 # benefit comes from sse2 so this setting allows ChromeOS
1908 # to build on other CPUs. In the future -march=atom would
1909 # help but requires a newer compiler.
1910 ['chromeos==1 and disable_sse2==0', {
1911 'cflags': [
1912 '-msse2',
1913 ],
1914 }],
1915 # Install packages have started cropping up with
1916 # different headers between the 32-bit and 64-bit
1917 # versions, so we have to shadow those differences off
1918 # and make sure a 32-bit-on-64-bit build picks up the
1919 # right files.
1920 ['host_arch!="ia32"', {
1921 'include_dirs+': [
1922 '/usr/include32',
1923 ],
1924 }],
1925 ],
1926 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1927 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061928 'cflags': [
[email protected]04b482602011-09-14 02:36:211929 '-m32',
1930 '-mmmx',
1931 ],
1932 'ldflags': [
1933 '-m32',
[email protected]ffde7932009-05-29 00:39:061934 ],
1935 }],
[email protected]606116d22009-05-06 22:38:231936 ],
1937 }],
[email protected]3dda8a962009-08-10 18:58:071938 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291939 'target_conditions': [
1940 ['_toolset=="target"', {
1941 'cflags_cc': [
1942 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1943 # has changed whenever it encounters a varargs function. This
1944 # silences those warnings, as they are not helpful and
1945 # clutter legitimate warnings.
1946 '-Wno-abi',
1947 ],
1948 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011949 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291950 'cflags': [
1951 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291952 ]
1953 }],
1954 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251955 'cflags': [
1956 '-march=armv7-a',
1957 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251958 '-mfloat-abi=softfp',
1959 ],
[email protected]eafc0b452010-02-26 21:53:431960 'conditions': [
1961 ['arm_neon==1', {
1962 'cflags': [ '-mfpu=neon', ],
1963 }, {
[email protected]53e0f642010-03-05 01:41:561964 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431965 }]
1966 ],
[email protected]dc9711f2009-11-13 19:30:251967 }],
[email protected]da1c8d692011-09-20 20:35:011968 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:531969 # Most of the following flags are derived from what Android
1970 # uses by default when building for arm, reference for which
1971 # can be found in the following file in the Android NDK:
1972 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
1973 'cflags': [
1974 # The tree-sra optimization (scalar replacement for
1975 # aggregates enabling subsequent optimizations) leads to
1976 # invalid code generation when using the Android NDK's
1977 # compiler (r5-r7). This can be verified using
1978 # TestWebKitAPI's WTF.Checked_int8_t test.
1979 '-fno-tree-sra',
1980 '-Wno-psabi',
1981 ],
[email protected]da1c8d692011-09-20 20:35:011982 'conditions': [
1983 ['arm_thumb == 1', {
1984 # Android toolchain doesn't support -mimplicit-it=thumb
1985 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1986 'cflags': [ '-mthumb-interwork', ],
1987 }],
1988 ['armv7==0', {
1989 # Flags suitable for Android emulator
1990 'cflags': [
1991 '-march=armv5te',
1992 '-mtune=xscale',
1993 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:361994 ],
1995 'defines': [
1996 '__ARM_ARCH_5__',
1997 '__ARM_ARCH_5T__',
1998 '__ARM_ARCH_5E__',
1999 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012000 ],
2001 }],
2002 ],
2003 }],
[email protected]3dda8a962009-08-10 18:58:072004 ],
2005 }],
2006 ],
2007 }],
[email protected]2fb843b2010-08-12 02:11:082008 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582009 'cflags': [
2010 '-fPIC',
2011 ],
[email protected]d3f692b32011-12-14 19:04:352012 'ldflags': [
2013 '-fPIC',
2014 ],
[email protected]c76723a2010-01-25 23:10:582015 }],
[email protected]ee28c9f2009-09-04 01:53:012016 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572017 'target_conditions': [
2018 ['_toolset=="target"', {
2019 'cflags': [
2020 '--sysroot=<(sysroot)',
2021 ],
2022 'ldflags': [
2023 '--sysroot=<(sysroot)',
2024 ],
2025 }]]
[email protected]ee28c9f2009-09-04 01:53:012026 }],
[email protected]58680ce2010-09-18 00:09:152027 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122028 'cflags': [
2029 '-Wheader-hygiene',
2030 # Clang spots more unused functions.
2031 '-Wno-unused-function',
2032 # Don't die on dtoa code that uses a char as an array index.
2033 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332034 # Especially needed for gtest macros using enum values from Mac
2035 # system headers.
2036 # TODO(pkasting): In C++11 this is legal, so this should be
2037 # removed when we change to that. (This is also why we don't
2038 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122039 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302040 # WebKit uses nullptr in a legit way, other that that this warning
2041 # doesn't fire.
2042 '-Wno-c++11-compat',
2043 # This (rightyfully) complains about 'override', which we use
2044 # heavily.
2045 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102046
2047 # Warns on switches on enums that cover all enum values but
2048 # also contain a default: branch. Chrome is full of that.
2049 '-Wno-covered-switch-default',
2050
2051 # TODO(thakis): Reenable once this no longer complains about
2052 # Invalid() in gmocks's gmock-internal-utils.h
2053 # http://crbug.com/111806
2054 '-Wno-null-dereference',
[email protected]18ca15a2011-08-10 03:07:122055 ],
2056 'cflags!': [
2057 # Clang doesn't seem to know know this flag.
2058 '-mfpmath=sse',
2059 ],
[email protected]58680ce2010-09-18 00:09:152060 }],
[email protected]5d451ad2011-02-11 16:43:462061 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262062 'cflags': [
2063 '<(clang_chrome_plugins_flags)',
2064 ],
[email protected]5d451ad2011-02-11 16:43:462065 }],
[email protected]4a9ac22e2011-12-02 03:41:532066 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262067 'cflags': [
2068 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532069 ],
2070 }],
2071 ['clang==1 and clang_add_plugin!=""', {
2072 'cflags': [
[email protected]d23720682011-08-11 00:16:262073 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2074 ],
[email protected]5e781232011-01-28 02:57:592075 }],
[email protected]2616d45d2012-01-19 03:15:482076 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2077 'cflags': [
2078 # See http://crbug.com/110262
2079 '-fcolor-diagnostics',
2080 ],
2081 }],
[email protected]92799b632011-08-15 14:33:062082 ['asan==1', {
[email protected]92799b632011-08-15 14:33:062083 'cflags': [
[email protected]6a4cad02011-11-25 07:26:562084 '-faddress-sanitizer',
[email protected]0ac773032011-12-21 17:37:082085 '-fno-omit-frame-pointer',
[email protected]74a26d72011-09-29 17:29:032086 '-w',
[email protected]3cfa96a62012-02-28 07:27:582087 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]92799b632011-08-15 14:33:062088 ],
2089 'ldflags': [
[email protected]6a4cad02011-11-25 07:26:562090 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:062091 ],
[email protected]921c7b52011-11-25 10:34:352092 'defines': [
2093 'ADDRESS_SANITIZER',
2094 ],
[email protected]92799b632011-08-15 14:33:062095 }],
[email protected]cbd5fd52009-08-26 00:14:272096 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172097 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272098 'defines': ['USE_LINUX_BREAKPAD'],
2099 }],
[email protected]d8b60602010-03-26 09:41:222100 ['linux_use_heapchecker==1', {
2101 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402102 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222103 }],
[email protected]61a9b2d82010-02-26 00:31:082104 ['linux_use_tcmalloc==0', {
2105 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242106 }],
[email protected]64e2d4a42010-08-27 10:13:212107 ['linux_keep_shadow_stacks==1', {
2108 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a74202012-02-23 19:10:512109 'cflags': [
2110 '-finstrument-functions',
2111 # Allow mmx intrinsics to inline, so that the compiler can expand
2112 # the intrinsics.
2113 '-finstrument-functions-exclude-file-list=mmintrin.h',
2114 ],
[email protected]64e2d4a42010-08-27 10:13:212115 }],
[email protected]8d726a42012-02-09 03:49:002116 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172117 'ldflags': [
2118 # Experimentation found that using four linking threads
2119 # saved ~20% of link time.
2120 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2121 '-Wl,--threads',
2122 '-Wl,--thread-count=4',
2123 ],
[email protected]8d726a42012-02-09 03:49:002124 'conditions': [
2125 ['release_valgrind_build==0', {
2126 'target_conditions': [
2127 ['_toolset=="target"', {
2128 'ldflags': [
2129 # There seems to be a conflict of --icf and -pie
2130 # in gold which can generate crashy binaries. As
2131 # a security measure, -pie takes precendence for
2132 # now.
2133 #'-Wl,--icf=safe',
2134 '-Wl,--icf=none',
2135 ],
2136 }],
2137 ],
2138 }],
2139 ],
2140 }],
[email protected]b07806c12012-02-03 22:44:592141 ['linux_use_gold_binary==1', {
2142 'variables': {
[email protected]516312d2012-02-28 05:17:262143 'conditions': [
2144 ['inside_chromium_build==1', {
2145 # We pass the path to gold to the compiler. gyp leaves
2146 # unspecified what the cwd is when running the compiler,
2147 # so the normal gyp path-munging fails us. This hack
2148 # gets the right path.
2149 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2150 }, {
2151 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2152 }]
2153 ]
[email protected]b07806c12012-02-03 22:44:592154 },
2155 'ldflags': [
2156 # Put our gold binary in the search path for the linker.
2157 '-B<(gold_path)',
2158 ],
2159 }],
[email protected]606116d22009-05-06 22:38:232160 ],
[email protected]9d384032009-03-20 23:13:262161 },
2162 }],
[email protected]c51e8d52009-12-11 20:04:062163 # FreeBSD-specific options; note that most FreeBSD options are set above,
2164 # with Linux.
2165 ['OS=="freebsd"', {
2166 'target_defaults': {
2167 'ldflags': [
2168 '-Wl,--no-keep-memory',
2169 ],
2170 },
2171 }],
[email protected]da1c8d692011-09-20 20:35:012172 # Android-specific options; note that most are set above with Linux.
2173 ['OS=="android"', {
2174 'variables': {
[email protected]febc41db2012-03-24 02:44:432175 'target_arch%': 'arm', # target_arch in android terms.
[email protected]da1c8d692011-09-20 20:35:012176 'conditions': [
2177 # Android uses x86 instead of ia32 for their target_arch designation.
2178 ['target_arch=="ia32"', {
[email protected]febc41db2012-03-24 02:44:432179 'target_arch%': 'x86',
[email protected]da1c8d692011-09-20 20:35:012180 }],
2181 # Use shared stlport library when system one used.
2182 # Figure this out early since it needs symbols from libgcc.a, so it
2183 # has to be before that in the set of libraries.
2184 ['use_system_stlport==1', {
2185 'android_stlport_library': 'stlport',
2186 }, {
2187 'android_stlport_library': 'stlport_static',
2188 }],
2189 ],
2190
2191 # Placing this variable here prevents from forking libvpx, used
2192 # by remoting. Remoting is off, so it needn't built,
2193 # so forking it's deps seems like overkill.
2194 # But this variable need defined to properly run gyp.
2195 # A proper solution is to have an OS==android conditional
2196 # in third_party/libvpx/libvpx.gyp to define it.
2197 'libvpx_path': 'lib/linux/arm',
2198 },
2199 'target_defaults': {
2200 # Build a Release build by default to match Android build behavior.
2201 # This is typical with Android because Debug builds tend to be much
2202 # larger and run very slowly on constrained devices. It is still
2203 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2204 # 'make' command line.
2205 'default_configuration': 'Release',
2206
2207 'variables': {
2208 'release_extra_cflags%': '',
2209 },
2210
2211 'target_conditions': [
2212 # Settings for building device targets using Android's toolchain.
2213 # These are based on the setup.mk file from the Android NDK.
2214 #
2215 # The NDK Android executable link step looks as follows:
2216 # $LDFLAGS
2217 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2218 # $(PRIVATE_OBJECTS) <-- The .o that we built
2219 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2220 # $(TARGET_LIBGCC) <-- libgcc.a
2221 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2222 # $(PRIVATE_LDLIBS) <-- System .so
2223 # $(TARGET_CRTEND_O) <-- crtend.o
2224 #
2225 # For now the above are approximated for executables by adding
2226 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2227 # of 'libraries'.
2228 #
2229 # The NDK Android shared library link step looks as follows:
2230 # $LDFLAGS
2231 # $(PRIVATE_OBJECTS) <-- The .o that we built
2232 # -l,--whole-archive
2233 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2234 # -l,--no-whole-archive
2235 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2236 # $(TARGET_LIBGCC) <-- libgcc.a
2237 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2238 # $(PRIVATE_LDLIBS) <-- System .so
2239 #
2240 # For now, assume not need any whole static libs.
2241 #
2242 # For both executables and shared libraries, add the proper
2243 # libgcc.a to the start of libraries which puts it in the
2244 # proper spot after .o and .a files get linked in.
2245 #
2246 # TODO: The proper thing to do longer-tem would be proper gyp
2247 # support for a custom link command line.
2248 ['_toolset=="target"', {
2249 'cflags!': [
2250 '-pthread', # Not supported by Android toolchain.
2251 ],
2252 'cflags': [
2253 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2254 '-ffunction-sections',
2255 '-funwind-tables',
2256 '-g',
2257 '-fstack-protector',
2258 '-fno-short-enums',
2259 '-finline-limit=64',
2260 '-Wa,--noexecstack',
2261 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2262 '<@(release_extra_cflags)',
2263 # Note: This include is in cflags to ensure that it comes after
2264 # all of the includes.
2265 '-I<(android_ndk_include)',
2266 ],
2267 'defines': [
2268 'ANDROID',
2269 '__GNU_SOURCE=1', # Necessary for clone()
2270 'USE_STLPORT=1',
2271 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2272 'HAVE_OFF64_T',
2273 'HAVE_SYS_UIO_H',
2274 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2275 ],
2276 'ldflags!': [
2277 '-pthread', # Not supported by Android toolchain.
2278 ],
2279 'ldflags': [
2280 '-nostdlib',
2281 '-Wl,--no-undefined',
2282 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2283 # Don't export symbols from statically linked libraries.
2284 '-Wl,--exclude-libs=ALL',
2285 ],
[email protected]a0e48b02011-11-22 07:53:012286 'libraries': [
2287 '-l<(android_stlport_library)',
2288 # Manually link the libgcc.a that the cross compiler uses.
[email protected]d10e2cc2012-03-20 10:45:272289 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012290 '-lc',
2291 '-ldl',
2292 '-lstdc++',
2293 '-lm',
[email protected]da1c8d692011-09-20 20:35:012294 ],
2295 'conditions': [
2296 ['android_build_type==0', {
2297 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522298 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012299 ],
2300 }],
2301 # NOTE: The stlport header include paths below are specified in
2302 # cflags rather than include_dirs because they need to come
2303 # after include_dirs. Think of them like system headers, but
2304 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2305 # toolchain (circa Gingerbread) will exhibit strange errors.
2306 # The include ordering here is important; change with caution.
2307 ['use_system_stlport==0', {
2308 'cflags': [
2309 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2310 ],
2311 'conditions': [
2312 ['target_arch=="arm" and armv7==1', {
2313 'ldflags': [
2314 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2315 ],
2316 }],
2317 ['target_arch=="arm" and armv7==0', {
2318 'ldflags': [
2319 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2320 ],
2321 }],
2322 ['target_arch=="ia32"', {
2323 'ldflags': [
2324 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2325 ],
2326 }],
2327 ],
2328 }],
2329 ['target_arch=="ia32"', {
2330 # The x86 toolchain currently has problems with stack-protector.
2331 'cflags!': [
2332 '-fstack-protector',
2333 ],
2334 'cflags': [
2335 '-fno-stack-protector',
2336 ],
2337 }],
2338 ],
2339 'target_conditions': [
2340 ['_type=="executable"', {
2341 'ldflags': [
2342 '-Bdynamic',
2343 '-Wl,-dynamic-linker,/system/bin/linker',
2344 '-Wl,--gc-sections',
2345 '-Wl,-z,nocopyreloc',
2346 # crtbegin_dynamic.o should be the last item in ldflags.
2347 '<(android_ndk_lib)/crtbegin_dynamic.o',
2348 ],
2349 'libraries': [
2350 # crtend_android.o needs to be the last item in libraries.
2351 # Do not add any libraries after this!
2352 '<(android_ndk_lib)/crtend_android.o',
2353 ],
2354 }],
2355 ['_type=="shared_library"', {
2356 'ldflags': [
2357 '-Wl,-shared,-Bsymbolic',
2358 ],
[email protected]da1c8d692011-09-20 20:35:012359 }],
2360 ],
2361 }],
2362 # Settings for building host targets using the system toolchain.
2363 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122364 'cflags!': [
2365 # Due to issues in Clang build system, using ASan on 32-bit
2366 # binaries on x86_64 host is problematic.
2367 # TODO(eugenis): re-enable.
2368 '-faddress-sanitizer',
2369 ],
[email protected]da1c8d692011-09-20 20:35:012370 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122371 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012372 '-Wl,-z,noexecstack',
2373 '-Wl,--gc-sections',
2374 '-Wl,-O1',
2375 '-Wl,--as-needed',
2376 ],
[email protected]965b6b22011-09-29 16:07:282377 'sources/': [
2378 ['exclude', '_android(_unittest)?\\.cc$'],
2379 ['exclude', '(^|/)android/']
2380 ],
[email protected]da1c8d692011-09-20 20:35:012381 }],
2382 ],
2383 },
2384 }],
[email protected]93f21e42010-04-01 00:35:152385 ['OS=="solaris"', {
2386 'cflags!': ['-fvisibility=hidden'],
2387 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2388 }],
[email protected]2f80c312009-02-25 21:26:552389 ['OS=="mac"', {
2390 'target_defaults': {
[email protected]24700642009-06-01 16:01:202391 'variables': {
[email protected]162407f2011-09-08 15:33:172392 # These should end with %, but there seems to be a bug with % in
2393 # variables that are intended to be set to different values in
2394 # different targets, like these.
2395 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202396 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382397 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202398 },
[email protected]d92c7c012009-03-19 19:26:422399 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552400 'xcode_settings': {
2401 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042402 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2403 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2404 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2405 # (Equivalent to -fPIC)
2406 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2407 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2408 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252409 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2410 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042411 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2412 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2413 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2414 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552415 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042416 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252417 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2418 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112419 # Keep pch files below xcodebuild/.
2420 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552421 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192422 'OTHER_CFLAGS': [
2423 '-fno-strict-aliasing', # See http://crbug.com/32204
2424 ],
[email protected]080e86f2010-06-21 15:19:042425 'WARNING_CFLAGS': [
2426 '-Wall',
2427 '-Wendif-labels',
2428 '-Wextra',
2429 # Don't warn about unused function parameters.
2430 '-Wno-unused-parameter',
2431 # Don't warn about the "struct foo f = {0};" initialization
2432 # pattern.
2433 '-Wno-missing-field-initializers',
2434 ],
[email protected]b3fb8092009-03-12 19:09:242435 'conditions': [
2436 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592437 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2438 ],
[email protected]66733172010-09-22 00:09:282439 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302440 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2441 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382442
[email protected]6c648f12011-12-24 07:50:432443 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2444 # when buliding with clang. This warning is triggered when the
2445 # override keyword is used via the OVERRIDE macro from
2446 # base/compiler_specific.h.
2447 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382448
[email protected]34f40892011-09-06 21:53:302449 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282450 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072451 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282452 # Don't die on dtoa code that uses a char as an array index.
2453 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2454 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452455 # Clang spots more unused functions.
2456 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332457 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052458 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302459 # WebKit uses nullptr in a legit way, other that that this
2460 # warning doesn't fire.
2461 '-Wno-c++0x-compat',
2462 # This (rightyfully) complains about 'override', which we use
2463 # heavily.
2464 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102465
2466 # Warns on switches on enums that cover all enum values but
2467 # also contain a default: branch. Chrome is full of that.
2468 '-Wno-covered-switch-default',
2469
2470 # TODO(thakis): Reenable once this no longer complains about
2471 # Invalid() in gmock's gmock-internal-utils.h
2472 # http://crbug.com/111806
2473 '-Wno-null-dereference',
[email protected]66733172010-09-22 00:09:282474 ],
2475 }],
[email protected]5d451ad2011-02-11 16:43:462476 ['clang==1 and clang_use_chrome_plugins==1', {
2477 'OTHER_CFLAGS': [
2478 '<(clang_chrome_plugins_flags)',
2479 ],
2480 }],
[email protected]4a9ac22e2011-12-02 03:41:532481 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592482 'OTHER_CFLAGS': [
2483 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532484 ],
2485 }],
2486 ['clang==1 and clang_add_plugin!=""', {
2487 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592488 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2489 ],
2490 }],
[email protected]2616d45d2012-01-19 03:15:482491 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2492 'OTHER_CFLAGS': [
2493 # See http://crbug.com/110262
2494 '-fcolor-diagnostics',
2495 ],
2496 }],
[email protected]b3fb8092009-03-12 19:09:242497 ],
[email protected]2f80c312009-02-25 21:26:552498 },
[email protected]34f40892011-09-06 21:53:302499 'conditions': [
2500 ['clang==1', {
2501 'variables': {
2502 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2503 },
2504 }],
[email protected]921c7b52011-11-25 10:34:352505 ['asan==1', {
2506 'xcode_settings': {
2507 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352508 '-faddress-sanitizer',
2509 '-w',
[email protected]3cfa96a62012-02-28 07:27:582510 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]921c7b52011-11-25 10:34:352511 ],
2512 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352513 '-faddress-sanitizer',
2514 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372515 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352516 # on the prior OS X versions. Because Chromium is currently
2517 # targeting 10.5.0, we need to explicitly mark these
2518 # symbols as dynamic_lookup.
2519 '-Wl,-U,_malloc_default_purgeable_zone',
2520 '-Wl,-U,_malloc_zone_memalign',
2521 '-Wl,-U,_dispatch_sync_f',
2522 '-Wl,-U,_dispatch_async_f',
2523 '-Wl,-U,_dispatch_barrier_async_f',
2524 '-Wl,-U,_dispatch_group_async_f',
2525 '-Wl,-U,_dispatch_after_f',
2526 ],
2527 },
2528 'defines': [
2529 'ADDRESS_SANITIZER',
2530 ],
2531 }],
[email protected]34f40892011-09-06 21:53:302532 ],
[email protected]2f80c312009-02-25 21:26:552533 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552534 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462535 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2536 }],
2537 ['_mac_bundle', {
2538 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082539 }],
[email protected]6303fed2011-08-11 01:12:102540 ['_type=="executable"', {
2541 'postbuilds': [
2542 {
2543 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362544 # code execution when running on Mac OS X 10.7 ("Lion"), and
2545 # ensures that the position-independent executable (PIE) bit
2546 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102547 'variables': {
[email protected]8c40f322011-08-24 03:33:362548 # Define change_mach_o_flags in a variable ending in _path
2549 # so that GYP understands it's a path and performs proper
2550 # relativization during dict merging.
2551 'change_mach_o_flags_path':
2552 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172553 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132554 ],
2555 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172556 ['mac_pie==0 or release_valgrind_build==1', {
2557 # Don't enable PIE if it's unwanted. It's unwanted if
2558 # the target specifies mac_pie=0 or if building for
2559 # Valgrind, because Valgrind doesn't understand slide.
2560 # See the similar mac_pie/release_valgrind_build check
2561 # below.
[email protected]081c0342011-08-24 14:59:132562 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132563 '--no-pie',
2564 ],
2565 }],
2566 ],
[email protected]6303fed2011-08-11 01:12:102567 },
[email protected]8c40f322011-08-24 03:33:362568 'postbuild_name': 'Change Mach-O Flags',
2569 'action': [
2570 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132571 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362572 ],
[email protected]6303fed2011-08-11 01:12:102573 },
2574 ],
[email protected]5a5d97aa2011-09-02 15:34:002575 'conditions': [
2576 ['asan==1', {
2577 'variables': {
2578 'asan_saves_file': 'asan.saves',
2579 },
2580 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562581 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002582 },
2583 }],
2584 ],
[email protected]162407f2011-09-08 15:33:172585 'target_conditions': [
2586 ['mac_pie==1 and release_valgrind_build==0', {
2587 # Turn on position-independence (ASLR) for executables. When
2588 # PIE is on for the Chrome executables, the framework will
2589 # also be subject to ASLR.
2590 # Don't do this when building for Valgrind, because Valgrind
2591 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2592 # understand slide, and get rid of the Valgrind check.
2593 'xcode_settings': {
2594 'OTHER_LDFLAGS': [
2595 '-Wl,-pie', # Position-independent executable (MH_PIE)
2596 ],
2597 },
2598 }],
2599 ],
[email protected]6a0242bc2011-07-01 00:34:462600 }],
[email protected]9a5e72862010-09-02 16:16:582601 ['(_type=="executable" or _type=="shared_library" or \
2602 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202603 'target_conditions': [
2604 ['mac_real_dsym == 1', {
2605 # To get a real .dSYM bundle produced by dsymutil, set the
2606 # debug information format to dwarf-with-dsym. Since
2607 # strip_from_xcode will not be used, set Xcode to do the
2608 # stripping as well.
2609 'configurations': {
[email protected]5153767c2009-12-22 01:52:502610 'Release_Base': {
[email protected]24700642009-06-01 16:01:202611 'xcode_settings': {
2612 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2613 'DEPLOYMENT_POSTPROCESSING': 'YES',
2614 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072615 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252616 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072617 # The Xcode default is to strip debugging symbols
2618 # only (-S). Local symbols should be stripped as
2619 # well, which will be handled by -x. Xcode will
2620 # continue to insert -S when stripping even when
2621 # additional flags are added with STRIPFLAGS.
2622 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252623 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072624 ], # target_conditions
2625 }, # xcode_settings
2626 }, # configuration "Release"
2627 }, # configurations
[email protected]24700642009-06-01 16:01:202628 }, { # mac_real_dsym != 1
2629 # To get a fast fake .dSYM bundle, use a post-build step to
2630 # produce the .dSYM and strip the executable. strip_from_xcode
2631 # only operates in the Release configuration.
2632 'postbuilds': [
2633 {
2634 'variables': {
2635 # Define strip_from_xcode in a variable ending in _path
2636 # so that gyp understands it's a path and performs proper
2637 # relativization during dict merging.
2638 'strip_from_xcode_path': 'mac/strip_from_xcode',
2639 },
2640 'postbuild_name': 'Strip If Needed',
2641 'action': ['<(strip_from_xcode_path)'],
2642 },
[email protected]e14a9f92009-08-05 19:26:072643 ], # postbuilds
2644 }], # mac_real_dsym
2645 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582646 }], # (_type=="executable" or _type=="shared_library" or
2647 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072648 ], # target_conditions
2649 }, # target_defaults
2650 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552651 ['OS=="win"', {
2652 'target_defaults': {
2653 'defines': [
[email protected]a89e0942011-09-26 16:06:472654 '_WIN32_WINNT=0x0601',
2655 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552656 'WIN32',
2657 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552658 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282659 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552660 '_CRT_RAND_S',
2661 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2662 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272663 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452664 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552665 ],
[email protected]8974e042010-06-21 18:06:522666 'conditions': [
[email protected]2212d272011-12-20 21:37:372667 ['buildtype=="Official"', {
2668 # In official builds, targets can self-select an optimization
2669 # level by defining a variable named 'optimize', and setting it
2670 # to one of
2671 # - "size", optimizes for minimal code size - the default.
2672 # - "speed", optimizes for speed over code size.
2673 # - "max", whole program optimization and link-time code
2674 # generation. This is very expensive and should be used
2675 # sparingly.
2676 'variables': {
2677 'optimize%': 'size',
2678 },
2679 'target_conditions': [
2680 ['optimize=="size"', {
2681 'msvs_settings': {
2682 'VCCLCompilerTool': {
2683 # 1, optimizeMinSpace, Minimize Size (/O1)
2684 'Optimization': '1',
2685 # 2, favorSize - Favor small code (/Os)
2686 'FavorSizeOrSpeed': '2',
2687 },
2688 },
2689 },
2690 ],
2691 ['optimize=="speed"', {
2692 'msvs_settings': {
2693 'VCCLCompilerTool': {
2694 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2695 'Optimization': '2',
2696 # 1, favorSpeed - Favor fast code (/Ot)
2697 'FavorSizeOrSpeed': '1',
2698 },
2699 },
2700 },
2701 ],
2702 ['optimize=="max"', {
2703 'msvs_settings': {
2704 'VCCLCompilerTool': {
2705 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2706 'Optimization': '2',
2707 # 1, favorSpeed - Favor fast code (/Ot)
2708 'FavorSizeOrSpeed': '1',
2709 # This implies link time code generation.
2710 'WholeProgramOptimization': 'true',
2711 },
2712 },
2713 },
2714 ],
2715 ],
2716 },
2717 ],
[email protected]8974e042010-06-21 18:06:522718 ['component=="static_library"', {
2719 'defines': [
2720 '_HAS_EXCEPTIONS=0',
2721 ],
2722 }],
[email protected]3e2648a2011-03-21 20:58:502723 ['secure_atl', {
2724 'defines': [
2725 '_SECURE_ATL',
2726 ],
2727 }],
[email protected]8974e042010-06-21 18:06:522728 ],
[email protected]5b5ca7cb2009-07-20 23:00:202729 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372730 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542731 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552732 '$(VSInstallDir)/VC/atlmfc/include',
2733 ],
[email protected]a8d99cef2009-08-26 20:47:492734 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112735 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2736 # TODO(maruel): These warnings are level 4. They will be slowly
2737 # removed as code is fixed.
2738 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2739 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2740 4702, 4706,
2741 ],
[email protected]2f80c312009-02-25 21:26:552742 'msvs_settings': {
2743 'VCCLCompilerTool': {
2744 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552745 'BufferSecurityCheck': 'true',
2746 'EnableFunctionLevelLinking': 'true',
2747 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112748 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552749 'WarnAsError': 'true',
2750 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582751 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502752 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162753 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552754 }],
[email protected]3e2648a2011-03-21 20:58:502755 ['MSVS_VERSION=="2005e"', {
2756 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2757 }],
[email protected]8974e042010-06-21 18:06:522758 ['component=="shared_library"', {
2759 'ExceptionHandling': '1', # /EHsc
2760 }, {
2761 'ExceptionHandling': '0',
2762 }],
[email protected]3fef6e62009-07-31 19:58:582763 ],
[email protected]2f80c312009-02-25 21:26:552764 },
2765 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162766 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372767 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372768 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542769 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372770 ],
[email protected]2f80c312009-02-25 21:26:552771 },
2772 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552773 'AdditionalDependencies': [
2774 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502775 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552776 'version.lib',
2777 'msimg32.lib',
2778 'ws2_32.lib',
2779 'usp10.lib',
2780 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082781 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482782 'winmm.lib',
2783 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552784 ],
[email protected]60c219832012-03-21 22:59:322785
[email protected]4de39f82011-03-28 12:01:292786 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502787 ['msvs_express', {
2788 # Explicitly required when using the ATL with express
2789 'AdditionalDependencies': [
2790 'atlthunk.lib',
2791 ],
[email protected]60c219832012-03-21 22:59:322792
2793 # ATL 8.0 included in WDK 7.1 makes the linker to generate
2794 # almost eight hundred LNK4254 and LNK4078 warnings:
2795 # - warning LNK4254: section 'ATL' (50000040) merged into
2796 # '.rdata' (40000040) with different attributes
2797 # - warning LNK4078: multiple 'ATL' sections found with
2798 # different attributes
2799 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
[email protected]3e2648a2011-03-21 20:58:502800 }],
2801 ['MSVS_VERSION=="2005e"', {
2802 # Non-express versions link automatically to these
2803 'AdditionalDependencies': [
2804 'advapi32.lib',
2805 'comdlg32.lib',
2806 'ole32.lib',
2807 'shell32.lib',
2808 'user32.lib',
2809 'winspool.lib',
2810 ],
2811 }],
2812 ],
[email protected]a78da50e2010-06-09 21:31:372813 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372814 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542815 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372816 ],
[email protected]2f80c312009-02-25 21:26:552817 'GenerateDebugInformation': 'true',
2818 'MapFileName': '$(OutDir)\\$(TargetName).map',
2819 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552820 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482821 # SubSystem values:
2822 # 0 == not set
2823 # 1 == /SUBSYSTEM:CONSOLE
2824 # 2 == /SUBSYSTEM:WINDOWS
2825 # Most of the executables we'll ever create are tests
2826 # and utilities with console output.
2827 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552828 },
2829 'VCMIDLTool': {
2830 'GenerateStublessProxies': 'true',
2831 'TypeLibraryName': '$(InputName).tlb',
2832 'OutputDirectory': '$(IntDir)',
2833 'HeaderFileName': '$(InputName).h',
2834 'DLLDataFileName': 'dlldata.c',
2835 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2836 'ProxyFileName': '$(InputName)_p.c',
2837 },
2838 'VCResourceCompilerTool': {
2839 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382840 'AdditionalIncludeDirectories': [
2841 '<(DEPTH)',
2842 '<(SHARED_INTERMEDIATE_DIR)',
2843 ],
[email protected]2f80c312009-02-25 21:26:552844 },
2845 },
2846 },
2847 }],
[email protected]79e2336c2011-05-12 18:18:342848 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312849 'target_defaults': {
2850 'defines': [
2851 'DISABLE_NACL',
2852 ],
2853 },
2854 }],
[email protected]cfbf9bc2009-12-07 22:07:562855 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192856 'target_defaults': {
2857 'msvs_settings': {
2858 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192859 'DelayLoadDLLs': [
2860 'dbghelp.dll',
2861 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:012862 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:192863 'uxtheme.dll',
2864 ],
2865 },
2866 },
[email protected]ef4fa4072009-12-04 22:46:502867 'configurations': {
[email protected]5153767c2009-12-22 01:52:502868 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502869 'msvs_settings': {
2870 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162871 'AdditionalOptions': [
2872 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:332873 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162874 '/ignore:4199',
2875 '/ignore:4221',
2876 '/nxcompat',
2877 ],
[email protected]ef4fa4072009-12-04 22:46:502878 },
2879 },
2880 },
[email protected]5153767c2009-12-22 01:52:502881 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502882 'msvs_settings': {
2883 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162884 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502885 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:332886 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162887 '/ignore:4199',
2888 '/ignore:4221',
2889 '/nxcompat',
2890 ],
[email protected]ef4fa4072009-12-04 22:46:502891 },
2892 },
2893 },
2894 },
[email protected]48c7af72009-07-03 22:00:192895 },
2896 }],
[email protected]9821d0d2010-04-16 22:40:372897 ['enable_new_npdevice_api==1', {
2898 'target_defaults': {
2899 'defines': [
2900 'ENABLE_NEW_NPDEVICE_API',
2901 ],
2902 },
2903 }],
[email protected]d10e2cc2012-03-20 10:45:272904 ['clang==1 and OS!="android"', {
[email protected]34f40892011-09-06 21:53:302905 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242906 ['CC', '<(make_clang_dir)/bin/clang'],
2907 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072908 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302909 ['CC.host', '$(CC)'],
2910 ['CXX.host', '$(CXX)'],
2911 ['LINK.host', '$(LINK)'],
2912 ],
2913 }],
[email protected]d10e2cc2012-03-20 10:45:272914 ['OS=="android" and "<(GENERATOR)"!="ninja"', {
2915 # Hardcode the compiler names in the Makefile so that
2916 # it won't depend on the environment at make time.
2917 'make_global_settings': [
2918 ['CC', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
2919 ['CXX', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'],
2920 ['LINK', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
2921 ['CC.host', '<!(which gcc)'],
2922 ['CXX.host', '<!(which g++)'],
2923 ['LINK.host', '<!(which g++)'],
2924 ],
2925 }],
[email protected]2f80c312009-02-25 21:26:552926 ],
2927 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502928 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2929 # This block adds *project-wide* configuration settings to each project
2930 # file. It's almost always wrong to put things here. Specify your
2931 # custom xcode_settings in target_defaults to add them to targets instead.
2932
2933 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2934 # setting sets the SDK on a project-wide basis. In order to get the
2935 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2936 # here at the project level.
2937 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2938
[email protected]2f80c312009-02-25 21:26:552939 # The Xcode generator will look for an xcode_settings section at the root
2940 # of each dict and use it to apply settings on a file-wide basis. Most
2941 # settings should not be here, they should be in target-specific
2942 # xcode_settings sections, or better yet, should use non-Xcode-specific
2943 # settings in target dicts. SYMROOT is a special case, because many other
2944 # Xcode variables depend on it, including variables such as
2945 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2946 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2947 # files to appear (when present) in the UI as actual files and not red
2948 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2949 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162950 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552951 },
[email protected]ee28c9f2009-09-04 01:53:012952}