blob: c59f9316facf2004d1c707198e1090c8e0e5c695 [file] [log] [blame]
[email protected]cfa2e1102011-04-27 22:30:231# Copyright (c) 2011 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]3fa441d2011-09-18 17:28:5027 # Whether we are using Views Toolkit
28 'toolkit_views%': 0,
29
[email protected]9c8a1982011-05-24 23:08:5830 # Whether the compositor is enabled on views.
31 'views_compositor%': 0,
[email protected]7de46352011-09-12 15:39:1932
[email protected]e599f0132011-08-24 19:03:3533 # Whether or not we are building with the Aura window manager.
[email protected]41423092011-08-25 15:39:5834 'use_aura%': 0,
[email protected]e0b85a52011-10-06 03:30:4235
36 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
37 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2738
39 # Disable Virtual keyboard support by default.
40 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4841
42 # Default setting for use_skia on mac platform.
43 # This is typically overridden in use_skia_on_mac.gypi.
44 'use_skia_on_mac%': 0,
[email protected]bb6aba32011-01-07 19:04:4345 },
46 # Copy conditionally-set variables out one scope.
47 'chromeos%': '<(chromeos)',
[email protected]9c8a1982011-05-24 23:08:5848 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:5849 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:4250 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2751 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]774e0612011-11-28 18:53:4852 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]e72e55b2011-01-06 22:19:3053
[email protected]e72e55b2011-01-06 22:19:3054 # Compute the architecture that we're building on.
55 'conditions': [
[email protected]177cd082011-10-04 18:36:3856 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3757 'host_arch%': 'ia32',
58 }, {
[email protected]79e2336c2011-05-12 18:18:3459 # This handles the Unix platforms for which there is some support.
60 # Anything else gets passed through, which probably won't work very
61 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3062 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3463 '<!(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:3064 }],
[email protected]bb6aba32011-01-07 19:04:4365
[email protected]023d8242011-11-22 01:25:2766 # Set default value of toolkit_views based on OS.
67 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4368 'toolkit_views%': 1,
69 }, {
70 'toolkit_views%': 0,
71 }],
[email protected]1b546692011-06-30 18:22:3072
[email protected]023d8242011-11-22 01:25:2773 # Use the views compositor when using the Aura window manager.
74 ['use_aura==1', {
[email protected]e599f0132011-08-24 19:03:3575 'views_compositor%': 1,
76 }],
[email protected]e736aa92011-12-07 19:13:1177
78 # Use the WebKit compositor for ui, when Aura is on.
79 ['use_aura==1', {
80 'use_webkit_compositor%': 1,
81 }, {
82 'use_webkit_compositor%': 0,
83 }],
[email protected]e72e55b2011-01-06 22:19:3084 ],
85 },
86
87 # Copy conditionally-set variables out one scope.
88 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:3089 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4390 'toolkit_views%': '<(toolkit_views)',
[email protected]9c8a1982011-05-24 23:08:5891 'views_compositor%': '<(views_compositor)',
[email protected]332749032011-10-22 00:32:4692 'use_webkit_compositor%': '<(use_webkit_compositor)',
[email protected]41423092011-08-25 15:39:5893 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:4294 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2795 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]774e0612011-11-28 18:53:4896 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]023d8242011-11-22 01:25:2797
[email protected]8fb0ef02011-05-20 00:53:5098 # We used to provide a variable for changing how libraries were built.
99 # This variable remains until we can clean up all the users.
100 # This needs to be one nested variables dict in so that dependent
101 # gyp files can make use of it in their outer variables. (Yikes!)
102 # http://code.google.com/p/chromium/issues/detail?id=83308
103 'library%': 'static_library',
104
[email protected]e14a9f92009-08-05 19:26:07105 # Override branding to select the desired branding flavor.
106 'branding%': 'Chromium',
107
108 # Override buildtype to select the desired build flavor.
109 # Dev - everyday build for development/testing
110 # Official - release build (generally implies additional processing)
111 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
112 # conversion is done), some of the things which are now controlled by
113 # 'branding', such as symbol generation, will need to be refactored based
114 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
115 # builds).
116 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27117
[email protected]e72e55b2011-01-06 22:19:30118 # Default architecture we're building for is the architecture we're
119 # building on.
120 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17121
[email protected]e72e55b2011-01-06 22:19:30122 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
123 # are built under a chromium full build (1) or a webkit.org chromium
124 # build (0).
125 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52126
[email protected]e72e55b2011-01-06 22:19:30127 # Set to 1 to enable fast builds. It disables debug info for fastest
128 # compilation.
129 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49130
[email protected]20960e072011-09-20 20:59:01131 # Set to 1 to enable dcheck in release without having to use the flag.
132 'dcheck_always_on%': 0,
133
[email protected]464750f2011-10-24 23:16:18134 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51135 'file_manager_extension%': 0,
136
[email protected]31736042011-12-09 09:48:10137 # Enable WebUI TaskManager by default.
138 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47139
[email protected]e72e55b2011-01-06 22:19:30140 # Python version.
[email protected]a43c5a02011-05-27 06:54:51141 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17142
[email protected]e72e55b2011-01-06 22:19:30143 # Set ARM-v7 compilation flags
144 'armv7%': 0,
145
146 # Set Neon compilation flags (only meaningful if armv7==1).
147 'arm_neon%': 1,
148
149 # The system root for cross-compiles. Default: none.
150 'sysroot%': '',
151
[email protected]945361a2011-09-30 04:38:43152 # The system libdir used for this ABI.
153 'system_libdir%': 'lib',
154
[email protected]e72e55b2011-01-06 22:19:30155 # On Linux, we build with sse2 for Chromium builds.
156 'disable_sse2%': 0,
157
158 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03159 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30160
161 # Variable 'component' is for cases where we would like to build some
162 # components as dynamic shared libraries but still need variable
163 # 'library' for static libraries.
164 # By default, component is set to whatever library is set to and
165 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53166 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30167
[email protected]bb6aba32011-01-07 19:04:43168 # Set to select the Title Case versions of strings in GRD files.
169 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21170
[email protected]98da0042011-02-02 00:10:27171 # Use translations provided by volunteers at launchpad.net. This
172 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19173 'use_third_party_translations%': 0,
174
[email protected]9a425422011-01-11 00:53:18175 # Remoting compilation is enabled by default. Set to 0 to disable.
176 'remoting%': 1,
177
[email protected]5834f4392011-09-13 20:06:17178 # Threaded compositing
179 'use_threaded_compositing%': 0,
180
[email protected]a026daa2011-04-20 15:49:51181 # P2P APIs are compiled in by default. Set to 0 to disable.
182 # Also note that this should be enabled for remoting to compile.
183 'p2p_apis%': 1,
184
[email protected]1ec68c42011-06-01 13:56:25185 # Configuration policy is enabled by default. Set to 0 to disable.
186 'configuration_policy%': 1,
187
[email protected]4b58e7d2011-07-11 10:22:56188 # Safe browsing is compiled in by default. Set to 0 to disable.
189 'safe_browsing%': 1,
190
[email protected]9eb100e2011-10-14 05:08:22191 # Speech input is compiled in by default. Set to 0 to disable.
192 'input_speech%': 1,
193
[email protected]7cce3232011-10-28 10:41:57194 # Notifications are compiled in by default. Set to 0 to disable.
195 'notifications%' : 1,
196
[email protected]5d451ad2011-02-11 16:43:46197 # If this is set, the clang plugins used on the buildbot will be used.
198 # Run tools/clang/scripts/update.sh to make sure they are compiled.
199 # This causes 'clang_chrome_plugins_flags' to be set.
200 # Has no effect if 'clang' is not set as well.
201 'clang_use_chrome_plugins%': 0,
202
[email protected]f36f3742011-11-21 13:12:14203 # Enable building with ASAN (Clang's -faddress-sanitizer option).
204 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06205 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
206 'asan%': 0,
207
[email protected]1ad5a7b2011-06-24 03:15:13208 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
209 # libraries on linux x86-64 and arm, plus ASLR.
210 'linux_fpic%': 1,
211
[email protected]c6a1f94172011-07-05 02:35:00212 # Enable navigator.registerProtocolHandler and supporting UI.
213 'enable_register_protocol_handler%': 1,
214
[email protected]62af76e2011-08-01 02:34:01215 # Enable Web Intents and supporting UI.
216 'enable_web_intents%': 0,
217
[email protected]dda90ae2011-07-19 22:07:48218 # Webrtc compilation is enabled by default. Set to 0 to disable.
219 'enable_webrtc%': 1,
220
[email protected]67c125d2011-10-11 18:58:22221 # PPAPI by default does not support plugins making calls off the main
222 # thread. Set to 1 to turn on experimental support for out-of-process
223 # plugins to make call of the main thread.
224 'enable_pepper_threading%': 0,
225
[email protected]f56797b2011-09-25 00:04:35226 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
227 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
228 # the input value also defines the required XI2 minor minimum version.
229 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
230 'use_xi2_mt%': 0,
231
[email protected]d5cf9fb2011-09-27 00:15:16232 # Use of precompiled headers on Windows is off by default
233 # because of complications that it can cause with our
234 # infrastructure (trybots etc.). Enable by setting to 1 in
235 # ~/.gyp/include.gypi or via the GYP command line for ~20-25%
236 # faster builds.
237 'chromium_win_pch%': 0,
238
[email protected]bb6aba32011-01-07 19:04:43239 'conditions': [
[email protected]33423fa2011-09-23 18:18:14240 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
241 # the 'conditions' clause. Initial attempts resulted in chromium and
242 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22243 ['OS=="mac"', {
[email protected]774e0612011-11-28 18:53:48244 'use_skia%': '<(use_skia_on_mac)',
[email protected]e4dbede82011-09-16 16:11:07245 # Mac uses clang by default, so turn on the plugin as well.
246 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22247 }, {
248 'use_skia%': 1,
249 }],
250
[email protected]79e2336c2011-05-12 18:18:34251 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37252 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34253 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37254 }, {
255 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34256 }],
257
[email protected]df9167b2011-11-14 19:15:25258 # A flag for BSD platforms
259 ['OS=="freebsd" or OS=="openbsd"', {
260 'os_bsd%': 1,
261 }, {
262 'os_bsd%': 0,
263 }],
264
[email protected]c329adf82011-10-05 14:34:57265 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42266 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57267 'use_nss%': 1,
268 }, {
269 'use_nss%': 0,
270 }],
[email protected]e0b85a52011-10-06 03:30:42271
[email protected]258dca42011-09-21 00:17:19272 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01273 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19274 'use_glib%': 0,
275 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34276 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37277 }, {
[email protected]258dca42011-09-21 00:17:19278 # TODO(dnicoara) Wayland build should have these disabled, but
279 # currently GTK and X is too spread and it's hard to completely
280 # remove every dependency.
281 'use_glib%': 1,
282 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37283 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34284 }],
[email protected]efadeacf2011-10-27 19:01:00285 # We always use skia text rendering in Aura on Windows, since GDI
286 # doesn't agree with our BackingStore.
287 # TODO(beng): remove once skia text rendering is on by default.
288 ['use_aura==1 and OS=="win"', {
289 'enable_skia_text%': 1,
290 }],
[email protected]258dca42011-09-21 00:17:19291 ['use_aura==1 and OS!="win"', {
[email protected]9d43e372011-09-22 19:39:52292 'toolkit_uses_gtk%': 0,
[email protected]9edeb712011-09-20 21:20:33293 }],
294
[email protected]63692212010-09-16 00:22:21295 # A flag to enable or disable our compile-time dependency
296 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
297 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49298 # for Linux distributions and for Aura.
299 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21300 'use_gnome_keyring%': 0,
301 }, {
302 'use_gnome_keyring%': 1,
303 }],
[email protected]0afe5212010-10-01 18:56:11304
[email protected]bb6aba32011-01-07 19:04:43305 ['toolkit_views==0 or OS=="mac"', {
306 # GTK+ and Mac wants Title Case strings
307 'use_titlecase_in_grd_files%': 1,
308 }],
309
[email protected]1b4209f2011-01-07 00:25:40310 # Enable some hacks to support Flapper only on Chrome OS.
311 ['chromeos==1', {
312 'enable_flapper_hacks%': 1,
313 }, {
314 'enable_flapper_hacks%': 0,
315 }],
[email protected]3d38d8e2011-04-16 20:48:51316
[email protected]8baf0dbb2011-11-27 22:47:02317 # Enable file manager extension on Chrome OS or Aura.
318 ['chromeos==1 or use_aura==1', {
[email protected]3d38d8e2011-04-16 20:48:51319 'file_manager_extension%': 1,
320 }, {
321 'file_manager_extension%': 0,
322 }],
[email protected]7de46352011-09-12 15:39:19323
[email protected]8baf0dbb2011-11-27 22:47:02324 # ... except on Windows even with Aura.
325 ['use_aura==1 and OS=="win"', {
326 'file_manager_extension%': 0,
327 }],
328
[email protected]31736042011-12-09 09:48:10329 # Enable WebUI TaskManager always on Chrome OS or Aura.
[email protected]023d8242011-11-22 01:25:27330 ['chromeos==1 or use_aura==1', {
[email protected]8b2e9f392011-08-05 04:00:47331 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47332 }],
333
[email protected]da1c8d692011-09-20 20:35:01334 ['OS=="android"', {
335 'proprietary_codecs%': 1,
336 'enable_webrtc%': 0,
337 }],
[email protected]839d5172011-10-13 17:18:11338
339 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27340 # on linux builds with the Aura window manager
[email protected]4b58d552011-10-26 00:54:46341 ['views_compositor==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33342 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11343 }, {
[email protected]1ee7c56c2011-10-19 14:51:33344 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11345 }],
[email protected]b3f23ba2010-04-26 22:58:17346 ],
[email protected]e14a9f92009-08-05 19:26:07347 },
348
[email protected]e72e55b2011-01-06 22:19:30349 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07350 'branding%': '<(branding)',
351 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27352 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59353 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50354 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44355 'toolkit_views%': '<(toolkit_views)',
[email protected]9c8a1982011-05-24 23:08:58356 'views_compositor%': '<(views_compositor)',
[email protected]1ee7c56c2011-10-19 14:51:33357 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]332749032011-10-22 00:32:46358 'use_webkit_compositor%': '<(use_webkit_compositor)',
[email protected]41423092011-08-25 15:39:58359 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:42360 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57361 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25362 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34363 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19364 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34365 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22366 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34367 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21368 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11369 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40370 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22371 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44372 'chromeos%': '<(chromeos)',
[email protected]2cc81d32011-10-04 17:03:18373 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]774e0612011-11-28 18:53:48374 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]f56797b2011-09-25 00:04:35375 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20376 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47377 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21378 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54379 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01380 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36381 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43382 'armv7%': '<(armv7)',
383 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23384 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43385 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22386 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52387 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43388 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17389 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18390 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17391 'use_threaded_compositing%': '<(use_threaded_compositing)',
[email protected]dda90ae2011-07-19 22:07:48392 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16393 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51394 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25395 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56396 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22397 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57398 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46399 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06400 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56401 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07402 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22403 # Whether to build for Wayland display server
404 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39405
[email protected]371e1092011-10-12 20:37:36406 # Use system yasm instead of bundled one.
407 'use_system_yasm%': 0,
408
[email protected]cf90a512011-10-08 00:00:44409 # Default to enabled PIE; this is important for ASLR but we need to be
410 # able to turn it off for remote debugging on Chromium OS
411 'linux_disable_pie%': 0,
412
[email protected]caa95c82009-11-23 22:39:32413 # The release channel that this build targets. This is used to restrict
414 # channel-specific build options, like which installer packages to create.
415 # The default is 'all', which does no channel-specific filtering.
416 'channel%': 'all',
417
[email protected]b3fb8092009-03-12 19:09:24418 # Override chromium_mac_pch and set it to 0 to suppress the use of
419 # precompiled headers on the Mac. Prefix header injection may still be
420 # used, but prefix headers will not be precompiled. This is useful when
421 # using distcc to distribute a build to compile slaves that don't
422 # share the same compiler executable as the system driving the compilation,
423 # because precompiled headers rely on pointers into a specific compiler
424 # executable's image. Setting this to 0 is needed to use an experimental
425 # Linux-Mac cross compiler distcc farm.
426 'chromium_mac_pch%': 1,
427
[email protected]3224dcd2009-09-16 17:31:25428 # Mac OS X SDK and deployment target support.
429 # The SDK identifies the version of the system headers that will be used,
430 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
431 # "Maximum allowed" refers to the operating system version whose APIs are
432 # available in the headers.
433 # The deployment target identifies the minimum system version that the
434 # built products are expected to function on. It corresponds to the
435 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
436 # To ensure these macros are available, #include <AvailabilityMacros.h>.
437 # Additional documentation on these macros is available at
438 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
439 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
440 # deployment target to 10.5. Other projects, such as O3D, may override
441 # these defaults.
442 'mac_sdk%': '10.5',
443 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59444
[email protected]f5ecbba12009-04-03 04:35:18445 # Set to 1 to enable code coverage. In addition to build changes
446 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
447 # project file called "coverage".
448 # Currently ignored on Windows.
449 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49450
[email protected]7477ea6f2009-12-22 23:28:15451 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47452 # environment variable, the libcmt shim it uses sometimes gets in
453 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
454 # 'win_use_allocator_shim': 0,
455 # 'win_release_RuntimeLibrary': 2
456 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52457 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11458
[email protected]95ff8082009-11-13 22:21:01459 # Whether usage of OpenMAX is enabled.
460 'enable_openmax%': 0,
461
[email protected]d01120e62010-05-10 17:04:48462 # Whether proprietary audio/video codecs are assumed to be included with
463 # this build (only meaningful if branding!=Chrome).
464 'proprietary_codecs%': 0,
465
[email protected]e5b2eaa2009-04-14 01:39:12466 # TODO(bradnelson): eliminate this when possible.
467 # To allow local gyp files to prevent release.vsprops from being included.
468 # Yes(1) means include release.vsprops.
469 # Once all vsprops settings are migrated into gyp, this can go away.
470 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23471
[email protected]cbd5fd52009-08-26 00:14:27472 # TODO(bradnelson): eliminate this when possible.
473 # To allow local gyp files to override additional linker options for msvs.
474 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19475 'msvs_use_common_linker_extras%': 1,
476
[email protected]1ffb6502009-06-02 07:46:24477 # TODO(sgk): eliminate this if possible.
478 # It would be nicer to support this via a setting in 'target_defaults'
479 # in chrome/app/locales/locales.gypi overriding the setting in the
480 # 'Debug' configuration in the 'target_defaults' dict below,
481 # but that doesn't work as we'd like.
482 'msvs_debug_link_incremental%': '2',
483
[email protected]1f790ef2011-01-11 20:45:36484 # Needed for some of the largest modules.
485 'msvs_debug_link_nonincremental%': '1',
486
[email protected]5ab8f482011-08-18 18:30:06487 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
488 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51489 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06490
[email protected]573136142009-07-15 22:48:37491 # This is the location of the sandbox binary. Chrome looks for this before
492 # running the zygote process. If found, and SUID, it will be used to
493 # sandbox the zygote process and, thus, all renderer processes.
494 'linux_sandbox_path%': '',
495
[email protected]ad6d2c42009-09-15 20:13:38496 # Set this to true to enable SELinux support.
497 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57498
[email protected]58680ce2010-09-18 00:09:15499 # Set this to true when building with Clang.
500 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15501 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24502 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15503
[email protected]5e781232011-01-28 02:57:59504 # These two variables can be set in GYP_DEFINES while running
505 # |gclient runhooks| to let clang run a plugin in every compilation.
506 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
507 # Example:
[email protected]93120fe2011-02-03 20:46:42508 # 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:59509
510 'clang_load%': '',
511 'clang_add_plugin%': '',
512
[email protected]da1c8d692011-09-20 20:35:01513 # The default type of gtest.
514 'gtest_target_type%': 'executable',
515
[email protected]7664ab32011-02-01 23:35:25516 # Enable sampling based profiler.
517 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
518 'profiling%': '0',
519
[email protected]93b373502011-08-16 19:06:22520 # Enable strict glibc debug mode.
521 'glibcxx_debug%': 0,
522
[email protected]36532f332010-08-25 00:22:01523 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
524 'linux_breakpad%': 0,
525 # And if we want to dump symbols for Breakpad-enabled builds.
526 'linux_dump_symbols%': 0,
527 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03528 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49529 # Strip the test binaries needed for Linux reliability tests.
530 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03531
[email protected]46ce5b562010-06-16 18:39:53532 # Enable TCMalloc.
533 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24534
[email protected]39ca7de2010-04-16 08:04:03535 # Disable TCMalloc's debugallocation.
536 'linux_use_debugallocation%': 0,
537
[email protected]d8b60602010-03-26 09:41:22538 # Disable TCMalloc's heapchecker.
539 'linux_use_heapchecker%': 0,
540
[email protected]64e2d4a42010-08-27 10:13:21541 # Disable shadow stack keeping used by heapcheck to unwind the stacks
542 # better.
543 'linux_keep_shadow_stacks%': 0,
544
[email protected]556c5d72010-06-10 05:45:01545 # Set to 1 to link against libgnome-keyring instead of using dlopen().
546 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35547 # Set to 1 to link against gsettings APIs instead of using dlopen().
548 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01549
[email protected]77c1b29392009-12-04 06:21:29550 # Set Thumb compilation flags.
551 'arm_thumb%': 0,
552
[email protected]53e0f642010-03-05 01:41:56553 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
554 # arm_neon==0).
555 'arm_fpu%': 'vfpv3',
556
[email protected]9821d0d2010-04-16 22:40:37557 # Enable new NPDevice API.
558 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50559
560 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14561 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50562
[email protected]6f51b27e2010-06-22 20:43:53563 # Enable a variable used elsewhere throughout the GYP files to determine
564 # whether to compile in the sources for the GPU plugin / process.
565 'enable_gpu%': 1,
566
[email protected]e72e55b2011-01-06 22:19:30567 # .gyp files or targets should set chromium_code to 1 if they build
568 # Chromium-specific code, as opposed to external code. This variable is
569 # used to control such things as the set of warnings to enable, and
570 # whether warnings are treated as errors.
571 'chromium_code%': 0,
572
[email protected]b1eb341c2011-11-09 18:46:07573 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
574 'enable_wexit_time_destructors%': 0,
575
[email protected]e72e55b2011-01-06 22:19:30576 # Set to 1 to compile with the built in pdf viewer.
577 'internal_pdf%': 0,
578
579 # This allows to use libcros from the current system, ie. /usr/lib/
580 # The cros_api will be pulled in as a static library, and all headers
581 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43582 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30583
[email protected]e72e55b2011-01-06 22:19:30584 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
585 # so Cocoa is happy (http://crbug.com/20441).
586 'locales': [
587 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
588 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
589 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
590 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
591 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
592 'vi', 'zh-CN', 'zh-TW',
593 ],
594
[email protected]cc0322d2011-07-24 09:29:19595 # Pseudo locales are special locales which are used for testing and
596 # debugging. They don't get copied to the final app. For more info,
597 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
598 'pseudo_locales': [
599 'fake-bidi',
600 ],
601
[email protected]bb6aba32011-01-07 19:04:43602 'grit_defines': [],
603
[email protected]29c2daea2011-01-05 20:38:50604 # Use Harfbuzz-NG instead of Harfbuzz.
605 # Under development: http://crbug.com/68551
606 'use_harfbuzz_ng%': 0,
607
[email protected]bd3bd442011-03-28 07:58:51608 # If debug_devtools is set to 1, JavaScript files for DevTools are
609 # stored as is and loaded from disk. Otherwise, a concatenated file
610 # is stored in resources.pak. It is still possible to load JS files
611 # from disk by passing --debug-devtools cmdline switch.
612 'debug_devtools%': 0,
613
[email protected]be8a9272011-02-10 22:06:07614 # Point to ICU directory.
615 'icu_src_dir': '../third_party/icu',
616
[email protected]464750f2011-10-24 23:16:18617 # The Java Bridge is not compiled in by default.
618 'java_bridge%': 0,
619
[email protected]0ba831c22011-11-23 23:32:06620 # TODO(dpranke): This determines whether we should attempt to build DRT
621 # et al. from WebKit/Source/WebKit.gyp or Tools/Tools.gyp. This
622 # flag should only be needed temporarily. See
623 # https://bugs.webkit.org/show_bug.cgi?id=68463.
624 'build_webkit_exes_from_webkit_gyp%': 1,
625
[email protected]33e1c372011-12-14 16:32:07626 # This flag is only used when disable_nacl==0 and disables all those
627 # subcomponents which would require the installation of a native_client
628 # untrusted toolchain.
629 'disable_nacl_untrusted%': 0,
630
[email protected]912c55c2009-07-31 23:33:55631 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11632 # Used to disable Native Client at compile time, for platforms where it
633 # isn't supported (ARM)
[email protected]33e1c372011-12-14 16:32:07634 ['target_arch=="arm" and chromeos == 1', {
[email protected]f0c4fce2011-10-20 18:16:11635 'disable_nacl%': 1,
636 }, {
637 'disable_nacl%': 0,
638 }],
[email protected]da1c8d692011-09-20 20:35:01639 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10640 # This will set gcc_version to XY if you are running gcc X.Y.*.
641 # This is used to tweak build flags for gcc 4.4.
642 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23643 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43644 '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:27645 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10646 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27647 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27648 }],
[email protected]4c9cc6c2009-10-01 18:54:57649 # All Chrome builds have breakpad symbols, but only process the
650 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08651 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57652 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57653 }],
[email protected]cbd5fd52009-08-26 00:14:27654 ],
[email protected]da1c8d692011-09-20 20:35:01655 }], # os_posix==1 and OS!="mac" and OS!="android"
656 ['OS=="android"', {
657 # Location of Android NDK.
658 'variables': {
659 'variables': {
660 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
661 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43662
[email protected]da1c8d692011-09-20 20:35:01663 # Switch between different build types, currently only '0' is
664 # supported.
665 'android_build_type%': 0,
666 },
667 'android_ndk_root%': '<(android_ndk_root)',
668 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
669 'android_build_type%': '<(android_build_type)',
670 },
671 'android_ndk_root%': '<(android_ndk_root)',
672 'android_ndk_sysroot': '<(android_ndk_sysroot)',
673 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
674 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
675
676 # Uses Android's crash report system
677 'linux_breakpad%': 0,
678
679 # Always uses openssl.
680 'use_openssl%': 1,
681
682 'proprietary_codecs%': '<(proprietary_codecs)',
683 'safe_browsing%': 0,
684 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22685 'input_speech%': 0,
[email protected]464750f2011-10-24 23:16:18686 'java_bridge%': 1,
[email protected]7cce3232011-10-28 10:41:57687 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01688
689 # Builds the gtest targets as a shared_library.
690 # TODO(michaelbai): Use the fixed value 'shared_library' once it
691 # is fully supported.
692 'gtest_target_type%': '<(gtest_target_type)',
693
694 # Uses system APIs for decoding audio and video.
695 'use_libffmpeg%': '0',
696
697 # Always use the chromium skia. The use_system_harfbuzz needs to
698 # match use_system_skia.
699 'use_system_skia%': '0',
700 'use_system_harfbuzz%': '0',
701
702 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28703 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01704
705 # Choose static link by build type.
706 'conditions': [
707 ['android_build_type==0', {
708 'static_link_system_icu%': 1,
709 }, {
710 'static_link_system_icu%': 0,
711 }],
712 ],
713 # Enable to use system sqlite.
714 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16715 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01716 'use_system_libjpeg%': '<(android_build_type)',
717 # Enable to use the system libexpat.
718 'use_system_libexpat%': '<(android_build_type)',
719 # Enable to use the system stlport, otherwise statically
720 # link the NDK one?
721 'use_system_stlport%': '<(android_build_type)',
722 # Copy it out one scope.
723 'android_build_type%': '<(android_build_type)',
724 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07725 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11726 # Enable clang on mac by default!
727 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56728 # Compile in Breakpad support by default so that it can be
729 # tested, even if it is not enabled by default at runtime.
730 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07731 'conditions': [
732 # mac_product_name is set to the name of the .app bundle as it should
733 # appear on disk. This duplicates data from
734 # chrome/app/theme/chromium/BRANDING and
735 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
736 # these names into the build system.
737 ['branding=="Chrome"', {
738 'mac_product_name%': 'Google Chrome',
739 }, { # else: branding!="Chrome"
740 'mac_product_name%': 'Chromium',
741 }],
742
[email protected]e14a9f92009-08-05 19:26:07743 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56744 # Enable uploading crash dumps.
745 'mac_breakpad_uploads%': 1,
746 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07747 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56748 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07749 'mac_keystone%': 1,
750 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56751 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07752 'mac_breakpad%': 0,
753 'mac_keystone%': 0,
754 }],
755 ],
756 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43757
[email protected]912c55c2009-07-31 23:33:55758 # Whether to use multiple cores to compile with visual studio. This is
759 # optional because it sometimes causes corruption on VS 2005.
760 # It is on by default on VS 2008 and off on VS 2005.
761 ['OS=="win"', {
762 'conditions': [
[email protected]8974e042010-06-21 18:06:52763 ['component=="shared_library"', {
764 'win_use_allocator_shim%': 0,
765 }],
[email protected]912c55c2009-07-31 23:33:55766 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13767 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55768 },{
769 'msvs_multi_core_compile%': 1,
770 }],
[email protected]10bb8c92009-08-07 21:16:03771 # Don't do incremental linking for large modules on 32-bit.
772 ['MSVS_OS_BITS==32', {
773 'msvs_large_module_debug_link_mode%': '1', # No
774 },{
775 'msvs_large_module_debug_link_mode%': '2', # Yes
776 }],
[email protected]3e2648a2011-03-21 20:58:50777 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
778 'msvs_express%': 1,
779 'secure_atl%': 0,
780 },{
781 'msvs_express%': 0,
782 'secure_atl%': 1,
783 }],
[email protected]912c55c2009-07-31 23:33:55784 ],
[email protected]ef4fa4072009-12-04 22:46:50785 'nacl_win64_defines': [
786 # This flag is used to minimize dependencies when building
787 # Native Client loader for 64-bit Windows.
788 'NACL_WIN64',
789 ],
[email protected]912c55c2009-07-31 23:33:55790 }],
[email protected]bb6aba32011-01-07 19:04:43791
[email protected]79e2336c2011-05-12 18:18:34792 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f42010-10-25 20:05:44793 'use_cups%': 1,
794 }, {
795 'use_cups%': 0,
796 }],
[email protected]bb6aba32011-01-07 19:04:43797
[email protected]19fe8f0b2010-12-07 07:27:27798 # Set the relative path from this file to the GYP file of the JPEG
799 # library used by Chromium.
800 ['use_libjpeg_turbo==1', {
801 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
802 }, {
803 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
804 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43805
[email protected]abcc9ac2011-05-16 20:04:35806 # Options controlling the use of GConf (the classic GNOME configuration
807 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31808 ['chromeos==1', {
809 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35810 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31811 }, {
812 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35813 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31814 }],
815
[email protected]4de39f82011-03-28 12:01:29816 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29817 ['branding=="Chrome"', {
818 # TODO(mmoss) The .grd files look for _google_chrome, but for
819 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29820 'grit_defines': ['-D', '_google_chrome',
821 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29822 }, {
[email protected]4de39f82011-03-28 12:01:29823 'grit_defines': ['-D', '_chromium',
824 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29825 }],
[email protected]bb6aba32011-01-07 19:04:43826 ['chromeos==1', {
827 'grit_defines': ['-D', 'chromeos'],
828 }],
829 ['toolkit_views==1', {
830 'grit_defines': ['-D', 'toolkit_views'],
831 }],
[email protected]8dd791d2011-09-16 16:37:30832 ['use_aura==1', {
833 'grit_defines': ['-D', 'use_aura'],
834 }],
[email protected]c329adf82011-10-05 14:34:57835 ['use_nss==1', {
836 'grit_defines': ['-D', 'use_nss'],
837 }],
[email protected]2cc81d32011-10-04 17:03:18838 ['use_virtual_keyboard==1', {
839 'grit_defines': ['-D', 'use_virtual_keyboard'],
840 }],
[email protected]e47c32032011-03-01 19:26:20841 ['file_manager_extension==1', {
842 'grit_defines': ['-D', 'file_manager_extension'],
843 }],
[email protected]8b2e9f392011-08-05 04:00:47844 ['webui_task_manager==1', {
845 'grit_defines': ['-D', 'webui_task_manager'],
846 }],
[email protected]9a425422011-01-11 00:53:18847 ['remoting==1', {
848 'grit_defines': ['-D', 'remoting'],
849 }],
[email protected]bb6aba32011-01-07 19:04:43850 ['use_titlecase_in_grd_files==1', {
851 'grit_defines': ['-D', 'use_titlecase'],
852 }],
[email protected]00dc155832011-02-01 18:51:19853 ['use_third_party_translations==1', {
854 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12855 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16856 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
857 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:12858 ],
[email protected]00dc155832011-02-01 18:51:19859 }],
[email protected]da1c8d692011-09-20 20:35:01860 ['OS=="android"', {
861 'grit_defines': ['-D', 'android'],
862 }],
[email protected]5d451ad2011-02-11 16:43:46863 ['clang_use_chrome_plugins==1', {
864 'clang_chrome_plugins_flags':
865 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
866 }],
[email protected]cfa2e1102011-04-27 22:30:23867
[email protected]452da69e2011-05-24 02:36:05868 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27869 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23870 'use_ibus%': 1,
871 }, {
872 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56873 }],
874
875 ['enable_register_protocol_handler==1', {
876 'grit_defines': ['-D', 'enable_register_protocol_handler'],
877 }],
[email protected]92799b632011-08-15 14:33:06878
[email protected]41ed4e82011-08-25 23:02:07879 ['enable_web_intents==1', {
880 'grit_defines': ['-D', 'enable_web_intents'],
881 }],
882
[email protected]92799b632011-08-15 14:33:06883 ['asan==1', {
884 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20885 # Do not use Chrome plugins for Clang. The Clang version in
886 # third_party/asan may be different from the default one.
887 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06888 }],
[email protected]912c55c2009-07-31 23:33:55889 ],
[email protected]35958422011-09-28 02:03:59890 # List of default apps to install in new profiles. The first list contains
891 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:06892 # contains the destination location for each of the files. When a crx
893 # is added or removed from the list, the chrome/browser/resources/
894 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:59895 'default_apps_list': [
896 'browser/resources/default_apps/external_extensions.json',
897 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06898 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59899 'browser/resources/default_apps/youtube.crx',
900 ],
901 'default_apps_list_linux_dest': [
902 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
903 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06904 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59905 '<(PRODUCT_DIR)/default_apps/youtube.crx',
906 ],
[email protected]2f80c312009-02-25 21:26:55907 },
908 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26909 'variables': {
[email protected]a6e22132010-02-10 20:43:18910 # The condition that operates on chromium_code is in a target_conditions
911 # section, and will not have access to the default fallback value of
912 # chromium_code at the top of this file, or to the chromium_code
913 # variable placed at the root variables scope of .gyp files, because
914 # those variables are not set at target scope. As a workaround,
915 # if chromium_code is not set at target scope, define it in target scope
916 # to contain whatever value it has during early variable expansion.
917 # That's enough to make it available during target conditional
918 # processing.
919 'chromium_code%': '<(chromium_code)',
920
[email protected]7e0d664a2009-12-03 21:07:47921 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29922 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00923 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:33924
[email protected]7e0d664a2009-12-03 21:07:47925 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
926 'win_release_Optimization%': '2', # 2 = /Os
927 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:33928
929 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
930 'win_release_OmitFramePointers%': '1',
931
[email protected]6b0507b2010-05-07 07:41:21932 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
933 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:33934
[email protected]6b0507b2010-05-07 07:41:21935 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15936 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
937 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:33938
[email protected]fac10d12010-11-08 16:00:31939 # VS inserts quite a lot of extra checks to algorithms like
940 # std::partial_sort in Debug build which make them O(N^2)
941 # instead of O(N*logN). This is particularly slow under memory
942 # tools like ThreadSanitizer so we want it to be disablable.
943 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
944 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47945
[email protected]ffd984b12009-09-11 19:37:00946 'release_extra_cflags%': '',
947 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56948 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52949
[email protected]b1eb341c2011-11-09 18:46:07950 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
951 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
952
[email protected]ef3326702011-10-06 18:06:44953 # Only used by Windows build for now. Can be used to build into a
954 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
955 # output files in src/build/VS2010_{Debug,Release}.
956 'build_dir_prefix%': '',
957
[email protected]8974e042010-06-21 18:06:52958 'conditions': [
959 ['OS=="win" and component=="shared_library"', {
960 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
961 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
962 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
963 }, {
964 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
965 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
966 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
967 }],
968 ],
[email protected]1c966092009-08-20 21:19:26969 },
[email protected]32aa8cc2009-03-04 21:36:39970 'conditions': [
971 ['branding=="Chrome"', {
972 'defines': ['GOOGLE_CHROME_BUILD'],
973 }, { # else: branding!="Chrome"
974 'defines': ['CHROMIUM_BUILD'],
975 }],
[email protected]63e39a282011-07-13 20:41:28976 ['component=="shared_library"', {
977 'defines': ['COMPONENT_BUILD'],
978 }],
[email protected]5cba9ff72011-11-16 21:55:18979 ['component=="shared_library" and incremental_chrome_dll==1', {
980 # TODO(dpranke): We can't incrementally link chrome when
981 # content is being built as a DLL because chrome links in
982 # webkit_glue and webkit_glue depends on symbols defined in
983 # content. We can remove this when we fix glue.
984 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
985 'defines': ['COMPILE_CONTENT_STATICALLY'],
986 }],
[email protected]06c756182010-04-27 18:31:31987 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17988 'defines': ['TOOLKIT_VIEWS=1'],
989 }],
[email protected]9c8a1982011-05-24 23:08:58990 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27991 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58992 }],
[email protected]1ee7c56c2011-10-19 14:51:33993 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:11994 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
995 }],
[email protected]332749032011-10-22 00:32:46996 ['use_webkit_compositor==1', {
997 'defines': ['USE_WEBKIT_COMPOSITOR=1'],
998 }],
[email protected]41423092011-08-25 15:39:58999 ['use_aura==1', {
1000 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351001 }],
[email protected]c329adf82011-10-05 14:34:571002 ['use_nss==1', {
1003 'defines': ['USE_NSS=1'],
1004 }],
[email protected]9d43e372011-09-22 19:39:521005 ['toolkit_uses_gtk==1', {
1006 'defines': ['TOOLKIT_USES_GTK=1'],
1007 }],
[email protected]a47aa892011-11-22 03:12:311008 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1009 # TODO(erg): We are progressively sealing up use of deprecated features
1010 # in gtk in preparation for an eventual porting to gtk3.
1011 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1012 }],
[email protected]fdc5bed2010-01-09 01:16:571013 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291014 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501015 }],
[email protected]2cc81d32011-10-04 17:03:181016 ['use_virtual_keyboard==1', {
1017 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1018 }],
[email protected]f56797b2011-09-25 00:04:351019 ['use_xi2_mt!=0', {
1020 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1021 }],
[email protected]236754a2011-07-28 17:38:231022 ['use_wayland==1', {
1023 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1024 }],
[email protected]e47c32032011-03-01 19:26:201025 ['file_manager_extension==1', {
1026 'defines': ['FILE_MANAGER_EXTENSION=1'],
1027 }],
[email protected]8b2e9f392011-08-05 04:00:471028 ['webui_task_manager==1', {
1029 'defines': ['WEBUI_TASK_MANAGER=1'],
1030 }],
[email protected]7664ab32011-02-01 23:35:251031 ['profiling==1', {
1032 'defines': ['ENABLE_PROFILING=1'],
1033 }],
[email protected]93b373502011-08-16 19:06:221034 ['OS=="linux" and glibcxx_debug==1', {
1035 'defines': ['_GLIBCXX_DEBUG=1',],
1036 'cflags_cc!': ['-fno-rtti'],
1037 'cflags_cc+': ['-frtti', '-g'],
1038 }],
[email protected]542bf24a2010-06-11 23:08:171039 ['remoting==1', {
1040 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001041 }],
[email protected]a026daa2011-04-20 15:49:511042 ['p2p_apis==1', {
1043 'defines': ['ENABLE_P2P_APIS=1'],
1044 }],
[email protected]d01120e62010-05-10 17:04:481045 ['proprietary_codecs==1', {
1046 'defines': ['USE_PROPRIETARY_CODECS'],
1047 }],
[email protected]1b4209f2011-01-07 00:25:401048 ['enable_flapper_hacks==1', {
1049 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1050 }],
[email protected]67c125d2011-10-11 18:58:221051 ['enable_pepper_threading==1', {
1052 'defines': ['ENABLE_PEPPER_THREADING'],
1053 }],
[email protected]f31e2e52011-07-14 16:01:191054 ['configuration_policy==1', {
1055 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1056 }],
[email protected]9eb100e2011-10-14 05:08:221057 ['input_speech==1', {
1058 'defines': ['ENABLE_INPUT_SPEECH'],
1059 }],
[email protected]7cce3232011-10-28 10:41:571060 ['notifications==1', {
1061 'defines': ['ENABLE_NOTIFICATIONS'],
1062 }],
[email protected]9c1949e2009-10-02 19:59:541063 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171064
[email protected]9c1949e2009-10-02 19:59:541065 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141066 # For Windows and Mac, we don't genererate debug information.
1067 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541068 'msvs_settings': {
1069 'VCLinkerTool': {
1070 'GenerateDebugInformation': 'false',
1071 },
1072 'VCCLCompilerTool': {
1073 'DebugInformationFormat': '0',
1074 }
[email protected]da4d4ea2011-09-22 20:23:141075 },
1076 'xcode_settings': {
1077 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1078 },
[email protected]1cc2fa72010-07-03 08:49:241079 }, { # else: OS != "win", generate less debug information.
1080 'variables': {
1081 'debug_extra_cflags': '-g1',
1082 },
[email protected]37c84192010-04-14 21:37:401083 }],
[email protected]aecc4d12011-01-19 05:32:331084 # Clang creates chubby debug information, which makes linking very
1085 # slow. For now, don't create debug information with clang. See
1086 # http://crbug.com/70000
1087 ['OS=="linux" and clang==1', {
1088 'variables': {
1089 'debug_extra_cflags': '-g0',
1090 },
1091 }],
[email protected]9c1949e2009-10-02 19:59:541092 ], # conditions for fastbuild.
1093 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011094 ['dcheck_always_on!=0', {
1095 'defines': ['DCHECK_ALWAYS_ON=1'],
1096 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381097 ['selinux==1', {
1098 'defines': ['CHROMIUM_SELINUX=1'],
1099 }],
[email protected]7e0d664a2009-12-03 21:07:471100 ['win_use_allocator_shim==0', {
1101 'conditions': [
1102 ['OS=="win"', {
1103 'defines': ['NO_TCMALLOC'],
1104 }],
1105 ],
1106 }],
[email protected]43f28f832010-02-03 02:28:481107 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151108 'defines': [
1109 'ENABLE_GPU=1',
1110 ],
1111 }],
[email protected]b1c2a5542010-10-08 12:44:401112 ['use_openssl==1', {
1113 'defines': [
1114 'USE_OPENSSL=1',
1115 ],
1116 }],
[email protected]ed154592010-04-29 00:18:501117 ['enable_eglimage==1', {
1118 'defines': [
1119 'ENABLE_EGLIMAGE=1',
1120 ],
1121 }],
[email protected]7d7564a12011-06-21 19:20:221122 ['use_skia==1', {
1123 'defines': [
1124 'USE_SKIA=1',
1125 ],
1126 }],
[email protected]f5ecbba12009-04-03 04:35:181127 ['coverage!=0', {
1128 'conditions': [
1129 ['OS=="mac"', {
1130 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041131 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1132 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471133 },
[email protected]e4fb84c2009-12-28 20:45:431134 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101135 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431136 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181137 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431138 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181139 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471140 }],
1141 ],
1142 }],
[email protected]da1c8d692011-09-20 20:35:011143 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181144 'cflags': [ '-ftest-coverage',
1145 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001146 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181147 }],
[email protected]e8f6ff42009-07-07 18:20:531148 # Finally, for Windows, we simply turn on profiling.
1149 ['OS=="win"', {
1150 'msvs_settings': {
1151 'VCLinkerTool': {
1152 'Profile': 'true',
1153 },
[email protected]10bb8c92009-08-07 21:16:031154 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531155 # /Z7, not /Zi, so coverage is happyb
1156 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161157 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531158 }
1159 }
1160 }], # OS==win
1161 ], # conditions for coverage
1162 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381163 ['OS=="win"', {
1164 'defines': [
1165 '__STD_C',
1166 '_CRT_SECURE_NO_DEPRECATE',
1167 '_SCL_SECURE_NO_DEPRECATE',
1168 ],
1169 'include_dirs': [
1170 '<(DEPTH)/third_party/wtl/include',
1171 ],
1172 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561173 ['enable_register_protocol_handler==1', {
1174 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191175 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561176 ],
1177 }],
[email protected]41ed4e82011-08-25 23:02:071178 ['enable_web_intents==1', {
1179 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471180 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071181 ],
1182 }],
[email protected]a6e22132010-02-10 20:43:181183 ], # conditions for 'target_defaults'
1184 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071185 ['enable_wexit_time_destructors==1', {
1186 'conditions': [
1187 [ 'clang==1', {
1188 'cflags': [
1189 '-Wexit-time-destructors',
1190 ],
1191 'xcode_settings': {
1192 'WARNING_CFLAGS': [
1193 '-Wexit-time-destructors',
1194 ],
1195 },
1196 }],
1197 ],
1198 }],
[email protected]c14d8e772010-02-09 22:06:151199 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281200 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341201 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331202 # We don't want to get warnings from third-party code,
1203 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281204 'cflags!': [
1205 '-Wall',
1206 '-Wextra',
1207 '-Werror',
1208 ],
[email protected]167ec822011-10-24 22:05:271209 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001210 # Don't warn about hash_map in third-party code.
1211 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271212 ],
1213 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331214 # Don't warn about printf format problems.
1215 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221216 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001217 ],
[email protected]d16bd642011-07-25 23:59:181218 'cflags_cc!': [
1219 # TODO(fischman): remove this.
1220 # http://code.google.com/p/chromium/issues/detail?id=90453
1221 '-Wsign-compare',
1222 ]
[email protected]d8543312010-02-10 17:43:281223 }],
[email protected]af824362011-12-04 14:19:411224 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android" and chromeos==0', {
[email protected]6e4451892011-07-27 10:32:111225 'cflags': [
1226 # Don't warn about ignoring the return value from e.g. close().
1227 # This is off by default in some gccs but on by default in others.
1228 # Currently this option is not set for Chrome OS build because
1229 # the current version of gcc (4.3.4) used for building Chrome in
1230 # Chrome OS chroot doesn't support this option.
[email protected]af824362011-12-04 14:19:411231 # BSD systems do not support this option either, since they are
1232 # usually using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111233 # TODO(mazda): remove the conditional for Chrome OS when gcc
1234 # version is upgraded.
1235 '-Wno-unused-result',
1236 ],
1237 }],
[email protected]d8543312010-02-10 17:43:281238 [ 'OS=="win"', {
1239 'defines': [
1240 '_CRT_SECURE_NO_DEPRECATE',
1241 '_CRT_NONSTDC_NO_WARNINGS',
1242 '_CRT_NONSTDC_NO_DEPRECATE',
1243 '_SCL_SECURE_NO_DEPRECATE',
1244 ],
1245 'msvs_disabled_warnings': [4800],
1246 'msvs_settings': {
1247 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111248 'WarningLevel': '3',
1249 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281250 'Detect64BitPortabilityProblems': 'false',
1251 },
1252 },
1253 }],
[email protected]ea47b6a2011-07-17 19:39:421254 # TODO(darin): Unfortunately, some third_party code depends on base/
1255 [ 'OS=="win" and component=="shared_library"', {
1256 'msvs_disabled_warnings': [
1257 4251, # class 'std::xx' needs to have dll-interface.
1258 ],
1259 }],
[email protected]d8543312010-02-10 17:43:281260 [ 'OS=="mac"', {
1261 'xcode_settings': {
1262 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061263 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281264 },
1265 }],
[email protected]c14d8e772010-02-09 22:06:151266 ],
1267 }, {
1268 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1269 # C99 macros on Mac and Linux.
1270 'defines': [
1271 '__STDC_FORMAT_MACROS',
1272 ],
1273 'conditions': [
1274 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301275 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161276 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301277 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151278 }],
1279 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301280 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161281 ['exclude', '(^|/)(cocoa|mac)/'],
1282 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151283 }],
[email protected]02065c62011-09-23 00:08:461284 ['use_x11!=1', {
1285 'sources/': [
1286 ['exclude', '_(chromeos|x|x11)(_unittest)?\\.(h|cc)$'],
1287 ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
1288 ],
1289 }],
[email protected]79e2336c2011-05-12 18:18:341290 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151291 'sources/': [
[email protected]3ce52b72011-11-10 23:01:191292 ['exclude', '_gtk(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161293 ['exclude', '(^|/)gtk/'],
[email protected]02065c62011-09-23 00:08:461294 ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131295 ],
1296 }],
[email protected]af824362011-12-04 14:19:411297 ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
[email protected]3ce52b72011-11-10 23:01:191298 'sources/': [
1299 ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
1300 ],
1301 }],
[email protected]f1b2cd02011-08-10 16:50:441302 ['use_wayland!=1', {
1303 'sources/': [
1304 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1305 ['exclude', '(^|/)wayland/'],
1306 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1307 ],
1308 }],
[email protected]af824362011-12-04 14:19:411309 # Do not exclude the linux files on *BSD since most of them can be
[email protected]167ec822011-10-24 22:05:271310 # shared at this point.
1311 # In case a file is not needed, it is going to be excluded later on.
[email protected]af824362011-12-04 14:19:411312 ['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
[email protected]18cff3d2010-02-17 18:03:131313 'sources/': [
[email protected]40519592010-11-16 15:23:301314 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161315 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131316 ],
[email protected]c14d8e772010-02-09 22:06:151317 }],
[email protected]f98d7b92011-09-09 10:17:351318 ['OS!="android"', {
1319 'sources/': [
1320 ['exclude', '_android(_unittest)?\\.cc$'],
1321 ['exclude', '(^|/)android/'],
1322 ],
1323 }],
[email protected]c14d8e772010-02-09 22:06:151324 # We use "POSIX" to refer to all non-Windows operating systems.
1325 ['OS=="win"', {
[email protected]d4af1e72011-10-21 17:45:431326 'sources/': [ ['exclude', '_posix(_unittest)?\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071327 # turn on warnings for signed/unsigned mismatch on chromium code.
1328 'msvs_settings': {
1329 'VCCLCompilerTool': {
1330 'AdditionalOptions': ['/we4389'],
1331 },
1332 },
[email protected]c14d8e772010-02-09 22:06:151333 }],
[email protected]63e39a282011-07-13 20:41:281334 ['OS=="win" and component=="shared_library"', {
1335 'msvs_disabled_warnings': [
1336 4251, # class 'std::xx' needs to have dll-interface.
1337 ],
1338 }],
[email protected]c14d8e772010-02-09 22:06:151339 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301340 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151341 }],
[email protected]06c756182010-04-27 18:31:311342 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301343 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151344 }],
[email protected]41423092011-08-25 15:39:581345 ['use_aura==0', {
[email protected]f941f47a2011-10-15 18:44:511346 'sources/': [ ['exclude', '_aura\\.(h|cc)$'],
1347 ['exclude', '(^|/)aura/'],
1348 ]
[email protected]41423092011-08-25 15:39:581349 }],
[email protected]50ea9262011-10-10 15:42:431350 ['use_aura==0 or use_x11==0', {
1351 'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ]
1352 }],
1353 ['use_aura==0 or OS!="win"', {
1354 'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ]
1355 }],
[email protected]c14d8e772010-02-09 22:06:151356 ],
1357 }],
[email protected]a6e22132010-02-10 20:43:181358 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551359 'default_configuration': 'Debug',
1360 'configurations': {
[email protected]5153767c2009-12-22 01:52:501361 # VCLinkerTool LinkIncremental values below:
1362 # 0 == default
1363 # 1 == /INCREMENTAL:NO
1364 # 2 == /INCREMENTAL
1365 # Debug links incremental, Release does not.
1366 #
[email protected]7b99801e2010-11-03 17:26:231367 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501368 #
1369 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561370 'abstract': 1,
1371 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511372 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561373 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1374 'CharacterSet': '1',
1375 },
[email protected]5153767c2009-12-22 01:52:501376 },
1377 'x86_Base': {
1378 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501379 'msvs_settings': {
1380 'VCLinkerTool': {
1381 'TargetMachine': '1',
1382 },
1383 },
[email protected]2fa40782009-11-01 21:17:341384 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561385 },
[email protected]5153767c2009-12-22 01:52:501386 'x64_Base': {
1387 'abstract': 1,
1388 'msvs_configuration_platform': 'x64',
1389 'msvs_settings': {
1390 'VCLinkerTool': {
1391 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501392 'AdditionalLibraryDirectories!':
1393 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1394 'AdditionalLibraryDirectories':
1395 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1396 },
[email protected]d26b4418ab2010-03-24 22:06:351397 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501398 'AdditionalLibraryDirectories!':
1399 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1400 'AdditionalLibraryDirectories':
1401 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1402 },
1403 },
1404 'defines': [
1405 # Not sure if tcmalloc works on 64-bit Windows.
1406 'NO_TCMALLOC',
1407 ],
1408 },
1409 'Debug_Base': {
1410 'abstract': 1,
[email protected]14339762011-04-05 07:36:581411 'defines': [
1412 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1413 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1414 ],
[email protected]1c966092009-08-20 21:19:261415 'xcode_settings': {
1416 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291417 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491418 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491419 '<@(debug_extra_cflags)',
1420 ],
[email protected]1c966092009-08-20 21:19:261421 },
[email protected]bb05e452009-10-29 21:24:561422 'msvs_settings': {
1423 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471424 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561425 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211426 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471427 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151428 'conditions': [
1429 # According to MSVS, InlineFunctionExpansion=0 means
1430 # "default inlining", not "/Ob0".
1431 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1432 ['win_debug_InlineFunctionExpansion==0', {
1433 'AdditionalOptions': ['/Ob0'],
1434 }],
1435 ['win_debug_InlineFunctionExpansion!=""', {
1436 'InlineFunctionExpansion':
1437 '<(win_debug_InlineFunctionExpansion)',
1438 }],
[email protected]fac10d12010-11-08 16:00:311439 ['win_debug_disable_iterator_debugging==1', {
1440 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1441 }],
[email protected]2ae6e022010-05-07 13:19:151442 ],
[email protected]bb05e452009-10-29 21:24:561443 },
1444 'VCLinkerTool': {
1445 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021446 # ASLR makes debugging with windbg difficult because Chrome.exe and
1447 # Chrome.dll share the same base name. As result, windbg will
1448 # name the Chrome.dll module like chrome_<base address>, where
1449 # <base address> typically changes with each launch. This in turn
1450 # means that breakpoints in Chrome.dll don't stick from one launch
1451 # to the next. For this reason, we turn ASLR off in debug builds.
1452 # Note that this is a three-way bool, where 0 means to pick up
1453 # the default setting, 1 is off and 2 is on.
1454 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561455 },
1456 'VCResourceCompilerTool': {
1457 'PreprocessorDefinitions': ['_DEBUG'],
1458 },
1459 },
[email protected]2f80c312009-02-25 21:26:551460 'conditions': [
[email protected]bb05e452009-10-29 21:24:561461 ['OS=="linux"', {
1462 'cflags': [
1463 '<@(debug_extra_cflags)',
1464 ],
[email protected]2f80c312009-02-25 21:26:551465 }],
[email protected]56cca4e2011-07-01 21:33:351466 ['release_valgrind_build==0', {
1467 'xcode_settings': {
1468 'OTHER_CFLAGS': [
1469 '-fstack-protector-all', # Implies -fstack-protector
1470 ],
1471 },
1472 }],
[email protected]2f80c312009-02-25 21:26:551473 ],
1474 },
[email protected]5153767c2009-12-22 01:52:501475 'Release_Base': {
1476 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551477 'defines': [
1478 'NDEBUG',
1479 ],
[email protected]1c966092009-08-20 21:19:261480 'xcode_settings': {
1481 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1482 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001483 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261484 },
[email protected]bb05e452009-10-29 21:24:561485 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471486 'VCCLCompilerTool': {
1487 'Optimization': '<(win_release_Optimization)',
1488 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151489 'conditions': [
1490 # According to MSVS, InlineFunctionExpansion=0 means
1491 # "default inlining", not "/Ob0".
1492 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1493 ['win_release_InlineFunctionExpansion==0', {
1494 'AdditionalOptions': ['/Ob0'],
1495 }],
1496 ['win_release_InlineFunctionExpansion!=""', {
1497 'InlineFunctionExpansion':
1498 '<(win_release_InlineFunctionExpansion)',
1499 }],
[email protected]626d2d22011-10-11 15:47:331500
1501 ['win_release_OmitFramePointers==1', {
1502 'OmitFramePointers': 'true',
1503 }],
1504 ['win_release_OmitFramePointers==0', {
1505 'OmitFramePointers': 'false',
1506 }],
[email protected]2ae6e022010-05-07 13:19:151507 ],
[email protected]7e0d664a2009-12-03 21:07:471508 },
[email protected]bb05e452009-10-29 21:24:561509 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341510 # LinkIncremental is a tri-state boolean, where 0 means default
1511 # (i.e., inherit from parent solution), 1 means false, and
1512 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561513 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341514 # This corresponds to the /PROFILE flag which ensures the PDB
1515 # file contains FIXUP information (growing the PDB file by about
1516 # 5%) but does not otherwise alter the output binary. This
1517 # information is used by the Syzygy optimization tool when
1518 # decomposing the release image.
1519 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561520 },
1521 },
[email protected]2f80c312009-02-25 21:26:551522 'conditions': [
[email protected]92822e82009-09-18 14:26:561523 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581524 'defines': [
1525 'NVALGRIND',
1526 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1527 ],
[email protected]ee857512010-05-14 08:24:421528 }, {
[email protected]14339762011-04-05 07:36:581529 'defines': [
1530 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1531 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1532 ],
[email protected]92822e82009-09-18 14:26:561533 }],
[email protected]7e0d664a2009-12-03 21:07:471534 ['win_use_allocator_shim==0', {
1535 'defines': ['NO_TCMALLOC'],
1536 }],
[email protected]bb05e452009-10-29 21:24:561537 ['OS=="linux"', {
1538 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001539 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561540 ],
1541 }],
[email protected]2f80c312009-02-25 21:26:551542 ],
1543 },
[email protected]5153767c2009-12-22 01:52:501544 #
1545 # Concrete configurations
1546 #
1547 'Debug': {
1548 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1549 },
1550 'Release': {
1551 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1552 'conditions': [
1553 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161554 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501555 }],
1556 ]
1557 },
[email protected]f926fa0a2009-08-04 22:50:131558 'conditions': [
1559 [ 'OS=="win"', {
1560 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501561 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501562 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301563 },
1564 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501565 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301566 },
[email protected]f926fa0a2009-08-04 22:50:131567 }],
1568 ],
[email protected]2f80c312009-02-25 21:26:551569 },
1570 },
1571 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341572 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261573 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271574 # Enable -Werror by default, but put it in a variable so it can
1575 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1576 'variables': {
[email protected]57e94022011-05-04 15:33:191577 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421578 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341579 'conditions': [
1580 ['OS=="linux"', {
1581 'werror%': '-Werror',
1582 }, { # turn off -Werror on other Unices
1583 'werror%': '',
1584 }],
[email protected]47deeb62009-12-17 14:49:391585 ],
[email protected]5315f2842009-04-28 00:43:271586 },
[email protected]9d384032009-03-20 23:13:261587 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161588 '<(werror)', # See note above about the werror variable.
1589 '-pthread',
1590 '-fno-exceptions',
1591 '-Wall',
[email protected]0fa17082010-03-26 00:48:051592 # TODO(evan): turn this back on once all the builds work.
1593 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201594 # Don't warn about unused function params. We use those everywhere.
1595 '-Wno-unused-parameter',
1596 # Don't warn about the "struct foo f = {0};" initialization pattern.
1597 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161598 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121599 # Don't export any symbols (for example, to plugins we dlopen()).
1600 # Note: this is *required* to make some plugins work.
1601 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351602 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241603 ],
1604 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221605 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241606 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361607 # Make inline functions have hidden visiblity by default.
1608 # Surprisingly, not covered by -fvisibility=hidden.
1609 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171610 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1611 # so we specify it explicitly.
1612 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181613 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171614 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261615 ],
[email protected]a6cf87e2009-04-03 04:07:381616 'ldflags': [
[email protected]138241f2010-03-30 23:53:101617 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261618 ],
[email protected]3aacaf952009-04-02 15:34:091619 'configurations': {
[email protected]5153767c2009-12-22 01:52:501620 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311621 'variables': {
1622 'debug_optimize%': '0',
1623 },
[email protected]3aacaf952009-04-02 15:34:091624 'defines': [
1625 '_DEBUG',
1626 ],
1627 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041628 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091629 '-g',
1630 ],
[email protected]da1c8d692011-09-20 20:35:011631 'conditions' : [
1632 ['OS=="android"', {
1633 'cflags': [
1634 '-fno-omit-frame-pointer',
1635 ],
1636 }],
1637 ],
1638 'target_conditions' : [
1639 ['_toolset=="target"', {
1640 'conditions': [
1641 ['OS=="android" and debug_optimize==0', {
1642 'cflags': [
1643 '-mlong-calls', # Needed when compiling with -O0
1644 ],
1645 }],
1646 ['arm_thumb==1', {
1647 'cflags': [
1648 '-marm',
1649 ],
1650 }],
1651 ],
1652 }],
1653 ],
[email protected]5315f2842009-04-28 00:43:271654 },
[email protected]5153767c2009-12-22 01:52:501655 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011656 'variables': {
1657 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511658 # Binaries become big and gold is unable to perform GC
1659 # and remove unused sections for some of test targets
1660 # on 32 bit platform.
1661 # (This is currently observed only in chromeos valgrind bots)
1662 # The following flag is to disable --gc-sections linker
1663 # option for these bots.
1664 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121665
1666 # TODO(bradnelson): reexamine how this is done if we change the
1667 # expansion of configurations
1668 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011669 },
[email protected]3aacaf952009-04-02 15:34:091670 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041671 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531672 # Don't emit the GCC version ident directives, they just end up
1673 # in the .comment section taking up binary size.
1674 '-fno-ident',
1675 # Put data and code in their own sections, so that unused symbols
1676 # can be removed at link time with --gc-sections.
1677 '-fdata-sections',
1678 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091679 ],
[email protected]c902f2c2010-08-06 20:04:181680 'ldflags': [
1681 # Specifically tell the linker to perform optimizations.
1682 # See http://lwn.net/Articles/192624/ .
1683 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221684 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181685 ],
[email protected]1dd529642010-05-15 01:02:511686 'conditions' : [
1687 ['no_gc_sections==0', {
1688 'ldflags': [
1689 '-Wl,--gc-sections',
1690 ],
1691 }],
[email protected]da1c8d692011-09-20 20:35:011692 ['OS=="android"', {
1693 'cflags': [
1694 '-fomit-frame-pointer',
1695 ],
1696 }],
[email protected]ecf7b6482010-10-13 09:15:201697 ['clang==1', {
1698 'cflags!': [
1699 '-fno-ident',
1700 ],
1701 }],
[email protected]7664ab32011-02-01 23:35:251702 ['profiling==1', {
1703 'cflags': [
1704 '-fno-omit-frame-pointer',
1705 '-g',
1706 ],
1707 }],
[email protected]c75f33e42011-05-04 18:11:521708 # At gyp time, we test the linker for ICF support; this flag
1709 # is then provided to us by gyp. (Currently only gold supports
1710 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531711 # There seems to be a conflict of --icf and -pie in gold which
1712 # can generate crashy binaries. As a security measure, -pie
1713 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121714 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461715 'target_conditions': [
1716 ['_toolset=="target"', {
1717 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531718 #'-Wl,--icf=safe',
1719 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461720 ]
1721 }]
[email protected]c75f33e42011-05-04 18:11:521722 ]
1723 }],
[email protected]1dd529642010-05-15 01:02:511724 ]
[email protected]3aacaf952009-04-02 15:34:091725 },
1726 },
[email protected]601b540222009-04-03 21:32:041727 'variants': {
1728 'coverage': {
1729 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1730 'ldflags': ['-fprofile-arcs'],
1731 },
1732 'profile': {
1733 'cflags': ['-pg', '-g'],
1734 'ldflags': ['-pg'],
1735 },
1736 'symbols': {
1737 'cflags': ['-g'],
1738 },
1739 },
[email protected]606116d22009-05-06 22:38:231740 'conditions': [
[email protected]04b482602011-09-14 02:36:211741 ['target_arch=="ia32"', {
1742 'target_conditions': [
1743 ['_toolset=="target"', {
1744 'asflags': [
1745 # Needed so that libs with .s files (e.g. libicudata.a)
1746 # are compatible with the general 32-bit-ness.
1747 '-32',
1748 ],
1749 # All floating-point computations on x87 happens in 80-bit
1750 # precision. Because the C and C++ language standards allow
1751 # the compiler to keep the floating-point values in higher
1752 # precision than what's specified in the source and doing so
1753 # is more efficient than constantly rounding up to 64-bit or
1754 # 32-bit precision as specified in the source, the compiler,
1755 # especially in the optimized mode, tries very hard to keep
1756 # values in x87 floating-point stack (in 80-bit precision)
1757 # as long as possible. This has important side effects, that
1758 # the real value used in computation may change depending on
1759 # how the compiler did the optimization - that is, the value
1760 # kept in 80-bit is different than the value rounded down to
1761 # 64-bit or 32-bit. There are possible compiler options to
1762 # make this behavior consistent (e.g. -ffloat-store would keep
1763 # all floating-values in the memory, thus force them to be
1764 # rounded to its original precision) but they have significant
1765 # runtime performance penalty.
1766 #
1767 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1768 # which keep floating-point values in SSE registers in its
1769 # native precision (32-bit for single precision, and 64-bit
1770 # for double precision values). This means the floating-point
1771 # value used during computation does not change depending on
1772 # how the compiler optimized the code, since the value is
1773 # always kept in its specified precision.
1774 'conditions': [
1775 ['branding=="Chromium" and disable_sse2==0', {
1776 'cflags': [
1777 '-march=pentium4',
1778 '-msse2',
1779 '-mfpmath=sse',
1780 ],
1781 }],
1782 # ChromeOS targets Pinetrail, which is sse3, but most of the
1783 # benefit comes from sse2 so this setting allows ChromeOS
1784 # to build on other CPUs. In the future -march=atom would
1785 # help but requires a newer compiler.
1786 ['chromeos==1 and disable_sse2==0', {
1787 'cflags': [
1788 '-msse2',
1789 ],
1790 }],
1791 # Install packages have started cropping up with
1792 # different headers between the 32-bit and 64-bit
1793 # versions, so we have to shadow those differences off
1794 # and make sure a 32-bit-on-64-bit build picks up the
1795 # right files.
1796 ['host_arch!="ia32"', {
1797 'include_dirs+': [
1798 '/usr/include32',
1799 ],
1800 }],
1801 ],
1802 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1803 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061804 'cflags': [
[email protected]04b482602011-09-14 02:36:211805 '-m32',
1806 '-mmmx',
1807 ],
1808 'ldflags': [
1809 '-m32',
[email protected]ffde7932009-05-29 00:39:061810 ],
1811 }],
[email protected]606116d22009-05-06 22:38:231812 ],
1813 }],
[email protected]3dda8a962009-08-10 18:58:071814 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291815 'target_conditions': [
1816 ['_toolset=="target"', {
1817 'cflags_cc': [
1818 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1819 # has changed whenever it encounters a varargs function. This
1820 # silences those warnings, as they are not helpful and
1821 # clutter legitimate warnings.
1822 '-Wno-abi',
1823 ],
1824 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011825 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291826 'cflags': [
1827 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291828 ]
1829 }],
1830 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251831 'cflags': [
1832 '-march=armv7-a',
1833 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251834 '-mfloat-abi=softfp',
1835 ],
[email protected]eafc0b452010-02-26 21:53:431836 'conditions': [
1837 ['arm_neon==1', {
1838 'cflags': [ '-mfpu=neon', ],
1839 }, {
[email protected]53e0f642010-03-05 01:41:561840 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431841 }]
1842 ],
[email protected]dc9711f2009-11-13 19:30:251843 }],
[email protected]da1c8d692011-09-20 20:35:011844 ['OS=="android"', {
1845 # The following flags are derived from what Android uses
1846 # by default when building for arm.
1847 'cflags': [ '-Wno-psabi', ],
1848 'conditions': [
1849 ['arm_thumb == 1', {
1850 # Android toolchain doesn't support -mimplicit-it=thumb
1851 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1852 'cflags': [ '-mthumb-interwork', ],
1853 }],
1854 ['armv7==0', {
1855 # Flags suitable for Android emulator
1856 'cflags': [
1857 '-march=armv5te',
1858 '-mtune=xscale',
1859 '-msoft-float',
1860 '-D__ARM_ARCH_5__',
1861 '-D__ARM_ARCH_5T__',
1862 '-D__ARM_ARCH_5E__',
1863 '-D__ARM_ARCH_5TE__',
1864 ],
1865 }],
1866 ],
1867 }],
[email protected]3dda8a962009-08-10 18:58:071868 ],
1869 }],
1870 ],
1871 }],
[email protected]2fb843b2010-08-12 02:11:081872 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581873 'cflags': [
1874 '-fPIC',
1875 ],
[email protected]d3f692b32011-12-14 19:04:351876 'ldflags': [
1877 '-fPIC',
1878 ],
[email protected]c76723a2010-01-25 23:10:581879 }],
[email protected]cf90a512011-10-08 00:00:441880 # TODO(rkc): Currently building Chrome with the PIE flag causes
1881 # remote debugging to break (remote debugger does not get correct
1882 # section header offsets hence causing all symbol handling to go
1883 # kaboom). See crosbug.com/15266
1884 # Remove this flag once this issue is fixed.
1885 ['linux_disable_pie==1', {
1886 'target_conditions': [
1887 ['_type=="executable"', {
1888 'ldflags': [
1889 '-nopie',
1890 ],
1891 }],
1892 ],
1893 }],
[email protected]ee28c9f2009-09-04 01:53:011894 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571895 'target_conditions': [
1896 ['_toolset=="target"', {
1897 'cflags': [
1898 '--sysroot=<(sysroot)',
1899 ],
1900 'ldflags': [
1901 '--sysroot=<(sysroot)',
1902 ],
1903 }]]
[email protected]ee28c9f2009-09-04 01:53:011904 }],
[email protected]58680ce2010-09-18 00:09:151905 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121906 'cflags': [
1907 '-Wheader-hygiene',
1908 # Clang spots more unused functions.
1909 '-Wno-unused-function',
1910 # Don't die on dtoa code that uses a char as an array index.
1911 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331912 # Especially needed for gtest macros using enum values from Mac
1913 # system headers.
1914 # TODO(pkasting): In C++11 this is legal, so this should be
1915 # removed when we change to that. (This is also why we don't
1916 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121917 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:301918 # WebKit uses nullptr in a legit way, other that that this warning
1919 # doesn't fire.
1920 '-Wno-c++11-compat',
1921 # This (rightyfully) complains about 'override', which we use
1922 # heavily.
1923 '-Wno-c++11-extensions',
[email protected]18ca15a2011-08-10 03:07:121924 ],
1925 'cflags!': [
1926 # Clang doesn't seem to know know this flag.
1927 '-mfpmath=sse',
1928 ],
[email protected]58680ce2010-09-18 00:09:151929 }],
[email protected]5d451ad2011-02-11 16:43:461930 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261931 'cflags': [
1932 '<(clang_chrome_plugins_flags)',
1933 ],
[email protected]5d451ad2011-02-11 16:43:461934 }],
[email protected]4a9ac22e2011-12-02 03:41:531935 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:261936 'cflags': [
1937 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:531938 ],
1939 }],
1940 ['clang==1 and clang_add_plugin!=""', {
1941 'cflags': [
[email protected]d23720682011-08-11 00:16:261942 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1943 ],
[email protected]5e781232011-01-28 02:57:591944 }],
[email protected]92799b632011-08-15 14:33:061945 ['asan==1', {
[email protected]6a4cad02011-11-25 07:26:561946 # TODO(glider): -fasan is deprecated. Remove it when we stop using
1947 # it.
[email protected]92799b632011-08-15 14:33:061948 'cflags': [
[email protected]74a26d72011-09-29 17:29:031949 '-fasan',
[email protected]6a4cad02011-11-25 07:26:561950 '-faddress-sanitizer',
[email protected]74a26d72011-09-29 17:29:031951 '-w',
[email protected]92799b632011-08-15 14:33:061952 ],
1953 'ldflags': [
1954 '-fasan',
[email protected]6a4cad02011-11-25 07:26:561955 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:061956 ],
[email protected]921c7b52011-11-25 10:34:351957 'defines': [
1958 'ADDRESS_SANITIZER',
1959 ],
[email protected]92799b632011-08-15 14:33:061960 }],
[email protected]cc4219a2009-08-14 05:30:521961 ['no_strict_aliasing==1', {
1962 'cflags': [
1963 '-fno-strict-aliasing',
1964 ],
1965 }],
[email protected]cbd5fd52009-08-26 00:14:271966 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171967 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271968 'defines': ['USE_LINUX_BREAKPAD'],
1969 }],
[email protected]d8b60602010-03-26 09:41:221970 ['linux_use_heapchecker==1', {
1971 'variables': {'linux_use_tcmalloc%': 1},
1972 }],
[email protected]61a9b2d82010-02-26 00:31:081973 ['linux_use_tcmalloc==0', {
1974 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241975 }],
[email protected]d8b60602010-03-26 09:41:221976 ['linux_use_heapchecker==0', {
1977 'defines': ['NO_HEAPCHECKER'],
1978 }],
[email protected]64e2d4a42010-08-27 10:13:211979 ['linux_keep_shadow_stacks==1', {
1980 'defines': ['KEEP_SHADOW_STACKS'],
1981 'cflags': ['-finstrument-functions'],
1982 }],
[email protected]606116d22009-05-06 22:38:231983 ],
[email protected]9d384032009-03-20 23:13:261984 },
1985 }],
[email protected]c51e8d52009-12-11 20:04:061986 # FreeBSD-specific options; note that most FreeBSD options are set above,
1987 # with Linux.
1988 ['OS=="freebsd"', {
1989 'target_defaults': {
1990 'ldflags': [
1991 '-Wl,--no-keep-memory',
1992 ],
1993 },
1994 }],
[email protected]da1c8d692011-09-20 20:35:011995 # Android-specific options; note that most are set above with Linux.
1996 ['OS=="android"', {
1997 'variables': {
1998 'android_target_arch%': 'arm', # target_arch in android terms.
1999 'conditions': [
2000 # Android uses x86 instead of ia32 for their target_arch designation.
2001 ['target_arch=="ia32"', {
2002 'android_target_arch%': 'x86',
2003 }],
2004 # Use shared stlport library when system one used.
2005 # Figure this out early since it needs symbols from libgcc.a, so it
2006 # has to be before that in the set of libraries.
2007 ['use_system_stlport==1', {
2008 'android_stlport_library': 'stlport',
2009 }, {
2010 'android_stlport_library': 'stlport_static',
2011 }],
2012 ],
2013
2014 # Placing this variable here prevents from forking libvpx, used
2015 # by remoting. Remoting is off, so it needn't built,
2016 # so forking it's deps seems like overkill.
2017 # But this variable need defined to properly run gyp.
2018 # A proper solution is to have an OS==android conditional
2019 # in third_party/libvpx/libvpx.gyp to define it.
2020 'libvpx_path': 'lib/linux/arm',
2021 },
2022 'target_defaults': {
2023 # Build a Release build by default to match Android build behavior.
2024 # This is typical with Android because Debug builds tend to be much
2025 # larger and run very slowly on constrained devices. It is still
2026 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2027 # 'make' command line.
2028 'default_configuration': 'Release',
2029
2030 'variables': {
2031 'release_extra_cflags%': '',
2032 },
2033
2034 'target_conditions': [
2035 # Settings for building device targets using Android's toolchain.
2036 # These are based on the setup.mk file from the Android NDK.
2037 #
2038 # The NDK Android executable link step looks as follows:
2039 # $LDFLAGS
2040 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2041 # $(PRIVATE_OBJECTS) <-- The .o that we built
2042 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2043 # $(TARGET_LIBGCC) <-- libgcc.a
2044 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2045 # $(PRIVATE_LDLIBS) <-- System .so
2046 # $(TARGET_CRTEND_O) <-- crtend.o
2047 #
2048 # For now the above are approximated for executables by adding
2049 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2050 # of 'libraries'.
2051 #
2052 # The NDK Android shared library link step looks as follows:
2053 # $LDFLAGS
2054 # $(PRIVATE_OBJECTS) <-- The .o that we built
2055 # -l,--whole-archive
2056 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2057 # -l,--no-whole-archive
2058 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2059 # $(TARGET_LIBGCC) <-- libgcc.a
2060 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2061 # $(PRIVATE_LDLIBS) <-- System .so
2062 #
2063 # For now, assume not need any whole static libs.
2064 #
2065 # For both executables and shared libraries, add the proper
2066 # libgcc.a to the start of libraries which puts it in the
2067 # proper spot after .o and .a files get linked in.
2068 #
2069 # TODO: The proper thing to do longer-tem would be proper gyp
2070 # support for a custom link command line.
2071 ['_toolset=="target"', {
2072 'cflags!': [
2073 '-pthread', # Not supported by Android toolchain.
2074 ],
2075 'cflags': [
2076 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2077 '-ffunction-sections',
2078 '-funwind-tables',
2079 '-g',
2080 '-fstack-protector',
2081 '-fno-short-enums',
2082 '-finline-limit=64',
2083 '-Wa,--noexecstack',
2084 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2085 '<@(release_extra_cflags)',
2086 # Note: This include is in cflags to ensure that it comes after
2087 # all of the includes.
2088 '-I<(android_ndk_include)',
2089 ],
2090 'defines': [
2091 'ANDROID',
2092 '__GNU_SOURCE=1', # Necessary for clone()
2093 'USE_STLPORT=1',
2094 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2095 'HAVE_OFF64_T',
2096 'HAVE_SYS_UIO_H',
2097 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2098 ],
2099 'ldflags!': [
2100 '-pthread', # Not supported by Android toolchain.
2101 ],
2102 'ldflags': [
2103 '-nostdlib',
2104 '-Wl,--no-undefined',
2105 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2106 # Don't export symbols from statically linked libraries.
2107 '-Wl,--exclude-libs=ALL',
2108 ],
[email protected]a0e48b02011-11-22 07:53:012109 'libraries': [
2110 '-l<(android_stlport_library)',
2111 # Manually link the libgcc.a that the cross compiler uses.
2112 '<!($CROSS_CC -print-libgcc-file-name)',
2113 '-lc',
2114 '-ldl',
2115 '-lstdc++',
2116 '-lm',
[email protected]da1c8d692011-09-20 20:35:012117 ],
2118 'conditions': [
2119 ['android_build_type==0', {
2120 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522121 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012122 ],
2123 }],
2124 # NOTE: The stlport header include paths below are specified in
2125 # cflags rather than include_dirs because they need to come
2126 # after include_dirs. Think of them like system headers, but
2127 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2128 # toolchain (circa Gingerbread) will exhibit strange errors.
2129 # The include ordering here is important; change with caution.
2130 ['use_system_stlport==0', {
2131 'cflags': [
2132 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2133 ],
2134 'conditions': [
2135 ['target_arch=="arm" and armv7==1', {
2136 'ldflags': [
2137 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2138 ],
2139 }],
2140 ['target_arch=="arm" and armv7==0', {
2141 'ldflags': [
2142 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2143 ],
2144 }],
2145 ['target_arch=="ia32"', {
2146 'ldflags': [
2147 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2148 ],
2149 }],
2150 ],
2151 }],
2152 ['target_arch=="ia32"', {
2153 # The x86 toolchain currently has problems with stack-protector.
2154 'cflags!': [
2155 '-fstack-protector',
2156 ],
2157 'cflags': [
2158 '-fno-stack-protector',
2159 ],
2160 }],
2161 ],
2162 'target_conditions': [
2163 ['_type=="executable"', {
2164 'ldflags': [
2165 '-Bdynamic',
2166 '-Wl,-dynamic-linker,/system/bin/linker',
2167 '-Wl,--gc-sections',
2168 '-Wl,-z,nocopyreloc',
2169 # crtbegin_dynamic.o should be the last item in ldflags.
2170 '<(android_ndk_lib)/crtbegin_dynamic.o',
2171 ],
2172 'libraries': [
2173 # crtend_android.o needs to be the last item in libraries.
2174 # Do not add any libraries after this!
2175 '<(android_ndk_lib)/crtend_android.o',
2176 ],
2177 }],
2178 ['_type=="shared_library"', {
2179 'ldflags': [
2180 '-Wl,-shared,-Bsymbolic',
2181 ],
2182 }],
2183 ],
2184 }],
2185 # Settings for building host targets using the system toolchain.
2186 ['_toolset=="host"', {
2187 'ldflags!': [
2188 '-Wl,-z,noexecstack',
2189 '-Wl,--gc-sections',
2190 '-Wl,-O1',
2191 '-Wl,--as-needed',
2192 ],
[email protected]965b6b22011-09-29 16:07:282193 'sources/': [
2194 ['exclude', '_android(_unittest)?\\.cc$'],
2195 ['exclude', '(^|/)android/']
2196 ],
[email protected]da1c8d692011-09-20 20:35:012197 }],
2198 ],
2199 },
2200 }],
[email protected]93f21e42010-04-01 00:35:152201 ['OS=="solaris"', {
2202 'cflags!': ['-fvisibility=hidden'],
2203 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2204 }],
[email protected]2f80c312009-02-25 21:26:552205 ['OS=="mac"', {
2206 'target_defaults': {
[email protected]24700642009-06-01 16:01:202207 'variables': {
[email protected]162407f2011-09-08 15:33:172208 # These should end with %, but there seems to be a bug with % in
2209 # variables that are intended to be set to different values in
2210 # different targets, like these.
2211 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202212 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382213 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202214 },
[email protected]d92c7c012009-03-19 19:26:422215 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552216 'xcode_settings': {
2217 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042218 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2219 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2220 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2221 # (Equivalent to -fPIC)
2222 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2223 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2224 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252225 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2226 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042227 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2228 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2229 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2230 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552231 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042232 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252233 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2234 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112235 # Keep pch files below xcodebuild/.
2236 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552237 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192238 'OTHER_CFLAGS': [
2239 '-fno-strict-aliasing', # See http://crbug.com/32204
2240 ],
[email protected]080e86f2010-06-21 15:19:042241 'WARNING_CFLAGS': [
2242 '-Wall',
2243 '-Wendif-labels',
2244 '-Wextra',
2245 # Don't warn about unused function parameters.
2246 '-Wno-unused-parameter',
2247 # Don't warn about the "struct foo f = {0};" initialization
2248 # pattern.
2249 '-Wno-missing-field-initializers',
2250 ],
[email protected]b3fb8092009-03-12 19:09:242251 'conditions': [
2252 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592253 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2254 ],
[email protected]66733172010-09-22 00:09:282255 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302256 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2257 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382258
2259 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2260 # when buliding with clang. This warning is triggered when the
2261 # override keyword is used via the OVERRIDE macro from
2262 # base/compiler_specific.h.
2263 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
2264
[email protected]34f40892011-09-06 21:53:302265 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282266 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072267 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282268 # Don't die on dtoa code that uses a char as an array index.
2269 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2270 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452271 # Clang spots more unused functions.
2272 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332273 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052274 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302275 # WebKit uses nullptr in a legit way, other that that this
2276 # warning doesn't fire.
2277 '-Wno-c++0x-compat',
2278 # This (rightyfully) complains about 'override', which we use
2279 # heavily.
2280 '-Wno-c++11-extensions',
[email protected]66733172010-09-22 00:09:282281 ],
2282 }],
[email protected]5d451ad2011-02-11 16:43:462283 ['clang==1 and clang_use_chrome_plugins==1', {
2284 'OTHER_CFLAGS': [
2285 '<(clang_chrome_plugins_flags)',
2286 ],
2287 }],
[email protected]4a9ac22e2011-12-02 03:41:532288 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592289 'OTHER_CFLAGS': [
2290 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532291 ],
2292 }],
2293 ['clang==1 and clang_add_plugin!=""', {
2294 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592295 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2296 ],
2297 }],
[email protected]b3fb8092009-03-12 19:09:242298 ],
[email protected]2f80c312009-02-25 21:26:552299 },
[email protected]34f40892011-09-06 21:53:302300 'conditions': [
2301 ['clang==1', {
2302 'variables': {
2303 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2304 },
2305 }],
[email protected]921c7b52011-11-25 10:34:352306 ['asan==1', {
2307 'xcode_settings': {
2308 'OTHER_CFLAGS': [
2309 '-fasan',
2310 '-faddress-sanitizer',
2311 '-w',
2312 ],
2313 'OTHER_LDFLAGS': [
2314 '-fasan',
2315 '-faddress-sanitizer',
2316 # The symbols below are referenced in the ASan runtime
2317 # library (compiled on OS X 10.6), but may be unavailable
2318 # on the prior OS X versions. Because Chromium is currently
2319 # targeting 10.5.0, we need to explicitly mark these
2320 # symbols as dynamic_lookup.
2321 '-Wl,-U,_malloc_default_purgeable_zone',
2322 '-Wl,-U,_malloc_zone_memalign',
2323 '-Wl,-U,_dispatch_sync_f',
2324 '-Wl,-U,_dispatch_async_f',
2325 '-Wl,-U,_dispatch_barrier_async_f',
2326 '-Wl,-U,_dispatch_group_async_f',
2327 '-Wl,-U,_dispatch_after_f',
2328 ],
2329 },
2330 'defines': [
2331 'ADDRESS_SANITIZER',
2332 ],
2333 }],
[email protected]34f40892011-09-06 21:53:302334 ],
[email protected]2f80c312009-02-25 21:26:552335 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552336 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462337 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2338 }],
2339 ['_mac_bundle', {
2340 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082341 }],
[email protected]6303fed2011-08-11 01:12:102342 ['_type=="executable"', {
2343 'postbuilds': [
2344 {
2345 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362346 # code execution when running on Mac OS X 10.7 ("Lion"), and
2347 # ensures that the position-independent executable (PIE) bit
2348 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102349 'variables': {
[email protected]8c40f322011-08-24 03:33:362350 # Define change_mach_o_flags in a variable ending in _path
2351 # so that GYP understands it's a path and performs proper
2352 # relativization during dict merging.
2353 'change_mach_o_flags_path':
2354 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172355 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132356 ],
2357 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172358 ['mac_pie==0 or release_valgrind_build==1', {
2359 # Don't enable PIE if it's unwanted. It's unwanted if
2360 # the target specifies mac_pie=0 or if building for
2361 # Valgrind, because Valgrind doesn't understand slide.
2362 # See the similar mac_pie/release_valgrind_build check
2363 # below.
[email protected]081c0342011-08-24 14:59:132364 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132365 '--no-pie',
2366 ],
2367 }],
2368 ],
[email protected]6303fed2011-08-11 01:12:102369 },
[email protected]8c40f322011-08-24 03:33:362370 'postbuild_name': 'Change Mach-O Flags',
2371 'action': [
2372 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132373 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362374 ],
[email protected]6303fed2011-08-11 01:12:102375 },
2376 ],
[email protected]5a5d97aa2011-09-02 15:34:002377 'conditions': [
2378 ['asan==1', {
2379 'variables': {
2380 'asan_saves_file': 'asan.saves',
2381 },
2382 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562383 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002384 },
2385 }],
2386 ],
[email protected]162407f2011-09-08 15:33:172387 'target_conditions': [
2388 ['mac_pie==1 and release_valgrind_build==0', {
2389 # Turn on position-independence (ASLR) for executables. When
2390 # PIE is on for the Chrome executables, the framework will
2391 # also be subject to ASLR.
2392 # Don't do this when building for Valgrind, because Valgrind
2393 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2394 # understand slide, and get rid of the Valgrind check.
2395 'xcode_settings': {
2396 'OTHER_LDFLAGS': [
2397 '-Wl,-pie', # Position-independent executable (MH_PIE)
2398 ],
2399 },
2400 }],
2401 ],
[email protected]6a0242bc2011-07-01 00:34:462402 }],
[email protected]9a5e72862010-09-02 16:16:582403 ['(_type=="executable" or _type=="shared_library" or \
2404 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202405 'target_conditions': [
2406 ['mac_real_dsym == 1', {
2407 # To get a real .dSYM bundle produced by dsymutil, set the
2408 # debug information format to dwarf-with-dsym. Since
2409 # strip_from_xcode will not be used, set Xcode to do the
2410 # stripping as well.
2411 'configurations': {
[email protected]5153767c2009-12-22 01:52:502412 'Release_Base': {
[email protected]24700642009-06-01 16:01:202413 'xcode_settings': {
2414 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2415 'DEPLOYMENT_POSTPROCESSING': 'YES',
2416 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072417 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252418 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072419 # The Xcode default is to strip debugging symbols
2420 # only (-S). Local symbols should be stripped as
2421 # well, which will be handled by -x. Xcode will
2422 # continue to insert -S when stripping even when
2423 # additional flags are added with STRIPFLAGS.
2424 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252425 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072426 ], # target_conditions
2427 }, # xcode_settings
2428 }, # configuration "Release"
2429 }, # configurations
[email protected]24700642009-06-01 16:01:202430 }, { # mac_real_dsym != 1
2431 # To get a fast fake .dSYM bundle, use a post-build step to
2432 # produce the .dSYM and strip the executable. strip_from_xcode
2433 # only operates in the Release configuration.
2434 'postbuilds': [
2435 {
2436 'variables': {
2437 # Define strip_from_xcode in a variable ending in _path
2438 # so that gyp understands it's a path and performs proper
2439 # relativization during dict merging.
2440 'strip_from_xcode_path': 'mac/strip_from_xcode',
2441 },
2442 'postbuild_name': 'Strip If Needed',
2443 'action': ['<(strip_from_xcode_path)'],
2444 },
[email protected]e14a9f92009-08-05 19:26:072445 ], # postbuilds
2446 }], # mac_real_dsym
2447 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582448 }], # (_type=="executable" or _type=="shared_library" or
2449 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072450 ], # target_conditions
2451 }, # target_defaults
2452 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552453 ['OS=="win"', {
2454 'target_defaults': {
2455 'defines': [
[email protected]a89e0942011-09-26 16:06:472456 '_WIN32_WINNT=0x0601',
2457 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552458 'WIN32',
2459 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552460 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282461 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552462 '_CRT_RAND_S',
2463 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2464 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272465 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452466 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552467 ],
[email protected]8974e042010-06-21 18:06:522468 'conditions': [
2469 ['component=="static_library"', {
2470 'defines': [
2471 '_HAS_EXCEPTIONS=0',
2472 ],
2473 }],
[email protected]3e2648a2011-03-21 20:58:502474 ['secure_atl', {
2475 'defines': [
2476 '_SECURE_ATL',
2477 ],
2478 }],
[email protected]8974e042010-06-21 18:06:522479 ],
[email protected]5b5ca7cb2009-07-20 23:00:202480 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372481 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542482 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552483 '$(VSInstallDir)/VC/atlmfc/include',
2484 ],
[email protected]a8d99cef2009-08-26 20:47:492485 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112486 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2487 # TODO(maruel): These warnings are level 4. They will be slowly
2488 # removed as code is fixed.
2489 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2490 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2491 4702, 4706,
2492 ],
[email protected]2f80c312009-02-25 21:26:552493 'msvs_settings': {
2494 'VCCLCompilerTool': {
2495 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552496 'BufferSecurityCheck': 'true',
2497 'EnableFunctionLevelLinking': 'true',
2498 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112499 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552500 'WarnAsError': 'true',
2501 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582502 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502503 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162504 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552505 }],
[email protected]3e2648a2011-03-21 20:58:502506 ['MSVS_VERSION=="2005e"', {
2507 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2508 }],
[email protected]8974e042010-06-21 18:06:522509 ['component=="shared_library"', {
2510 'ExceptionHandling': '1', # /EHsc
2511 }, {
2512 'ExceptionHandling': '0',
2513 }],
[email protected]3fef6e62009-07-31 19:58:582514 ],
[email protected]2f80c312009-02-25 21:26:552515 },
2516 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162517 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372518 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372519 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542520 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372521 ],
[email protected]2f80c312009-02-25 21:26:552522 },
2523 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552524 'AdditionalDependencies': [
2525 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502526 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552527 'version.lib',
2528 'msimg32.lib',
2529 'ws2_32.lib',
2530 'usp10.lib',
2531 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082532 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482533 'winmm.lib',
2534 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552535 ],
[email protected]4de39f82011-03-28 12:01:292536 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502537 ['msvs_express', {
2538 # Explicitly required when using the ATL with express
2539 'AdditionalDependencies': [
2540 'atlthunk.lib',
2541 ],
2542 }],
2543 ['MSVS_VERSION=="2005e"', {
2544 # Non-express versions link automatically to these
2545 'AdditionalDependencies': [
2546 'advapi32.lib',
2547 'comdlg32.lib',
2548 'ole32.lib',
2549 'shell32.lib',
2550 'user32.lib',
2551 'winspool.lib',
2552 ],
2553 }],
2554 ],
[email protected]a78da50e2010-06-09 21:31:372555 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372556 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542557 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372558 ],
[email protected]2f80c312009-02-25 21:26:552559 'GenerateDebugInformation': 'true',
2560 'MapFileName': '$(OutDir)\\$(TargetName).map',
2561 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552562 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482563 # SubSystem values:
2564 # 0 == not set
2565 # 1 == /SUBSYSTEM:CONSOLE
2566 # 2 == /SUBSYSTEM:WINDOWS
2567 # Most of the executables we'll ever create are tests
2568 # and utilities with console output.
2569 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552570 },
2571 'VCMIDLTool': {
2572 'GenerateStublessProxies': 'true',
2573 'TypeLibraryName': '$(InputName).tlb',
2574 'OutputDirectory': '$(IntDir)',
2575 'HeaderFileName': '$(InputName).h',
2576 'DLLDataFileName': 'dlldata.c',
2577 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2578 'ProxyFileName': '$(InputName)_p.c',
2579 },
2580 'VCResourceCompilerTool': {
2581 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382582 'AdditionalIncludeDirectories': [
2583 '<(DEPTH)',
2584 '<(SHARED_INTERMEDIATE_DIR)',
2585 ],
[email protected]2f80c312009-02-25 21:26:552586 },
2587 },
2588 },
2589 }],
[email protected]79e2336c2011-05-12 18:18:342590 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312591 'target_defaults': {
2592 'defines': [
2593 'DISABLE_NACL',
2594 ],
2595 },
2596 }],
[email protected]cfbf9bc2009-12-07 22:07:562597 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192598 'target_defaults': {
2599 'msvs_settings': {
2600 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192601 'DelayLoadDLLs': [
2602 'dbghelp.dll',
2603 'dwmapi.dll',
2604 'uxtheme.dll',
2605 ],
2606 },
2607 },
[email protected]ef4fa4072009-12-04 22:46:502608 'configurations': {
[email protected]5153767c2009-12-22 01:52:502609 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502610 'msvs_settings': {
2611 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162612 'AdditionalOptions': [
2613 '/safeseh',
2614 '/dynamicbase',
2615 '/ignore:4199',
2616 '/ignore:4221',
2617 '/nxcompat',
2618 ],
[email protected]ef4fa4072009-12-04 22:46:502619 },
2620 },
2621 },
[email protected]5153767c2009-12-22 01:52:502622 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502623 'msvs_settings': {
2624 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162625 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502626 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162627 '/dynamicbase',
2628 '/ignore:4199',
2629 '/ignore:4221',
2630 '/nxcompat',
2631 ],
[email protected]ef4fa4072009-12-04 22:46:502632 },
2633 },
2634 },
2635 },
[email protected]48c7af72009-07-03 22:00:192636 },
2637 }],
[email protected]9821d0d2010-04-16 22:40:372638 ['enable_new_npdevice_api==1', {
2639 'target_defaults': {
2640 'defines': [
2641 'ENABLE_NEW_NPDEVICE_API',
2642 ],
2643 },
2644 }],
[email protected]34f40892011-09-06 21:53:302645 ['clang==1', {
2646 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242647 ['CC', '<(make_clang_dir)/bin/clang'],
2648 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072649 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302650 ['CC.host', '$(CC)'],
2651 ['CXX.host', '$(CXX)'],
2652 ['LINK.host', '$(LINK)'],
2653 ],
2654 }],
[email protected]2f80c312009-02-25 21:26:552655 ],
2656 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502657 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2658 # This block adds *project-wide* configuration settings to each project
2659 # file. It's almost always wrong to put things here. Specify your
2660 # custom xcode_settings in target_defaults to add them to targets instead.
2661
2662 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2663 # setting sets the SDK on a project-wide basis. In order to get the
2664 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2665 # here at the project level.
2666 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2667
[email protected]2f80c312009-02-25 21:26:552668 # The Xcode generator will look for an xcode_settings section at the root
2669 # of each dict and use it to apply settings on a file-wide basis. Most
2670 # settings should not be here, they should be in target-specific
2671 # xcode_settings sections, or better yet, should use non-Xcode-specific
2672 # settings in target dicts. SYMROOT is a special case, because many other
2673 # Xcode variables depend on it, including variables such as
2674 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2675 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2676 # files to appear (when present) in the UI as actual files and not red
2677 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2678 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162679 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552680 },
[email protected]ee28c9f2009-09-04 01:53:012681}