blob: f5bc3a56f619937f2cd4aa2ea1a751e896d70713 [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]e72e55b2011-01-06 22:19:3016 # dict that operate on these variables (e.g., for setting 'toolkit_views',
17 # we need to have 'chromeos' already set).
[email protected]e14a9f92009-08-05 19:26:0718 'variables': {
[email protected]e72e55b2011-01-06 22:19:3019 'variables': {
[email protected]774e0612011-11-28 18:53:4820 'includes': [
21 'use_skia_on_mac.gypi',
22 ],
[email protected]bb6aba32011-01-07 19:04:4323 'variables': {
24 # Whether we're building a ChromeOS build.
25 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3026
[email protected]de3c97272012-02-07 16:36:0627 # Whether we're building pre-Aura ChromeOS (using GTK).
28 'chromeos_gtk%': 0,
29
[email protected]3fa441d2011-09-18 17:28:5030 # Whether we are using Views Toolkit
31 'toolkit_views%': 0,
32
[email protected]ed329be2012-01-03 22:02:1633 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5834 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2835
[email protected]ed329be2012-01-03 22:02:1636 # Whether or not we are building the Ash shell.
37 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4238
39 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
40 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2741
42 # Disable Virtual keyboard support by default.
43 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4844
[email protected]7ddea9802012-02-22 23:08:0545 # Disable viewport meta tag by default.
46 'enable_viewport%': 0,
47
[email protected]774e0612011-11-28 18:53:4848 # Default setting for use_skia on mac platform.
49 # This is typically overridden in use_skia_on_mac.gypi.
50 'use_skia_on_mac%': 0,
[email protected]bb6aba32011-01-07 19:04:4351 },
52 # Copy conditionally-set variables out one scope.
53 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:0654 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]41423092011-08-25 15:39:5855 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1656 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4257 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2758 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0559 'enable_viewport%': '<(enable_viewport)',
[email protected]774e0612011-11-28 18:53:4860 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]e72e55b2011-01-06 22:19:3061
[email protected]e72e55b2011-01-06 22:19:3062 # Compute the architecture that we're building on.
63 'conditions': [
[email protected]177cd082011-10-04 18:36:3864 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3765 'host_arch%': 'ia32',
66 }, {
[email protected]79e2336c2011-05-12 18:18:3467 # This handles the Unix platforms for which there is some support.
68 # Anything else gets passed through, which probably won't work very
69 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3070 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3471 '<!(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:3072 }],
[email protected]1353a092012-01-13 03:34:2873
[email protected]24c7ac42012-02-02 21:40:0574 # Ash and ChromeOS require Aura.
[email protected]de3c97272012-02-07 16:36:0675 ['(use_ash==1 or chromeos==1) and chromeos_gtk==0', {
[email protected]ed329be2012-01-03 22:02:1676 'use_aura%': 1,
77 }],
[email protected]bb6aba32011-01-07 19:04:4378
[email protected]ab2017e2012-02-07 01:54:5079 # Set default value of toolkit_views based on OS.
[email protected]de3c97272012-02-07 16:36:0680 ['OS=="win" or chromeos==1 or chromeos_gtk==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4381 'toolkit_views%': 1,
82 }, {
83 'toolkit_views%': 0,
84 }],
[email protected]de3c97272012-02-07 16:36:0685
86 # ChromeOS GTK implies ChromeOS.
87 ['chromeos_gtk==1', {
88 'chromeos%': 1,
89 }],
[email protected]e72e55b2011-01-06 22:19:3090 ],
91 },
92
93 # Copy conditionally-set variables out one scope.
94 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:0695 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]e72e55b2011-01-06 22:19:3096 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4397 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:5898 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1699 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42100 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:27101 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05102 'enable_viewport%': '<(enable_viewport)',
[email protected]774e0612011-11-28 18:53:48103 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]023d8242011-11-22 01:25:27104
[email protected]8fb0ef02011-05-20 00:53:50105 # We used to provide a variable for changing how libraries were built.
106 # This variable remains until we can clean up all the users.
107 # This needs to be one nested variables dict in so that dependent
108 # gyp files can make use of it in their outer variables. (Yikes!)
109 # http://code.google.com/p/chromium/issues/detail?id=83308
110 'library%': 'static_library',
111
[email protected]e14a9f92009-08-05 19:26:07112 # Override branding to select the desired branding flavor.
113 'branding%': 'Chromium',
114
115 # Override buildtype to select the desired build flavor.
116 # Dev - everyday build for development/testing
117 # Official - release build (generally implies additional processing)
118 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
119 # conversion is done), some of the things which are now controlled by
120 # 'branding', such as symbol generation, will need to be refactored based
121 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
122 # builds).
123 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27124
[email protected]e72e55b2011-01-06 22:19:30125 # Default architecture we're building for is the architecture we're
126 # building on.
127 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17128
[email protected]e72e55b2011-01-06 22:19:30129 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
130 # are built under a chromium full build (1) or a webkit.org chromium
131 # build (0).
132 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52133
[email protected]e72e55b2011-01-06 22:19:30134 # Set to 1 to enable fast builds. It disables debug info for fastest
135 # compilation.
136 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49137
[email protected]20960e072011-09-20 20:59:01138 # Set to 1 to enable dcheck in release without having to use the flag.
139 'dcheck_always_on%': 0,
140
[email protected]464750f2011-10-24 23:16:18141 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51142 'file_manager_extension%': 0,
143
[email protected]e1229602012-02-21 09:53:16144 # Enable WebUI TaskManager by default.
145 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47146
[email protected]e72e55b2011-01-06 22:19:30147 # Python version.
[email protected]a43c5a02011-05-27 06:54:51148 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17149
[email protected]e72e55b2011-01-06 22:19:30150 # Set ARM-v7 compilation flags
151 'armv7%': 0,
152
153 # Set Neon compilation flags (only meaningful if armv7==1).
154 'arm_neon%': 1,
155
156 # The system root for cross-compiles. Default: none.
157 'sysroot%': '',
158
[email protected]945361a2011-09-30 04:38:43159 # The system libdir used for this ABI.
160 'system_libdir%': 'lib',
161
[email protected]e72e55b2011-01-06 22:19:30162 # On Linux, we build with sse2 for Chromium builds.
163 'disable_sse2%': 0,
164
165 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03166 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30167
168 # Variable 'component' is for cases where we would like to build some
169 # components as dynamic shared libraries but still need variable
170 # 'library' for static libraries.
171 # By default, component is set to whatever library is set to and
172 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53173 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30174
[email protected]bb6aba32011-01-07 19:04:43175 # Set to select the Title Case versions of strings in GRD files.
176 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21177
[email protected]98da0042011-02-02 00:10:27178 # Use translations provided by volunteers at launchpad.net. This
179 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19180 'use_third_party_translations%': 0,
181
[email protected]9a425422011-01-11 00:53:18182 # Remoting compilation is enabled by default. Set to 0 to disable.
183 'remoting%': 1,
184
[email protected]a026daa2011-04-20 15:49:51185 # P2P APIs are compiled in by default. Set to 0 to disable.
186 # Also note that this should be enabled for remoting to compile.
187 'p2p_apis%': 1,
188
[email protected]1ec68c42011-06-01 13:56:25189 # Configuration policy is enabled by default. Set to 0 to disable.
190 'configuration_policy%': 1,
191
[email protected]4b58e7d2011-07-11 10:22:56192 # Safe browsing is compiled in by default. Set to 0 to disable.
193 'safe_browsing%': 1,
194
[email protected]9eb100e2011-10-14 05:08:22195 # Speech input is compiled in by default. Set to 0 to disable.
196 'input_speech%': 1,
197
[email protected]7cce3232011-10-28 10:41:57198 # Notifications are compiled in by default. Set to 0 to disable.
199 'notifications%' : 1,
200
[email protected]5d451ad2011-02-11 16:43:46201 # If this is set, the clang plugins used on the buildbot will be used.
202 # Run tools/clang/scripts/update.sh to make sure they are compiled.
203 # This causes 'clang_chrome_plugins_flags' to be set.
204 # Has no effect if 'clang' is not set as well.
205 'clang_use_chrome_plugins%': 0,
206
[email protected]f36f3742011-11-21 13:12:14207 # Enable building with ASAN (Clang's -faddress-sanitizer option).
208 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06209 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
210 'asan%': 0,
[email protected]3cfa96a62012-02-28 07:27:58211 'asan_blacklist%': '<(PRODUCT_DIR)/../../third_party/asan/ignore.txt',
[email protected]92799b632011-08-15 14:33:06212
[email protected]00b0a7f2012-01-25 15:30:46213 # Use the provided profiled order file to link Chrome image with it.
214 # This makes Chrome faster by better using CPU cache when executing code.
215 # This is known as PGO (profile guided optimization).
216 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
217 'order_text_section%' : "",
218
[email protected]1ad5a7b2011-06-24 03:15:13219 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
220 # libraries on linux x86-64 and arm, plus ASLR.
221 'linux_fpic%': 1,
222
[email protected]c6a1f94172011-07-05 02:35:00223 # Enable navigator.registerProtocolHandler and supporting UI.
224 'enable_register_protocol_handler%': 1,
225
[email protected]5ffb0a42012-01-27 09:36:11226 # Enable Web Intents support in WebKit, dispatching of intents,
227 # and extensions Web Intents support.
228 'enable_web_intents%': 1,
229
230 # Enable Web Intents web content registration via HTML element
231 # and WebUI managing such registrations.
232 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01233
[email protected]dda90ae2011-07-19 22:07:48234 # Webrtc compilation is enabled by default. Set to 0 to disable.
235 'enable_webrtc%': 1,
236
[email protected]67c125d2011-10-11 18:58:22237 # PPAPI by default does not support plugins making calls off the main
238 # thread. Set to 1 to turn on experimental support for out-of-process
239 # plugins to make call of the main thread.
240 'enable_pepper_threading%': 0,
241
[email protected]f56797b2011-09-25 00:04:35242 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
243 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
244 # the input value also defines the required XI2 minor minimum version.
245 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
246 'use_xi2_mt%': 0,
247
[email protected]9061bee82012-01-16 11:45:17248 # Use of precompiled headers on Windows.
249 #
250 # This is on by default in VS 2010, but off by default for VS
251 # 2008 because of complications that it can cause with our
252 # trybots etc.
253 #
254 # This variable may be explicitly set to 1 (enabled) or 0
255 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
256 # This setting will override the default.
257 #
258 # Note that a setting of 1 is probably suitable for most or all
259 # Windows developers using VS 2008, since precompiled headers
260 # provide a build speedup of 20-25%. There are a couple of
261 # small workarounds you may need to use when using VS 2008 (but
262 # not 2010), see
263 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
264 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16265 'chromium_win_pch%': 0,
266
[email protected]18e0f39b2012-01-17 16:47:34267 # Enable plug-in installation by default.
268 'enable_plugin_installation%': 1,
269
[email protected]d18e50312012-01-25 17:49:35270 # Specifies whether to use canvas_skia_skia.cc in place of platform
271 # specific implementations of CanvasSkia. Affects text drawing in the
272 # Chrome UI.
273 # TODO(asvitkine): Enable this on all platforms and delete this flag.
274 # http://crbug.com/105550
275 'use_canvas_skia_skia%': 0,
276
[email protected]bb6aba32011-01-07 19:04:43277 'conditions': [
[email protected]33423fa2011-09-23 18:18:14278 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
279 # the 'conditions' clause. Initial attempts resulted in chromium and
280 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22281 ['OS=="mac"', {
[email protected]774e0612011-11-28 18:53:48282 'use_skia%': '<(use_skia_on_mac)',
[email protected]e4dbede82011-09-16 16:11:07283 # Mac uses clang by default, so turn on the plugin as well.
284 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22285 }, {
286 'use_skia%': 1,
287 }],
288
[email protected]79e2336c2011-05-12 18:18:34289 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37290 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34291 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37292 }, {
293 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34294 }],
295
[email protected]df9167b2011-11-14 19:15:25296 # A flag for BSD platforms
297 ['OS=="freebsd" or OS=="openbsd"', {
298 'os_bsd%': 1,
299 }, {
300 'os_bsd%': 0,
301 }],
302
[email protected]c329adf82011-10-05 14:34:57303 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42304 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57305 'use_nss%': 1,
306 }, {
307 'use_nss%': 0,
308 }],
[email protected]e0b85a52011-10-06 03:30:42309
[email protected]258dca42011-09-21 00:17:19310 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01311 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19312 'use_glib%': 0,
[email protected]ab2017e2012-02-07 01:54:50313 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34314 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37315 }, {
[email protected]ab2017e2012-02-07 01:54:50316 # TODO(dnicoara) Wayland build should have these disabled, but
317 # currently GTK and X is too spread and it's hard to completely
318 # remove every dependency.
[email protected]258dca42011-09-21 00:17:19319 'use_glib%': 1,
[email protected]ab2017e2012-02-07 01:54:50320 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37321 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34322 }],
[email protected]efadeacf2011-10-27 19:01:00323 # We always use skia text rendering in Aura on Windows, since GDI
324 # doesn't agree with our BackingStore.
325 # TODO(beng): remove once skia text rendering is on by default.
326 ['use_aura==1 and OS=="win"', {
327 'enable_skia_text%': 1,
328 }],
[email protected]ab2017e2012-02-07 01:54:50329 ['use_aura==1 and OS!="win"', {
330 'toolkit_uses_gtk%': 0,
331 }],
[email protected]9edeb712011-09-20 21:20:33332
[email protected]63692212010-09-16 00:22:21333 # A flag to enable or disable our compile-time dependency
334 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
335 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49336 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50337 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21338 'use_gnome_keyring%': 0,
339 }, {
340 'use_gnome_keyring%': 1,
341 }],
[email protected]0afe5212010-10-01 18:56:11342
[email protected]bb6aba32011-01-07 19:04:43343 ['toolkit_views==0 or OS=="mac"', {
344 # GTK+ and Mac wants Title Case strings
345 'use_titlecase_in_grd_files%': 1,
346 }],
347
[email protected]1b4209f2011-01-07 00:25:40348 # Enable some hacks to support Flapper only on Chrome OS.
349 ['chromeos==1', {
350 'enable_flapper_hacks%': 1,
[email protected]3d38d8e2011-04-16 20:48:51351 }, {
[email protected]c5582412012-02-05 20:16:21352 'enable_flapper_hacks%': 0,
[email protected]ab2017e2012-02-07 01:54:50353 }],
354
355 # Enable file manager extension on Chrome OS or Aura.
356 ['chromeos==1 or use_aura==1', {
357 'file_manager_extension%': 1,
358 }, {
[email protected]3d38d8e2011-04-16 20:48:51359 'file_manager_extension%': 0,
360 }],
[email protected]7de46352011-09-12 15:39:19361
[email protected]ab2017e2012-02-07 01:54:50362 # ... except on Windows even with Aura.
363 ['use_aura==1 and OS=="win"', {
364 'file_manager_extension%': 0,
365 }],
366
[email protected]da1c8d692011-09-20 20:35:01367 ['OS=="android"', {
368 'proprietary_codecs%': 1,
369 'enable_webrtc%': 0,
370 }],
[email protected]839d5172011-10-13 17:18:11371
372 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27373 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01374 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33375 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11376 }, {
[email protected]1ee7c56c2011-10-19 14:51:33377 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11378 }],
[email protected]9061bee82012-01-16 11:45:17379
380 # Turn precompiled headers on by default for VS 2010.
381 ['OS=="win" and MSVS_VERSION=="2010"', {
382 'chromium_win_pch%': 1
383 }],
[email protected]18e0f39b2012-01-17 16:47:34384
[email protected]ab2017e2012-02-07 01:54:50385 ['use_aura==1 or chromeos==1', {
[email protected]18e0f39b2012-01-17 16:47:34386 'enable_plugin_installation%': 0,
387 }, {
388 'enable_plugin_installation%': 1,
389 }],
[email protected]b07806c12012-02-03 22:44:59390
[email protected]8d726a42012-02-09 03:49:00391 # linux_use_gold_binary: whether to use the binary checked into
392 # third_party/gold.
[email protected]433d20a12012-02-12 18:09:46393 ['host_arch=="x64" and OS!="android"', {
[email protected]1e033482012-02-09 19:33:51394 'linux_use_gold_binary%': 1,
395 }, {
396 'linux_use_gold_binary%': 0,
397 }],
398
[email protected]be239492012-02-09 19:00:17399 # linux_use_gold_flags: whether to use build flags that rely on gold.
400 # On by default for x64 Linux. Temporarily off for ChromeOS as
401 # it failed on a buildbot.
[email protected]433d20a12012-02-12 18:09:46402 ['host_arch=="x64" and chromeos==0 and OS!="android"', {
[email protected]be239492012-02-09 19:00:17403 'linux_use_gold_flags%': 1,
404 }, {
[email protected]8d726a42012-02-09 03:49:00405 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59406 }],
[email protected]b3f23ba2010-04-26 22:58:17407 ],
[email protected]e14a9f92009-08-05 19:26:07408 },
409
[email protected]e72e55b2011-01-06 22:19:30410 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07411 'branding%': '<(branding)',
412 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27413 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59414 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50415 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44416 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33417 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58418 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16419 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42420 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57421 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25422 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34423 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19424 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34425 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22426 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34427 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21428 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11429 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40430 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22431 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44432 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:06433 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]2cc81d32011-10-04 17:03:18434 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05435 'enable_viewport%': '<(enable_viewport)',
[email protected]774e0612011-11-28 18:53:48436 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]f56797b2011-09-25 00:04:35437 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20438 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47439 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21440 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54441 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01442 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36443 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43444 'armv7%': '<(armv7)',
445 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23446 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43447 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22448 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52449 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43450 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17451 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18452 'remoting%': '<(remoting)',
[email protected]dda90ae2011-07-19 22:07:48453 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16454 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51455 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25456 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56457 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22458 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57459 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46460 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06461 'asan%': '<(asan)',
[email protected]3cfa96a62012-02-28 07:27:58462 'asan_blacklist%': '<(asan_blacklist)',
[email protected]00b0a7f2012-01-25 15:30:46463 'order_text_section%': '<(order_text_section)',
[email protected]365dd5b92011-05-26 01:30:56464 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07465 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11466 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34467 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]b07806c12012-02-03 22:44:59468 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00469 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]d18e50312012-01-25 17:49:35470 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)',
[email protected]4076d2f2011-08-11 18:20:22471 # Whether to build for Wayland display server
472 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39473
[email protected]371e1092011-10-12 20:37:36474 # Use system yasm instead of bundled one.
475 'use_system_yasm%': 0,
476
[email protected]cd00bd862012-02-29 00:40:36477 # Default to enabled PIE; this is important for ASLR but we may need to be
478 # able to turn it off for various reasons.
479 'linux_disable_pie%': 0,
480
[email protected]caa95c82009-11-23 22:39:32481 # The release channel that this build targets. This is used to restrict
482 # channel-specific build options, like which installer packages to create.
483 # The default is 'all', which does no channel-specific filtering.
484 'channel%': 'all',
485
[email protected]b3fb8092009-03-12 19:09:24486 # Override chromium_mac_pch and set it to 0 to suppress the use of
487 # precompiled headers on the Mac. Prefix header injection may still be
488 # used, but prefix headers will not be precompiled. This is useful when
489 # using distcc to distribute a build to compile slaves that don't
490 # share the same compiler executable as the system driving the compilation,
491 # because precompiled headers rely on pointers into a specific compiler
492 # executable's image. Setting this to 0 is needed to use an experimental
493 # Linux-Mac cross compiler distcc farm.
494 'chromium_mac_pch%': 1,
495
[email protected]3224dcd2009-09-16 17:31:25496 # Mac OS X SDK and deployment target support.
497 # The SDK identifies the version of the system headers that will be used,
498 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
499 # "Maximum allowed" refers to the operating system version whose APIs are
500 # available in the headers.
501 # The deployment target identifies the minimum system version that the
502 # built products are expected to function on. It corresponds to the
503 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
504 # To ensure these macros are available, #include <AvailabilityMacros.h>.
505 # Additional documentation on these macros is available at
506 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
507 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
508 # deployment target to 10.5. Other projects, such as O3D, may override
509 # these defaults.
510 'mac_sdk%': '10.5',
511 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59512
[email protected]f5ecbba12009-04-03 04:35:18513 # Set to 1 to enable code coverage. In addition to build changes
514 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
515 # project file called "coverage".
516 # Currently ignored on Windows.
517 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49518
[email protected]7477ea6f2009-12-22 23:28:15519 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47520 # environment variable, the libcmt shim it uses sometimes gets in
521 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
522 # 'win_use_allocator_shim': 0,
523 # 'win_release_RuntimeLibrary': 2
524 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52525 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11526
[email protected]95ff8082009-11-13 22:21:01527 # Whether usage of OpenMAX is enabled.
528 'enable_openmax%': 0,
529
[email protected]d01120e62010-05-10 17:04:48530 # Whether proprietary audio/video codecs are assumed to be included with
531 # this build (only meaningful if branding!=Chrome).
532 'proprietary_codecs%': 0,
533
[email protected]e5b2eaa2009-04-14 01:39:12534 # TODO(bradnelson): eliminate this when possible.
535 # To allow local gyp files to prevent release.vsprops from being included.
536 # Yes(1) means include release.vsprops.
537 # Once all vsprops settings are migrated into gyp, this can go away.
538 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23539
[email protected]cbd5fd52009-08-26 00:14:27540 # TODO(bradnelson): eliminate this when possible.
541 # To allow local gyp files to override additional linker options for msvs.
542 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19543 'msvs_use_common_linker_extras%': 1,
544
[email protected]1ffb6502009-06-02 07:46:24545 # TODO(sgk): eliminate this if possible.
546 # It would be nicer to support this via a setting in 'target_defaults'
547 # in chrome/app/locales/locales.gypi overriding the setting in the
548 # 'Debug' configuration in the 'target_defaults' dict below,
549 # but that doesn't work as we'd like.
550 'msvs_debug_link_incremental%': '2',
551
[email protected]1f790ef2011-01-11 20:45:36552 # Needed for some of the largest modules.
553 'msvs_debug_link_nonincremental%': '1',
554
[email protected]5ab8f482011-08-18 18:30:06555 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
556 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51557 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06558
[email protected]573136142009-07-15 22:48:37559 # This is the location of the sandbox binary. Chrome looks for this before
560 # running the zygote process. If found, and SUID, it will be used to
561 # sandbox the zygote process and, thus, all renderer processes.
562 'linux_sandbox_path%': '',
563
[email protected]ad6d2c42009-09-15 20:13:38564 # Set this to true to enable SELinux support.
565 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57566
[email protected]58680ce2010-09-18 00:09:15567 # Set this to true when building with Clang.
568 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15569 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24570 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15571
[email protected]5e781232011-01-28 02:57:59572 # These two variables can be set in GYP_DEFINES while running
573 # |gclient runhooks| to let clang run a plugin in every compilation.
574 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
575 # Example:
[email protected]93120fe2011-02-03 20:46:42576 # 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:59577
578 'clang_load%': '',
579 'clang_add_plugin%': '',
580
[email protected]da1c8d692011-09-20 20:35:01581 # The default type of gtest.
582 'gtest_target_type%': 'executable',
583
[email protected]7664ab32011-02-01 23:35:25584 # Enable sampling based profiler.
585 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
586 'profiling%': '0',
587
[email protected]93b373502011-08-16 19:06:22588 # Enable strict glibc debug mode.
589 'glibcxx_debug%': 0,
590
[email protected]36532f332010-08-25 00:22:01591 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
592 'linux_breakpad%': 0,
593 # And if we want to dump symbols for Breakpad-enabled builds.
594 'linux_dump_symbols%': 0,
595 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03596 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49597 # Strip the test binaries needed for Linux reliability tests.
598 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03599
[email protected]46ce5b562010-06-16 18:39:53600 # Enable TCMalloc.
601 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24602
[email protected]39ca7de2010-04-16 08:04:03603 # Disable TCMalloc's debugallocation.
604 'linux_use_debugallocation%': 0,
605
[email protected]d8b60602010-03-26 09:41:22606 # Disable TCMalloc's heapchecker.
607 'linux_use_heapchecker%': 0,
608
[email protected]64e2d4a42010-08-27 10:13:21609 # Disable shadow stack keeping used by heapcheck to unwind the stacks
610 # better.
611 'linux_keep_shadow_stacks%': 0,
612
[email protected]556c5d72010-06-10 05:45:01613 # Set to 1 to link against libgnome-keyring instead of using dlopen().
614 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35615 # Set to 1 to link against gsettings APIs instead of using dlopen().
616 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01617
[email protected]77c1b29392009-12-04 06:21:29618 # Set Thumb compilation flags.
619 'arm_thumb%': 0,
620
[email protected]53e0f642010-03-05 01:41:56621 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
622 # arm_neon==0).
623 'arm_fpu%': 'vfpv3',
624
[email protected]9821d0d2010-04-16 22:40:37625 # Enable new NPDevice API.
626 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50627
628 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14629 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50630
[email protected]6f51b27e2010-06-22 20:43:53631 # Enable a variable used elsewhere throughout the GYP files to determine
632 # whether to compile in the sources for the GPU plugin / process.
633 'enable_gpu%': 1,
634
[email protected]e72e55b2011-01-06 22:19:30635 # .gyp files or targets should set chromium_code to 1 if they build
636 # Chromium-specific code, as opposed to external code. This variable is
637 # used to control such things as the set of warnings to enable, and
638 # whether warnings are treated as errors.
639 'chromium_code%': 0,
640
[email protected]8d726a42012-02-09 03:49:00641 'release_valgrind_build%': 0,
642
[email protected]b1eb341c2011-11-09 18:46:07643 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
644 'enable_wexit_time_destructors%': 0,
645
[email protected]e72e55b2011-01-06 22:19:30646 # Set to 1 to compile with the built in pdf viewer.
647 'internal_pdf%': 0,
648
649 # This allows to use libcros from the current system, ie. /usr/lib/
650 # The cros_api will be pulled in as a static library, and all headers
651 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43652 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30653
[email protected]e72e55b2011-01-06 22:19:30654 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
655 # so Cocoa is happy (http://crbug.com/20441).
656 'locales': [
657 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
658 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
659 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19660 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30661 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
662 'vi', 'zh-CN', 'zh-TW',
663 ],
664
[email protected]cc0322d2011-07-24 09:29:19665 # Pseudo locales are special locales which are used for testing and
666 # debugging. They don't get copied to the final app. For more info,
667 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
668 'pseudo_locales': [
669 'fake-bidi',
670 ],
671
[email protected]bb6aba32011-01-07 19:04:43672 'grit_defines': [],
673
[email protected]bd3bd442011-03-28 07:58:51674 # If debug_devtools is set to 1, JavaScript files for DevTools are
675 # stored as is and loaded from disk. Otherwise, a concatenated file
676 # is stored in resources.pak. It is still possible to load JS files
677 # from disk by passing --debug-devtools cmdline switch.
678 'debug_devtools%': 0,
679
[email protected]464750f2011-10-24 23:16:18680 # The Java Bridge is not compiled in by default.
681 'java_bridge%': 0,
682
[email protected]33e1c372011-12-14 16:32:07683 # This flag is only used when disable_nacl==0 and disables all those
684 # subcomponents which would require the installation of a native_client
685 # untrusted toolchain.
686 'disable_nacl_untrusted%': 0,
687
[email protected]407dfa632011-12-23 11:59:35688 # Disable Dart by default.
689 'enable_dart%': 0,
690
[email protected]ff10b132012-02-29 22:53:30691 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
692 'msbuild_toolset%': '',
693
[email protected]912c55c2009-07-31 23:33:55694 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11695 # Used to disable Native Client at compile time, for platforms where it
696 # isn't supported (ARM)
[email protected]33e1c372011-12-14 16:32:07697 ['target_arch=="arm" and chromeos == 1', {
[email protected]f0c4fce2011-10-20 18:16:11698 'disable_nacl%': 1,
699 }, {
700 'disable_nacl%': 0,
701 }],
[email protected]da1c8d692011-09-20 20:35:01702 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10703 # This will set gcc_version to XY if you are running gcc X.Y.*.
704 # This is used to tweak build flags for gcc 4.4.
705 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23706 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43707 '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:27708 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10709 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27710 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27711 }],
[email protected]4c9cc6c2009-10-01 18:54:57712 # All Chrome builds have breakpad symbols, but only process the
713 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08714 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57715 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57716 }],
[email protected]cbd5fd52009-08-26 00:14:27717 ],
[email protected]da1c8d692011-09-20 20:35:01718 }], # os_posix==1 and OS!="mac" and OS!="android"
719 ['OS=="android"', {
720 # Location of Android NDK.
721 'variables': {
722 'variables': {
723 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
724 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43725
[email protected]da1c8d692011-09-20 20:35:01726 # Switch between different build types, currently only '0' is
727 # supported.
728 'android_build_type%': 0,
729 },
730 'android_ndk_root%': '<(android_ndk_root)',
731 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
732 'android_build_type%': '<(android_build_type)',
733 },
734 'android_ndk_root%': '<(android_ndk_root)',
735 'android_ndk_sysroot': '<(android_ndk_sysroot)',
736 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
737 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
738
739 # Uses Android's crash report system
740 'linux_breakpad%': 0,
741
742 # Always uses openssl.
743 'use_openssl%': 1,
744
745 'proprietary_codecs%': '<(proprietary_codecs)',
746 'safe_browsing%': 0,
747 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22748 'input_speech%': 0,
[email protected]464750f2011-10-24 23:16:18749 'java_bridge%': 1,
[email protected]7cce3232011-10-28 10:41:57750 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01751
752 # Builds the gtest targets as a shared_library.
753 # TODO(michaelbai): Use the fixed value 'shared_library' once it
754 # is fully supported.
755 'gtest_target_type%': '<(gtest_target_type)',
756
757 # Uses system APIs for decoding audio and video.
758 'use_libffmpeg%': '0',
759
760 # Always use the chromium skia. The use_system_harfbuzz needs to
761 # match use_system_skia.
762 'use_system_skia%': '0',
763 'use_system_harfbuzz%': '0',
764
765 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28766 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01767
768 # Choose static link by build type.
769 'conditions': [
770 ['android_build_type==0', {
771 'static_link_system_icu%': 1,
772 }, {
773 'static_link_system_icu%': 0,
774 }],
775 ],
776 # Enable to use system sqlite.
777 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16778 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01779 'use_system_libjpeg%': '<(android_build_type)',
780 # Enable to use the system libexpat.
781 'use_system_libexpat%': '<(android_build_type)',
782 # Enable to use the system stlport, otherwise statically
783 # link the NDK one?
784 'use_system_stlport%': '<(android_build_type)',
785 # Copy it out one scope.
786 'android_build_type%': '<(android_build_type)',
787 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07788 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11789 # Enable clang on mac by default!
790 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56791 # Compile in Breakpad support by default so that it can be
792 # tested, even if it is not enabled by default at runtime.
793 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07794 'conditions': [
795 # mac_product_name is set to the name of the .app bundle as it should
796 # appear on disk. This duplicates data from
797 # chrome/app/theme/chromium/BRANDING and
798 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
799 # these names into the build system.
800 ['branding=="Chrome"', {
801 'mac_product_name%': 'Google Chrome',
802 }, { # else: branding!="Chrome"
803 'mac_product_name%': 'Chromium',
804 }],
805
[email protected]e14a9f92009-08-05 19:26:07806 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56807 # Enable uploading crash dumps.
808 'mac_breakpad_uploads%': 1,
809 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07810 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56811 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07812 'mac_keystone%': 1,
813 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56814 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07815 'mac_breakpad%': 0,
816 'mac_keystone%': 0,
817 }],
818 ],
819 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43820
[email protected]912c55c2009-07-31 23:33:55821 ['OS=="win"', {
822 'conditions': [
[email protected]8974e042010-06-21 18:06:52823 ['component=="shared_library"', {
824 'win_use_allocator_shim%': 0,
825 }],
[email protected]2212d272011-12-20 21:37:37826 # Whether to use multiple cores to compile with visual studio. This is
827 # optional because it sometimes causes corruption on VS 2005.
828 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55829 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13830 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55831 },{
832 'msvs_multi_core_compile%': 1,
833 }],
[email protected]10bb8c92009-08-07 21:16:03834 # Don't do incremental linking for large modules on 32-bit.
835 ['MSVS_OS_BITS==32', {
836 'msvs_large_module_debug_link_mode%': '1', # No
837 },{
838 'msvs_large_module_debug_link_mode%': '2', # Yes
839 }],
[email protected]3e2648a2011-03-21 20:58:50840 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
841 'msvs_express%': 1,
842 'secure_atl%': 0,
843 },{
844 'msvs_express%': 0,
845 'secure_atl%': 1,
846 }],
[email protected]912c55c2009-07-31 23:33:55847 ],
[email protected]ef4fa4072009-12-04 22:46:50848 'nacl_win64_defines': [
849 # This flag is used to minimize dependencies when building
850 # Native Client loader for 64-bit Windows.
851 'NACL_WIN64',
852 ],
[email protected]912c55c2009-07-31 23:33:55853 }],
[email protected]bb6aba32011-01-07 19:04:43854
[email protected]79e2336c2011-05-12 18:18:34855 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44856 'use_cups%': 1,
857 }, {
858 'use_cups%': 0,
859 }],
[email protected]bb6aba32011-01-07 19:04:43860
[email protected]19fe8f0b2010-12-07 07:27:27861 # Set the relative path from this file to the GYP file of the JPEG
862 # library used by Chromium.
863 ['use_libjpeg_turbo==1', {
864 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
865 }, {
866 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
867 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43868
[email protected]abcc9ac2011-05-16 20:04:35869 # Options controlling the use of GConf (the classic GNOME configuration
870 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31871 ['chromeos==1', {
872 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35873 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31874 }, {
875 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35876 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31877 }],
878
[email protected]4de39f82011-03-28 12:01:29879 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29880 ['branding=="Chrome"', {
881 # TODO(mmoss) The .grd files look for _google_chrome, but for
882 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29883 'grit_defines': ['-D', '_google_chrome',
884 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29885 }, {
[email protected]4de39f82011-03-28 12:01:29886 'grit_defines': ['-D', '_chromium',
887 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29888 }],
[email protected]bb6aba32011-01-07 19:04:43889 ['chromeos==1', {
890 'grit_defines': ['-D', 'chromeos'],
891 }],
892 ['toolkit_views==1', {
893 'grit_defines': ['-D', 'toolkit_views'],
894 }],
[email protected]8dd791d2011-09-16 16:37:30895 ['use_aura==1', {
896 'grit_defines': ['-D', 'use_aura'],
897 }],
[email protected]ed329be2012-01-03 22:02:16898 ['use_ash==1', {
899 'grit_defines': ['-D', 'use_ash'],
900 }],
[email protected]c329adf82011-10-05 14:34:57901 ['use_nss==1', {
902 'grit_defines': ['-D', 'use_nss'],
903 }],
[email protected]2cc81d32011-10-04 17:03:18904 ['use_virtual_keyboard==1', {
905 'grit_defines': ['-D', 'use_virtual_keyboard'],
906 }],
[email protected]e47c32032011-03-01 19:26:20907 ['file_manager_extension==1', {
908 'grit_defines': ['-D', 'file_manager_extension'],
909 }],
[email protected]8b2e9f392011-08-05 04:00:47910 ['webui_task_manager==1', {
911 'grit_defines': ['-D', 'webui_task_manager'],
912 }],
[email protected]9a425422011-01-11 00:53:18913 ['remoting==1', {
914 'grit_defines': ['-D', 'remoting'],
915 }],
[email protected]bb6aba32011-01-07 19:04:43916 ['use_titlecase_in_grd_files==1', {
917 'grit_defines': ['-D', 'use_titlecase'],
918 }],
[email protected]00dc155832011-02-01 18:51:19919 ['use_third_party_translations==1', {
920 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12921 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16922 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
923 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12924 ],
[email protected]00dc155832011-02-01 18:51:19925 }],
[email protected]da1c8d692011-09-20 20:35:01926 ['OS=="android"', {
927 'grit_defines': ['-D', 'android'],
928 }],
[email protected]5d451ad2011-02-11 16:43:46929 ['clang_use_chrome_plugins==1', {
930 'clang_chrome_plugins_flags':
931 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
932 }],
[email protected]cfa2e1102011-04-27 22:30:23933
[email protected]452da69e2011-05-24 02:36:05934 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27935 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23936 'use_ibus%': 1,
937 }, {
938 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56939 }],
940
941 ['enable_register_protocol_handler==1', {
942 'grit_defines': ['-D', 'enable_register_protocol_handler'],
943 }],
[email protected]92799b632011-08-15 14:33:06944
[email protected]5ffb0a42012-01-27 09:36:11945 ['enable_web_intents_tag==1', {
946 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:07947 }],
948
[email protected]92799b632011-08-15 14:33:06949 ['asan==1', {
950 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20951 # Do not use Chrome plugins for Clang. The Clang version in
952 # third_party/asan may be different from the default one.
953 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06954 }],
[email protected]912c55c2009-07-31 23:33:55955 ],
[email protected]35958422011-09-28 02:03:59956 # List of default apps to install in new profiles. The first list contains
957 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:06958 # contains the destination location for each of the files. When a crx
959 # is added or removed from the list, the chrome/browser/resources/
960 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:59961 'default_apps_list': [
962 'browser/resources/default_apps/external_extensions.json',
963 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06964 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59965 'browser/resources/default_apps/youtube.crx',
966 ],
967 'default_apps_list_linux_dest': [
968 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
969 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06970 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59971 '<(PRODUCT_DIR)/default_apps/youtube.crx',
972 ],
[email protected]2f80c312009-02-25 21:26:55973 },
974 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26975 'variables': {
[email protected]a6e22132010-02-10 20:43:18976 # The condition that operates on chromium_code is in a target_conditions
977 # section, and will not have access to the default fallback value of
978 # chromium_code at the top of this file, or to the chromium_code
979 # variable placed at the root variables scope of .gyp files, because
980 # those variables are not set at target scope. As a workaround,
981 # if chromium_code is not set at target scope, define it in target scope
982 # to contain whatever value it has during early variable expansion.
983 # That's enough to make it available during target conditional
984 # processing.
985 'chromium_code%': '<(chromium_code)',
986
[email protected]7e0d664a2009-12-03 21:07:47987 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29988 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00989 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:33990
[email protected]7e0d664a2009-12-03 21:07:47991 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
992 'win_release_Optimization%': '2', # 2 = /Os
993 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:33994
995 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:24996 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:33997 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:24998 # Tri-state: blank is default, 1 on, 0 off
999 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331000
[email protected]6b0507b2010-05-07 07:41:211001 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1002 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331003
[email protected]6b0507b2010-05-07 07:41:211004 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151005 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1006 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331007
[email protected]fac10d12010-11-08 16:00:311008 # VS inserts quite a lot of extra checks to algorithms like
1009 # std::partial_sort in Debug build which make them O(N^2)
1010 # instead of O(N*logN). This is particularly slow under memory
1011 # tools like ThreadSanitizer so we want it to be disablable.
1012 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1013 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471014
[email protected]ffd984b12009-09-11 19:37:001015 'release_extra_cflags%': '',
1016 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001017
1018 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521019
[email protected]ef5c5f1b2011-12-17 02:16:241020 # the non-qualified versions are widely assumed to be *nix-only
1021 'win_release_extra_cflags%': '',
1022 'win_debug_extra_cflags%': '',
1023
[email protected]b1eb341c2011-11-09 18:46:071024 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1025 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1026
[email protected]ef3326702011-10-06 18:06:441027 # Only used by Windows build for now. Can be used to build into a
1028 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1029 # output files in src/build/VS2010_{Debug,Release}.
1030 'build_dir_prefix%': '',
1031
[email protected]8974e042010-06-21 18:06:521032 'conditions': [
1033 ['OS=="win" and component=="shared_library"', {
1034 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1035 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
1036 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
1037 }, {
1038 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1039 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1040 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1041 }],
1042 ],
[email protected]1c966092009-08-20 21:19:261043 },
[email protected]32aa8cc2009-03-04 21:36:391044 'conditions': [
[email protected]ff10b132012-02-29 22:53:301045 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1046 'msbuild_toolset': '<(msbuild_toolset)',
1047 }],
[email protected]32aa8cc2009-03-04 21:36:391048 ['branding=="Chrome"', {
1049 'defines': ['GOOGLE_CHROME_BUILD'],
1050 }, { # else: branding!="Chrome"
1051 'defines': ['CHROMIUM_BUILD'],
1052 }],
[email protected]63e39a282011-07-13 20:41:281053 ['component=="shared_library"', {
1054 'defines': ['COMPONENT_BUILD'],
1055 }],
[email protected]5cba9ff72011-11-16 21:55:181056 ['component=="shared_library" and incremental_chrome_dll==1', {
1057 # TODO(dpranke): We can't incrementally link chrome when
1058 # content is being built as a DLL because chrome links in
1059 # webkit_glue and webkit_glue depends on symbols defined in
1060 # content. We can remove this when we fix glue.
1061 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
1062 'defines': ['COMPILE_CONTENT_STATICALLY'],
1063 }],
[email protected]06c756182010-04-27 18:31:311064 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171065 'defines': ['TOOLKIT_VIEWS=1'],
1066 }],
[email protected]1ee7c56c2011-10-19 14:51:331067 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111068 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1069 }],
[email protected]41423092011-08-25 15:39:581070 ['use_aura==1', {
1071 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351072 }],
[email protected]ed329be2012-01-03 22:02:161073 ['use_ash==1', {
1074 'defines': ['USE_ASH=1'],
1075 }],
[email protected]c329adf82011-10-05 14:34:571076 ['use_nss==1', {
1077 'defines': ['USE_NSS=1'],
1078 }],
[email protected]9d43e372011-09-22 19:39:521079 ['toolkit_uses_gtk==1', {
1080 'defines': ['TOOLKIT_USES_GTK=1'],
1081 }],
[email protected]a47aa892011-11-22 03:12:311082 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1083 # TODO(erg): We are progressively sealing up use of deprecated features
1084 # in gtk in preparation for an eventual porting to gtk3.
1085 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1086 }],
[email protected]fdc5bed2010-01-09 01:16:571087 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291088 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501089 }],
[email protected]2cc81d32011-10-04 17:03:181090 ['use_virtual_keyboard==1', {
1091 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1092 }],
[email protected]f56797b2011-09-25 00:04:351093 ['use_xi2_mt!=0', {
1094 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1095 }],
[email protected]236754a2011-07-28 17:38:231096 ['use_wayland==1', {
1097 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1098 }],
[email protected]e47c32032011-03-01 19:26:201099 ['file_manager_extension==1', {
1100 'defines': ['FILE_MANAGER_EXTENSION=1'],
1101 }],
[email protected]8b2e9f392011-08-05 04:00:471102 ['webui_task_manager==1', {
1103 'defines': ['WEBUI_TASK_MANAGER=1'],
1104 }],
[email protected]7664ab32011-02-01 23:35:251105 ['profiling==1', {
1106 'defines': ['ENABLE_PROFILING=1'],
1107 }],
[email protected]93b373502011-08-16 19:06:221108 ['OS=="linux" and glibcxx_debug==1', {
1109 'defines': ['_GLIBCXX_DEBUG=1',],
1110 'cflags_cc!': ['-fno-rtti'],
1111 'cflags_cc+': ['-frtti', '-g'],
1112 }],
[email protected]542bf24a2010-06-11 23:08:171113 ['remoting==1', {
1114 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001115 }],
[email protected]5b87e782012-02-09 18:19:321116 ['enable_webrtc==1', {
1117 'defines': ['ENABLE_WEBRTC=1'],
1118 }],
[email protected]a026daa2011-04-20 15:49:511119 ['p2p_apis==1', {
1120 'defines': ['ENABLE_P2P_APIS=1'],
1121 }],
[email protected]d01120e62010-05-10 17:04:481122 ['proprietary_codecs==1', {
1123 'defines': ['USE_PROPRIETARY_CODECS'],
1124 }],
[email protected]1b4209f2011-01-07 00:25:401125 ['enable_flapper_hacks==1', {
1126 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1127 }],
[email protected]67c125d2011-10-11 18:58:221128 ['enable_pepper_threading==1', {
1129 'defines': ['ENABLE_PEPPER_THREADING'],
1130 }],
[email protected]7ddea9802012-02-22 23:08:051131 ['enable_viewport==1', {
1132 'defines': ['ENABLE_VIEWPORT'],
1133 }],
[email protected]f31e2e52011-07-14 16:01:191134 ['configuration_policy==1', {
1135 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1136 }],
[email protected]9eb100e2011-10-14 05:08:221137 ['input_speech==1', {
1138 'defines': ['ENABLE_INPUT_SPEECH'],
1139 }],
[email protected]7cce3232011-10-28 10:41:571140 ['notifications==1', {
1141 'defines': ['ENABLE_NOTIFICATIONS'],
1142 }],
[email protected]9c1949e2009-10-02 19:59:541143 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171144
[email protected]9c1949e2009-10-02 19:59:541145 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141146 # For Windows and Mac, we don't genererate debug information.
1147 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541148 'msvs_settings': {
1149 'VCLinkerTool': {
1150 'GenerateDebugInformation': 'false',
1151 },
1152 'VCCLCompilerTool': {
1153 'DebugInformationFormat': '0',
1154 }
[email protected]da4d4ea2011-09-22 20:23:141155 },
1156 'xcode_settings': {
1157 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1158 },
[email protected]1cc2fa72010-07-03 08:49:241159 }, { # else: OS != "win", generate less debug information.
1160 'variables': {
1161 'debug_extra_cflags': '-g1',
1162 },
[email protected]37c84192010-04-14 21:37:401163 }],
[email protected]aecc4d12011-01-19 05:32:331164 # Clang creates chubby debug information, which makes linking very
1165 # slow. For now, don't create debug information with clang. See
1166 # http://crbug.com/70000
1167 ['OS=="linux" and clang==1', {
1168 'variables': {
1169 'debug_extra_cflags': '-g0',
1170 },
1171 }],
[email protected]9c1949e2009-10-02 19:59:541172 ], # conditions for fastbuild.
1173 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011174 ['dcheck_always_on!=0', {
1175 'defines': ['DCHECK_ALWAYS_ON=1'],
1176 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381177 ['selinux==1', {
1178 'defines': ['CHROMIUM_SELINUX=1'],
1179 }],
[email protected]7e0d664a2009-12-03 21:07:471180 ['win_use_allocator_shim==0', {
1181 'conditions': [
1182 ['OS=="win"', {
1183 'defines': ['NO_TCMALLOC'],
1184 }],
1185 ],
1186 }],
[email protected]43f28f832010-02-03 02:28:481187 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151188 'defines': [
1189 'ENABLE_GPU=1',
1190 ],
1191 }],
[email protected]b1c2a5542010-10-08 12:44:401192 ['use_openssl==1', {
1193 'defines': [
1194 'USE_OPENSSL=1',
1195 ],
1196 }],
[email protected]ed154592010-04-29 00:18:501197 ['enable_eglimage==1', {
1198 'defines': [
1199 'ENABLE_EGLIMAGE=1',
1200 ],
1201 }],
[email protected]7d7564a12011-06-21 19:20:221202 ['use_skia==1', {
1203 'defines': [
1204 'USE_SKIA=1',
1205 ],
1206 }],
[email protected]f5ecbba12009-04-03 04:35:181207 ['coverage!=0', {
1208 'conditions': [
1209 ['OS=="mac"', {
1210 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041211 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1212 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471213 },
[email protected]e4fb84c2009-12-28 20:45:431214 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101215 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431216 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181217 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431218 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181219 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471220 }],
1221 ],
1222 }],
[email protected]da1c8d692011-09-20 20:35:011223 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181224 'cflags': [ '-ftest-coverage',
1225 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001226 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181227 }],
[email protected]e8f6ff42009-07-07 18:20:531228 # Finally, for Windows, we simply turn on profiling.
1229 ['OS=="win"', {
1230 'msvs_settings': {
1231 'VCLinkerTool': {
1232 'Profile': 'true',
1233 },
[email protected]10bb8c92009-08-07 21:16:031234 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531235 # /Z7, not /Zi, so coverage is happyb
1236 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161237 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531238 }
1239 }
1240 }], # OS==win
1241 ], # conditions for coverage
1242 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381243 ['OS=="win"', {
1244 'defines': [
1245 '__STD_C',
1246 '_CRT_SECURE_NO_DEPRECATE',
1247 '_SCL_SECURE_NO_DEPRECATE',
1248 ],
1249 'include_dirs': [
1250 '<(DEPTH)/third_party/wtl/include',
1251 ],
1252 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561253 ['enable_register_protocol_handler==1', {
1254 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191255 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561256 ],
1257 }],
[email protected]41ed4e82011-08-25 23:02:071258 ['enable_web_intents==1', {
1259 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471260 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071261 ],
1262 }],
[email protected]13eb97d2012-01-05 01:07:121263 ['OS=="win" and branding=="Chrome"', {
1264 'defines': ['ENABLE_SWIFTSHADER'],
1265 }],
[email protected]407dfa632011-12-23 11:59:351266 ['enable_dart==1', {
1267 'defines': ['WEBKIT_USING_DART=1'],
1268 }],
[email protected]18e0f39b2012-01-17 16:47:341269 ['enable_plugin_installation==1', {
1270 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1271 }],
[email protected]a6e22132010-02-10 20:43:181272 ], # conditions for 'target_defaults'
1273 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071274 ['enable_wexit_time_destructors==1', {
1275 'conditions': [
1276 [ 'clang==1', {
1277 'cflags': [
1278 '-Wexit-time-destructors',
1279 ],
1280 'xcode_settings': {
1281 'WARNING_CFLAGS': [
1282 '-Wexit-time-destructors',
1283 ],
1284 },
1285 }],
1286 ],
1287 }],
[email protected]c14d8e772010-02-09 22:06:151288 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281289 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341290 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331291 # We don't want to get warnings from third-party code,
1292 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281293 'cflags!': [
1294 '-Wall',
1295 '-Wextra',
1296 '-Werror',
1297 ],
[email protected]167ec822011-10-24 22:05:271298 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001299 # Don't warn about hash_map in third-party code.
1300 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271301 ],
1302 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331303 # Don't warn about printf format problems.
1304 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221305 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001306 ],
[email protected]d16bd642011-07-25 23:59:181307 'cflags_cc!': [
1308 # TODO(fischman): remove this.
1309 # http://code.google.com/p/chromium/issues/detail?id=90453
1310 '-Wsign-compare',
1311 ]
[email protected]d8543312010-02-10 17:43:281312 }],
[email protected]bc073c062012-01-13 06:28:031313 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111314 'cflags': [
1315 # Don't warn about ignoring the return value from e.g. close().
1316 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031317 # BSD systems do not support this option, since they are usually
1318 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111319 '-Wno-unused-result',
1320 ],
1321 }],
[email protected]d8543312010-02-10 17:43:281322 [ 'OS=="win"', {
1323 'defines': [
1324 '_CRT_SECURE_NO_DEPRECATE',
1325 '_CRT_NONSTDC_NO_WARNINGS',
1326 '_CRT_NONSTDC_NO_DEPRECATE',
1327 '_SCL_SECURE_NO_DEPRECATE',
1328 ],
1329 'msvs_disabled_warnings': [4800],
1330 'msvs_settings': {
1331 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111332 'WarningLevel': '3',
1333 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281334 'Detect64BitPortabilityProblems': 'false',
1335 },
1336 },
1337 }],
[email protected]ea47b6a2011-07-17 19:39:421338 # TODO(darin): Unfortunately, some third_party code depends on base/
1339 [ 'OS=="win" and component=="shared_library"', {
1340 'msvs_disabled_warnings': [
1341 4251, # class 'std::xx' needs to have dll-interface.
1342 ],
1343 }],
[email protected]d8543312010-02-10 17:43:281344 [ 'OS=="mac"', {
1345 'xcode_settings': {
1346 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061347 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281348 },
1349 }],
[email protected]c14d8e772010-02-09 22:06:151350 ],
1351 }, {
[email protected]a5c598152012-01-27 04:55:131352 'includes': [
1353 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1354 'filename_rules.gypi',
1355 ],
[email protected]c14d8e772010-02-09 22:06:151356 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1357 # C99 macros on Mac and Linux.
1358 'defines': [
1359 '__STDC_FORMAT_MACROS',
1360 ],
1361 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151362 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071363 # turn on warnings for signed/unsigned mismatch on chromium code.
1364 'msvs_settings': {
1365 'VCCLCompilerTool': {
1366 'AdditionalOptions': ['/we4389'],
1367 },
1368 },
[email protected]c14d8e772010-02-09 22:06:151369 }],
[email protected]63e39a282011-07-13 20:41:281370 ['OS=="win" and component=="shared_library"', {
1371 'msvs_disabled_warnings': [
1372 4251, # class 'std::xx' needs to have dll-interface.
1373 ],
1374 }],
[email protected]c14d8e772010-02-09 22:06:151375 ],
1376 }],
[email protected]a6e22132010-02-10 20:43:181377 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551378 'default_configuration': 'Debug',
1379 'configurations': {
[email protected]5153767c2009-12-22 01:52:501380 # VCLinkerTool LinkIncremental values below:
1381 # 0 == default
1382 # 1 == /INCREMENTAL:NO
1383 # 2 == /INCREMENTAL
1384 # Debug links incremental, Release does not.
1385 #
[email protected]7b99801e2010-11-03 17:26:231386 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501387 #
1388 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561389 'abstract': 1,
1390 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511391 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561392 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1393 'CharacterSet': '1',
1394 },
[email protected]5153767c2009-12-22 01:52:501395 },
1396 'x86_Base': {
1397 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501398 'msvs_settings': {
1399 'VCLinkerTool': {
1400 'TargetMachine': '1',
1401 },
1402 },
[email protected]2fa40782009-11-01 21:17:341403 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561404 },
[email protected]5153767c2009-12-22 01:52:501405 'x64_Base': {
1406 'abstract': 1,
1407 'msvs_configuration_platform': 'x64',
1408 'msvs_settings': {
1409 'VCLinkerTool': {
1410 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501411 'AdditionalLibraryDirectories!':
1412 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1413 'AdditionalLibraryDirectories':
1414 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1415 },
[email protected]d26b4418ab2010-03-24 22:06:351416 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501417 'AdditionalLibraryDirectories!':
1418 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1419 'AdditionalLibraryDirectories':
1420 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1421 },
1422 },
1423 'defines': [
1424 # Not sure if tcmalloc works on 64-bit Windows.
1425 'NO_TCMALLOC',
1426 ],
1427 },
1428 'Debug_Base': {
1429 'abstract': 1,
[email protected]14339762011-04-05 07:36:581430 'defines': [
1431 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1432 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1433 ],
[email protected]1c966092009-08-20 21:19:261434 'xcode_settings': {
1435 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291436 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491437 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491438 '<@(debug_extra_cflags)',
1439 ],
[email protected]1c966092009-08-20 21:19:261440 },
[email protected]bb05e452009-10-29 21:24:561441 'msvs_settings': {
1442 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471443 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561444 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211445 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471446 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151447 'conditions': [
1448 # According to MSVS, InlineFunctionExpansion=0 means
1449 # "default inlining", not "/Ob0".
1450 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1451 ['win_debug_InlineFunctionExpansion==0', {
1452 'AdditionalOptions': ['/Ob0'],
1453 }],
1454 ['win_debug_InlineFunctionExpansion!=""', {
1455 'InlineFunctionExpansion':
1456 '<(win_debug_InlineFunctionExpansion)',
1457 }],
[email protected]fac10d12010-11-08 16:00:311458 ['win_debug_disable_iterator_debugging==1', {
1459 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1460 }],
[email protected]ef5c5f1b2011-12-17 02:16:241461
1462 # if win_debug_OmitFramePointers is blank, leave as default
1463 ['win_debug_OmitFramePointers==1', {
1464 'OmitFramePointers': 'true',
1465 }],
1466 ['win_debug_OmitFramePointers==0', {
1467 'OmitFramePointers': 'false',
1468 # The above is not sufficient (http://crbug.com/106711): it
1469 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1470 # perform FPO regardless, so we must explicitly disable.
1471 # We still want the false setting above to avoid having
1472 # "/Oy /Oy-" and warnings about overriding.
1473 'AdditionalOptions': ['/Oy-'],
1474 }],
[email protected]2ae6e022010-05-07 13:19:151475 ],
[email protected]ef5c5f1b2011-12-17 02:16:241476 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561477 },
1478 'VCLinkerTool': {
1479 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331480 # ASLR makes debugging with windbg difficult because Chrome.exe and
1481 # Chrome.dll share the same base name. As result, windbg will
1482 # name the Chrome.dll module like chrome_<base address>, where
1483 # <base address> typically changes with each launch. This in turn
1484 # means that breakpoints in Chrome.dll don't stick from one launch
1485 # to the next. For this reason, we turn ASLR off in debug builds.
1486 # Note that this is a three-way bool, where 0 means to pick up
1487 # the default setting, 1 is off and 2 is on.
1488 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561489 },
1490 'VCResourceCompilerTool': {
1491 'PreprocessorDefinitions': ['_DEBUG'],
1492 },
1493 },
[email protected]2f80c312009-02-25 21:26:551494 'conditions': [
[email protected]bb05e452009-10-29 21:24:561495 ['OS=="linux"', {
1496 'cflags': [
1497 '<@(debug_extra_cflags)',
1498 ],
[email protected]2f80c312009-02-25 21:26:551499 }],
[email protected]56cca4e2011-07-01 21:33:351500 ['release_valgrind_build==0', {
1501 'xcode_settings': {
1502 'OTHER_CFLAGS': [
1503 '-fstack-protector-all', # Implies -fstack-protector
1504 ],
1505 },
1506 }],
[email protected]2f80c312009-02-25 21:26:551507 ],
1508 },
[email protected]5153767c2009-12-22 01:52:501509 'Release_Base': {
1510 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551511 'defines': [
1512 'NDEBUG',
1513 ],
[email protected]1c966092009-08-20 21:19:261514 'xcode_settings': {
1515 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1516 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001517 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261518 },
[email protected]bb05e452009-10-29 21:24:561519 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471520 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471521 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151522 'conditions': [
[email protected]2212d272011-12-20 21:37:371523 # In official builds, each target will self-select
1524 # an optimization level.
1525 ['buildtype!="Official"', {
1526 'Optimization': '<(win_release_Optimization)',
1527 },
1528 ],
[email protected]2ae6e022010-05-07 13:19:151529 # According to MSVS, InlineFunctionExpansion=0 means
1530 # "default inlining", not "/Ob0".
1531 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1532 ['win_release_InlineFunctionExpansion==0', {
1533 'AdditionalOptions': ['/Ob0'],
1534 }],
1535 ['win_release_InlineFunctionExpansion!=""', {
1536 'InlineFunctionExpansion':
1537 '<(win_release_InlineFunctionExpansion)',
1538 }],
[email protected]626d2d22011-10-11 15:47:331539
[email protected]ef5c5f1b2011-12-17 02:16:241540 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331541 ['win_release_OmitFramePointers==1', {
1542 'OmitFramePointers': 'true',
1543 }],
1544 ['win_release_OmitFramePointers==0', {
1545 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241546 # The above is not sufficient (http://crbug.com/106711): it
1547 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1548 # perform FPO regardless, so we must explicitly disable.
1549 # We still want the false setting above to avoid having
1550 # "/Oy /Oy-" and warnings about overriding.
1551 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331552 }],
[email protected]2ae6e022010-05-07 13:19:151553 ],
[email protected]ef5c5f1b2011-12-17 02:16:241554 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471555 },
[email protected]bb05e452009-10-29 21:24:561556 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341557 # LinkIncremental is a tri-state boolean, where 0 means default
1558 # (i.e., inherit from parent solution), 1 means false, and
1559 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561560 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341561 # This corresponds to the /PROFILE flag which ensures the PDB
1562 # file contains FIXUP information (growing the PDB file by about
1563 # 5%) but does not otherwise alter the output binary. This
1564 # information is used by the Syzygy optimization tool when
1565 # decomposing the release image.
1566 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561567 },
1568 },
[email protected]2f80c312009-02-25 21:26:551569 'conditions': [
[email protected]92822e82009-09-18 14:26:561570 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581571 'defines': [
1572 'NVALGRIND',
1573 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1574 ],
[email protected]ee857512010-05-14 08:24:421575 }, {
[email protected]14339762011-04-05 07:36:581576 'defines': [
1577 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1578 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1579 ],
[email protected]92822e82009-09-18 14:26:561580 }],
[email protected]7e0d664a2009-12-03 21:07:471581 ['win_use_allocator_shim==0', {
1582 'defines': ['NO_TCMALLOC'],
1583 }],
[email protected]bb05e452009-10-29 21:24:561584 ['OS=="linux"', {
1585 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001586 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561587 ],
1588 }],
[email protected]2f80c312009-02-25 21:26:551589 ],
1590 },
[email protected]5153767c2009-12-22 01:52:501591 #
1592 # Concrete configurations
1593 #
1594 'Debug': {
1595 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1596 },
1597 'Release': {
1598 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1599 'conditions': [
1600 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161601 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501602 }],
1603 ]
1604 },
[email protected]f926fa0a2009-08-04 22:50:131605 'conditions': [
1606 [ 'OS=="win"', {
1607 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501608 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501609 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301610 },
1611 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501612 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301613 },
[email protected]f926fa0a2009-08-04 22:50:131614 }],
1615 ],
[email protected]2f80c312009-02-25 21:26:551616 },
1617 },
1618 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341619 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261620 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271621 # Enable -Werror by default, but put it in a variable so it can
1622 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1623 'variables': {
[email protected]cbbb3472012-01-25 18:32:311624 'werror%': '-Werror',
[email protected]5315f2842009-04-28 00:43:271625 },
[email protected]6863896f2012-01-25 17:51:361626 'defines': [
1627 '_FILE_OFFSET_BITS=64',
1628 ],
[email protected]9d384032009-03-20 23:13:261629 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161630 '<(werror)', # See note above about the werror variable.
1631 '-pthread',
1632 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291633 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161634 '-Wall',
[email protected]0fa17082010-03-26 00:48:051635 # TODO(evan): turn this back on once all the builds work.
1636 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201637 # Don't warn about unused function params. We use those everywhere.
1638 '-Wno-unused-parameter',
1639 # Don't warn about the "struct foo f = {0};" initialization pattern.
1640 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121641 # Don't export any symbols (for example, to plugins we dlopen()).
1642 # Note: this is *required* to make some plugins work.
1643 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351644 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241645 ],
1646 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221647 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241648 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361649 # Make inline functions have hidden visiblity by default.
1650 # Surprisingly, not covered by -fvisibility=hidden.
1651 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171652 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1653 # so we specify it explicitly.
1654 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181655 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171656 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261657 ],
[email protected]a6cf87e2009-04-03 04:07:381658 'ldflags': [
[email protected]138241f2010-03-30 23:53:101659 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261660 ],
[email protected]3aacaf952009-04-02 15:34:091661 'configurations': {
[email protected]5153767c2009-12-22 01:52:501662 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311663 'variables': {
1664 'debug_optimize%': '0',
1665 },
[email protected]3aacaf952009-04-02 15:34:091666 'defines': [
1667 '_DEBUG',
1668 ],
1669 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041670 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091671 '-g',
1672 ],
[email protected]da1c8d692011-09-20 20:35:011673 'conditions' : [
1674 ['OS=="android"', {
1675 'cflags': [
1676 '-fno-omit-frame-pointer',
1677 ],
1678 }],
1679 ],
1680 'target_conditions' : [
1681 ['_toolset=="target"', {
1682 'conditions': [
1683 ['OS=="android" and debug_optimize==0', {
1684 'cflags': [
1685 '-mlong-calls', # Needed when compiling with -O0
1686 ],
1687 }],
1688 ['arm_thumb==1', {
1689 'cflags': [
1690 '-marm',
1691 ],
1692 }],
1693 ],
1694 }],
1695 ],
[email protected]5315f2842009-04-28 00:43:271696 },
[email protected]5153767c2009-12-22 01:52:501697 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011698 'variables': {
1699 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511700 # Binaries become big and gold is unable to perform GC
1701 # and remove unused sections for some of test targets
1702 # on 32 bit platform.
1703 # (This is currently observed only in chromeos valgrind bots)
1704 # The following flag is to disable --gc-sections linker
1705 # option for these bots.
1706 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121707
1708 # TODO(bradnelson): reexamine how this is done if we change the
1709 # expansion of configurations
1710 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011711 },
[email protected]3aacaf952009-04-02 15:34:091712 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041713 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531714 # Don't emit the GCC version ident directives, they just end up
1715 # in the .comment section taking up binary size.
1716 '-fno-ident',
1717 # Put data and code in their own sections, so that unused symbols
1718 # can be removed at link time with --gc-sections.
1719 '-fdata-sections',
1720 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091721 ],
[email protected]c902f2cba2010-08-06 20:04:181722 'ldflags': [
1723 # Specifically tell the linker to perform optimizations.
1724 # See http://lwn.net/Articles/192624/ .
1725 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221726 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181727 ],
[email protected]1dd529642010-05-15 01:02:511728 'conditions' : [
1729 ['no_gc_sections==0', {
1730 'ldflags': [
1731 '-Wl,--gc-sections',
1732 ],
1733 }],
[email protected]da1c8d692011-09-20 20:35:011734 ['OS=="android"', {
1735 'cflags': [
1736 '-fomit-frame-pointer',
1737 ],
1738 }],
[email protected]ecf7b6482010-10-13 09:15:201739 ['clang==1', {
1740 'cflags!': [
1741 '-fno-ident',
1742 ],
1743 }],
[email protected]7664ab32011-02-01 23:35:251744 ['profiling==1', {
1745 'cflags': [
1746 '-fno-omit-frame-pointer',
1747 '-g',
1748 ],
1749 }],
[email protected]8d726a42012-02-09 03:49:001750 ],
[email protected]3aacaf952009-04-02 15:34:091751 },
1752 },
[email protected]601b540222009-04-03 21:32:041753 'variants': {
1754 'coverage': {
1755 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1756 'ldflags': ['-fprofile-arcs'],
1757 },
1758 'profile': {
1759 'cflags': ['-pg', '-g'],
1760 'ldflags': ['-pg'],
1761 },
1762 'symbols': {
1763 'cflags': ['-g'],
1764 },
1765 },
[email protected]606116d22009-05-06 22:38:231766 'conditions': [
[email protected]04b482602011-09-14 02:36:211767 ['target_arch=="ia32"', {
1768 'target_conditions': [
1769 ['_toolset=="target"', {
1770 'asflags': [
1771 # Needed so that libs with .s files (e.g. libicudata.a)
1772 # are compatible with the general 32-bit-ness.
1773 '-32',
1774 ],
1775 # All floating-point computations on x87 happens in 80-bit
1776 # precision. Because the C and C++ language standards allow
1777 # the compiler to keep the floating-point values in higher
1778 # precision than what's specified in the source and doing so
1779 # is more efficient than constantly rounding up to 64-bit or
1780 # 32-bit precision as specified in the source, the compiler,
1781 # especially in the optimized mode, tries very hard to keep
1782 # values in x87 floating-point stack (in 80-bit precision)
1783 # as long as possible. This has important side effects, that
1784 # the real value used in computation may change depending on
1785 # how the compiler did the optimization - that is, the value
1786 # kept in 80-bit is different than the value rounded down to
1787 # 64-bit or 32-bit. There are possible compiler options to
1788 # make this behavior consistent (e.g. -ffloat-store would keep
1789 # all floating-values in the memory, thus force them to be
1790 # rounded to its original precision) but they have significant
1791 # runtime performance penalty.
1792 #
1793 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1794 # which keep floating-point values in SSE registers in its
1795 # native precision (32-bit for single precision, and 64-bit
1796 # for double precision values). This means the floating-point
1797 # value used during computation does not change depending on
1798 # how the compiler optimized the code, since the value is
1799 # always kept in its specified precision.
1800 'conditions': [
1801 ['branding=="Chromium" and disable_sse2==0', {
1802 'cflags': [
1803 '-march=pentium4',
1804 '-msse2',
1805 '-mfpmath=sse',
1806 ],
1807 }],
1808 # ChromeOS targets Pinetrail, which is sse3, but most of the
1809 # benefit comes from sse2 so this setting allows ChromeOS
1810 # to build on other CPUs. In the future -march=atom would
1811 # help but requires a newer compiler.
1812 ['chromeos==1 and disable_sse2==0', {
1813 'cflags': [
1814 '-msse2',
1815 ],
1816 }],
1817 # Install packages have started cropping up with
1818 # different headers between the 32-bit and 64-bit
1819 # versions, so we have to shadow those differences off
1820 # and make sure a 32-bit-on-64-bit build picks up the
1821 # right files.
1822 ['host_arch!="ia32"', {
1823 'include_dirs+': [
1824 '/usr/include32',
1825 ],
1826 }],
1827 ],
1828 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1829 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061830 'cflags': [
[email protected]04b482602011-09-14 02:36:211831 '-m32',
1832 '-mmmx',
1833 ],
1834 'ldflags': [
1835 '-m32',
[email protected]ffde7932009-05-29 00:39:061836 ],
1837 }],
[email protected]606116d22009-05-06 22:38:231838 ],
1839 }],
[email protected]3dda8a962009-08-10 18:58:071840 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291841 'target_conditions': [
1842 ['_toolset=="target"', {
1843 'cflags_cc': [
1844 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1845 # has changed whenever it encounters a varargs function. This
1846 # silences those warnings, as they are not helpful and
1847 # clutter legitimate warnings.
1848 '-Wno-abi',
1849 ],
1850 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011851 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291852 'cflags': [
1853 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291854 ]
1855 }],
1856 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251857 'cflags': [
1858 '-march=armv7-a',
1859 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251860 '-mfloat-abi=softfp',
1861 ],
[email protected]eafc0b452010-02-26 21:53:431862 'conditions': [
1863 ['arm_neon==1', {
1864 'cflags': [ '-mfpu=neon', ],
1865 }, {
[email protected]53e0f642010-03-05 01:41:561866 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431867 }]
1868 ],
[email protected]dc9711f2009-11-13 19:30:251869 }],
[email protected]da1c8d692011-09-20 20:35:011870 ['OS=="android"', {
1871 # The following flags are derived from what Android uses
1872 # by default when building for arm.
1873 'cflags': [ '-Wno-psabi', ],
1874 'conditions': [
1875 ['arm_thumb == 1', {
1876 # Android toolchain doesn't support -mimplicit-it=thumb
1877 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1878 'cflags': [ '-mthumb-interwork', ],
1879 }],
1880 ['armv7==0', {
1881 # Flags suitable for Android emulator
1882 'cflags': [
1883 '-march=armv5te',
1884 '-mtune=xscale',
1885 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:361886 ],
1887 'defines': [
1888 '__ARM_ARCH_5__',
1889 '__ARM_ARCH_5T__',
1890 '__ARM_ARCH_5E__',
1891 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:011892 ],
1893 }],
1894 ],
1895 }],
[email protected]3dda8a962009-08-10 18:58:071896 ],
1897 }],
1898 ],
1899 }],
[email protected]2fb843b2010-08-12 02:11:081900 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581901 'cflags': [
1902 '-fPIC',
1903 ],
[email protected]d3f692b32011-12-14 19:04:351904 'ldflags': [
1905 '-fPIC',
1906 ],
[email protected]c76723a2010-01-25 23:10:581907 }],
[email protected]ee28c9f2009-09-04 01:53:011908 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571909 'target_conditions': [
1910 ['_toolset=="target"', {
1911 'cflags': [
1912 '--sysroot=<(sysroot)',
1913 ],
1914 'ldflags': [
1915 '--sysroot=<(sysroot)',
1916 ],
1917 }]]
[email protected]ee28c9f2009-09-04 01:53:011918 }],
[email protected]58680ce2010-09-18 00:09:151919 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121920 'cflags': [
1921 '-Wheader-hygiene',
1922 # Clang spots more unused functions.
1923 '-Wno-unused-function',
1924 # Don't die on dtoa code that uses a char as an array index.
1925 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331926 # Especially needed for gtest macros using enum values from Mac
1927 # system headers.
1928 # TODO(pkasting): In C++11 this is legal, so this should be
1929 # removed when we change to that. (This is also why we don't
1930 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121931 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:301932 # WebKit uses nullptr in a legit way, other that that this warning
1933 # doesn't fire.
1934 '-Wno-c++11-compat',
1935 # This (rightyfully) complains about 'override', which we use
1936 # heavily.
1937 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:101938
1939 # Warns on switches on enums that cover all enum values but
1940 # also contain a default: branch. Chrome is full of that.
1941 '-Wno-covered-switch-default',
1942
1943 # TODO(thakis): Reenable once this no longer complains about
1944 # Invalid() in gmocks's gmock-internal-utils.h
1945 # http://crbug.com/111806
1946 '-Wno-null-dereference',
[email protected]18ca15a2011-08-10 03:07:121947 ],
1948 'cflags!': [
1949 # Clang doesn't seem to know know this flag.
1950 '-mfpmath=sse',
1951 ],
[email protected]58680ce2010-09-18 00:09:151952 }],
[email protected]5d451ad2011-02-11 16:43:461953 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261954 'cflags': [
1955 '<(clang_chrome_plugins_flags)',
1956 ],
[email protected]5d451ad2011-02-11 16:43:461957 }],
[email protected]4a9ac22e2011-12-02 03:41:531958 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:261959 'cflags': [
1960 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:531961 ],
1962 }],
1963 ['clang==1 and clang_add_plugin!=""', {
1964 'cflags': [
[email protected]d23720682011-08-11 00:16:261965 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1966 ],
[email protected]5e781232011-01-28 02:57:591967 }],
[email protected]2616d45d2012-01-19 03:15:481968 ['clang==1 and "<(GENERATOR)"=="ninja"', {
1969 'cflags': [
1970 # See http://crbug.com/110262
1971 '-fcolor-diagnostics',
1972 ],
1973 }],
[email protected]92799b632011-08-15 14:33:061974 ['asan==1', {
[email protected]92799b632011-08-15 14:33:061975 'cflags': [
[email protected]6a4cad02011-11-25 07:26:561976 '-faddress-sanitizer',
[email protected]0ac773032011-12-21 17:37:081977 '-fno-omit-frame-pointer',
[email protected]74a26d72011-09-29 17:29:031978 '-w',
[email protected]3cfa96a62012-02-28 07:27:581979 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]92799b632011-08-15 14:33:061980 ],
1981 'ldflags': [
[email protected]6a4cad02011-11-25 07:26:561982 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:061983 ],
[email protected]921c7b52011-11-25 10:34:351984 'defines': [
1985 'ADDRESS_SANITIZER',
1986 ],
[email protected]92799b632011-08-15 14:33:061987 }],
[email protected]cbd5fd52009-08-26 00:14:271988 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171989 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271990 'defines': ['USE_LINUX_BREAKPAD'],
1991 }],
[email protected]d8b60602010-03-26 09:41:221992 ['linux_use_heapchecker==1', {
1993 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:401994 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:221995 }],
[email protected]61a9b2d82010-02-26 00:31:081996 ['linux_use_tcmalloc==0', {
1997 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241998 }],
[email protected]64e2d4a42010-08-27 10:13:211999 ['linux_keep_shadow_stacks==1', {
2000 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a74202012-02-23 19:10:512001 'cflags': [
2002 '-finstrument-functions',
2003 # Allow mmx intrinsics to inline, so that the compiler can expand
2004 # the intrinsics.
2005 '-finstrument-functions-exclude-file-list=mmintrin.h',
2006 ],
[email protected]64e2d4a42010-08-27 10:13:212007 }],
[email protected]8d726a42012-02-09 03:49:002008 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172009 'ldflags': [
2010 # Experimentation found that using four linking threads
2011 # saved ~20% of link time.
2012 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2013 '-Wl,--threads',
2014 '-Wl,--thread-count=4',
2015 ],
[email protected]8d726a42012-02-09 03:49:002016 'conditions': [
2017 ['release_valgrind_build==0', {
2018 'target_conditions': [
2019 ['_toolset=="target"', {
2020 'ldflags': [
2021 # There seems to be a conflict of --icf and -pie
2022 # in gold which can generate crashy binaries. As
2023 # a security measure, -pie takes precendence for
2024 # now.
2025 #'-Wl,--icf=safe',
2026 '-Wl,--icf=none',
2027 ],
2028 }],
2029 ],
2030 }],
2031 ],
2032 }],
[email protected]b07806c12012-02-03 22:44:592033 ['linux_use_gold_binary==1', {
2034 'variables': {
[email protected]516312d2012-02-28 05:17:262035 'conditions': [
2036 ['inside_chromium_build==1', {
2037 # We pass the path to gold to the compiler. gyp leaves
2038 # unspecified what the cwd is when running the compiler,
2039 # so the normal gyp path-munging fails us. This hack
2040 # gets the right path.
2041 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2042 }, {
2043 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2044 }]
2045 ]
[email protected]b07806c12012-02-03 22:44:592046 },
2047 'ldflags': [
2048 # Put our gold binary in the search path for the linker.
2049 '-B<(gold_path)',
2050 ],
2051 }],
[email protected]606116d22009-05-06 22:38:232052 ],
[email protected]9d384032009-03-20 23:13:262053 },
2054 }],
[email protected]c51e8d52009-12-11 20:04:062055 # FreeBSD-specific options; note that most FreeBSD options are set above,
2056 # with Linux.
2057 ['OS=="freebsd"', {
2058 'target_defaults': {
2059 'ldflags': [
2060 '-Wl,--no-keep-memory',
2061 ],
2062 },
2063 }],
[email protected]da1c8d692011-09-20 20:35:012064 # Android-specific options; note that most are set above with Linux.
2065 ['OS=="android"', {
2066 'variables': {
2067 'android_target_arch%': 'arm', # target_arch in android terms.
2068 'conditions': [
2069 # Android uses x86 instead of ia32 for their target_arch designation.
2070 ['target_arch=="ia32"', {
2071 'android_target_arch%': 'x86',
2072 }],
2073 # Use shared stlport library when system one used.
2074 # Figure this out early since it needs symbols from libgcc.a, so it
2075 # has to be before that in the set of libraries.
2076 ['use_system_stlport==1', {
2077 'android_stlport_library': 'stlport',
2078 }, {
2079 'android_stlport_library': 'stlport_static',
2080 }],
2081 ],
2082
2083 # Placing this variable here prevents from forking libvpx, used
2084 # by remoting. Remoting is off, so it needn't built,
2085 # so forking it's deps seems like overkill.
2086 # But this variable need defined to properly run gyp.
2087 # A proper solution is to have an OS==android conditional
2088 # in third_party/libvpx/libvpx.gyp to define it.
2089 'libvpx_path': 'lib/linux/arm',
2090 },
2091 'target_defaults': {
2092 # Build a Release build by default to match Android build behavior.
2093 # This is typical with Android because Debug builds tend to be much
2094 # larger and run very slowly on constrained devices. It is still
2095 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2096 # 'make' command line.
2097 'default_configuration': 'Release',
2098
2099 'variables': {
2100 'release_extra_cflags%': '',
2101 },
2102
2103 'target_conditions': [
2104 # Settings for building device targets using Android's toolchain.
2105 # These are based on the setup.mk file from the Android NDK.
2106 #
2107 # The NDK Android executable link step looks as follows:
2108 # $LDFLAGS
2109 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2110 # $(PRIVATE_OBJECTS) <-- The .o that we built
2111 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2112 # $(TARGET_LIBGCC) <-- libgcc.a
2113 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2114 # $(PRIVATE_LDLIBS) <-- System .so
2115 # $(TARGET_CRTEND_O) <-- crtend.o
2116 #
2117 # For now the above are approximated for executables by adding
2118 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2119 # of 'libraries'.
2120 #
2121 # The NDK Android shared library link step looks as follows:
2122 # $LDFLAGS
2123 # $(PRIVATE_OBJECTS) <-- The .o that we built
2124 # -l,--whole-archive
2125 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2126 # -l,--no-whole-archive
2127 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2128 # $(TARGET_LIBGCC) <-- libgcc.a
2129 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2130 # $(PRIVATE_LDLIBS) <-- System .so
2131 #
2132 # For now, assume not need any whole static libs.
2133 #
2134 # For both executables and shared libraries, add the proper
2135 # libgcc.a to the start of libraries which puts it in the
2136 # proper spot after .o and .a files get linked in.
2137 #
2138 # TODO: The proper thing to do longer-tem would be proper gyp
2139 # support for a custom link command line.
2140 ['_toolset=="target"', {
2141 'cflags!': [
2142 '-pthread', # Not supported by Android toolchain.
2143 ],
2144 'cflags': [
2145 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2146 '-ffunction-sections',
2147 '-funwind-tables',
2148 '-g',
2149 '-fstack-protector',
2150 '-fno-short-enums',
2151 '-finline-limit=64',
2152 '-Wa,--noexecstack',
2153 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2154 '<@(release_extra_cflags)',
2155 # Note: This include is in cflags to ensure that it comes after
2156 # all of the includes.
2157 '-I<(android_ndk_include)',
2158 ],
2159 'defines': [
2160 'ANDROID',
2161 '__GNU_SOURCE=1', # Necessary for clone()
2162 'USE_STLPORT=1',
2163 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2164 'HAVE_OFF64_T',
2165 'HAVE_SYS_UIO_H',
2166 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2167 ],
2168 'ldflags!': [
2169 '-pthread', # Not supported by Android toolchain.
2170 ],
2171 'ldflags': [
2172 '-nostdlib',
2173 '-Wl,--no-undefined',
2174 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2175 # Don't export symbols from statically linked libraries.
2176 '-Wl,--exclude-libs=ALL',
2177 ],
[email protected]a0e48b02011-11-22 07:53:012178 'libraries': [
2179 '-l<(android_stlport_library)',
2180 # Manually link the libgcc.a that the cross compiler uses.
2181 '<!($CROSS_CC -print-libgcc-file-name)',
2182 '-lc',
2183 '-ldl',
2184 '-lstdc++',
2185 '-lm',
[email protected]da1c8d692011-09-20 20:35:012186 ],
2187 'conditions': [
2188 ['android_build_type==0', {
2189 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522190 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012191 ],
2192 }],
2193 # NOTE: The stlport header include paths below are specified in
2194 # cflags rather than include_dirs because they need to come
2195 # after include_dirs. Think of them like system headers, but
2196 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2197 # toolchain (circa Gingerbread) will exhibit strange errors.
2198 # The include ordering here is important; change with caution.
2199 ['use_system_stlport==0', {
2200 'cflags': [
2201 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2202 ],
2203 'conditions': [
2204 ['target_arch=="arm" and armv7==1', {
2205 'ldflags': [
2206 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2207 ],
2208 }],
2209 ['target_arch=="arm" and armv7==0', {
2210 'ldflags': [
2211 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2212 ],
2213 }],
2214 ['target_arch=="ia32"', {
2215 'ldflags': [
2216 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2217 ],
2218 }],
2219 ],
2220 }],
2221 ['target_arch=="ia32"', {
2222 # The x86 toolchain currently has problems with stack-protector.
2223 'cflags!': [
2224 '-fstack-protector',
2225 ],
2226 'cflags': [
2227 '-fno-stack-protector',
2228 ],
2229 }],
2230 ],
2231 'target_conditions': [
2232 ['_type=="executable"', {
2233 'ldflags': [
2234 '-Bdynamic',
2235 '-Wl,-dynamic-linker,/system/bin/linker',
2236 '-Wl,--gc-sections',
2237 '-Wl,-z,nocopyreloc',
2238 # crtbegin_dynamic.o should be the last item in ldflags.
2239 '<(android_ndk_lib)/crtbegin_dynamic.o',
2240 ],
2241 'libraries': [
2242 # crtend_android.o needs to be the last item in libraries.
2243 # Do not add any libraries after this!
2244 '<(android_ndk_lib)/crtend_android.o',
2245 ],
2246 }],
2247 ['_type=="shared_library"', {
2248 'ldflags': [
2249 '-Wl,-shared,-Bsymbolic',
2250 ],
2251 }],
2252 ],
2253 }],
2254 # Settings for building host targets using the system toolchain.
2255 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122256 'cflags!': [
2257 # Due to issues in Clang build system, using ASan on 32-bit
2258 # binaries on x86_64 host is problematic.
2259 # TODO(eugenis): re-enable.
2260 '-faddress-sanitizer',
2261 ],
[email protected]da1c8d692011-09-20 20:35:012262 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122263 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012264 '-Wl,-z,noexecstack',
2265 '-Wl,--gc-sections',
2266 '-Wl,-O1',
2267 '-Wl,--as-needed',
2268 ],
[email protected]965b6b22011-09-29 16:07:282269 'sources/': [
2270 ['exclude', '_android(_unittest)?\\.cc$'],
2271 ['exclude', '(^|/)android/']
2272 ],
[email protected]da1c8d692011-09-20 20:35:012273 }],
2274 ],
2275 },
2276 }],
[email protected]93f21e42010-04-01 00:35:152277 ['OS=="solaris"', {
2278 'cflags!': ['-fvisibility=hidden'],
2279 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2280 }],
[email protected]2f80c312009-02-25 21:26:552281 ['OS=="mac"', {
2282 'target_defaults': {
[email protected]24700642009-06-01 16:01:202283 'variables': {
[email protected]162407f2011-09-08 15:33:172284 # These should end with %, but there seems to be a bug with % in
2285 # variables that are intended to be set to different values in
2286 # different targets, like these.
2287 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202288 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382289 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202290 },
[email protected]d92c7c012009-03-19 19:26:422291 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552292 'xcode_settings': {
2293 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042294 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2295 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2296 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2297 # (Equivalent to -fPIC)
2298 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2299 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2300 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252301 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2302 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042303 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2304 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2305 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2306 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552307 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042308 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252309 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2310 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112311 # Keep pch files below xcodebuild/.
2312 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552313 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192314 'OTHER_CFLAGS': [
2315 '-fno-strict-aliasing', # See http://crbug.com/32204
2316 ],
[email protected]080e86f2010-06-21 15:19:042317 'WARNING_CFLAGS': [
2318 '-Wall',
2319 '-Wendif-labels',
2320 '-Wextra',
2321 # Don't warn about unused function parameters.
2322 '-Wno-unused-parameter',
2323 # Don't warn about the "struct foo f = {0};" initialization
2324 # pattern.
2325 '-Wno-missing-field-initializers',
2326 ],
[email protected]b3fb8092009-03-12 19:09:242327 'conditions': [
2328 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592329 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2330 ],
[email protected]66733172010-09-22 00:09:282331 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302332 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2333 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382334
[email protected]6c648f12011-12-24 07:50:432335 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2336 # when buliding with clang. This warning is triggered when the
2337 # override keyword is used via the OVERRIDE macro from
2338 # base/compiler_specific.h.
2339 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382340
[email protected]34f40892011-09-06 21:53:302341 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282342 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072343 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282344 # Don't die on dtoa code that uses a char as an array index.
2345 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2346 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452347 # Clang spots more unused functions.
2348 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332349 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052350 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302351 # WebKit uses nullptr in a legit way, other that that this
2352 # warning doesn't fire.
2353 '-Wno-c++0x-compat',
2354 # This (rightyfully) complains about 'override', which we use
2355 # heavily.
2356 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102357
2358 # Warns on switches on enums that cover all enum values but
2359 # also contain a default: branch. Chrome is full of that.
2360 '-Wno-covered-switch-default',
2361
2362 # TODO(thakis): Reenable once this no longer complains about
2363 # Invalid() in gmock's gmock-internal-utils.h
2364 # http://crbug.com/111806
2365 '-Wno-null-dereference',
[email protected]66733172010-09-22 00:09:282366 ],
2367 }],
[email protected]5d451ad2011-02-11 16:43:462368 ['clang==1 and clang_use_chrome_plugins==1', {
2369 'OTHER_CFLAGS': [
2370 '<(clang_chrome_plugins_flags)',
2371 ],
2372 }],
[email protected]4a9ac22e2011-12-02 03:41:532373 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592374 'OTHER_CFLAGS': [
2375 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532376 ],
2377 }],
2378 ['clang==1 and clang_add_plugin!=""', {
2379 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592380 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2381 ],
2382 }],
[email protected]2616d45d2012-01-19 03:15:482383 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2384 'OTHER_CFLAGS': [
2385 # See http://crbug.com/110262
2386 '-fcolor-diagnostics',
2387 ],
2388 }],
[email protected]b3fb8092009-03-12 19:09:242389 ],
[email protected]2f80c312009-02-25 21:26:552390 },
[email protected]34f40892011-09-06 21:53:302391 'conditions': [
2392 ['clang==1', {
2393 'variables': {
2394 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2395 },
2396 }],
[email protected]921c7b52011-11-25 10:34:352397 ['asan==1', {
2398 'xcode_settings': {
2399 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352400 '-faddress-sanitizer',
2401 '-w',
[email protected]3cfa96a62012-02-28 07:27:582402 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]921c7b52011-11-25 10:34:352403 ],
2404 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352405 '-faddress-sanitizer',
2406 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372407 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352408 # on the prior OS X versions. Because Chromium is currently
2409 # targeting 10.5.0, we need to explicitly mark these
2410 # symbols as dynamic_lookup.
2411 '-Wl,-U,_malloc_default_purgeable_zone',
2412 '-Wl,-U,_malloc_zone_memalign',
2413 '-Wl,-U,_dispatch_sync_f',
2414 '-Wl,-U,_dispatch_async_f',
2415 '-Wl,-U,_dispatch_barrier_async_f',
2416 '-Wl,-U,_dispatch_group_async_f',
2417 '-Wl,-U,_dispatch_after_f',
2418 ],
2419 },
2420 'defines': [
2421 'ADDRESS_SANITIZER',
2422 ],
2423 }],
[email protected]34f40892011-09-06 21:53:302424 ],
[email protected]2f80c312009-02-25 21:26:552425 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552426 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462427 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2428 }],
2429 ['_mac_bundle', {
2430 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082431 }],
[email protected]6303fed2011-08-11 01:12:102432 ['_type=="executable"', {
2433 'postbuilds': [
2434 {
2435 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362436 # code execution when running on Mac OS X 10.7 ("Lion"), and
2437 # ensures that the position-independent executable (PIE) bit
2438 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102439 'variables': {
[email protected]8c40f322011-08-24 03:33:362440 # Define change_mach_o_flags in a variable ending in _path
2441 # so that GYP understands it's a path and performs proper
2442 # relativization during dict merging.
2443 'change_mach_o_flags_path':
2444 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172445 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132446 ],
2447 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172448 ['mac_pie==0 or release_valgrind_build==1', {
2449 # Don't enable PIE if it's unwanted. It's unwanted if
2450 # the target specifies mac_pie=0 or if building for
2451 # Valgrind, because Valgrind doesn't understand slide.
2452 # See the similar mac_pie/release_valgrind_build check
2453 # below.
[email protected]081c0342011-08-24 14:59:132454 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132455 '--no-pie',
2456 ],
2457 }],
2458 ],
[email protected]6303fed2011-08-11 01:12:102459 },
[email protected]8c40f322011-08-24 03:33:362460 'postbuild_name': 'Change Mach-O Flags',
2461 'action': [
2462 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132463 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362464 ],
[email protected]6303fed2011-08-11 01:12:102465 },
2466 ],
[email protected]5a5d97aa2011-09-02 15:34:002467 'conditions': [
2468 ['asan==1', {
2469 'variables': {
2470 'asan_saves_file': 'asan.saves',
2471 },
2472 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562473 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002474 },
2475 }],
2476 ],
[email protected]162407f2011-09-08 15:33:172477 'target_conditions': [
2478 ['mac_pie==1 and release_valgrind_build==0', {
2479 # Turn on position-independence (ASLR) for executables. When
2480 # PIE is on for the Chrome executables, the framework will
2481 # also be subject to ASLR.
2482 # Don't do this when building for Valgrind, because Valgrind
2483 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2484 # understand slide, and get rid of the Valgrind check.
2485 'xcode_settings': {
2486 'OTHER_LDFLAGS': [
2487 '-Wl,-pie', # Position-independent executable (MH_PIE)
2488 ],
2489 },
2490 }],
2491 ],
[email protected]6a0242bc2011-07-01 00:34:462492 }],
[email protected]9a5e72862010-09-02 16:16:582493 ['(_type=="executable" or _type=="shared_library" or \
2494 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202495 'target_conditions': [
2496 ['mac_real_dsym == 1', {
2497 # To get a real .dSYM bundle produced by dsymutil, set the
2498 # debug information format to dwarf-with-dsym. Since
2499 # strip_from_xcode will not be used, set Xcode to do the
2500 # stripping as well.
2501 'configurations': {
[email protected]5153767c2009-12-22 01:52:502502 'Release_Base': {
[email protected]24700642009-06-01 16:01:202503 'xcode_settings': {
2504 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2505 'DEPLOYMENT_POSTPROCESSING': 'YES',
2506 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072507 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252508 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072509 # The Xcode default is to strip debugging symbols
2510 # only (-S). Local symbols should be stripped as
2511 # well, which will be handled by -x. Xcode will
2512 # continue to insert -S when stripping even when
2513 # additional flags are added with STRIPFLAGS.
2514 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252515 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072516 ], # target_conditions
2517 }, # xcode_settings
2518 }, # configuration "Release"
2519 }, # configurations
[email protected]24700642009-06-01 16:01:202520 }, { # mac_real_dsym != 1
2521 # To get a fast fake .dSYM bundle, use a post-build step to
2522 # produce the .dSYM and strip the executable. strip_from_xcode
2523 # only operates in the Release configuration.
2524 'postbuilds': [
2525 {
2526 'variables': {
2527 # Define strip_from_xcode in a variable ending in _path
2528 # so that gyp understands it's a path and performs proper
2529 # relativization during dict merging.
2530 'strip_from_xcode_path': 'mac/strip_from_xcode',
2531 },
2532 'postbuild_name': 'Strip If Needed',
2533 'action': ['<(strip_from_xcode_path)'],
2534 },
[email protected]e14a9f92009-08-05 19:26:072535 ], # postbuilds
2536 }], # mac_real_dsym
2537 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582538 }], # (_type=="executable" or _type=="shared_library" or
2539 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072540 ], # target_conditions
2541 }, # target_defaults
2542 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552543 ['OS=="win"', {
2544 'target_defaults': {
2545 'defines': [
[email protected]a89e0942011-09-26 16:06:472546 '_WIN32_WINNT=0x0601',
2547 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552548 'WIN32',
2549 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552550 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282551 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552552 '_CRT_RAND_S',
2553 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2554 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272555 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452556 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552557 ],
[email protected]8974e042010-06-21 18:06:522558 'conditions': [
[email protected]2212d272011-12-20 21:37:372559 ['buildtype=="Official"', {
2560 # In official builds, targets can self-select an optimization
2561 # level by defining a variable named 'optimize', and setting it
2562 # to one of
2563 # - "size", optimizes for minimal code size - the default.
2564 # - "speed", optimizes for speed over code size.
2565 # - "max", whole program optimization and link-time code
2566 # generation. This is very expensive and should be used
2567 # sparingly.
2568 'variables': {
2569 'optimize%': 'size',
2570 },
2571 'target_conditions': [
2572 ['optimize=="size"', {
2573 'msvs_settings': {
2574 'VCCLCompilerTool': {
2575 # 1, optimizeMinSpace, Minimize Size (/O1)
2576 'Optimization': '1',
2577 # 2, favorSize - Favor small code (/Os)
2578 'FavorSizeOrSpeed': '2',
2579 },
2580 },
2581 },
2582 ],
2583 ['optimize=="speed"', {
2584 'msvs_settings': {
2585 'VCCLCompilerTool': {
2586 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2587 'Optimization': '2',
2588 # 1, favorSpeed - Favor fast code (/Ot)
2589 'FavorSizeOrSpeed': '1',
2590 },
2591 },
2592 },
2593 ],
2594 ['optimize=="max"', {
2595 'msvs_settings': {
2596 'VCCLCompilerTool': {
2597 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2598 'Optimization': '2',
2599 # 1, favorSpeed - Favor fast code (/Ot)
2600 'FavorSizeOrSpeed': '1',
2601 # This implies link time code generation.
2602 'WholeProgramOptimization': 'true',
2603 },
2604 },
2605 },
2606 ],
2607 ],
2608 },
2609 ],
[email protected]8974e042010-06-21 18:06:522610 ['component=="static_library"', {
2611 'defines': [
2612 '_HAS_EXCEPTIONS=0',
2613 ],
2614 }],
[email protected]3e2648a2011-03-21 20:58:502615 ['secure_atl', {
2616 'defines': [
2617 '_SECURE_ATL',
2618 ],
2619 }],
[email protected]8974e042010-06-21 18:06:522620 ],
[email protected]5b5ca7cb2009-07-20 23:00:202621 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372622 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542623 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552624 '$(VSInstallDir)/VC/atlmfc/include',
2625 ],
[email protected]a8d99cef2009-08-26 20:47:492626 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112627 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2628 # TODO(maruel): These warnings are level 4. They will be slowly
2629 # removed as code is fixed.
2630 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2631 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2632 4702, 4706,
2633 ],
[email protected]2f80c312009-02-25 21:26:552634 'msvs_settings': {
2635 'VCCLCompilerTool': {
2636 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552637 'BufferSecurityCheck': 'true',
2638 'EnableFunctionLevelLinking': 'true',
2639 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112640 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552641 'WarnAsError': 'true',
2642 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582643 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502644 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162645 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552646 }],
[email protected]3e2648a2011-03-21 20:58:502647 ['MSVS_VERSION=="2005e"', {
2648 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2649 }],
[email protected]8974e042010-06-21 18:06:522650 ['component=="shared_library"', {
2651 'ExceptionHandling': '1', # /EHsc
2652 }, {
2653 'ExceptionHandling': '0',
2654 }],
[email protected]3fef6e62009-07-31 19:58:582655 ],
[email protected]2f80c312009-02-25 21:26:552656 },
2657 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162658 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372659 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372660 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542661 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372662 ],
[email protected]2f80c312009-02-25 21:26:552663 },
2664 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552665 'AdditionalDependencies': [
2666 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502667 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552668 'version.lib',
2669 'msimg32.lib',
2670 'ws2_32.lib',
2671 'usp10.lib',
2672 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082673 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482674 'winmm.lib',
2675 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552676 ],
[email protected]4de39f82011-03-28 12:01:292677 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502678 ['msvs_express', {
2679 # Explicitly required when using the ATL with express
2680 'AdditionalDependencies': [
2681 'atlthunk.lib',
2682 ],
2683 }],
2684 ['MSVS_VERSION=="2005e"', {
2685 # Non-express versions link automatically to these
2686 'AdditionalDependencies': [
2687 'advapi32.lib',
2688 'comdlg32.lib',
2689 'ole32.lib',
2690 'shell32.lib',
2691 'user32.lib',
2692 'winspool.lib',
2693 ],
2694 }],
2695 ],
[email protected]a78da50e2010-06-09 21:31:372696 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372697 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542698 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372699 ],
[email protected]2f80c312009-02-25 21:26:552700 'GenerateDebugInformation': 'true',
2701 'MapFileName': '$(OutDir)\\$(TargetName).map',
2702 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552703 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482704 # SubSystem values:
2705 # 0 == not set
2706 # 1 == /SUBSYSTEM:CONSOLE
2707 # 2 == /SUBSYSTEM:WINDOWS
2708 # Most of the executables we'll ever create are tests
2709 # and utilities with console output.
2710 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552711 },
2712 'VCMIDLTool': {
2713 'GenerateStublessProxies': 'true',
2714 'TypeLibraryName': '$(InputName).tlb',
2715 'OutputDirectory': '$(IntDir)',
2716 'HeaderFileName': '$(InputName).h',
2717 'DLLDataFileName': 'dlldata.c',
2718 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2719 'ProxyFileName': '$(InputName)_p.c',
2720 },
2721 'VCResourceCompilerTool': {
2722 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382723 'AdditionalIncludeDirectories': [
2724 '<(DEPTH)',
2725 '<(SHARED_INTERMEDIATE_DIR)',
2726 ],
[email protected]2f80c312009-02-25 21:26:552727 },
2728 },
2729 },
2730 }],
[email protected]79e2336c2011-05-12 18:18:342731 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312732 'target_defaults': {
2733 'defines': [
2734 'DISABLE_NACL',
2735 ],
2736 },
2737 }],
[email protected]cfbf9bc2009-12-07 22:07:562738 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192739 'target_defaults': {
2740 'msvs_settings': {
2741 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192742 'DelayLoadDLLs': [
2743 'dbghelp.dll',
2744 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:012745 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:192746 'uxtheme.dll',
2747 ],
2748 },
2749 },
[email protected]ef4fa4072009-12-04 22:46:502750 'configurations': {
[email protected]5153767c2009-12-22 01:52:502751 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502752 'msvs_settings': {
2753 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162754 'AdditionalOptions': [
2755 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:332756 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162757 '/ignore:4199',
2758 '/ignore:4221',
2759 '/nxcompat',
2760 ],
[email protected]ef4fa4072009-12-04 22:46:502761 },
2762 },
2763 },
[email protected]5153767c2009-12-22 01:52:502764 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502765 'msvs_settings': {
2766 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162767 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502768 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:332769 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162770 '/ignore:4199',
2771 '/ignore:4221',
2772 '/nxcompat',
2773 ],
[email protected]ef4fa4072009-12-04 22:46:502774 },
2775 },
2776 },
2777 },
[email protected]48c7af72009-07-03 22:00:192778 },
2779 }],
[email protected]9821d0d2010-04-16 22:40:372780 ['enable_new_npdevice_api==1', {
2781 'target_defaults': {
2782 'defines': [
2783 'ENABLE_NEW_NPDEVICE_API',
2784 ],
2785 },
2786 }],
[email protected]34f40892011-09-06 21:53:302787 ['clang==1', {
2788 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242789 ['CC', '<(make_clang_dir)/bin/clang'],
2790 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072791 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302792 ['CC.host', '$(CC)'],
2793 ['CXX.host', '$(CXX)'],
2794 ['LINK.host', '$(LINK)'],
2795 ],
2796 }],
[email protected]2f80c312009-02-25 21:26:552797 ],
2798 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502799 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2800 # This block adds *project-wide* configuration settings to each project
2801 # file. It's almost always wrong to put things here. Specify your
2802 # custom xcode_settings in target_defaults to add them to targets instead.
2803
2804 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2805 # setting sets the SDK on a project-wide basis. In order to get the
2806 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2807 # here at the project level.
2808 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2809
[email protected]2f80c312009-02-25 21:26:552810 # The Xcode generator will look for an xcode_settings section at the root
2811 # of each dict and use it to apply settings on a file-wide basis. Most
2812 # settings should not be here, they should be in target-specific
2813 # xcode_settings sections, or better yet, should use non-Xcode-specific
2814 # settings in target dicts. SYMROOT is a special case, because many other
2815 # Xcode variables depend on it, including variables such as
2816 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2817 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2818 # files to appear (when present) in the UI as actual files and not red
2819 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2820 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162821 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552822 },
[email protected]ee28c9f2009-09-04 01:53:012823}