blob: a1bfddb6aac34794e8ad79dbb4c5ceb3525c4136 [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]bb6aba32011-01-07 19:04:4320 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3023
[email protected]3fa441d2011-09-18 17:28:5024 # Whether we are using Views Toolkit
25 'toolkit_views%': 0,
26
[email protected]9c8a1982011-05-24 23:08:5827 # Whether the compositor is enabled on views.
28 'views_compositor%': 0,
[email protected]7de46352011-09-12 15:39:1929
[email protected]e599f0132011-08-24 19:03:3530 # Whether or not we are building with the Aura window manager.
[email protected]41423092011-08-25 15:39:5831 'use_aura%': 0,
[email protected]e0b85a52011-10-06 03:30:4232
33 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
34 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2735
36 # Disable Virtual keyboard support by default.
37 'use_virtual_keyboard%': 0,
[email protected]bb6aba32011-01-07 19:04:4338 },
39 # Copy conditionally-set variables out one scope.
40 'chromeos%': '<(chromeos)',
[email protected]9c8a1982011-05-24 23:08:5841 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:5842 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:4243 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2744 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]e72e55b2011-01-06 22:19:3045
[email protected]332749032011-10-22 00:32:4646 # WebKit compositor for ui
47 'use_webkit_compositor%': 0,
48
[email protected]e72e55b2011-01-06 22:19:3049 # Compute the architecture that we're building on.
50 'conditions': [
[email protected]177cd082011-10-04 18:36:3851 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3752 'host_arch%': 'ia32',
53 }, {
[email protected]79e2336c2011-05-12 18:18:3454 # This handles the Unix platforms for which there is some support.
55 # Anything else gets passed through, which probably won't work very
56 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3057 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3458 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
[email protected]e72e55b2011-01-06 22:19:3059 }],
[email protected]bb6aba32011-01-07 19:04:4360
[email protected]023d8242011-11-22 01:25:2761 # Set default value of toolkit_views based on OS.
62 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4363 'toolkit_views%': 1,
64 }, {
65 'toolkit_views%': 0,
66 }],
[email protected]1b546692011-06-30 18:22:3067
[email protected]023d8242011-11-22 01:25:2768 # Use the views compositor when using the Aura window manager.
69 ['use_aura==1', {
[email protected]e599f0132011-08-24 19:03:3570 'views_compositor%': 1,
71 }],
[email protected]e72e55b2011-01-06 22:19:3072 ],
73 },
74
75 # Copy conditionally-set variables out one scope.
76 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:3077 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4378 'toolkit_views%': '<(toolkit_views)',
[email protected]9c8a1982011-05-24 23:08:5879 'views_compositor%': '<(views_compositor)',
[email protected]332749032011-10-22 00:32:4680 'use_webkit_compositor%': '<(use_webkit_compositor)',
[email protected]41423092011-08-25 15:39:5881 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:4282 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2783 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
84
85 # The variable touchui is still present (until all clean up is done).
86 'touchui%': 0,
[email protected]e72e55b2011-01-06 22:19:3087
[email protected]8fb0ef02011-05-20 00:53:5088 # We used to provide a variable for changing how libraries were built.
89 # This variable remains until we can clean up all the users.
90 # This needs to be one nested variables dict in so that dependent
91 # gyp files can make use of it in their outer variables. (Yikes!)
92 # http://code.google.com/p/chromium/issues/detail?id=83308
93 'library%': 'static_library',
94
[email protected]e14a9f92009-08-05 19:26:0795 # Override branding to select the desired branding flavor.
96 'branding%': 'Chromium',
97
98 # Override buildtype to select the desired build flavor.
99 # Dev - everyday build for development/testing
100 # Official - release build (generally implies additional processing)
101 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
102 # conversion is done), some of the things which are now controlled by
103 # 'branding', such as symbol generation, will need to be refactored based
104 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
105 # builds).
106 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27107
[email protected]e72e55b2011-01-06 22:19:30108 # Default architecture we're building for is the architecture we're
109 # building on.
110 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17111
[email protected]e72e55b2011-01-06 22:19:30112 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
113 # are built under a chromium full build (1) or a webkit.org chromium
114 # build (0).
115 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52116
[email protected]e72e55b2011-01-06 22:19:30117 # Set to 1 to enable fast builds. It disables debug info for fastest
118 # compilation.
119 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49120
[email protected]c999f8142011-11-21 17:16:54121 # By default, tests are built with debug symbols. These can be stripped
122 # to improve build speed.
123 'strip_tests%': 0,
124
[email protected]20960e072011-09-20 20:59:01125 # Set to 1 to enable dcheck in release without having to use the flag.
126 'dcheck_always_on%': 0,
127
[email protected]464750f2011-10-24 23:16:18128 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51129 'file_manager_extension%': 0,
130
[email protected]32981462011-10-18 07:05:16131 # Enable WebUI TaskManager by default.
132 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47133
[email protected]e72e55b2011-01-06 22:19:30134 # Python version.
[email protected]a43c5a02011-05-27 06:54:51135 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17136
[email protected]e72e55b2011-01-06 22:19:30137 # Set ARM-v7 compilation flags
138 'armv7%': 0,
139
140 # Set Neon compilation flags (only meaningful if armv7==1).
141 'arm_neon%': 1,
142
143 # The system root for cross-compiles. Default: none.
144 'sysroot%': '',
145
[email protected]945361a2011-09-30 04:38:43146 # The system libdir used for this ABI.
147 'system_libdir%': 'lib',
148
[email protected]e72e55b2011-01-06 22:19:30149 # On Linux, we build with sse2 for Chromium builds.
150 'disable_sse2%': 0,
151
152 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03153 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30154
155 # Variable 'component' is for cases where we would like to build some
156 # components as dynamic shared libraries but still need variable
157 # 'library' for static libraries.
158 # By default, component is set to whatever library is set to and
159 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53160 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30161
[email protected]bb6aba32011-01-07 19:04:43162 # Set to select the Title Case versions of strings in GRD files.
163 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21164
[email protected]98da0042011-02-02 00:10:27165 # Use translations provided by volunteers at launchpad.net. This
166 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19167 'use_third_party_translations%': 0,
168
[email protected]9a425422011-01-11 00:53:18169 # Remoting compilation is enabled by default. Set to 0 to disable.
170 'remoting%': 1,
171
[email protected]5834f4392011-09-13 20:06:17172 # Threaded compositing
173 'use_threaded_compositing%': 0,
174
[email protected]a026daa2011-04-20 15:49:51175 # P2P APIs are compiled in by default. Set to 0 to disable.
176 # Also note that this should be enabled for remoting to compile.
177 'p2p_apis%': 1,
178
[email protected]1ec68c42011-06-01 13:56:25179 # Configuration policy is enabled by default. Set to 0 to disable.
180 'configuration_policy%': 1,
181
[email protected]4b58e7d2011-07-11 10:22:56182 # Safe browsing is compiled in by default. Set to 0 to disable.
183 'safe_browsing%': 1,
184
[email protected]9eb100e2011-10-14 05:08:22185 # Speech input is compiled in by default. Set to 0 to disable.
186 'input_speech%': 1,
187
[email protected]7cce3232011-10-28 10:41:57188 # Notifications are compiled in by default. Set to 0 to disable.
189 'notifications%' : 1,
190
[email protected]5d451ad2011-02-11 16:43:46191 # If this is set, the clang plugins used on the buildbot will be used.
192 # Run tools/clang/scripts/update.sh to make sure they are compiled.
193 # This causes 'clang_chrome_plugins_flags' to be set.
194 # Has no effect if 'clang' is not set as well.
195 'clang_use_chrome_plugins%': 0,
196
[email protected]f36f3742011-11-21 13:12:14197 # Enable building with ASAN (Clang's -faddress-sanitizer option).
198 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06199 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
200 'asan%': 0,
201
[email protected]1ad5a7b2011-06-24 03:15:13202 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
203 # libraries on linux x86-64 and arm, plus ASLR.
204 'linux_fpic%': 1,
205
[email protected]c6a1f94172011-07-05 02:35:00206 # Enable navigator.registerProtocolHandler and supporting UI.
207 'enable_register_protocol_handler%': 1,
208
[email protected]62af76e2011-08-01 02:34:01209 # Enable Web Intents and supporting UI.
210 'enable_web_intents%': 0,
211
[email protected]dda90ae2011-07-19 22:07:48212 # Webrtc compilation is enabled by default. Set to 0 to disable.
213 'enable_webrtc%': 1,
214
[email protected]67c125d2011-10-11 18:58:22215 # PPAPI by default does not support plugins making calls off the main
216 # thread. Set to 1 to turn on experimental support for out-of-process
217 # plugins to make call of the main thread.
218 'enable_pepper_threading%': 0,
219
[email protected]f56797b2011-09-25 00:04:35220 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
221 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
222 # the input value also defines the required XI2 minor minimum version.
223 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
224 'use_xi2_mt%': 0,
225
[email protected]d5cf9fb2011-09-27 00:15:16226 # Use of precompiled headers on Windows is off by default
227 # because of complications that it can cause with our
228 # infrastructure (trybots etc.). Enable by setting to 1 in
229 # ~/.gyp/include.gypi or via the GYP command line for ~20-25%
230 # faster builds.
231 'chromium_win_pch%': 0,
232
[email protected]bb6aba32011-01-07 19:04:43233 'conditions': [
[email protected]33423fa2011-09-23 18:18:14234 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
235 # the 'conditions' clause. Initial attempts resulted in chromium and
236 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22237 ['OS=="mac"', {
[email protected]ef1155a2011-11-10 16:25:09238 'use_skia%': 0,
[email protected]e4dbede82011-09-16 16:11:07239 # Mac uses clang by default, so turn on the plugin as well.
240 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22241 }, {
242 'use_skia%': 1,
243 }],
244
[email protected]79e2336c2011-05-12 18:18:34245 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37246 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34247 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37248 }, {
249 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34250 }],
251
[email protected]df9167b2011-11-14 19:15:25252 # A flag for BSD platforms
253 ['OS=="freebsd" or OS=="openbsd"', {
254 'os_bsd%': 1,
255 }, {
256 'os_bsd%': 0,
257 }],
258
[email protected]c329adf82011-10-05 14:34:57259 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42260 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57261 'use_nss%': 1,
262 }, {
263 'use_nss%': 0,
264 }],
[email protected]e0b85a52011-10-06 03:30:42265
[email protected]258dca42011-09-21 00:17:19266 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01267 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19268 'use_glib%': 0,
269 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34270 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37271 }, {
[email protected]258dca42011-09-21 00:17:19272 # TODO(dnicoara) Wayland build should have these disabled, but
273 # currently GTK and X is too spread and it's hard to completely
274 # remove every dependency.
275 'use_glib%': 1,
276 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37277 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34278 }],
[email protected]efadeacf2011-10-27 19:01:00279 # We always use skia text rendering in Aura on Windows, since GDI
280 # doesn't agree with our BackingStore.
281 # TODO(beng): remove once skia text rendering is on by default.
282 ['use_aura==1 and OS=="win"', {
283 'enable_skia_text%': 1,
284 }],
[email protected]258dca42011-09-21 00:17:19285 ['use_aura==1 and OS!="win"', {
[email protected]9d43e372011-09-22 19:39:52286 'toolkit_uses_gtk%': 0,
[email protected]9edeb712011-09-20 21:20:33287 }],
288
[email protected]63692212010-09-16 00:22:21289 # A flag to enable or disable our compile-time dependency
290 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
291 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49292 # for Linux distributions and for Aura.
293 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21294 'use_gnome_keyring%': 0,
295 }, {
296 'use_gnome_keyring%': 1,
297 }],
[email protected]0afe5212010-10-01 18:56:11298
[email protected]bb6aba32011-01-07 19:04:43299 ['toolkit_views==0 or OS=="mac"', {
300 # GTK+ and Mac wants Title Case strings
301 'use_titlecase_in_grd_files%': 1,
302 }],
303
[email protected]1b4209f2011-01-07 00:25:40304 # Enable some hacks to support Flapper only on Chrome OS.
305 ['chromeos==1', {
306 'enable_flapper_hacks%': 1,
307 }, {
308 'enable_flapper_hacks%': 0,
309 }],
[email protected]3d38d8e2011-04-16 20:48:51310
[email protected]023d8242011-11-22 01:25:27311 # Enable file manager extension on Chrome OS or Aura.
312 ['chromeos==1 or use_aura==1', {
[email protected]3d38d8e2011-04-16 20:48:51313 'file_manager_extension%': 1,
314 }, {
315 'file_manager_extension%': 0,
316 }],
[email protected]7de46352011-09-12 15:39:19317
[email protected]e5b307f2011-10-06 22:55:28318 # ... except on Windows even with Aura.
319 ['use_aura==1 and OS=="win"', {
320 'file_manager_extension%': 0,
321 }],
322
[email protected]023d8242011-11-22 01:25:27323 # Enable WebUI TaskManager always on Chrome OS or Aura.
324 ['chromeos==1 or use_aura==1', {
[email protected]8b2e9f392011-08-05 04:00:47325 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47326 }],
327
[email protected]da1c8d692011-09-20 20:35:01328 ['OS=="android"', {
329 'proprietary_codecs%': 1,
330 'enable_webrtc%': 0,
331 }],
[email protected]839d5172011-10-13 17:18:11332
333 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27334 # on linux builds with the Aura window manager
[email protected]4b58d552011-10-26 00:54:46335 ['views_compositor==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33336 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11337 }, {
[email protected]1ee7c56c2011-10-19 14:51:33338 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11339 }],
[email protected]b3f23ba2010-04-26 22:58:17340 ],
[email protected]e14a9f92009-08-05 19:26:07341 },
342
[email protected]e72e55b2011-01-06 22:19:30343 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07344 'branding%': '<(branding)',
345 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27346 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59347 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50348 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44349 'toolkit_views%': '<(toolkit_views)',
[email protected]9c8a1982011-05-24 23:08:58350 'views_compositor%': '<(views_compositor)',
[email protected]1ee7c56c2011-10-19 14:51:33351 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]332749032011-10-22 00:32:46352 'use_webkit_compositor%': '<(use_webkit_compositor)',
[email protected]41423092011-08-25 15:39:58353 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:42354 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57355 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25356 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34357 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19358 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34359 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22360 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34361 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21362 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11363 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40364 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22365 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44366 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49367 'touchui%': '<(touchui)',
[email protected]2cc81d32011-10-04 17:03:18368 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]f56797b2011-09-25 00:04:35369 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20370 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47371 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21372 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54373 'fastbuild%': '<(fastbuild)',
[email protected]c999f8142011-11-21 17:16:54374 'strip_tests%': '<(strip_tests)',
[email protected]20960e072011-09-20 20:59:01375 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36376 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43377 'armv7%': '<(armv7)',
378 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23379 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43380 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22381 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52382 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43383 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17384 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18385 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17386 'use_threaded_compositing%': '<(use_threaded_compositing)',
[email protected]dda90ae2011-07-19 22:07:48387 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16388 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51389 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25390 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56391 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22392 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57393 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46394 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06395 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56396 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07397 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22398 # Whether to build for Wayland display server
399 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39400
[email protected]371e1092011-10-12 20:37:36401 # Use system yasm instead of bundled one.
402 'use_system_yasm%': 0,
403
[email protected]cf90a512011-10-08 00:00:44404 # Default to enabled PIE; this is important for ASLR but we need to be
405 # able to turn it off for remote debugging on Chromium OS
406 'linux_disable_pie%': 0,
407
[email protected]caa95c82009-11-23 22:39:32408 # The release channel that this build targets. This is used to restrict
409 # channel-specific build options, like which installer packages to create.
410 # The default is 'all', which does no channel-specific filtering.
411 'channel%': 'all',
412
[email protected]b3fb8092009-03-12 19:09:24413 # Override chromium_mac_pch and set it to 0 to suppress the use of
414 # precompiled headers on the Mac. Prefix header injection may still be
415 # used, but prefix headers will not be precompiled. This is useful when
416 # using distcc to distribute a build to compile slaves that don't
417 # share the same compiler executable as the system driving the compilation,
418 # because precompiled headers rely on pointers into a specific compiler
419 # executable's image. Setting this to 0 is needed to use an experimental
420 # Linux-Mac cross compiler distcc farm.
421 'chromium_mac_pch%': 1,
422
[email protected]3224dcd2009-09-16 17:31:25423 # Mac OS X SDK and deployment target support.
424 # The SDK identifies the version of the system headers that will be used,
425 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
426 # "Maximum allowed" refers to the operating system version whose APIs are
427 # available in the headers.
428 # The deployment target identifies the minimum system version that the
429 # built products are expected to function on. It corresponds to the
430 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
431 # To ensure these macros are available, #include <AvailabilityMacros.h>.
432 # Additional documentation on these macros is available at
433 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
434 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
435 # deployment target to 10.5. Other projects, such as O3D, may override
436 # these defaults.
437 'mac_sdk%': '10.5',
438 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59439
[email protected]f5ecbba12009-04-03 04:35:18440 # Set to 1 to enable code coverage. In addition to build changes
441 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
442 # project file called "coverage".
443 # Currently ignored on Windows.
444 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49445
[email protected]7477ea6f2009-12-22 23:28:15446 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47447 # environment variable, the libcmt shim it uses sometimes gets in
448 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
449 # 'win_use_allocator_shim': 0,
450 # 'win_release_RuntimeLibrary': 2
451 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52452 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11453
[email protected]95ff8082009-11-13 22:21:01454 # Whether usage of OpenMAX is enabled.
455 'enable_openmax%': 0,
456
[email protected]d01120e62010-05-10 17:04:48457 # Whether proprietary audio/video codecs are assumed to be included with
458 # this build (only meaningful if branding!=Chrome).
459 'proprietary_codecs%': 0,
460
[email protected]e5b2eaa2009-04-14 01:39:12461 # TODO(bradnelson): eliminate this when possible.
462 # To allow local gyp files to prevent release.vsprops from being included.
463 # Yes(1) means include release.vsprops.
464 # Once all vsprops settings are migrated into gyp, this can go away.
465 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23466
[email protected]cbd5fd52009-08-26 00:14:27467 # TODO(bradnelson): eliminate this when possible.
468 # To allow local gyp files to override additional linker options for msvs.
469 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19470 'msvs_use_common_linker_extras%': 1,
471
[email protected]1ffb6502009-06-02 07:46:24472 # TODO(sgk): eliminate this if possible.
473 # It would be nicer to support this via a setting in 'target_defaults'
474 # in chrome/app/locales/locales.gypi overriding the setting in the
475 # 'Debug' configuration in the 'target_defaults' dict below,
476 # but that doesn't work as we'd like.
477 'msvs_debug_link_incremental%': '2',
478
[email protected]1f790ef2011-01-11 20:45:36479 # Needed for some of the largest modules.
480 'msvs_debug_link_nonincremental%': '1',
481
[email protected]5ab8f482011-08-18 18:30:06482 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
483 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51484 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06485
[email protected]573136142009-07-15 22:48:37486 # This is the location of the sandbox binary. Chrome looks for this before
487 # running the zygote process. If found, and SUID, it will be used to
488 # sandbox the zygote process and, thus, all renderer processes.
489 'linux_sandbox_path%': '',
490
[email protected]ad6d2c42009-09-15 20:13:38491 # Set this to true to enable SELinux support.
492 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57493
[email protected]58680ce2010-09-18 00:09:15494 # Set this to true when building with Clang.
495 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15496 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24497 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15498
[email protected]5e781232011-01-28 02:57:59499 # These two variables can be set in GYP_DEFINES while running
500 # |gclient runhooks| to let clang run a plugin in every compilation.
501 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
502 # Example:
[email protected]93120fe2011-02-03 20:46:42503 # 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:59504
505 'clang_load%': '',
506 'clang_add_plugin%': '',
507
[email protected]da1c8d692011-09-20 20:35:01508 # The default type of gtest.
509 'gtest_target_type%': 'executable',
510
[email protected]7664ab32011-02-01 23:35:25511 # Enable sampling based profiler.
512 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
513 'profiling%': '0',
514
[email protected]93b373502011-08-16 19:06:22515 # Enable strict glibc debug mode.
516 'glibcxx_debug%': 0,
517
[email protected]36532f332010-08-25 00:22:01518 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
519 'linux_breakpad%': 0,
520 # And if we want to dump symbols for Breakpad-enabled builds.
521 'linux_dump_symbols%': 0,
522 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03523 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49524 # Strip the test binaries needed for Linux reliability tests.
525 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03526
[email protected]46ce5b562010-06-16 18:39:53527 # Enable TCMalloc.
528 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24529
[email protected]39ca7de2010-04-16 08:04:03530 # Disable TCMalloc's debugallocation.
531 'linux_use_debugallocation%': 0,
532
[email protected]d8b60602010-03-26 09:41:22533 # Disable TCMalloc's heapchecker.
534 'linux_use_heapchecker%': 0,
535
[email protected]64e2d4a42010-08-27 10:13:21536 # Disable shadow stack keeping used by heapcheck to unwind the stacks
537 # better.
538 'linux_keep_shadow_stacks%': 0,
539
[email protected]556c5d72010-06-10 05:45:01540 # Set to 1 to link against libgnome-keyring instead of using dlopen().
541 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35542 # Set to 1 to link against gsettings APIs instead of using dlopen().
543 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01544
[email protected]77c1b29392009-12-04 06:21:29545 # Set Thumb compilation flags.
546 'arm_thumb%': 0,
547
[email protected]53e0f642010-03-05 01:41:56548 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
549 # arm_neon==0).
550 'arm_fpu%': 'vfpv3',
551
[email protected]9821d0d2010-04-16 22:40:37552 # Enable new NPDevice API.
553 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50554
555 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14556 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50557
[email protected]6f51b27e2010-06-22 20:43:53558 # Enable a variable used elsewhere throughout the GYP files to determine
559 # whether to compile in the sources for the GPU plugin / process.
560 'enable_gpu%': 1,
561
[email protected]e72e55b2011-01-06 22:19:30562 # .gyp files or targets should set chromium_code to 1 if they build
563 # Chromium-specific code, as opposed to external code. This variable is
564 # used to control such things as the set of warnings to enable, and
565 # whether warnings are treated as errors.
566 'chromium_code%': 0,
567
[email protected]b1eb341c2011-11-09 18:46:07568 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
569 'enable_wexit_time_destructors%': 0,
570
[email protected]e72e55b2011-01-06 22:19:30571 # Set to 1 to compile with the built in pdf viewer.
572 'internal_pdf%': 0,
573
574 # This allows to use libcros from the current system, ie. /usr/lib/
575 # The cros_api will be pulled in as a static library, and all headers
576 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43577 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30578
[email protected]e72e55b2011-01-06 22:19:30579 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
580 # so Cocoa is happy (http://crbug.com/20441).
581 'locales': [
582 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
583 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
584 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
585 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
586 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
587 'vi', 'zh-CN', 'zh-TW',
588 ],
589
[email protected]cc0322d2011-07-24 09:29:19590 # Pseudo locales are special locales which are used for testing and
591 # debugging. They don't get copied to the final app. For more info,
592 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
593 'pseudo_locales': [
594 'fake-bidi',
595 ],
596
[email protected]bb6aba32011-01-07 19:04:43597 'grit_defines': [],
598
[email protected]29c2daea2011-01-05 20:38:50599 # Use Harfbuzz-NG instead of Harfbuzz.
600 # Under development: http://crbug.com/68551
601 'use_harfbuzz_ng%': 0,
602
[email protected]bd3bd442011-03-28 07:58:51603 # If debug_devtools is set to 1, JavaScript files for DevTools are
604 # stored as is and loaded from disk. Otherwise, a concatenated file
605 # is stored in resources.pak. It is still possible to load JS files
606 # from disk by passing --debug-devtools cmdline switch.
607 'debug_devtools%': 0,
608
[email protected]be8a9272011-02-10 22:06:07609 # Point to ICU directory.
610 'icu_src_dir': '../third_party/icu',
611
[email protected]464750f2011-10-24 23:16:18612 # The Java Bridge is not compiled in by default.
613 'java_bridge%': 0,
614
[email protected]0ba831c22011-11-23 23:32:06615 # TODO(dpranke): This determines whether we should attempt to build DRT
616 # et al. from WebKit/Source/WebKit.gyp or Tools/Tools.gyp. This
617 # flag should only be needed temporarily. See
618 # https://bugs.webkit.org/show_bug.cgi?id=68463.
619 'build_webkit_exes_from_webkit_gyp%': 1,
620
[email protected]912c55c2009-07-31 23:33:55621 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11622 # Used to disable Native Client at compile time, for platforms where it
623 # isn't supported (ARM)
624 ['target_arch=="arm"', {
625 'disable_nacl%': 1,
626 }, {
627 'disable_nacl%': 0,
628 }],
[email protected]da1c8d692011-09-20 20:35:01629 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10630 # This will set gcc_version to XY if you are running gcc X.Y.*.
631 # This is used to tweak build flags for gcc 4.4.
632 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23633 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43634 '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:27635 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10636 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27637 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27638 }],
[email protected]4c9cc6c2009-10-01 18:54:57639 # All Chrome builds have breakpad symbols, but only process the
640 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08641 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57642 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57643 }],
[email protected]cbd5fd52009-08-26 00:14:27644 ],
[email protected]da1c8d692011-09-20 20:35:01645 }], # os_posix==1 and OS!="mac" and OS!="android"
646 ['OS=="android"', {
647 # Location of Android NDK.
648 'variables': {
649 'variables': {
650 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
651 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43652
[email protected]da1c8d692011-09-20 20:35:01653 # Switch between different build types, currently only '0' is
654 # supported.
655 'android_build_type%': 0,
656 },
657 'android_ndk_root%': '<(android_ndk_root)',
658 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
659 'android_build_type%': '<(android_build_type)',
660 },
661 'android_ndk_root%': '<(android_ndk_root)',
662 'android_ndk_sysroot': '<(android_ndk_sysroot)',
663 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
664 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
665
666 # Uses Android's crash report system
667 'linux_breakpad%': 0,
668
669 # Always uses openssl.
670 'use_openssl%': 1,
671
672 'proprietary_codecs%': '<(proprietary_codecs)',
673 'safe_browsing%': 0,
674 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22675 'input_speech%': 0,
[email protected]464750f2011-10-24 23:16:18676 'java_bridge%': 1,
[email protected]7cce3232011-10-28 10:41:57677 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01678
679 # Builds the gtest targets as a shared_library.
680 # TODO(michaelbai): Use the fixed value 'shared_library' once it
681 # is fully supported.
682 'gtest_target_type%': '<(gtest_target_type)',
683
684 # Uses system APIs for decoding audio and video.
685 'use_libffmpeg%': '0',
686
687 # Always use the chromium skia. The use_system_harfbuzz needs to
688 # match use_system_skia.
689 'use_system_skia%': '0',
690 'use_system_harfbuzz%': '0',
691
692 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28693 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01694
695 # Choose static link by build type.
696 'conditions': [
697 ['android_build_type==0', {
698 'static_link_system_icu%': 1,
699 }, {
700 'static_link_system_icu%': 0,
701 }],
702 ],
703 # Enable to use system sqlite.
704 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16705 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01706 'use_system_libjpeg%': '<(android_build_type)',
707 # Enable to use the system libexpat.
708 'use_system_libexpat%': '<(android_build_type)',
709 # Enable to use the system stlport, otherwise statically
710 # link the NDK one?
711 'use_system_stlport%': '<(android_build_type)',
712 # Copy it out one scope.
713 'android_build_type%': '<(android_build_type)',
714 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07715 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11716 # Enable clang on mac by default!
717 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07718 'conditions': [
719 # mac_product_name is set to the name of the .app bundle as it should
720 # appear on disk. This duplicates data from
721 # chrome/app/theme/chromium/BRANDING and
722 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
723 # these names into the build system.
724 ['branding=="Chrome"', {
725 'mac_product_name%': 'Google Chrome',
726 }, { # else: branding!="Chrome"
727 'mac_product_name%': 'Chromium',
728 }],
729
730 # Feature variables for enabling Mac Breakpad and Keystone auto-update
731 # support. Both features are on by default in official builds with
732 # Chrome branding.
733 ['branding=="Chrome" and buildtype=="Official"', {
734 'mac_breakpad%': 1,
735 'mac_keystone%': 1,
736 }, { # else: branding!="Chrome" or buildtype!="Official"
737 'mac_breakpad%': 0,
738 'mac_keystone%': 0,
739 }],
740 ],
741 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43742
[email protected]912c55c2009-07-31 23:33:55743 # Whether to use multiple cores to compile with visual studio. This is
744 # optional because it sometimes causes corruption on VS 2005.
745 # It is on by default on VS 2008 and off on VS 2005.
746 ['OS=="win"', {
747 'conditions': [
[email protected]8974e042010-06-21 18:06:52748 ['component=="shared_library"', {
749 'win_use_allocator_shim%': 0,
750 }],
[email protected]912c55c2009-07-31 23:33:55751 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13752 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55753 },{
754 'msvs_multi_core_compile%': 1,
755 }],
[email protected]10bb8c92009-08-07 21:16:03756 # Don't do incremental linking for large modules on 32-bit.
757 ['MSVS_OS_BITS==32', {
758 'msvs_large_module_debug_link_mode%': '1', # No
759 },{
760 'msvs_large_module_debug_link_mode%': '2', # Yes
761 }],
[email protected]3e2648a2011-03-21 20:58:50762 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
763 'msvs_express%': 1,
764 'secure_atl%': 0,
765 },{
766 'msvs_express%': 0,
767 'secure_atl%': 1,
768 }],
[email protected]912c55c2009-07-31 23:33:55769 ],
[email protected]ef4fa4072009-12-04 22:46:50770 'nacl_win64_defines': [
771 # This flag is used to minimize dependencies when building
772 # Native Client loader for 64-bit Windows.
773 'NACL_WIN64',
774 ],
[email protected]912c55c2009-07-31 23:33:55775 }],
[email protected]bb6aba32011-01-07 19:04:43776
[email protected]79e2336c2011-05-12 18:18:34777 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44778 'use_cups%': 1,
779 }, {
780 'use_cups%': 0,
781 }],
[email protected]bb6aba32011-01-07 19:04:43782
[email protected]19fe8f0b2010-12-07 07:27:27783 # Set the relative path from this file to the GYP file of the JPEG
784 # library used by Chromium.
785 ['use_libjpeg_turbo==1', {
786 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
787 }, {
788 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
789 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43790
[email protected]abcc9ac2011-05-16 20:04:35791 # Options controlling the use of GConf (the classic GNOME configuration
792 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31793 ['chromeos==1', {
794 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35795 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31796 }, {
797 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35798 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31799 }],
800
[email protected]4de39f82011-03-28 12:01:29801 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29802 ['branding=="Chrome"', {
803 # TODO(mmoss) The .grd files look for _google_chrome, but for
804 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29805 'grit_defines': ['-D', '_google_chrome',
806 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29807 }, {
[email protected]4de39f82011-03-28 12:01:29808 'grit_defines': ['-D', '_chromium',
809 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29810 }],
[email protected]bb6aba32011-01-07 19:04:43811 ['chromeos==1', {
812 'grit_defines': ['-D', 'chromeos'],
813 }],
814 ['toolkit_views==1', {
815 'grit_defines': ['-D', 'toolkit_views'],
816 }],
[email protected]8dd791d2011-09-16 16:37:30817 ['use_aura==1', {
818 'grit_defines': ['-D', 'use_aura'],
819 }],
[email protected]c329adf82011-10-05 14:34:57820 ['use_nss==1', {
821 'grit_defines': ['-D', 'use_nss'],
822 }],
[email protected]2cc81d32011-10-04 17:03:18823 ['use_virtual_keyboard==1', {
824 'grit_defines': ['-D', 'use_virtual_keyboard'],
825 }],
[email protected]e47c32032011-03-01 19:26:20826 ['file_manager_extension==1', {
827 'grit_defines': ['-D', 'file_manager_extension'],
828 }],
[email protected]8b2e9f392011-08-05 04:00:47829 ['webui_task_manager==1', {
830 'grit_defines': ['-D', 'webui_task_manager'],
831 }],
[email protected]9a425422011-01-11 00:53:18832 ['remoting==1', {
833 'grit_defines': ['-D', 'remoting'],
834 }],
[email protected]bb6aba32011-01-07 19:04:43835 ['use_titlecase_in_grd_files==1', {
836 'grit_defines': ['-D', 'use_titlecase'],
837 }],
[email protected]00dc155832011-02-01 18:51:19838 ['use_third_party_translations==1', {
839 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12840 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16841 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
842 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12843 ],
[email protected]00dc155832011-02-01 18:51:19844 }],
[email protected]da1c8d692011-09-20 20:35:01845 ['OS=="android"', {
846 'grit_defines': ['-D', 'android'],
847 }],
[email protected]5d451ad2011-02-11 16:43:46848 ['clang_use_chrome_plugins==1', {
849 'clang_chrome_plugins_flags':
850 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
851 }],
[email protected]cfa2e1102011-04-27 22:30:23852
[email protected]452da69e2011-05-24 02:36:05853 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27854 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23855 'use_ibus%': 1,
856 }, {
857 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56858 }],
859
860 ['enable_register_protocol_handler==1', {
861 'grit_defines': ['-D', 'enable_register_protocol_handler'],
862 }],
[email protected]92799b632011-08-15 14:33:06863
[email protected]41ed4e82011-08-25 23:02:07864 ['enable_web_intents==1', {
865 'grit_defines': ['-D', 'enable_web_intents'],
866 }],
867
[email protected]92799b632011-08-15 14:33:06868 ['asan==1', {
869 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20870 # Do not use Chrome plugins for Clang. The Clang version in
871 # third_party/asan may be different from the default one.
872 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06873 }],
[email protected]912c55c2009-07-31 23:33:55874 ],
[email protected]35958422011-09-28 02:03:59875 # List of default apps to install in new profiles. The first list contains
876 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:06877 # contains the destination location for each of the files. When a crx
878 # is added or removed from the list, the chrome/browser/resources/
879 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:59880 'default_apps_list': [
881 'browser/resources/default_apps/external_extensions.json',
882 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06883 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59884 'browser/resources/default_apps/youtube.crx',
885 ],
886 'default_apps_list_linux_dest': [
887 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
888 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06889 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59890 '<(PRODUCT_DIR)/default_apps/youtube.crx',
891 ],
[email protected]2f80c312009-02-25 21:26:55892 },
893 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26894 'variables': {
[email protected]a6e22132010-02-10 20:43:18895 # The condition that operates on chromium_code is in a target_conditions
896 # section, and will not have access to the default fallback value of
897 # chromium_code at the top of this file, or to the chromium_code
898 # variable placed at the root variables scope of .gyp files, because
899 # those variables are not set at target scope. As a workaround,
900 # if chromium_code is not set at target scope, define it in target scope
901 # to contain whatever value it has during early variable expansion.
902 # That's enough to make it available during target conditional
903 # processing.
904 'chromium_code%': '<(chromium_code)',
905
[email protected]7e0d664a2009-12-03 21:07:47906 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29907 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00908 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:33909
[email protected]7e0d664a2009-12-03 21:07:47910 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
911 'win_release_Optimization%': '2', # 2 = /Os
912 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:33913
914 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
915 'win_release_OmitFramePointers%': '1',
916
[email protected]6b0507b2010-05-07 07:41:21917 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
918 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:33919
[email protected]6b0507b2010-05-07 07:41:21920 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15921 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
922 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:33923
[email protected]fac10d12010-11-08 16:00:31924 # VS inserts quite a lot of extra checks to algorithms like
925 # std::partial_sort in Debug build which make them O(N^2)
926 # instead of O(N*logN). This is particularly slow under memory
927 # tools like ThreadSanitizer so we want it to be disablable.
928 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
929 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47930
[email protected]ffd984b12009-09-11 19:37:00931 'release_extra_cflags%': '',
932 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56933 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52934
[email protected]b1eb341c2011-11-09 18:46:07935 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
936 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
937
[email protected]ef3326702011-10-06 18:06:44938 # Only used by Windows build for now. Can be used to build into a
939 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
940 # output files in src/build/VS2010_{Debug,Release}.
941 'build_dir_prefix%': '',
942
[email protected]8974e042010-06-21 18:06:52943 'conditions': [
944 ['OS=="win" and component=="shared_library"', {
945 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
946 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
947 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
948 }, {
949 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
950 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
951 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
952 }],
953 ],
[email protected]1c966092009-08-20 21:19:26954 },
[email protected]32aa8cc2009-03-04 21:36:39955 'conditions': [
956 ['branding=="Chrome"', {
957 'defines': ['GOOGLE_CHROME_BUILD'],
958 }, { # else: branding!="Chrome"
959 'defines': ['CHROMIUM_BUILD'],
960 }],
[email protected]63e39a282011-07-13 20:41:28961 ['component=="shared_library"', {
962 'defines': ['COMPONENT_BUILD'],
963 }],
[email protected]5cba9ff72011-11-16 21:55:18964 ['component=="shared_library" and incremental_chrome_dll==1', {
965 # TODO(dpranke): We can't incrementally link chrome when
966 # content is being built as a DLL because chrome links in
967 # webkit_glue and webkit_glue depends on symbols defined in
968 # content. We can remove this when we fix glue.
969 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
970 'defines': ['COMPILE_CONTENT_STATICALLY'],
971 }],
[email protected]06c756182010-04-27 18:31:31972 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17973 'defines': ['TOOLKIT_VIEWS=1'],
974 }],
[email protected]9c8a1982011-05-24 23:08:58975 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27976 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58977 }],
[email protected]1ee7c56c2011-10-19 14:51:33978 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:11979 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
980 }],
[email protected]332749032011-10-22 00:32:46981 ['use_webkit_compositor==1', {
982 'defines': ['USE_WEBKIT_COMPOSITOR=1'],
983 }],
[email protected]41423092011-08-25 15:39:58984 ['use_aura==1', {
985 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:35986 }],
[email protected]c329adf82011-10-05 14:34:57987 ['use_nss==1', {
988 'defines': ['USE_NSS=1'],
989 }],
[email protected]9d43e372011-09-22 19:39:52990 ['toolkit_uses_gtk==1', {
991 'defines': ['TOOLKIT_USES_GTK=1'],
992 }],
[email protected]a47aa892011-11-22 03:12:31993 ['toolkit_uses_gtk==1 and toolkit_views==0', {
994 # TODO(erg): We are progressively sealing up use of deprecated features
995 # in gtk in preparation for an eventual porting to gtk3.
996 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
997 }],
[email protected]fdc5bed2010-01-09 01:16:57998 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29999 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501000 }],
[email protected]2cc81d32011-10-04 17:03:181001 ['use_virtual_keyboard==1', {
1002 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1003 }],
[email protected]f56797b2011-09-25 00:04:351004 ['use_xi2_mt!=0', {
1005 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1006 }],
[email protected]236754a2011-07-28 17:38:231007 ['use_wayland==1', {
1008 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1009 }],
[email protected]e47c32032011-03-01 19:26:201010 ['file_manager_extension==1', {
1011 'defines': ['FILE_MANAGER_EXTENSION=1'],
1012 }],
[email protected]8b2e9f392011-08-05 04:00:471013 ['webui_task_manager==1', {
1014 'defines': ['WEBUI_TASK_MANAGER=1'],
1015 }],
[email protected]7664ab32011-02-01 23:35:251016 ['profiling==1', {
1017 'defines': ['ENABLE_PROFILING=1'],
1018 }],
[email protected]93b373502011-08-16 19:06:221019 ['OS=="linux" and glibcxx_debug==1', {
1020 'defines': ['_GLIBCXX_DEBUG=1',],
1021 'cflags_cc!': ['-fno-rtti'],
1022 'cflags_cc+': ['-frtti', '-g'],
1023 }],
[email protected]542bf24a2010-06-11 23:08:171024 ['remoting==1', {
1025 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001026 }],
[email protected]a026daa2011-04-20 15:49:511027 ['p2p_apis==1', {
1028 'defines': ['ENABLE_P2P_APIS=1'],
1029 }],
[email protected]d01120e62010-05-10 17:04:481030 ['proprietary_codecs==1', {
1031 'defines': ['USE_PROPRIETARY_CODECS'],
1032 }],
[email protected]1b4209f2011-01-07 00:25:401033 ['enable_flapper_hacks==1', {
1034 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1035 }],
[email protected]67c125d2011-10-11 18:58:221036 ['enable_pepper_threading==1', {
1037 'defines': ['ENABLE_PEPPER_THREADING'],
1038 }],
[email protected]f31e2e52011-07-14 16:01:191039 ['configuration_policy==1', {
1040 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1041 }],
[email protected]9eb100e2011-10-14 05:08:221042 ['input_speech==1', {
1043 'defines': ['ENABLE_INPUT_SPEECH'],
1044 }],
[email protected]7cce3232011-10-28 10:41:571045 ['notifications==1', {
1046 'defines': ['ENABLE_NOTIFICATIONS'],
1047 }],
[email protected]9c1949e2009-10-02 19:59:541048 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171049
[email protected]9c1949e2009-10-02 19:59:541050 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141051 # For Windows and Mac, we don't genererate debug information.
1052 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541053 'msvs_settings': {
1054 'VCLinkerTool': {
1055 'GenerateDebugInformation': 'false',
1056 },
1057 'VCCLCompilerTool': {
1058 'DebugInformationFormat': '0',
1059 }
[email protected]da4d4ea2011-09-22 20:23:141060 },
1061 'xcode_settings': {
1062 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1063 },
[email protected]1cc2fa72010-07-03 08:49:241064 }, { # else: OS != "win", generate less debug information.
1065 'variables': {
1066 'debug_extra_cflags': '-g1',
1067 },
[email protected]37c84192010-04-14 21:37:401068 }],
[email protected]aecc4d12011-01-19 05:32:331069 # Clang creates chubby debug information, which makes linking very
1070 # slow. For now, don't create debug information with clang. See
1071 # http://crbug.com/70000
1072 ['OS=="linux" and clang==1', {
1073 'variables': {
1074 'debug_extra_cflags': '-g0',
1075 },
1076 }],
[email protected]9c1949e2009-10-02 19:59:541077 ], # conditions for fastbuild.
1078 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011079 ['dcheck_always_on!=0', {
1080 'defines': ['DCHECK_ALWAYS_ON=1'],
1081 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381082 ['selinux==1', {
1083 'defines': ['CHROMIUM_SELINUX=1'],
1084 }],
[email protected]7e0d664a2009-12-03 21:07:471085 ['win_use_allocator_shim==0', {
1086 'conditions': [
1087 ['OS=="win"', {
1088 'defines': ['NO_TCMALLOC'],
1089 }],
1090 ],
1091 }],
[email protected]43f28f832010-02-03 02:28:481092 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151093 'defines': [
1094 'ENABLE_GPU=1',
1095 ],
1096 }],
[email protected]b1c2a5542010-10-08 12:44:401097 ['use_openssl==1', {
1098 'defines': [
1099 'USE_OPENSSL=1',
1100 ],
1101 }],
[email protected]ed154592010-04-29 00:18:501102 ['enable_eglimage==1', {
1103 'defines': [
1104 'ENABLE_EGLIMAGE=1',
1105 ],
1106 }],
[email protected]7d7564a12011-06-21 19:20:221107 ['use_skia==1', {
1108 'defines': [
1109 'USE_SKIA=1',
1110 ],
1111 }],
[email protected]f5ecbba12009-04-03 04:35:181112 ['coverage!=0', {
1113 'conditions': [
1114 ['OS=="mac"', {
1115 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041116 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1117 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471118 },
[email protected]e4fb84c2009-12-28 20:45:431119 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101120 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431121 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181122 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431123 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181124 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471125 }],
1126 ],
1127 }],
[email protected]da1c8d692011-09-20 20:35:011128 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181129 'cflags': [ '-ftest-coverage',
1130 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001131 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181132 }],
[email protected]e8f6ff42009-07-07 18:20:531133 # Finally, for Windows, we simply turn on profiling.
1134 ['OS=="win"', {
1135 'msvs_settings': {
1136 'VCLinkerTool': {
1137 'Profile': 'true',
1138 },
[email protected]10bb8c92009-08-07 21:16:031139 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531140 # /Z7, not /Zi, so coverage is happyb
1141 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161142 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531143 }
1144 }
1145 }], # OS==win
1146 ], # conditions for coverage
1147 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381148 ['OS=="win"', {
1149 'defines': [
1150 '__STD_C',
1151 '_CRT_SECURE_NO_DEPRECATE',
1152 '_SCL_SECURE_NO_DEPRECATE',
1153 ],
1154 'include_dirs': [
1155 '<(DEPTH)/third_party/wtl/include',
1156 ],
1157 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561158 ['enable_register_protocol_handler==1', {
1159 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191160 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561161 ],
1162 }],
[email protected]41ed4e82011-08-25 23:02:071163 ['enable_web_intents==1', {
1164 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471165 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071166 ],
1167 }],
[email protected]a6e22132010-02-10 20:43:181168 ], # conditions for 'target_defaults'
1169 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071170 ['enable_wexit_time_destructors==1', {
1171 'conditions': [
1172 [ 'clang==1', {
1173 'cflags': [
1174 '-Wexit-time-destructors',
1175 ],
1176 'xcode_settings': {
1177 'WARNING_CFLAGS': [
1178 '-Wexit-time-destructors',
1179 ],
1180 },
1181 }],
1182 ],
1183 }],
[email protected]c14d8e772010-02-09 22:06:151184 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281185 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341186 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331187 # We don't want to get warnings from third-party code,
1188 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281189 'cflags!': [
1190 '-Wall',
1191 '-Wextra',
1192 '-Werror',
1193 ],
[email protected]167ec822011-10-24 22:05:271194 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001195 # Don't warn about hash_map in third-party code.
1196 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271197 ],
1198 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331199 # Don't warn about printf format problems.
1200 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221201 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001202 ],
[email protected]d16bd642011-07-25 23:59:181203 'cflags_cc!': [
1204 # TODO(fischman): remove this.
1205 # http://code.google.com/p/chromium/issues/detail?id=90453
1206 '-Wsign-compare',
1207 ]
[email protected]d8543312010-02-10 17:43:281208 }],
[email protected]a0e48b02011-11-22 07:53:011209 [ 'os_posix==1 and OS!="mac" and OS!="openbsd" and OS!="android" and chromeos==0', {
[email protected]6e4451892011-07-27 10:32:111210 'cflags': [
1211 # Don't warn about ignoring the return value from e.g. close().
1212 # This is off by default in some gccs but on by default in others.
1213 # Currently this option is not set for Chrome OS build because
1214 # the current version of gcc (4.3.4) used for building Chrome in
1215 # Chrome OS chroot doesn't support this option.
[email protected]817f0f142011-10-13 04:23:221216 # OpenBSD does not support this option either, since it's using
1217 # gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111218 # TODO(mazda): remove the conditional for Chrome OS when gcc
1219 # version is upgraded.
1220 '-Wno-unused-result',
1221 ],
1222 }],
[email protected]d8543312010-02-10 17:43:281223 [ 'OS=="win"', {
1224 'defines': [
1225 '_CRT_SECURE_NO_DEPRECATE',
1226 '_CRT_NONSTDC_NO_WARNINGS',
1227 '_CRT_NONSTDC_NO_DEPRECATE',
1228 '_SCL_SECURE_NO_DEPRECATE',
1229 ],
1230 'msvs_disabled_warnings': [4800],
1231 'msvs_settings': {
1232 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111233 'WarningLevel': '3',
1234 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281235 'Detect64BitPortabilityProblems': 'false',
1236 },
1237 },
1238 }],
[email protected]ea47b6a2011-07-17 19:39:421239 # TODO(darin): Unfortunately, some third_party code depends on base/
1240 [ 'OS=="win" and component=="shared_library"', {
1241 'msvs_disabled_warnings': [
1242 4251, # class 'std::xx' needs to have dll-interface.
1243 ],
1244 }],
[email protected]d8543312010-02-10 17:43:281245 [ 'OS=="mac"', {
1246 'xcode_settings': {
1247 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061248 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281249 },
1250 }],
[email protected]c14d8e772010-02-09 22:06:151251 ],
1252 }, {
1253 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1254 # C99 macros on Mac and Linux.
1255 'defines': [
1256 '__STDC_FORMAT_MACROS',
1257 ],
1258 'conditions': [
1259 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301260 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161261 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301262 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151263 }],
1264 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301265 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161266 ['exclude', '(^|/)(cocoa|mac)/'],
1267 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151268 }],
[email protected]02065c62011-09-23 00:08:461269 ['use_x11!=1', {
1270 'sources/': [
1271 ['exclude', '_(chromeos|x|x11)(_unittest)?\\.(h|cc)$'],
1272 ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
1273 ],
1274 }],
[email protected]79e2336c2011-05-12 18:18:341275 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151276 'sources/': [
[email protected]3ce52b72011-11-10 23:01:191277 ['exclude', '_gtk(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161278 ['exclude', '(^|/)gtk/'],
[email protected]02065c62011-09-23 00:08:461279 ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131280 ],
1281 }],
[email protected]69a48a92011-11-14 15:18:011282 ['OS!="linux" and OS!="openbsd"', {
[email protected]3ce52b72011-11-10 23:01:191283 'sources/': [
1284 ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
1285 ],
1286 }],
[email protected]f1b2cd02011-08-10 16:50:441287 ['use_wayland!=1', {
1288 'sources/': [
1289 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1290 ['exclude', '(^|/)wayland/'],
1291 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1292 ],
1293 }],
[email protected]167ec822011-10-24 22:05:271294 # Do not exclude the linux files on OpenBSD since most of them can be
1295 # shared at this point.
1296 # In case a file is not needed, it is going to be excluded later on.
1297 ['OS!="linux" and OS!="openbsd"', {
[email protected]18cff3d2010-02-17 18:03:131298 'sources/': [
[email protected]40519592010-11-16 15:23:301299 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161300 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131301 ],
[email protected]c14d8e772010-02-09 22:06:151302 }],
[email protected]f98d7b92011-09-09 10:17:351303 ['OS!="android"', {
1304 'sources/': [
1305 ['exclude', '_android(_unittest)?\\.cc$'],
1306 ['exclude', '(^|/)android/'],
1307 ],
1308 }],
[email protected]c14d8e772010-02-09 22:06:151309 # We use "POSIX" to refer to all non-Windows operating systems.
1310 ['OS=="win"', {
[email protected]d4af1e72011-10-21 17:45:431311 'sources/': [ ['exclude', '_posix(_unittest)?\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071312 # turn on warnings for signed/unsigned mismatch on chromium code.
1313 'msvs_settings': {
1314 'VCCLCompilerTool': {
1315 'AdditionalOptions': ['/we4389'],
1316 },
1317 },
[email protected]c14d8e772010-02-09 22:06:151318 }],
[email protected]63e39a282011-07-13 20:41:281319 ['OS=="win" and component=="shared_library"', {
1320 'msvs_disabled_warnings': [
1321 4251, # class 'std::xx' needs to have dll-interface.
1322 ],
1323 }],
[email protected]c14d8e772010-02-09 22:06:151324 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301325 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151326 }],
[email protected]06c756182010-04-27 18:31:311327 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301328 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151329 }],
[email protected]41423092011-08-25 15:39:581330 ['use_aura==0', {
[email protected]f941f47a2011-10-15 18:44:511331 'sources/': [ ['exclude', '_aura\\.(h|cc)$'],
1332 ['exclude', '(^|/)aura/'],
1333 ]
[email protected]41423092011-08-25 15:39:581334 }],
[email protected]50ea9262011-10-10 15:42:431335 ['use_aura==0 or use_x11==0', {
1336 'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ]
1337 }],
1338 ['use_aura==0 or OS!="win"', {
1339 'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ]
1340 }],
[email protected]c14d8e772010-02-09 22:06:151341 ],
1342 }],
[email protected]a6e22132010-02-10 20:43:181343 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551344 'default_configuration': 'Debug',
1345 'configurations': {
[email protected]5153767c2009-12-22 01:52:501346 # VCLinkerTool LinkIncremental values below:
1347 # 0 == default
1348 # 1 == /INCREMENTAL:NO
1349 # 2 == /INCREMENTAL
1350 # Debug links incremental, Release does not.
1351 #
[email protected]7b99801e2010-11-03 17:26:231352 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501353 #
1354 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561355 'abstract': 1,
1356 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511357 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561358 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1359 'CharacterSet': '1',
1360 },
[email protected]5153767c2009-12-22 01:52:501361 },
1362 'x86_Base': {
1363 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501364 'msvs_settings': {
1365 'VCLinkerTool': {
1366 'TargetMachine': '1',
1367 },
1368 },
[email protected]2fa40782009-11-01 21:17:341369 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561370 },
[email protected]5153767c2009-12-22 01:52:501371 'x64_Base': {
1372 'abstract': 1,
1373 'msvs_configuration_platform': 'x64',
1374 'msvs_settings': {
1375 'VCLinkerTool': {
1376 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501377 'AdditionalLibraryDirectories!':
1378 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1379 'AdditionalLibraryDirectories':
1380 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1381 },
[email protected]d26b4418ab2010-03-24 22:06:351382 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501383 'AdditionalLibraryDirectories!':
1384 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1385 'AdditionalLibraryDirectories':
1386 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1387 },
1388 },
1389 'defines': [
1390 # Not sure if tcmalloc works on 64-bit Windows.
1391 'NO_TCMALLOC',
1392 ],
1393 },
1394 'Debug_Base': {
1395 'abstract': 1,
[email protected]14339762011-04-05 07:36:581396 'defines': [
1397 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1398 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1399 ],
[email protected]1c966092009-08-20 21:19:261400 'xcode_settings': {
1401 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291402 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491403 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491404 '<@(debug_extra_cflags)',
1405 ],
[email protected]1c966092009-08-20 21:19:261406 },
[email protected]bb05e452009-10-29 21:24:561407 'msvs_settings': {
1408 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471409 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561410 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211411 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471412 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151413 'conditions': [
1414 # According to MSVS, InlineFunctionExpansion=0 means
1415 # "default inlining", not "/Ob0".
1416 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1417 ['win_debug_InlineFunctionExpansion==0', {
1418 'AdditionalOptions': ['/Ob0'],
1419 }],
1420 ['win_debug_InlineFunctionExpansion!=""', {
1421 'InlineFunctionExpansion':
1422 '<(win_debug_InlineFunctionExpansion)',
1423 }],
[email protected]fac10d12010-11-08 16:00:311424 ['win_debug_disable_iterator_debugging==1', {
1425 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1426 }],
[email protected]2ae6e022010-05-07 13:19:151427 ],
[email protected]bb05e452009-10-29 21:24:561428 },
1429 'VCLinkerTool': {
1430 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021431 # ASLR makes debugging with windbg difficult because Chrome.exe and
1432 # Chrome.dll share the same base name. As result, windbg will
1433 # name the Chrome.dll module like chrome_<base address>, where
1434 # <base address> typically changes with each launch. This in turn
1435 # means that breakpoints in Chrome.dll don't stick from one launch
1436 # to the next. For this reason, we turn ASLR off in debug builds.
1437 # Note that this is a three-way bool, where 0 means to pick up
1438 # the default setting, 1 is off and 2 is on.
1439 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561440 },
1441 'VCResourceCompilerTool': {
1442 'PreprocessorDefinitions': ['_DEBUG'],
1443 },
1444 },
[email protected]2f80c312009-02-25 21:26:551445 'conditions': [
[email protected]bb05e452009-10-29 21:24:561446 ['OS=="linux"', {
1447 'cflags': [
1448 '<@(debug_extra_cflags)',
1449 ],
[email protected]2f80c312009-02-25 21:26:551450 }],
[email protected]56cca4e2011-07-01 21:33:351451 ['release_valgrind_build==0', {
1452 'xcode_settings': {
1453 'OTHER_CFLAGS': [
1454 '-fstack-protector-all', # Implies -fstack-protector
1455 ],
1456 },
1457 }],
[email protected]2f80c312009-02-25 21:26:551458 ],
1459 },
[email protected]5153767c2009-12-22 01:52:501460 'Release_Base': {
1461 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551462 'defines': [
1463 'NDEBUG',
1464 ],
[email protected]1c966092009-08-20 21:19:261465 'xcode_settings': {
1466 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1467 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001468 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261469 },
[email protected]bb05e452009-10-29 21:24:561470 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471471 'VCCLCompilerTool': {
1472 'Optimization': '<(win_release_Optimization)',
1473 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151474 'conditions': [
1475 # According to MSVS, InlineFunctionExpansion=0 means
1476 # "default inlining", not "/Ob0".
1477 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1478 ['win_release_InlineFunctionExpansion==0', {
1479 'AdditionalOptions': ['/Ob0'],
1480 }],
1481 ['win_release_InlineFunctionExpansion!=""', {
1482 'InlineFunctionExpansion':
1483 '<(win_release_InlineFunctionExpansion)',
1484 }],
[email protected]626d2d22011-10-11 15:47:331485
1486 ['win_release_OmitFramePointers==1', {
1487 'OmitFramePointers': 'true',
1488 }],
1489 ['win_release_OmitFramePointers==0', {
1490 'OmitFramePointers': 'false',
1491 }],
[email protected]2ae6e022010-05-07 13:19:151492 ],
[email protected]7e0d664a2009-12-03 21:07:471493 },
[email protected]bb05e452009-10-29 21:24:561494 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341495 # LinkIncremental is a tri-state boolean, where 0 means default
1496 # (i.e., inherit from parent solution), 1 means false, and
1497 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561498 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341499 # This corresponds to the /PROFILE flag which ensures the PDB
1500 # file contains FIXUP information (growing the PDB file by about
1501 # 5%) but does not otherwise alter the output binary. This
1502 # information is used by the Syzygy optimization tool when
1503 # decomposing the release image.
1504 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561505 },
1506 },
[email protected]2f80c312009-02-25 21:26:551507 'conditions': [
[email protected]92822e82009-09-18 14:26:561508 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581509 'defines': [
1510 'NVALGRIND',
1511 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1512 ],
[email protected]ee857512010-05-14 08:24:421513 }, {
[email protected]14339762011-04-05 07:36:581514 'defines': [
1515 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1516 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1517 ],
[email protected]92822e82009-09-18 14:26:561518 }],
[email protected]7e0d664a2009-12-03 21:07:471519 ['win_use_allocator_shim==0', {
1520 'defines': ['NO_TCMALLOC'],
1521 }],
[email protected]bb05e452009-10-29 21:24:561522 ['OS=="linux"', {
1523 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001524 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561525 ],
1526 }],
[email protected]2f80c312009-02-25 21:26:551527 ],
1528 },
[email protected]5153767c2009-12-22 01:52:501529 #
1530 # Concrete configurations
1531 #
1532 'Debug': {
1533 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1534 },
1535 'Release': {
1536 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1537 'conditions': [
1538 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161539 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501540 }],
1541 ]
1542 },
[email protected]f926fa0a2009-08-04 22:50:131543 'conditions': [
1544 [ 'OS=="win"', {
1545 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501546 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501547 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301548 },
1549 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501550 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301551 },
[email protected]f926fa0a2009-08-04 22:50:131552 }],
1553 ],
[email protected]2f80c312009-02-25 21:26:551554 },
1555 },
1556 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341557 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261558 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271559 # Enable -Werror by default, but put it in a variable so it can
1560 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1561 'variables': {
[email protected]57e94022011-05-04 15:33:191562 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421563 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341564 'conditions': [
1565 ['OS=="linux"', {
1566 'werror%': '-Werror',
1567 }, { # turn off -Werror on other Unices
1568 'werror%': '',
1569 }],
[email protected]47deeb62009-12-17 14:49:391570 ],
[email protected]5315f2842009-04-28 00:43:271571 },
[email protected]9d384032009-03-20 23:13:261572 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161573 '<(werror)', # See note above about the werror variable.
1574 '-pthread',
1575 '-fno-exceptions',
1576 '-Wall',
[email protected]0fa17082010-03-26 00:48:051577 # TODO(evan): turn this back on once all the builds work.
1578 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201579 # Don't warn about unused function params. We use those everywhere.
1580 '-Wno-unused-parameter',
1581 # Don't warn about the "struct foo f = {0};" initialization pattern.
1582 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161583 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121584 # Don't export any symbols (for example, to plugins we dlopen()).
1585 # Note: this is *required* to make some plugins work.
1586 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351587 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241588 ],
1589 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221590 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241591 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361592 # Make inline functions have hidden visiblity by default.
1593 # Surprisingly, not covered by -fvisibility=hidden.
1594 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171595 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1596 # so we specify it explicitly.
1597 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181598 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171599 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261600 ],
[email protected]a6cf87e2009-04-03 04:07:381601 'ldflags': [
[email protected]138241f2010-03-30 23:53:101602 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261603 ],
[email protected]3aacaf952009-04-02 15:34:091604 'configurations': {
[email protected]5153767c2009-12-22 01:52:501605 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311606 'variables': {
1607 'debug_optimize%': '0',
1608 },
[email protected]3aacaf952009-04-02 15:34:091609 'defines': [
1610 '_DEBUG',
1611 ],
1612 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041613 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091614 '-g',
1615 ],
[email protected]da1c8d692011-09-20 20:35:011616 'conditions' : [
1617 ['OS=="android"', {
1618 'cflags': [
1619 '-fno-omit-frame-pointer',
1620 ],
1621 }],
1622 ],
1623 'target_conditions' : [
1624 ['_toolset=="target"', {
1625 'conditions': [
1626 ['OS=="android" and debug_optimize==0', {
1627 'cflags': [
1628 '-mlong-calls', # Needed when compiling with -O0
1629 ],
1630 }],
1631 ['arm_thumb==1', {
1632 'cflags': [
1633 '-marm',
1634 ],
1635 }],
1636 ],
1637 }],
1638 ],
[email protected]5315f2842009-04-28 00:43:271639 },
[email protected]5153767c2009-12-22 01:52:501640 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011641 'variables': {
1642 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511643 # Binaries become big and gold is unable to perform GC
1644 # and remove unused sections for some of test targets
1645 # on 32 bit platform.
1646 # (This is currently observed only in chromeos valgrind bots)
1647 # The following flag is to disable --gc-sections linker
1648 # option for these bots.
1649 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121650
1651 # TODO(bradnelson): reexamine how this is done if we change the
1652 # expansion of configurations
1653 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011654 },
[email protected]3aacaf952009-04-02 15:34:091655 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041656 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531657 # Don't emit the GCC version ident directives, they just end up
1658 # in the .comment section taking up binary size.
1659 '-fno-ident',
1660 # Put data and code in their own sections, so that unused symbols
1661 # can be removed at link time with --gc-sections.
1662 '-fdata-sections',
1663 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091664 ],
[email protected]c902f2cba2010-08-06 20:04:181665 'ldflags': [
1666 # Specifically tell the linker to perform optimizations.
1667 # See http://lwn.net/Articles/192624/ .
1668 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221669 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181670 ],
[email protected]1dd529642010-05-15 01:02:511671 'conditions' : [
1672 ['no_gc_sections==0', {
1673 'ldflags': [
1674 '-Wl,--gc-sections',
1675 ],
1676 }],
[email protected]da1c8d692011-09-20 20:35:011677 ['OS=="android"', {
1678 'cflags': [
1679 '-fomit-frame-pointer',
1680 ],
1681 }],
[email protected]ecf7b6482010-10-13 09:15:201682 ['clang==1', {
1683 'cflags!': [
1684 '-fno-ident',
1685 ],
1686 }],
[email protected]7664ab32011-02-01 23:35:251687 ['profiling==1', {
1688 'cflags': [
1689 '-fno-omit-frame-pointer',
1690 '-g',
1691 ],
1692 }],
[email protected]c75f33e42011-05-04 18:11:521693 # At gyp time, we test the linker for ICF support; this flag
1694 # is then provided to us by gyp. (Currently only gold supports
1695 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531696 # There seems to be a conflict of --icf and -pie in gold which
1697 # can generate crashy binaries. As a security measure, -pie
1698 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121699 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461700 'target_conditions': [
1701 ['_toolset=="target"', {
1702 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531703 #'-Wl,--icf=safe',
1704 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461705 ]
1706 }]
[email protected]c75f33e42011-05-04 18:11:521707 ]
1708 }],
[email protected]1dd529642010-05-15 01:02:511709 ]
[email protected]3aacaf952009-04-02 15:34:091710 },
1711 },
[email protected]601b540222009-04-03 21:32:041712 'variants': {
1713 'coverage': {
1714 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1715 'ldflags': ['-fprofile-arcs'],
1716 },
1717 'profile': {
1718 'cflags': ['-pg', '-g'],
1719 'ldflags': ['-pg'],
1720 },
1721 'symbols': {
1722 'cflags': ['-g'],
1723 },
1724 },
[email protected]606116d22009-05-06 22:38:231725 'conditions': [
[email protected]04b482602011-09-14 02:36:211726 ['target_arch=="ia32"', {
1727 'target_conditions': [
1728 ['_toolset=="target"', {
1729 'asflags': [
1730 # Needed so that libs with .s files (e.g. libicudata.a)
1731 # are compatible with the general 32-bit-ness.
1732 '-32',
1733 ],
1734 # All floating-point computations on x87 happens in 80-bit
1735 # precision. Because the C and C++ language standards allow
1736 # the compiler to keep the floating-point values in higher
1737 # precision than what's specified in the source and doing so
1738 # is more efficient than constantly rounding up to 64-bit or
1739 # 32-bit precision as specified in the source, the compiler,
1740 # especially in the optimized mode, tries very hard to keep
1741 # values in x87 floating-point stack (in 80-bit precision)
1742 # as long as possible. This has important side effects, that
1743 # the real value used in computation may change depending on
1744 # how the compiler did the optimization - that is, the value
1745 # kept in 80-bit is different than the value rounded down to
1746 # 64-bit or 32-bit. There are possible compiler options to
1747 # make this behavior consistent (e.g. -ffloat-store would keep
1748 # all floating-values in the memory, thus force them to be
1749 # rounded to its original precision) but they have significant
1750 # runtime performance penalty.
1751 #
1752 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1753 # which keep floating-point values in SSE registers in its
1754 # native precision (32-bit for single precision, and 64-bit
1755 # for double precision values). This means the floating-point
1756 # value used during computation does not change depending on
1757 # how the compiler optimized the code, since the value is
1758 # always kept in its specified precision.
1759 'conditions': [
1760 ['branding=="Chromium" and disable_sse2==0', {
1761 'cflags': [
1762 '-march=pentium4',
1763 '-msse2',
1764 '-mfpmath=sse',
1765 ],
1766 }],
1767 # ChromeOS targets Pinetrail, which is sse3, but most of the
1768 # benefit comes from sse2 so this setting allows ChromeOS
1769 # to build on other CPUs. In the future -march=atom would
1770 # help but requires a newer compiler.
1771 ['chromeos==1 and disable_sse2==0', {
1772 'cflags': [
1773 '-msse2',
1774 ],
1775 }],
1776 # Install packages have started cropping up with
1777 # different headers between the 32-bit and 64-bit
1778 # versions, so we have to shadow those differences off
1779 # and make sure a 32-bit-on-64-bit build picks up the
1780 # right files.
1781 ['host_arch!="ia32"', {
1782 'include_dirs+': [
1783 '/usr/include32',
1784 ],
1785 }],
1786 ],
1787 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1788 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061789 'cflags': [
[email protected]04b482602011-09-14 02:36:211790 '-m32',
1791 '-mmmx',
1792 ],
1793 'ldflags': [
1794 '-m32',
[email protected]ffde7932009-05-29 00:39:061795 ],
1796 }],
[email protected]606116d22009-05-06 22:38:231797 ],
1798 }],
[email protected]3dda8a962009-08-10 18:58:071799 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291800 'target_conditions': [
1801 ['_toolset=="target"', {
1802 'cflags_cc': [
1803 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1804 # has changed whenever it encounters a varargs function. This
1805 # silences those warnings, as they are not helpful and
1806 # clutter legitimate warnings.
1807 '-Wno-abi',
1808 ],
1809 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011810 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291811 'cflags': [
1812 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291813 ]
1814 }],
1815 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251816 'cflags': [
1817 '-march=armv7-a',
1818 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251819 '-mfloat-abi=softfp',
1820 ],
[email protected]eafc0b452010-02-26 21:53:431821 'conditions': [
1822 ['arm_neon==1', {
1823 'cflags': [ '-mfpu=neon', ],
1824 }, {
[email protected]53e0f642010-03-05 01:41:561825 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431826 }]
1827 ],
[email protected]dc9711f2009-11-13 19:30:251828 }],
[email protected]da1c8d692011-09-20 20:35:011829 ['OS=="android"', {
1830 # The following flags are derived from what Android uses
1831 # by default when building for arm.
1832 'cflags': [ '-Wno-psabi', ],
1833 'conditions': [
1834 ['arm_thumb == 1', {
1835 # Android toolchain doesn't support -mimplicit-it=thumb
1836 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1837 'cflags': [ '-mthumb-interwork', ],
1838 }],
1839 ['armv7==0', {
1840 # Flags suitable for Android emulator
1841 'cflags': [
1842 '-march=armv5te',
1843 '-mtune=xscale',
1844 '-msoft-float',
1845 '-D__ARM_ARCH_5__',
1846 '-D__ARM_ARCH_5T__',
1847 '-D__ARM_ARCH_5E__',
1848 '-D__ARM_ARCH_5TE__',
1849 ],
1850 }],
1851 ],
1852 }],
[email protected]3dda8a962009-08-10 18:58:071853 ],
1854 }],
1855 ],
1856 }],
[email protected]2fb843b2010-08-12 02:11:081857 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581858 'cflags': [
1859 '-fPIC',
1860 ],
1861 }],
[email protected]cf90a512011-10-08 00:00:441862 # TODO(rkc): Currently building Chrome with the PIE flag causes
1863 # remote debugging to break (remote debugger does not get correct
1864 # section header offsets hence causing all symbol handling to go
1865 # kaboom). See crosbug.com/15266
1866 # Remove this flag once this issue is fixed.
1867 ['linux_disable_pie==1', {
1868 'target_conditions': [
1869 ['_type=="executable"', {
1870 'ldflags': [
1871 '-nopie',
1872 ],
1873 }],
1874 ],
1875 }],
[email protected]ee28c9f2009-09-04 01:53:011876 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571877 'target_conditions': [
1878 ['_toolset=="target"', {
1879 'cflags': [
1880 '--sysroot=<(sysroot)',
1881 ],
1882 'ldflags': [
1883 '--sysroot=<(sysroot)',
1884 ],
1885 }]]
[email protected]ee28c9f2009-09-04 01:53:011886 }],
[email protected]58680ce2010-09-18 00:09:151887 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121888 'cflags': [
1889 '-Wheader-hygiene',
1890 # Clang spots more unused functions.
1891 '-Wno-unused-function',
1892 # Don't die on dtoa code that uses a char as an array index.
1893 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331894 # Especially needed for gtest macros using enum values from Mac
1895 # system headers.
1896 # TODO(pkasting): In C++11 this is legal, so this should be
1897 # removed when we change to that. (This is also why we don't
1898 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121899 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:301900 # WebKit uses nullptr in a legit way, other that that this warning
1901 # doesn't fire.
1902 '-Wno-c++11-compat',
1903 # This (rightyfully) complains about 'override', which we use
1904 # heavily.
1905 '-Wno-c++11-extensions',
[email protected]18ca15a2011-08-10 03:07:121906 ],
1907 'cflags!': [
1908 # Clang doesn't seem to know know this flag.
1909 '-mfpmath=sse',
1910 ],
[email protected]58680ce2010-09-18 00:09:151911 }],
[email protected]5d451ad2011-02-11 16:43:461912 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261913 'cflags': [
1914 '<(clang_chrome_plugins_flags)',
1915 ],
[email protected]5d451ad2011-02-11 16:43:461916 }],
[email protected]5e781232011-01-28 02:57:591917 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261918 'cflags': [
1919 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1920 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1921 ],
[email protected]5e781232011-01-28 02:57:591922 }],
[email protected]92799b632011-08-15 14:33:061923 ['asan==1', {
1924 # Only in the linux section for now, since ASAN doesn't
1925 # work on Mac yet.
[email protected]6a4cad02011-11-25 07:26:561926 # TODO(glider): -fasan is deprecated. Remove it when we stop using
1927 # it.
[email protected]92799b632011-08-15 14:33:061928 'cflags': [
[email protected]74a26d72011-09-29 17:29:031929 '-fasan',
[email protected]6a4cad02011-11-25 07:26:561930 '-faddress-sanitizer',
[email protected]74a26d72011-09-29 17:29:031931 '-w',
[email protected]6a4cad02011-11-25 07:26:561932 '-DADDRESS_SANITIZER',
[email protected]92799b632011-08-15 14:33:061933 ],
1934 'ldflags': [
1935 '-fasan',
[email protected]6a4cad02011-11-25 07:26:561936 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:061937 ],
1938 }],
[email protected]cc4219a2009-08-14 05:30:521939 ['no_strict_aliasing==1', {
1940 'cflags': [
1941 '-fno-strict-aliasing',
1942 ],
1943 }],
[email protected]cbd5fd52009-08-26 00:14:271944 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171945 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271946 'defines': ['USE_LINUX_BREAKPAD'],
1947 }],
[email protected]d8b60602010-03-26 09:41:221948 ['linux_use_heapchecker==1', {
1949 'variables': {'linux_use_tcmalloc%': 1},
1950 }],
[email protected]61a9b2d82010-02-26 00:31:081951 ['linux_use_tcmalloc==0', {
1952 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241953 }],
[email protected]d8b60602010-03-26 09:41:221954 ['linux_use_heapchecker==0', {
1955 'defines': ['NO_HEAPCHECKER'],
1956 }],
[email protected]64e2d4a42010-08-27 10:13:211957 ['linux_keep_shadow_stacks==1', {
1958 'defines': ['KEEP_SHADOW_STACKS'],
1959 'cflags': ['-finstrument-functions'],
1960 }],
[email protected]606116d22009-05-06 22:38:231961 ],
[email protected]9d384032009-03-20 23:13:261962 },
1963 }],
[email protected]c51e8d52009-12-11 20:04:061964 # FreeBSD-specific options; note that most FreeBSD options are set above,
1965 # with Linux.
1966 ['OS=="freebsd"', {
1967 'target_defaults': {
1968 'ldflags': [
1969 '-Wl,--no-keep-memory',
1970 ],
1971 },
1972 }],
[email protected]da1c8d692011-09-20 20:35:011973 # Android-specific options; note that most are set above with Linux.
1974 ['OS=="android"', {
1975 'variables': {
1976 'android_target_arch%': 'arm', # target_arch in android terms.
1977 'conditions': [
1978 # Android uses x86 instead of ia32 for their target_arch designation.
1979 ['target_arch=="ia32"', {
1980 'android_target_arch%': 'x86',
1981 }],
1982 # Use shared stlport library when system one used.
1983 # Figure this out early since it needs symbols from libgcc.a, so it
1984 # has to be before that in the set of libraries.
1985 ['use_system_stlport==1', {
1986 'android_stlport_library': 'stlport',
1987 }, {
1988 'android_stlport_library': 'stlport_static',
1989 }],
1990 ],
1991
1992 # Placing this variable here prevents from forking libvpx, used
1993 # by remoting. Remoting is off, so it needn't built,
1994 # so forking it's deps seems like overkill.
1995 # But this variable need defined to properly run gyp.
1996 # A proper solution is to have an OS==android conditional
1997 # in third_party/libvpx/libvpx.gyp to define it.
1998 'libvpx_path': 'lib/linux/arm',
1999 },
2000 'target_defaults': {
2001 # Build a Release build by default to match Android build behavior.
2002 # This is typical with Android because Debug builds tend to be much
2003 # larger and run very slowly on constrained devices. It is still
2004 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2005 # 'make' command line.
2006 'default_configuration': 'Release',
2007
2008 'variables': {
2009 'release_extra_cflags%': '',
2010 },
2011
2012 'target_conditions': [
2013 # Settings for building device targets using Android's toolchain.
2014 # These are based on the setup.mk file from the Android NDK.
2015 #
2016 # The NDK Android executable link step looks as follows:
2017 # $LDFLAGS
2018 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2019 # $(PRIVATE_OBJECTS) <-- The .o that we built
2020 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2021 # $(TARGET_LIBGCC) <-- libgcc.a
2022 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2023 # $(PRIVATE_LDLIBS) <-- System .so
2024 # $(TARGET_CRTEND_O) <-- crtend.o
2025 #
2026 # For now the above are approximated for executables by adding
2027 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2028 # of 'libraries'.
2029 #
2030 # The NDK Android shared library link step looks as follows:
2031 # $LDFLAGS
2032 # $(PRIVATE_OBJECTS) <-- The .o that we built
2033 # -l,--whole-archive
2034 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2035 # -l,--no-whole-archive
2036 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2037 # $(TARGET_LIBGCC) <-- libgcc.a
2038 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2039 # $(PRIVATE_LDLIBS) <-- System .so
2040 #
2041 # For now, assume not need any whole static libs.
2042 #
2043 # For both executables and shared libraries, add the proper
2044 # libgcc.a to the start of libraries which puts it in the
2045 # proper spot after .o and .a files get linked in.
2046 #
2047 # TODO: The proper thing to do longer-tem would be proper gyp
2048 # support for a custom link command line.
2049 ['_toolset=="target"', {
2050 'cflags!': [
2051 '-pthread', # Not supported by Android toolchain.
2052 ],
2053 'cflags': [
2054 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2055 '-ffunction-sections',
2056 '-funwind-tables',
2057 '-g',
2058 '-fstack-protector',
2059 '-fno-short-enums',
2060 '-finline-limit=64',
2061 '-Wa,--noexecstack',
2062 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2063 '<@(release_extra_cflags)',
2064 # Note: This include is in cflags to ensure that it comes after
2065 # all of the includes.
2066 '-I<(android_ndk_include)',
2067 ],
2068 'defines': [
2069 'ANDROID',
2070 '__GNU_SOURCE=1', # Necessary for clone()
2071 'USE_STLPORT=1',
2072 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2073 'HAVE_OFF64_T',
2074 'HAVE_SYS_UIO_H',
2075 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2076 ],
2077 'ldflags!': [
2078 '-pthread', # Not supported by Android toolchain.
2079 ],
2080 'ldflags': [
2081 '-nostdlib',
2082 '-Wl,--no-undefined',
2083 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2084 # Don't export symbols from statically linked libraries.
2085 '-Wl,--exclude-libs=ALL',
2086 ],
[email protected]a0e48b02011-11-22 07:53:012087 'libraries': [
2088 '-l<(android_stlport_library)',
2089 # Manually link the libgcc.a that the cross compiler uses.
2090 '<!($CROSS_CC -print-libgcc-file-name)',
2091 '-lc',
2092 '-ldl',
2093 '-lstdc++',
2094 '-lm',
[email protected]da1c8d692011-09-20 20:35:012095 ],
2096 'conditions': [
2097 ['android_build_type==0', {
2098 'ldflags': [
2099 '-Wl,-rpath-link=<(android_ndk_lib)',
2100 '-L<(android_ndk_lib)',
2101 ],
2102 }],
2103 # NOTE: The stlport header include paths below are specified in
2104 # cflags rather than include_dirs because they need to come
2105 # after include_dirs. Think of them like system headers, but
2106 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2107 # toolchain (circa Gingerbread) will exhibit strange errors.
2108 # The include ordering here is important; change with caution.
2109 ['use_system_stlport==0', {
2110 'cflags': [
2111 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2112 ],
2113 'conditions': [
2114 ['target_arch=="arm" and armv7==1', {
2115 'ldflags': [
2116 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2117 ],
2118 }],
2119 ['target_arch=="arm" and armv7==0', {
2120 'ldflags': [
2121 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2122 ],
2123 }],
2124 ['target_arch=="ia32"', {
2125 'ldflags': [
2126 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2127 ],
2128 }],
2129 ],
2130 }],
2131 ['target_arch=="ia32"', {
2132 # The x86 toolchain currently has problems with stack-protector.
2133 'cflags!': [
2134 '-fstack-protector',
2135 ],
2136 'cflags': [
2137 '-fno-stack-protector',
2138 ],
2139 }],
2140 ],
2141 'target_conditions': [
2142 ['_type=="executable"', {
2143 'ldflags': [
2144 '-Bdynamic',
2145 '-Wl,-dynamic-linker,/system/bin/linker',
2146 '-Wl,--gc-sections',
2147 '-Wl,-z,nocopyreloc',
2148 # crtbegin_dynamic.o should be the last item in ldflags.
2149 '<(android_ndk_lib)/crtbegin_dynamic.o',
2150 ],
2151 'libraries': [
2152 # crtend_android.o needs to be the last item in libraries.
2153 # Do not add any libraries after this!
2154 '<(android_ndk_lib)/crtend_android.o',
2155 ],
2156 }],
2157 ['_type=="shared_library"', {
2158 'ldflags': [
2159 '-Wl,-shared,-Bsymbolic',
2160 ],
2161 }],
2162 ],
2163 }],
2164 # Settings for building host targets using the system toolchain.
2165 ['_toolset=="host"', {
2166 'ldflags!': [
2167 '-Wl,-z,noexecstack',
2168 '-Wl,--gc-sections',
2169 '-Wl,-O1',
2170 '-Wl,--as-needed',
2171 ],
[email protected]965b6b22011-09-29 16:07:282172 'sources/': [
2173 ['exclude', '_android(_unittest)?\\.cc$'],
2174 ['exclude', '(^|/)android/']
2175 ],
[email protected]da1c8d692011-09-20 20:35:012176 }],
2177 ],
2178 },
2179 }],
[email protected]93f21e42010-04-01 00:35:152180 ['OS=="solaris"', {
2181 'cflags!': ['-fvisibility=hidden'],
2182 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2183 }],
[email protected]2f80c312009-02-25 21:26:552184 ['OS=="mac"', {
2185 'target_defaults': {
[email protected]24700642009-06-01 16:01:202186 'variables': {
[email protected]162407f2011-09-08 15:33:172187 # These should end with %, but there seems to be a bug with % in
2188 # variables that are intended to be set to different values in
2189 # different targets, like these.
2190 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202191 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382192 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202193 },
[email protected]d92c7c012009-03-19 19:26:422194 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552195 'xcode_settings': {
2196 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042197 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2198 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2199 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2200 # (Equivalent to -fPIC)
2201 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2202 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2203 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252204 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2205 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042206 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2207 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2208 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2209 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552210 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042211 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252212 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2213 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112214 # Keep pch files below xcodebuild/.
2215 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552216 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192217 'OTHER_CFLAGS': [
2218 '-fno-strict-aliasing', # See http://crbug.com/32204
2219 ],
[email protected]080e86f2010-06-21 15:19:042220 'WARNING_CFLAGS': [
2221 '-Wall',
2222 '-Wendif-labels',
2223 '-Wextra',
2224 # Don't warn about unused function parameters.
2225 '-Wno-unused-parameter',
2226 # Don't warn about the "struct foo f = {0};" initialization
2227 # pattern.
2228 '-Wno-missing-field-initializers',
2229 ],
[email protected]b3fb8092009-03-12 19:09:242230 'conditions': [
2231 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592232 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2233 ],
[email protected]66733172010-09-22 00:09:282234 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302235 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2236 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382237
2238 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2239 # when buliding with clang. This warning is triggered when the
2240 # override keyword is used via the OVERRIDE macro from
2241 # base/compiler_specific.h.
2242 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
2243
[email protected]34f40892011-09-06 21:53:302244 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282245 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072246 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282247 # Don't die on dtoa code that uses a char as an array index.
2248 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2249 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452250 # Clang spots more unused functions.
2251 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332252 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052253 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302254 # WebKit uses nullptr in a legit way, other that that this
2255 # warning doesn't fire.
2256 '-Wno-c++0x-compat',
2257 # This (rightyfully) complains about 'override', which we use
2258 # heavily.
2259 '-Wno-c++11-extensions',
[email protected]66733172010-09-22 00:09:282260 ],
2261 }],
[email protected]5d451ad2011-02-11 16:43:462262 ['clang==1 and clang_use_chrome_plugins==1', {
2263 'OTHER_CFLAGS': [
2264 '<(clang_chrome_plugins_flags)',
2265 ],
2266 }],
[email protected]5e781232011-01-28 02:57:592267 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
2268 'OTHER_CFLAGS': [
2269 '-Xclang', '-load', '-Xclang', '<(clang_load)',
2270 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2271 ],
2272 }],
[email protected]b3fb8092009-03-12 19:09:242273 ],
[email protected]2f80c312009-02-25 21:26:552274 },
[email protected]34f40892011-09-06 21:53:302275 'conditions': [
2276 ['clang==1', {
2277 'variables': {
2278 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2279 },
2280 }],
2281 ],
[email protected]2f80c312009-02-25 21:26:552282 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552283 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462284 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2285 }],
2286 ['_mac_bundle', {
2287 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082288 }],
[email protected]6303fed2011-08-11 01:12:102289 ['_type=="executable"', {
2290 'postbuilds': [
2291 {
2292 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362293 # code execution when running on Mac OS X 10.7 ("Lion"), and
2294 # ensures that the position-independent executable (PIE) bit
2295 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102296 'variables': {
[email protected]8c40f322011-08-24 03:33:362297 # Define change_mach_o_flags in a variable ending in _path
2298 # so that GYP understands it's a path and performs proper
2299 # relativization during dict merging.
2300 'change_mach_o_flags_path':
2301 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172302 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132303 ],
2304 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172305 ['mac_pie==0 or release_valgrind_build==1', {
2306 # Don't enable PIE if it's unwanted. It's unwanted if
2307 # the target specifies mac_pie=0 or if building for
2308 # Valgrind, because Valgrind doesn't understand slide.
2309 # See the similar mac_pie/release_valgrind_build check
2310 # below.
[email protected]081c0342011-08-24 14:59:132311 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132312 '--no-pie',
2313 ],
2314 }],
2315 ],
[email protected]6303fed2011-08-11 01:12:102316 },
[email protected]8c40f322011-08-24 03:33:362317 'postbuild_name': 'Change Mach-O Flags',
2318 'action': [
2319 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132320 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362321 ],
[email protected]6303fed2011-08-11 01:12:102322 },
2323 ],
[email protected]5a5d97aa2011-09-02 15:34:002324 'conditions': [
2325 ['asan==1', {
2326 'variables': {
2327 'asan_saves_file': 'asan.saves',
2328 },
2329 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562330 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
2331 'OTHER_CFLAGS': [
2332 '-fasan',
2333 '-faddress-sanitizer',
2334 '-w',
2335 ],
2336 'OTHER_LDFLAGS': [
2337 '-fasan',
2338 '-faddress-sanitizer',
2339 # The symbols below are referenced in the ASan runtime
2340 # library (compiled on OS X 10.6), but may be unavailable
2341 # on the prior OS X versions. Because Chromium is currently
2342 # targeting 10.5.0, we need to explicitly mark these
2343 # symbols as dynamic_lookup.
2344 '-Wl,-U,_malloc_default_purgeable_zone',
2345 '-Wl,-U,_malloc_zone_memalign',
2346 '-Wl,-U,_dispatch_sync_f',
2347 '-Wl,-U,_dispatch_async_f',
2348 '-Wl,-U,_dispatch_barrier_async_f',
2349 '-Wl,-U,_dispatch_group_async_f',
2350 '-Wl,-U,_dispatch_after_f',
2351
2352 ],
[email protected]5a5d97aa2011-09-02 15:34:002353 },
[email protected]6a4cad02011-11-25 07:26:562354 'defines': [
2355 'ADDRESS_SANITIZER',
2356 ],
[email protected]5a5d97aa2011-09-02 15:34:002357 }],
2358 ],
[email protected]162407f2011-09-08 15:33:172359 'target_conditions': [
2360 ['mac_pie==1 and release_valgrind_build==0', {
2361 # Turn on position-independence (ASLR) for executables. When
2362 # PIE is on for the Chrome executables, the framework will
2363 # also be subject to ASLR.
2364 # Don't do this when building for Valgrind, because Valgrind
2365 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2366 # understand slide, and get rid of the Valgrind check.
2367 'xcode_settings': {
2368 'OTHER_LDFLAGS': [
2369 '-Wl,-pie', # Position-independent executable (MH_PIE)
2370 ],
2371 },
2372 }],
2373 ],
[email protected]6a0242bc2011-07-01 00:34:462374 }],
[email protected]9a5e72862010-09-02 16:16:582375 ['(_type=="executable" or _type=="shared_library" or \
2376 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202377 'target_conditions': [
2378 ['mac_real_dsym == 1', {
2379 # To get a real .dSYM bundle produced by dsymutil, set the
2380 # debug information format to dwarf-with-dsym. Since
2381 # strip_from_xcode will not be used, set Xcode to do the
2382 # stripping as well.
2383 'configurations': {
[email protected]5153767c2009-12-22 01:52:502384 'Release_Base': {
[email protected]24700642009-06-01 16:01:202385 'xcode_settings': {
2386 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2387 'DEPLOYMENT_POSTPROCESSING': 'YES',
2388 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072389 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252390 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072391 # The Xcode default is to strip debugging symbols
2392 # only (-S). Local symbols should be stripped as
2393 # well, which will be handled by -x. Xcode will
2394 # continue to insert -S when stripping even when
2395 # additional flags are added with STRIPFLAGS.
2396 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252397 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072398 ], # target_conditions
2399 }, # xcode_settings
2400 }, # configuration "Release"
2401 }, # configurations
[email protected]24700642009-06-01 16:01:202402 }, { # mac_real_dsym != 1
2403 # To get a fast fake .dSYM bundle, use a post-build step to
2404 # produce the .dSYM and strip the executable. strip_from_xcode
2405 # only operates in the Release configuration.
2406 'postbuilds': [
2407 {
2408 'variables': {
2409 # Define strip_from_xcode in a variable ending in _path
2410 # so that gyp understands it's a path and performs proper
2411 # relativization during dict merging.
2412 'strip_from_xcode_path': 'mac/strip_from_xcode',
2413 },
2414 'postbuild_name': 'Strip If Needed',
2415 'action': ['<(strip_from_xcode_path)'],
2416 },
[email protected]e14a9f92009-08-05 19:26:072417 ], # postbuilds
2418 }], # mac_real_dsym
2419 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582420 }], # (_type=="executable" or _type=="shared_library" or
2421 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072422 ], # target_conditions
2423 }, # target_defaults
2424 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552425 ['OS=="win"', {
2426 'target_defaults': {
2427 'defines': [
[email protected]a89e0942011-09-26 16:06:472428 '_WIN32_WINNT=0x0601',
2429 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552430 'WIN32',
2431 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552432 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282433 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552434 '_CRT_RAND_S',
2435 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2436 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272437 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452438 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552439 ],
[email protected]8974e042010-06-21 18:06:522440 'conditions': [
2441 ['component=="static_library"', {
2442 'defines': [
2443 '_HAS_EXCEPTIONS=0',
2444 ],
2445 }],
[email protected]3e2648a2011-03-21 20:58:502446 ['secure_atl', {
2447 'defines': [
2448 '_SECURE_ATL',
2449 ],
2450 }],
[email protected]8974e042010-06-21 18:06:522451 ],
[email protected]5b5ca7cb2009-07-20 23:00:202452 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372453 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542454 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552455 '$(VSInstallDir)/VC/atlmfc/include',
2456 ],
[email protected]a8d99cef2009-08-26 20:47:492457 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112458 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2459 # TODO(maruel): These warnings are level 4. They will be slowly
2460 # removed as code is fixed.
2461 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2462 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2463 4702, 4706,
2464 ],
[email protected]2f80c312009-02-25 21:26:552465 'msvs_settings': {
2466 'VCCLCompilerTool': {
2467 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552468 'BufferSecurityCheck': 'true',
2469 'EnableFunctionLevelLinking': 'true',
2470 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112471 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552472 'WarnAsError': 'true',
2473 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582474 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502475 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162476 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552477 }],
[email protected]3e2648a2011-03-21 20:58:502478 ['MSVS_VERSION=="2005e"', {
2479 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2480 }],
[email protected]8974e042010-06-21 18:06:522481 ['component=="shared_library"', {
2482 'ExceptionHandling': '1', # /EHsc
2483 }, {
2484 'ExceptionHandling': '0',
2485 }],
[email protected]3fef6e62009-07-31 19:58:582486 ],
[email protected]2f80c312009-02-25 21:26:552487 },
2488 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162489 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372490 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372491 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542492 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372493 ],
[email protected]2f80c312009-02-25 21:26:552494 },
2495 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552496 'AdditionalDependencies': [
2497 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502498 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552499 'version.lib',
2500 'msimg32.lib',
2501 'ws2_32.lib',
2502 'usp10.lib',
2503 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082504 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482505 'winmm.lib',
2506 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552507 ],
[email protected]4de39f82011-03-28 12:01:292508 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502509 ['msvs_express', {
2510 # Explicitly required when using the ATL with express
2511 'AdditionalDependencies': [
2512 'atlthunk.lib',
2513 ],
2514 }],
2515 ['MSVS_VERSION=="2005e"', {
2516 # Non-express versions link automatically to these
2517 'AdditionalDependencies': [
2518 'advapi32.lib',
2519 'comdlg32.lib',
2520 'ole32.lib',
2521 'shell32.lib',
2522 'user32.lib',
2523 'winspool.lib',
2524 ],
2525 }],
2526 ],
[email protected]a78da50e2010-06-09 21:31:372527 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372528 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542529 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372530 ],
[email protected]2f80c312009-02-25 21:26:552531 'GenerateDebugInformation': 'true',
2532 'MapFileName': '$(OutDir)\\$(TargetName).map',
2533 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552534 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482535 # SubSystem values:
2536 # 0 == not set
2537 # 1 == /SUBSYSTEM:CONSOLE
2538 # 2 == /SUBSYSTEM:WINDOWS
2539 # Most of the executables we'll ever create are tests
2540 # and utilities with console output.
2541 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552542 },
2543 'VCMIDLTool': {
2544 'GenerateStublessProxies': 'true',
2545 'TypeLibraryName': '$(InputName).tlb',
2546 'OutputDirectory': '$(IntDir)',
2547 'HeaderFileName': '$(InputName).h',
2548 'DLLDataFileName': 'dlldata.c',
2549 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2550 'ProxyFileName': '$(InputName)_p.c',
2551 },
2552 'VCResourceCompilerTool': {
2553 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382554 'AdditionalIncludeDirectories': [
2555 '<(DEPTH)',
2556 '<(SHARED_INTERMEDIATE_DIR)',
2557 ],
[email protected]2f80c312009-02-25 21:26:552558 },
2559 },
2560 },
2561 }],
[email protected]79e2336c2011-05-12 18:18:342562 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312563 'target_defaults': {
2564 'defines': [
2565 'DISABLE_NACL',
2566 ],
2567 },
2568 }],
[email protected]cfbf9bc2009-12-07 22:07:562569 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192570 'target_defaults': {
2571 'msvs_settings': {
2572 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192573 'DelayLoadDLLs': [
2574 'dbghelp.dll',
2575 'dwmapi.dll',
2576 'uxtheme.dll',
2577 ],
2578 },
2579 },
[email protected]ef4fa4072009-12-04 22:46:502580 'configurations': {
[email protected]5153767c2009-12-22 01:52:502581 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502582 'msvs_settings': {
2583 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162584 'AdditionalOptions': [
2585 '/safeseh',
2586 '/dynamicbase',
2587 '/ignore:4199',
2588 '/ignore:4221',
2589 '/nxcompat',
2590 ],
[email protected]ef4fa4072009-12-04 22:46:502591 },
2592 },
2593 },
[email protected]5153767c2009-12-22 01:52:502594 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502595 'msvs_settings': {
2596 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162597 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502598 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162599 '/dynamicbase',
2600 '/ignore:4199',
2601 '/ignore:4221',
2602 '/nxcompat',
2603 ],
[email protected]ef4fa4072009-12-04 22:46:502604 },
2605 },
2606 },
2607 },
[email protected]48c7af72009-07-03 22:00:192608 },
2609 }],
[email protected]9821d0d2010-04-16 22:40:372610 ['enable_new_npdevice_api==1', {
2611 'target_defaults': {
2612 'defines': [
2613 'ENABLE_NEW_NPDEVICE_API',
2614 ],
2615 },
2616 }],
[email protected]34f40892011-09-06 21:53:302617 ['clang==1', {
2618 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242619 ['CC', '<(make_clang_dir)/bin/clang'],
2620 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072621 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302622 ['CC.host', '$(CC)'],
2623 ['CXX.host', '$(CXX)'],
2624 ['LINK.host', '$(LINK)'],
2625 ],
2626 }],
[email protected]2f80c312009-02-25 21:26:552627 ],
2628 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502629 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2630 # This block adds *project-wide* configuration settings to each project
2631 # file. It's almost always wrong to put things here. Specify your
2632 # custom xcode_settings in target_defaults to add them to targets instead.
2633
2634 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2635 # setting sets the SDK on a project-wide basis. In order to get the
2636 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2637 # here at the project level.
2638 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2639
[email protected]2f80c312009-02-25 21:26:552640 # The Xcode generator will look for an xcode_settings section at the root
2641 # of each dict and use it to apply settings on a file-wide basis. Most
2642 # settings should not be here, they should be in target-specific
2643 # xcode_settings sections, or better yet, should use non-Xcode-specific
2644 # settings in target dicts. SYMROOT is a special case, because many other
2645 # Xcode variables depend on it, including variables such as
2646 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2647 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2648 # files to appear (when present) in the UI as actual files and not red
2649 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2650 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162651 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552652 },
[email protected]ee28c9f2009-09-04 01:53:012653}