blob: acf9fb7e1366189014d298a088dbe263bcc98091 [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]bb6aba32011-01-07 19:04:4327 # Disable touch support by default.
28 'touchui%': 0,
[email protected]9c8a1982011-05-24 23:08:5829
30 # Whether the compositor is enabled on views.
31 'views_compositor%': 0,
[email protected]7de46352011-09-12 15:39:1932
[email protected]e599f0132011-08-24 19:03:3533 # Whether or not we are building with the Aura window manager.
[email protected]41423092011-08-25 15:39:5834 'use_aura%': 0,
[email protected]e0b85a52011-10-06 03:30:4235
36 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
37 'use_openssl%': 0,
[email protected]bb6aba32011-01-07 19:04:4338 },
39 # Copy conditionally-set variables out one scope.
40 'chromeos%': '<(chromeos)',
41 'touchui%': '<(touchui)',
[email protected]9c8a1982011-05-24 23:08:5842 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:5843 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:4244 'use_openssl%': '<(use_openssl)',
[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]fd88a8842011-09-13 02:50:2261 # Set default value of toolkit_views on for Windows, Chrome OS,
62 # Touch and PureView.
[email protected]cefddfc2011-11-11 03:00:3863 ['OS=="win" or chromeos==1 or touchui==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4364 'toolkit_views%': 1,
65 }, {
66 'toolkit_views%': 0,
67 }],
[email protected]1b546692011-06-30 18:22:3068
[email protected]2cc81d32011-10-04 17:03:1869 # Use virtual keyboard by default in TouchUI builds.
70 ['touchui==1', {
71 'use_virtual_keyboard%': 1,
72 }, {
73 'use_virtual_keyboard%': 0,
74 }],
75
[email protected]4916d622011-09-28 23:45:3876 # Use the views compositor when using the Aura window manager or
77 # touch.
78 ['use_aura==1 or touchui==1', {
[email protected]e599f0132011-08-24 19:03:3579 'views_compositor%': 1,
80 }],
[email protected]e72e55b2011-01-06 22:19:3081 ],
82 },
83
84 # Copy conditionally-set variables out one scope.
85 'chromeos%': '<(chromeos)',
86 'touchui%': '<(touchui)',
[email protected]2cc81d32011-10-04 17:03:1887 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]e72e55b2011-01-06 22:19:3088 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4389 'toolkit_views%': '<(toolkit_views)',
[email protected]9c8a1982011-05-24 23:08:5890 'views_compositor%': '<(views_compositor)',
[email protected]332749032011-10-22 00:32:4691 'use_webkit_compositor%': '<(use_webkit_compositor)',
[email protected]41423092011-08-25 15:39:5892 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:4293 'use_openssl%': '<(use_openssl)',
[email protected]e72e55b2011-01-06 22:19:3094
[email protected]8fb0ef02011-05-20 00:53:5095 # We used to provide a variable for changing how libraries were built.
96 # This variable remains until we can clean up all the users.
97 # This needs to be one nested variables dict in so that dependent
98 # gyp files can make use of it in their outer variables. (Yikes!)
99 # http://code.google.com/p/chromium/issues/detail?id=83308
100 'library%': 'static_library',
101
[email protected]e14a9f92009-08-05 19:26:07102 # Override branding to select the desired branding flavor.
103 'branding%': 'Chromium',
104
105 # Override buildtype to select the desired build flavor.
106 # Dev - everyday build for development/testing
107 # Official - release build (generally implies additional processing)
108 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
109 # conversion is done), some of the things which are now controlled by
110 # 'branding', such as symbol generation, will need to be refactored based
111 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
112 # builds).
113 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27114
[email protected]e72e55b2011-01-06 22:19:30115 # Default architecture we're building for is the architecture we're
116 # building on.
117 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17118
[email protected]e72e55b2011-01-06 22:19:30119 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
120 # are built under a chromium full build (1) or a webkit.org chromium
121 # build (0).
122 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52123
[email protected]e72e55b2011-01-06 22:19:30124 # Set to 1 to enable fast builds. It disables debug info for fastest
125 # compilation.
126 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49127
[email protected]20960e072011-09-20 20:59:01128 # Set to 1 to enable dcheck in release without having to use the flag.
129 'dcheck_always_on%': 0,
130
[email protected]464750f2011-10-24 23:16:18131 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51132 'file_manager_extension%': 0,
133
[email protected]32981462011-10-18 07:05:16134 # Enable WebUI TaskManager by default.
135 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47136
[email protected]e72e55b2011-01-06 22:19:30137 # Python version.
[email protected]a43c5a02011-05-27 06:54:51138 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17139
[email protected]e72e55b2011-01-06 22:19:30140 # Set ARM-v7 compilation flags
141 'armv7%': 0,
142
143 # Set Neon compilation flags (only meaningful if armv7==1).
144 'arm_neon%': 1,
145
146 # The system root for cross-compiles. Default: none.
147 'sysroot%': '',
148
[email protected]945361a2011-09-30 04:38:43149 # The system libdir used for this ABI.
150 'system_libdir%': 'lib',
151
[email protected]e72e55b2011-01-06 22:19:30152 # On Linux, we build with sse2 for Chromium builds.
153 'disable_sse2%': 0,
154
155 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03156 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30157
158 # Variable 'component' is for cases where we would like to build some
159 # components as dynamic shared libraries but still need variable
160 # 'library' for static libraries.
161 # By default, component is set to whatever library is set to and
162 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53163 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30164
[email protected]bb6aba32011-01-07 19:04:43165 # Set to select the Title Case versions of strings in GRD files.
166 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21167
[email protected]98da0042011-02-02 00:10:27168 # Use translations provided by volunteers at launchpad.net. This
169 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19170 'use_third_party_translations%': 0,
171
[email protected]9a425422011-01-11 00:53:18172 # Remoting compilation is enabled by default. Set to 0 to disable.
173 'remoting%': 1,
174
[email protected]5834f4392011-09-13 20:06:17175 # Threaded compositing
176 'use_threaded_compositing%': 0,
177
[email protected]a026daa2011-04-20 15:49:51178 # P2P APIs are compiled in by default. Set to 0 to disable.
179 # Also note that this should be enabled for remoting to compile.
180 'p2p_apis%': 1,
181
[email protected]1ec68c42011-06-01 13:56:25182 # Configuration policy is enabled by default. Set to 0 to disable.
183 'configuration_policy%': 1,
184
[email protected]4b58e7d2011-07-11 10:22:56185 # Safe browsing is compiled in by default. Set to 0 to disable.
186 'safe_browsing%': 1,
187
[email protected]9eb100e2011-10-14 05:08:22188 # Speech input is compiled in by default. Set to 0 to disable.
189 'input_speech%': 1,
190
[email protected]7cce3232011-10-28 10:41:57191 # Notifications are compiled in by default. Set to 0 to disable.
192 'notifications%' : 1,
193
[email protected]5d451ad2011-02-11 16:43:46194 # If this is set, the clang plugins used on the buildbot will be used.
195 # Run tools/clang/scripts/update.sh to make sure they are compiled.
196 # This causes 'clang_chrome_plugins_flags' to be set.
197 # Has no effect if 'clang' is not set as well.
198 'clang_use_chrome_plugins%': 0,
199
[email protected]f36f3742011-11-21 13:12:14200 # Enable building with ASAN (Clang's -faddress-sanitizer option).
201 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06202 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
203 'asan%': 0,
204
[email protected]1ad5a7b2011-06-24 03:15:13205 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
206 # libraries on linux x86-64 and arm, plus ASLR.
207 'linux_fpic%': 1,
208
[email protected]c6a1f94172011-07-05 02:35:00209 # Enable navigator.registerProtocolHandler and supporting UI.
210 'enable_register_protocol_handler%': 1,
211
[email protected]62af76e2011-08-01 02:34:01212 # Enable Web Intents and supporting UI.
213 'enable_web_intents%': 0,
214
[email protected]dda90ae2011-07-19 22:07:48215 # Webrtc compilation is enabled by default. Set to 0 to disable.
216 'enable_webrtc%': 1,
217
[email protected]67c125d2011-10-11 18:58:22218 # PPAPI by default does not support plugins making calls off the main
219 # thread. Set to 1 to turn on experimental support for out-of-process
220 # plugins to make call of the main thread.
221 'enable_pepper_threading%': 0,
222
[email protected]f56797b2011-09-25 00:04:35223 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
224 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
225 # the input value also defines the required XI2 minor minimum version.
226 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
227 'use_xi2_mt%': 0,
228
[email protected]d5cf9fb2011-09-27 00:15:16229 # Use of precompiled headers on Windows is off by default
230 # because of complications that it can cause with our
231 # infrastructure (trybots etc.). Enable by setting to 1 in
232 # ~/.gyp/include.gypi or via the GYP command line for ~20-25%
233 # faster builds.
234 'chromium_win_pch%': 0,
235
[email protected]bb6aba32011-01-07 19:04:43236 'conditions': [
[email protected]33423fa2011-09-23 18:18:14237 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
238 # the 'conditions' clause. Initial attempts resulted in chromium and
239 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22240 ['OS=="mac"', {
[email protected]ef1155a2011-11-10 16:25:09241 'use_skia%': 0,
[email protected]e4dbede82011-09-16 16:11:07242 # Mac uses clang by default, so turn on the plugin as well.
243 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22244 }, {
245 'use_skia%': 1,
246 }],
247
[email protected]79e2336c2011-05-12 18:18:34248 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37249 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34250 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37251 }, {
252 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34253 }],
254
[email protected]df9167b2011-11-14 19:15:25255 # A flag for BSD platforms
256 ['OS=="freebsd" or OS=="openbsd"', {
257 'os_bsd%': 1,
258 }, {
259 'os_bsd%': 0,
260 }],
261
[email protected]c329adf82011-10-05 14:34:57262 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42263 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57264 'use_nss%': 1,
265 }, {
266 'use_nss%': 0,
267 }],
[email protected]e0b85a52011-10-06 03:30:42268
[email protected]258dca42011-09-21 00:17:19269 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01270 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19271 'use_glib%': 0,
272 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34273 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37274 }, {
[email protected]258dca42011-09-21 00:17:19275 # TODO(dnicoara) Wayland build should have these disabled, but
276 # currently GTK and X is too spread and it's hard to completely
277 # remove every dependency.
278 'use_glib%': 1,
279 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37280 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34281 }],
[email protected]efadeacf2011-10-27 19:01:00282 # We always use skia text rendering in Aura on Windows, since GDI
283 # doesn't agree with our BackingStore.
284 # TODO(beng): remove once skia text rendering is on by default.
285 ['use_aura==1 and OS=="win"', {
286 'enable_skia_text%': 1,
287 }],
[email protected]258dca42011-09-21 00:17:19288 ['use_aura==1 and OS!="win"', {
[email protected]9d43e372011-09-22 19:39:52289 'toolkit_uses_gtk%': 0,
[email protected]9edeb712011-09-20 21:20:33290 }],
291
[email protected]63692212010-09-16 00:22:21292 # A flag to enable or disable our compile-time dependency
293 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
294 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49295 # for Linux distributions and for Aura.
296 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21297 'use_gnome_keyring%': 0,
298 }, {
299 'use_gnome_keyring%': 1,
300 }],
[email protected]0afe5212010-10-01 18:56:11301
[email protected]bb6aba32011-01-07 19:04:43302 ['toolkit_views==0 or OS=="mac"', {
303 # GTK+ and Mac wants Title Case strings
304 'use_titlecase_in_grd_files%': 1,
305 }],
306
[email protected]1b4209f2011-01-07 00:25:40307 # Enable some hacks to support Flapper only on Chrome OS.
308 ['chromeos==1', {
309 'enable_flapper_hacks%': 1,
310 }, {
311 'enable_flapper_hacks%': 0,
312 }],
[email protected]3d38d8e2011-04-16 20:48:51313
[email protected]f6e680912011-09-21 20:26:19314 # Enable file manager extension on Chrome OS, Touch, PureView, Aura.
[email protected]cefddfc2011-11-11 03:00:38315 ['chromeos==1 or touchui==1 or use_aura==1', {
[email protected]3d38d8e2011-04-16 20:48:51316 'file_manager_extension%': 1,
317 }, {
318 'file_manager_extension%': 0,
319 }],
[email protected]7de46352011-09-12 15:39:19320
[email protected]e5b307f2011-10-06 22:55:28321 # ... except on Windows even with Aura.
322 ['use_aura==1 and OS=="win"', {
323 'file_manager_extension%': 0,
324 }],
325
[email protected]32981462011-10-18 07:05:16326 # Enable WebUI TaskManager always on Chrome OS, Touch or PureView.
[email protected]cefddfc2011-11-11 03:00:38327 ['chromeos==1 or touchui==1 or use_aura==1', {
[email protected]8b2e9f392011-08-05 04:00:47328 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47329 }],
330
[email protected]da1c8d692011-09-20 20:35:01331 ['OS=="android"', {
332 'proprietary_codecs%': 1,
333 'enable_webrtc%': 0,
334 }],
[email protected]839d5172011-10-13 17:18:11335
336 # Use GPU accelerated cross process image transport by default
337 # on TOUCH_UI and linux builds with the Aura window manager
[email protected]4b58d552011-10-26 00:54:46338 ['views_compositor==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33339 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11340 }, {
[email protected]1ee7c56c2011-10-19 14:51:33341 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11342 }],
[email protected]b3f23ba2010-04-26 22:58:17343 ],
[email protected]e14a9f92009-08-05 19:26:07344 },
345
[email protected]e72e55b2011-01-06 22:19:30346 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07347 'branding%': '<(branding)',
348 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27349 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59350 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50351 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44352 'toolkit_views%': '<(toolkit_views)',
[email protected]9c8a1982011-05-24 23:08:58353 'views_compositor%': '<(views_compositor)',
[email protected]1ee7c56c2011-10-19 14:51:33354 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]332749032011-10-22 00:32:46355 'use_webkit_compositor%': '<(use_webkit_compositor)',
[email protected]41423092011-08-25 15:39:58356 'use_aura%': '<(use_aura)',
[email protected]e0b85a52011-10-06 03:30:42357 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57358 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25359 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34360 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19361 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34362 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22363 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34364 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21365 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11366 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40367 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22368 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44369 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49370 'touchui%': '<(touchui)',
[email protected]2cc81d32011-10-04 17:03:18371 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]f56797b2011-09-25 00:04:35372 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20373 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47374 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21375 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54376 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01377 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36378 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43379 'armv7%': '<(armv7)',
380 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23381 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43382 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22383 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52384 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43385 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17386 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18387 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17388 'use_threaded_compositing%': '<(use_threaded_compositing)',
[email protected]dda90ae2011-07-19 22:07:48389 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16390 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51391 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25392 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56393 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22394 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57395 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46396 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06397 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56398 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07399 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22400 # Whether to build for Wayland display server
401 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39402
[email protected]371e1092011-10-12 20:37:36403 # Use system yasm instead of bundled one.
404 'use_system_yasm%': 0,
405
[email protected]cf90a512011-10-08 00:00:44406 # Default to enabled PIE; this is important for ASLR but we need to be
407 # able to turn it off for remote debugging on Chromium OS
408 'linux_disable_pie%': 0,
409
[email protected]caa95c82009-11-23 22:39:32410 # The release channel that this build targets. This is used to restrict
411 # channel-specific build options, like which installer packages to create.
412 # The default is 'all', which does no channel-specific filtering.
413 'channel%': 'all',
414
[email protected]b3fb8092009-03-12 19:09:24415 # Override chromium_mac_pch and set it to 0 to suppress the use of
416 # precompiled headers on the Mac. Prefix header injection may still be
417 # used, but prefix headers will not be precompiled. This is useful when
418 # using distcc to distribute a build to compile slaves that don't
419 # share the same compiler executable as the system driving the compilation,
420 # because precompiled headers rely on pointers into a specific compiler
421 # executable's image. Setting this to 0 is needed to use an experimental
422 # Linux-Mac cross compiler distcc farm.
423 'chromium_mac_pch%': 1,
424
[email protected]3224dcd2009-09-16 17:31:25425 # Mac OS X SDK and deployment target support.
426 # The SDK identifies the version of the system headers that will be used,
427 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
428 # "Maximum allowed" refers to the operating system version whose APIs are
429 # available in the headers.
430 # The deployment target identifies the minimum system version that the
431 # built products are expected to function on. It corresponds to the
432 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
433 # To ensure these macros are available, #include <AvailabilityMacros.h>.
434 # Additional documentation on these macros is available at
435 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
436 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
437 # deployment target to 10.5. Other projects, such as O3D, may override
438 # these defaults.
439 'mac_sdk%': '10.5',
440 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59441
[email protected]f5ecbba12009-04-03 04:35:18442 # Set to 1 to enable code coverage. In addition to build changes
443 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
444 # project file called "coverage".
445 # Currently ignored on Windows.
446 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49447
[email protected]7477ea6f2009-12-22 23:28:15448 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47449 # environment variable, the libcmt shim it uses sometimes gets in
450 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
451 # 'win_use_allocator_shim': 0,
452 # 'win_release_RuntimeLibrary': 2
453 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52454 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11455
[email protected]95ff8082009-11-13 22:21:01456 # Whether usage of OpenMAX is enabled.
457 'enable_openmax%': 0,
458
[email protected]d01120e62010-05-10 17:04:48459 # Whether proprietary audio/video codecs are assumed to be included with
460 # this build (only meaningful if branding!=Chrome).
461 'proprietary_codecs%': 0,
462
[email protected]e5b2eaa2009-04-14 01:39:12463 # TODO(bradnelson): eliminate this when possible.
464 # To allow local gyp files to prevent release.vsprops from being included.
465 # Yes(1) means include release.vsprops.
466 # Once all vsprops settings are migrated into gyp, this can go away.
467 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23468
[email protected]cbd5fd52009-08-26 00:14:27469 # TODO(bradnelson): eliminate this when possible.
470 # To allow local gyp files to override additional linker options for msvs.
471 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19472 'msvs_use_common_linker_extras%': 1,
473
[email protected]1ffb6502009-06-02 07:46:24474 # TODO(sgk): eliminate this if possible.
475 # It would be nicer to support this via a setting in 'target_defaults'
476 # in chrome/app/locales/locales.gypi overriding the setting in the
477 # 'Debug' configuration in the 'target_defaults' dict below,
478 # but that doesn't work as we'd like.
479 'msvs_debug_link_incremental%': '2',
480
[email protected]1f790ef2011-01-11 20:45:36481 # Needed for some of the largest modules.
482 'msvs_debug_link_nonincremental%': '1',
483
[email protected]5ab8f482011-08-18 18:30:06484 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
485 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51486 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06487
[email protected]573136142009-07-15 22:48:37488 # This is the location of the sandbox binary. Chrome looks for this before
489 # running the zygote process. If found, and SUID, it will be used to
490 # sandbox the zygote process and, thus, all renderer processes.
491 'linux_sandbox_path%': '',
492
[email protected]ad6d2c42009-09-15 20:13:38493 # Set this to true to enable SELinux support.
494 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57495
[email protected]58680ce2010-09-18 00:09:15496 # Set this to true when building with Clang.
497 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15498 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24499 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15500
[email protected]5e781232011-01-28 02:57:59501 # These two variables can be set in GYP_DEFINES while running
502 # |gclient runhooks| to let clang run a plugin in every compilation.
503 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
504 # Example:
[email protected]93120fe2011-02-03 20:46:42505 # 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:59506
507 'clang_load%': '',
508 'clang_add_plugin%': '',
509
[email protected]da1c8d692011-09-20 20:35:01510 # The default type of gtest.
511 'gtest_target_type%': 'executable',
512
[email protected]7664ab32011-02-01 23:35:25513 # Enable sampling based profiler.
514 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
515 'profiling%': '0',
516
[email protected]93b373502011-08-16 19:06:22517 # Enable strict glibc debug mode.
518 'glibcxx_debug%': 0,
519
[email protected]36532f332010-08-25 00:22:01520 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
521 'linux_breakpad%': 0,
522 # And if we want to dump symbols for Breakpad-enabled builds.
523 'linux_dump_symbols%': 0,
524 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03525 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49526 # Strip the test binaries needed for Linux reliability tests.
527 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03528
[email protected]46ce5b562010-06-16 18:39:53529 # Enable TCMalloc.
530 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24531
[email protected]39ca7de2010-04-16 08:04:03532 # Disable TCMalloc's debugallocation.
533 'linux_use_debugallocation%': 0,
534
[email protected]d8b60602010-03-26 09:41:22535 # Disable TCMalloc's heapchecker.
536 'linux_use_heapchecker%': 0,
537
[email protected]64e2d4a42010-08-27 10:13:21538 # Disable shadow stack keeping used by heapcheck to unwind the stacks
539 # better.
540 'linux_keep_shadow_stacks%': 0,
541
[email protected]556c5d72010-06-10 05:45:01542 # Set to 1 to link against libgnome-keyring instead of using dlopen().
543 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35544 # Set to 1 to link against gsettings APIs instead of using dlopen().
545 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01546
[email protected]77c1b29392009-12-04 06:21:29547 # Set Thumb compilation flags.
548 'arm_thumb%': 0,
549
[email protected]53e0f642010-03-05 01:41:56550 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
551 # arm_neon==0).
552 'arm_fpu%': 'vfpv3',
553
[email protected]9821d0d2010-04-16 22:40:37554 # Enable new NPDevice API.
555 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50556
557 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14558 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50559
[email protected]6f51b27e2010-06-22 20:43:53560 # Enable a variable used elsewhere throughout the GYP files to determine
561 # whether to compile in the sources for the GPU plugin / process.
562 'enable_gpu%': 1,
563
[email protected]e72e55b2011-01-06 22:19:30564 # .gyp files or targets should set chromium_code to 1 if they build
565 # Chromium-specific code, as opposed to external code. This variable is
566 # used to control such things as the set of warnings to enable, and
567 # whether warnings are treated as errors.
568 'chromium_code%': 0,
569
[email protected]b1eb341c2011-11-09 18:46:07570 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
571 'enable_wexit_time_destructors%': 0,
572
[email protected]e72e55b2011-01-06 22:19:30573 # Set to 1 to compile with the built in pdf viewer.
574 'internal_pdf%': 0,
575
576 # This allows to use libcros from the current system, ie. /usr/lib/
577 # The cros_api will be pulled in as a static library, and all headers
578 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43579 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30580
[email protected]e72e55b2011-01-06 22:19:30581 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
582 # so Cocoa is happy (http://crbug.com/20441).
583 'locales': [
584 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
585 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
586 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
587 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
588 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
589 'vi', 'zh-CN', 'zh-TW',
590 ],
591
[email protected]cc0322d2011-07-24 09:29:19592 # Pseudo locales are special locales which are used for testing and
593 # debugging. They don't get copied to the final app. For more info,
594 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
595 'pseudo_locales': [
596 'fake-bidi',
597 ],
598
[email protected]bb6aba32011-01-07 19:04:43599 'grit_defines': [],
600
[email protected]29c2daea2011-01-05 20:38:50601 # Use Harfbuzz-NG instead of Harfbuzz.
602 # Under development: http://crbug.com/68551
603 'use_harfbuzz_ng%': 0,
604
[email protected]bd3bd442011-03-28 07:58:51605 # If debug_devtools is set to 1, JavaScript files for DevTools are
606 # stored as is and loaded from disk. Otherwise, a concatenated file
607 # is stored in resources.pak. It is still possible to load JS files
608 # from disk by passing --debug-devtools cmdline switch.
609 'debug_devtools%': 0,
610
[email protected]be8a9272011-02-10 22:06:07611 # Point to ICU directory.
612 'icu_src_dir': '../third_party/icu',
613
[email protected]464750f2011-10-24 23:16:18614 # The Java Bridge is not compiled in by default.
615 'java_bridge%': 0,
616
[email protected]912c55c2009-07-31 23:33:55617 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11618 # Used to disable Native Client at compile time, for platforms where it
619 # isn't supported (ARM)
620 ['target_arch=="arm"', {
621 'disable_nacl%': 1,
622 }, {
623 'disable_nacl%': 0,
624 }],
[email protected]da1c8d692011-09-20 20:35:01625 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10626 # This will set gcc_version to XY if you are running gcc X.Y.*.
627 # This is used to tweak build flags for gcc 4.4.
628 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23629 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43630 '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:27631 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10632 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27633 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27634 }],
[email protected]4c9cc6c2009-10-01 18:54:57635 # All Chrome builds have breakpad symbols, but only process the
636 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08637 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57638 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57639 }],
[email protected]cbd5fd52009-08-26 00:14:27640 ],
[email protected]da1c8d692011-09-20 20:35:01641 }], # os_posix==1 and OS!="mac" and OS!="android"
642 ['OS=="android"', {
643 # Location of Android NDK.
644 'variables': {
645 'variables': {
646 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
647 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43648
[email protected]da1c8d692011-09-20 20:35:01649 # Switch between different build types, currently only '0' is
650 # supported.
651 'android_build_type%': 0,
652 },
653 'android_ndk_root%': '<(android_ndk_root)',
654 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
655 'android_build_type%': '<(android_build_type)',
656 },
657 'android_ndk_root%': '<(android_ndk_root)',
658 'android_ndk_sysroot': '<(android_ndk_sysroot)',
659 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
660 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
661
662 # Uses Android's crash report system
663 'linux_breakpad%': 0,
664
665 # Always uses openssl.
666 'use_openssl%': 1,
667
668 'proprietary_codecs%': '<(proprietary_codecs)',
669 'safe_browsing%': 0,
670 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22671 'input_speech%': 0,
[email protected]464750f2011-10-24 23:16:18672 'java_bridge%': 1,
[email protected]7cce3232011-10-28 10:41:57673 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01674
675 # Builds the gtest targets as a shared_library.
676 # TODO(michaelbai): Use the fixed value 'shared_library' once it
677 # is fully supported.
678 'gtest_target_type%': '<(gtest_target_type)',
679
680 # Uses system APIs for decoding audio and video.
681 'use_libffmpeg%': '0',
682
683 # Always use the chromium skia. The use_system_harfbuzz needs to
684 # match use_system_skia.
685 'use_system_skia%': '0',
686 'use_system_harfbuzz%': '0',
687
688 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28689 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01690
691 # Choose static link by build type.
692 'conditions': [
693 ['android_build_type==0', {
694 'static_link_system_icu%': 1,
695 }, {
696 'static_link_system_icu%': 0,
697 }],
698 ],
699 # Enable to use system sqlite.
700 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16701 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01702 'use_system_libjpeg%': '<(android_build_type)',
703 # Enable to use the system libexpat.
704 'use_system_libexpat%': '<(android_build_type)',
705 # Enable to use the system stlport, otherwise statically
706 # link the NDK one?
707 'use_system_stlport%': '<(android_build_type)',
708 # Copy it out one scope.
709 'android_build_type%': '<(android_build_type)',
710 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07711 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11712 # Enable clang on mac by default!
713 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07714 'conditions': [
715 # mac_product_name is set to the name of the .app bundle as it should
716 # appear on disk. This duplicates data from
717 # chrome/app/theme/chromium/BRANDING and
718 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
719 # these names into the build system.
720 ['branding=="Chrome"', {
721 'mac_product_name%': 'Google Chrome',
722 }, { # else: branding!="Chrome"
723 'mac_product_name%': 'Chromium',
724 }],
725
726 # Feature variables for enabling Mac Breakpad and Keystone auto-update
727 # support. Both features are on by default in official builds with
728 # Chrome branding.
729 ['branding=="Chrome" and buildtype=="Official"', {
730 'mac_breakpad%': 1,
731 'mac_keystone%': 1,
732 }, { # else: branding!="Chrome" or buildtype!="Official"
733 'mac_breakpad%': 0,
734 'mac_keystone%': 0,
735 }],
736 ],
737 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43738
[email protected]912c55c2009-07-31 23:33:55739 # Whether to use multiple cores to compile with visual studio. This is
740 # optional because it sometimes causes corruption on VS 2005.
741 # It is on by default on VS 2008 and off on VS 2005.
742 ['OS=="win"', {
743 'conditions': [
[email protected]8974e042010-06-21 18:06:52744 ['component=="shared_library"', {
745 'win_use_allocator_shim%': 0,
746 }],
[email protected]912c55c2009-07-31 23:33:55747 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13748 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55749 },{
750 'msvs_multi_core_compile%': 1,
751 }],
[email protected]10bb8c92009-08-07 21:16:03752 # Don't do incremental linking for large modules on 32-bit.
753 ['MSVS_OS_BITS==32', {
754 'msvs_large_module_debug_link_mode%': '1', # No
755 },{
756 'msvs_large_module_debug_link_mode%': '2', # Yes
757 }],
[email protected]3e2648a2011-03-21 20:58:50758 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
759 'msvs_express%': 1,
760 'secure_atl%': 0,
761 },{
762 'msvs_express%': 0,
763 'secure_atl%': 1,
764 }],
[email protected]912c55c2009-07-31 23:33:55765 ],
[email protected]ef4fa4072009-12-04 22:46:50766 'nacl_win64_defines': [
767 # This flag is used to minimize dependencies when building
768 # Native Client loader for 64-bit Windows.
769 'NACL_WIN64',
770 ],
[email protected]912c55c2009-07-31 23:33:55771 }],
[email protected]bb6aba32011-01-07 19:04:43772
[email protected]79e2336c2011-05-12 18:18:34773 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44774 'use_cups%': 1,
775 }, {
776 'use_cups%': 0,
777 }],
[email protected]bb6aba32011-01-07 19:04:43778
[email protected]19fe8f0b2010-12-07 07:27:27779 # Set the relative path from this file to the GYP file of the JPEG
780 # library used by Chromium.
781 ['use_libjpeg_turbo==1', {
782 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
783 }, {
784 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
785 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43786
[email protected]abcc9ac2011-05-16 20:04:35787 # Options controlling the use of GConf (the classic GNOME configuration
788 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31789 ['chromeos==1', {
790 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35791 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31792 }, {
793 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35794 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31795 }],
796
[email protected]4de39f82011-03-28 12:01:29797 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29798 ['branding=="Chrome"', {
799 # TODO(mmoss) The .grd files look for _google_chrome, but for
800 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29801 'grit_defines': ['-D', '_google_chrome',
802 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29803 }, {
[email protected]4de39f82011-03-28 12:01:29804 'grit_defines': ['-D', '_chromium',
805 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29806 }],
[email protected]bb6aba32011-01-07 19:04:43807 ['chromeos==1', {
808 'grit_defines': ['-D', 'chromeos'],
809 }],
810 ['toolkit_views==1', {
811 'grit_defines': ['-D', 'toolkit_views'],
812 }],
[email protected]8dd791d2011-09-16 16:37:30813 ['use_aura==1', {
814 'grit_defines': ['-D', 'use_aura'],
815 }],
[email protected]c329adf82011-10-05 14:34:57816 ['use_nss==1', {
817 'grit_defines': ['-D', 'use_nss'],
818 }],
[email protected]bb6aba32011-01-07 19:04:43819 ['touchui==1', {
820 'grit_defines': ['-D', 'touchui'],
821 }],
[email protected]2cc81d32011-10-04 17:03:18822 ['use_virtual_keyboard==1', {
823 'grit_defines': ['-D', 'use_virtual_keyboard'],
824 }],
[email protected]e47c32032011-03-01 19:26:20825 ['file_manager_extension==1', {
826 'grit_defines': ['-D', 'file_manager_extension'],
827 }],
[email protected]8b2e9f392011-08-05 04:00:47828 ['webui_task_manager==1', {
829 'grit_defines': ['-D', 'webui_task_manager'],
830 }],
[email protected]9a425422011-01-11 00:53:18831 ['remoting==1', {
832 'grit_defines': ['-D', 'remoting'],
833 }],
[email protected]bb6aba32011-01-07 19:04:43834 ['use_titlecase_in_grd_files==1', {
835 'grit_defines': ['-D', 'use_titlecase'],
836 }],
[email protected]00dc155832011-02-01 18:51:19837 ['use_third_party_translations==1', {
838 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12839 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16840 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
841 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12842 ],
[email protected]00dc155832011-02-01 18:51:19843 }],
[email protected]da1c8d692011-09-20 20:35:01844 ['OS=="android"', {
845 'grit_defines': ['-D', 'android'],
846 }],
[email protected]5d451ad2011-02-11 16:43:46847 ['clang_use_chrome_plugins==1', {
848 'clang_chrome_plugins_flags':
849 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
850 }],
[email protected]cfa2e1102011-04-27 22:30:23851
[email protected]452da69e2011-05-24 02:36:05852 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23853 ['touchui==1 and chromeos==1', {
854 'use_ibus%': 1,
855 }, {
856 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56857 }],
858
859 ['enable_register_protocol_handler==1', {
860 'grit_defines': ['-D', 'enable_register_protocol_handler'],
861 }],
[email protected]92799b632011-08-15 14:33:06862
[email protected]41ed4e82011-08-25 23:02:07863 ['enable_web_intents==1', {
864 'grit_defines': ['-D', 'enable_web_intents'],
865 }],
866
[email protected]92799b632011-08-15 14:33:06867 ['asan==1', {
868 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20869 # Do not use Chrome plugins for Clang. The Clang version in
870 # third_party/asan may be different from the default one.
871 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06872 }],
[email protected]912c55c2009-07-31 23:33:55873 ],
[email protected]35958422011-09-28 02:03:59874 # List of default apps to install in new profiles. The first list contains
875 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:06876 # contains the destination location for each of the files. When a crx
877 # is added or removed from the list, the chrome/browser/resources/
878 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:59879 'default_apps_list': [
880 'browser/resources/default_apps/external_extensions.json',
881 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06882 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59883 'browser/resources/default_apps/youtube.crx',
884 ],
885 'default_apps_list_linux_dest': [
886 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
887 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:06888 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:59889 '<(PRODUCT_DIR)/default_apps/youtube.crx',
890 ],
[email protected]2f80c312009-02-25 21:26:55891 },
892 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26893 'variables': {
[email protected]a6e22132010-02-10 20:43:18894 # The condition that operates on chromium_code is in a target_conditions
895 # section, and will not have access to the default fallback value of
896 # chromium_code at the top of this file, or to the chromium_code
897 # variable placed at the root variables scope of .gyp files, because
898 # those variables are not set at target scope. As a workaround,
899 # if chromium_code is not set at target scope, define it in target scope
900 # to contain whatever value it has during early variable expansion.
901 # That's enough to make it available during target conditional
902 # processing.
903 'chromium_code%': '<(chromium_code)',
904
[email protected]7e0d664a2009-12-03 21:07:47905 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29906 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00907 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:33908
[email protected]7e0d664a2009-12-03 21:07:47909 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
910 'win_release_Optimization%': '2', # 2 = /Os
911 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:33912
913 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
914 'win_release_OmitFramePointers%': '1',
915
[email protected]6b0507b2010-05-07 07:41:21916 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
917 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:33918
[email protected]6b0507b2010-05-07 07:41:21919 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15920 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
921 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:33922
[email protected]fac10d12010-11-08 16:00:31923 # VS inserts quite a lot of extra checks to algorithms like
924 # std::partial_sort in Debug build which make them O(N^2)
925 # instead of O(N*logN). This is particularly slow under memory
926 # tools like ThreadSanitizer so we want it to be disablable.
927 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
928 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47929
[email protected]ffd984b12009-09-11 19:37:00930 'release_extra_cflags%': '',
931 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56932 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52933
[email protected]b1eb341c2011-11-09 18:46:07934 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
935 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
936
[email protected]ef3326702011-10-06 18:06:44937 # Only used by Windows build for now. Can be used to build into a
938 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
939 # output files in src/build/VS2010_{Debug,Release}.
940 'build_dir_prefix%': '',
941
[email protected]8974e042010-06-21 18:06:52942 'conditions': [
943 ['OS=="win" and component=="shared_library"', {
944 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
945 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
946 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
947 }, {
948 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
949 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
950 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
951 }],
952 ],
[email protected]1c966092009-08-20 21:19:26953 },
[email protected]32aa8cc2009-03-04 21:36:39954 'conditions': [
955 ['branding=="Chrome"', {
956 'defines': ['GOOGLE_CHROME_BUILD'],
957 }, { # else: branding!="Chrome"
958 'defines': ['CHROMIUM_BUILD'],
959 }],
[email protected]63e39a282011-07-13 20:41:28960 ['component=="shared_library"', {
961 'defines': ['COMPONENT_BUILD'],
962 }],
[email protected]5cba9ff72011-11-16 21:55:18963 ['component=="shared_library" and incremental_chrome_dll==1', {
964 # TODO(dpranke): We can't incrementally link chrome when
965 # content is being built as a DLL because chrome links in
966 # webkit_glue and webkit_glue depends on symbols defined in
967 # content. We can remove this when we fix glue.
968 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
969 'defines': ['COMPILE_CONTENT_STATICALLY'],
970 }],
[email protected]06c756182010-04-27 18:31:31971 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17972 'defines': ['TOOLKIT_VIEWS=1'],
973 }],
[email protected]9c8a1982011-05-24 23:08:58974 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27975 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58976 }],
[email protected]1ee7c56c2011-10-19 14:51:33977 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:11978 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
979 }],
[email protected]332749032011-10-22 00:32:46980 ['use_webkit_compositor==1', {
981 'defines': ['USE_WEBKIT_COMPOSITOR=1'],
982 }],
[email protected]41423092011-08-25 15:39:58983 ['use_aura==1', {
984 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:35985 }],
[email protected]c329adf82011-10-05 14:34:57986 ['use_nss==1', {
987 'defines': ['USE_NSS=1'],
988 }],
[email protected]9d43e372011-09-22 19:39:52989 ['toolkit_uses_gtk==1', {
990 'defines': ['TOOLKIT_USES_GTK=1'],
991 }],
[email protected]fdc5bed2010-01-09 01:16:57992 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29993 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50994 }],
[email protected]0094fbe2010-07-15 21:51:43995 ['touchui==1', {
996 'defines': ['TOUCH_UI=1'],
997 }],
[email protected]2cc81d32011-10-04 17:03:18998 ['use_virtual_keyboard==1', {
999 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1000 }],
[email protected]f56797b2011-09-25 00:04:351001 ['use_xi2_mt!=0', {
1002 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1003 }],
[email protected]236754a2011-07-28 17:38:231004 ['use_wayland==1', {
1005 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1006 }],
[email protected]e47c32032011-03-01 19:26:201007 ['file_manager_extension==1', {
1008 'defines': ['FILE_MANAGER_EXTENSION=1'],
1009 }],
[email protected]8b2e9f392011-08-05 04:00:471010 ['webui_task_manager==1', {
1011 'defines': ['WEBUI_TASK_MANAGER=1'],
1012 }],
[email protected]7664ab32011-02-01 23:35:251013 ['profiling==1', {
1014 'defines': ['ENABLE_PROFILING=1'],
1015 }],
[email protected]93b373502011-08-16 19:06:221016 ['OS=="linux" and glibcxx_debug==1', {
1017 'defines': ['_GLIBCXX_DEBUG=1',],
1018 'cflags_cc!': ['-fno-rtti'],
1019 'cflags_cc+': ['-frtti', '-g'],
1020 }],
[email protected]542bf24a2010-06-11 23:08:171021 ['remoting==1', {
1022 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001023 }],
[email protected]a026daa2011-04-20 15:49:511024 ['p2p_apis==1', {
1025 'defines': ['ENABLE_P2P_APIS=1'],
1026 }],
[email protected]d01120e62010-05-10 17:04:481027 ['proprietary_codecs==1', {
1028 'defines': ['USE_PROPRIETARY_CODECS'],
1029 }],
[email protected]1b4209f2011-01-07 00:25:401030 ['enable_flapper_hacks==1', {
1031 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1032 }],
[email protected]67c125d2011-10-11 18:58:221033 ['enable_pepper_threading==1', {
1034 'defines': ['ENABLE_PEPPER_THREADING'],
1035 }],
[email protected]f31e2e52011-07-14 16:01:191036 ['configuration_policy==1', {
1037 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1038 }],
[email protected]9eb100e2011-10-14 05:08:221039 ['input_speech==1', {
1040 'defines': ['ENABLE_INPUT_SPEECH'],
1041 }],
[email protected]7cce3232011-10-28 10:41:571042 ['notifications==1', {
1043 'defines': ['ENABLE_NOTIFICATIONS'],
1044 }],
[email protected]9c1949e2009-10-02 19:59:541045 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171046
[email protected]9c1949e2009-10-02 19:59:541047 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141048 # For Windows and Mac, we don't genererate debug information.
1049 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541050 'msvs_settings': {
1051 'VCLinkerTool': {
1052 'GenerateDebugInformation': 'false',
1053 },
1054 'VCCLCompilerTool': {
1055 'DebugInformationFormat': '0',
1056 }
[email protected]da4d4ea2011-09-22 20:23:141057 },
1058 'xcode_settings': {
1059 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1060 },
[email protected]1cc2fa72010-07-03 08:49:241061 }, { # else: OS != "win", generate less debug information.
1062 'variables': {
1063 'debug_extra_cflags': '-g1',
1064 },
[email protected]37c84192010-04-14 21:37:401065 }],
[email protected]aecc4d12011-01-19 05:32:331066 # Clang creates chubby debug information, which makes linking very
1067 # slow. For now, don't create debug information with clang. See
1068 # http://crbug.com/70000
1069 ['OS=="linux" and clang==1', {
1070 'variables': {
1071 'debug_extra_cflags': '-g0',
1072 },
1073 }],
[email protected]9c1949e2009-10-02 19:59:541074 ], # conditions for fastbuild.
1075 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011076 ['dcheck_always_on!=0', {
1077 'defines': ['DCHECK_ALWAYS_ON=1'],
1078 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381079 ['selinux==1', {
1080 'defines': ['CHROMIUM_SELINUX=1'],
1081 }],
[email protected]7e0d664a2009-12-03 21:07:471082 ['win_use_allocator_shim==0', {
1083 'conditions': [
1084 ['OS=="win"', {
1085 'defines': ['NO_TCMALLOC'],
1086 }],
1087 ],
1088 }],
[email protected]43f28f832010-02-03 02:28:481089 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151090 'defines': [
1091 'ENABLE_GPU=1',
1092 ],
1093 }],
[email protected]b1c2a5542010-10-08 12:44:401094 ['use_openssl==1', {
1095 'defines': [
1096 'USE_OPENSSL=1',
1097 ],
1098 }],
[email protected]ed154592010-04-29 00:18:501099 ['enable_eglimage==1', {
1100 'defines': [
1101 'ENABLE_EGLIMAGE=1',
1102 ],
1103 }],
[email protected]7d7564a12011-06-21 19:20:221104 ['use_skia==1', {
1105 'defines': [
1106 'USE_SKIA=1',
1107 ],
1108 }],
[email protected]f5ecbba12009-04-03 04:35:181109 ['coverage!=0', {
1110 'conditions': [
1111 ['OS=="mac"', {
1112 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041113 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1114 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471115 },
[email protected]e4fb84c2009-12-28 20:45:431116 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101117 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431118 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181119 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431120 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181121 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471122 }],
1123 ],
1124 }],
[email protected]da1c8d692011-09-20 20:35:011125 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181126 'cflags': [ '-ftest-coverage',
1127 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001128 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181129 }],
[email protected]e8f6ff42009-07-07 18:20:531130 # Finally, for Windows, we simply turn on profiling.
1131 ['OS=="win"', {
1132 'msvs_settings': {
1133 'VCLinkerTool': {
1134 'Profile': 'true',
1135 },
[email protected]10bb8c92009-08-07 21:16:031136 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531137 # /Z7, not /Zi, so coverage is happyb
1138 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161139 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531140 }
1141 }
1142 }], # OS==win
1143 ], # conditions for coverage
1144 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381145 ['OS=="win"', {
1146 'defines': [
1147 '__STD_C',
1148 '_CRT_SECURE_NO_DEPRECATE',
1149 '_SCL_SECURE_NO_DEPRECATE',
1150 ],
1151 'include_dirs': [
1152 '<(DEPTH)/third_party/wtl/include',
1153 ],
1154 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561155 ['enable_register_protocol_handler==1', {
1156 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191157 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561158 ],
1159 }],
[email protected]41ed4e82011-08-25 23:02:071160 ['enable_web_intents==1', {
1161 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471162 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071163 ],
1164 }],
[email protected]a6e22132010-02-10 20:43:181165 ], # conditions for 'target_defaults'
1166 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071167 ['enable_wexit_time_destructors==1', {
1168 'conditions': [
1169 [ 'clang==1', {
1170 'cflags': [
1171 '-Wexit-time-destructors',
1172 ],
1173 'xcode_settings': {
1174 'WARNING_CFLAGS': [
1175 '-Wexit-time-destructors',
1176 ],
1177 },
1178 }],
1179 ],
1180 }],
[email protected]c14d8e772010-02-09 22:06:151181 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281182 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341183 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331184 # We don't want to get warnings from third-party code,
1185 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281186 'cflags!': [
1187 '-Wall',
1188 '-Wextra',
1189 '-Werror',
1190 ],
[email protected]167ec822011-10-24 22:05:271191 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001192 # Don't warn about hash_map in third-party code.
1193 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271194 ],
1195 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331196 # Don't warn about printf format problems.
1197 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221198 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001199 ],
[email protected]d16bd642011-07-25 23:59:181200 'cflags_cc!': [
1201 # TODO(fischman): remove this.
1202 # http://code.google.com/p/chromium/issues/detail?id=90453
1203 '-Wsign-compare',
1204 ]
[email protected]d8543312010-02-10 17:43:281205 }],
[email protected]817f0f142011-10-13 04:23:221206 [ 'os_posix==1 and OS!="mac" and OS!="openbsd" and chromeos==0', {
[email protected]6e4451892011-07-27 10:32:111207 'cflags': [
1208 # Don't warn about ignoring the return value from e.g. close().
1209 # This is off by default in some gccs but on by default in others.
1210 # Currently this option is not set for Chrome OS build because
1211 # the current version of gcc (4.3.4) used for building Chrome in
1212 # Chrome OS chroot doesn't support this option.
[email protected]817f0f142011-10-13 04:23:221213 # OpenBSD does not support this option either, since it's using
1214 # gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111215 # TODO(mazda): remove the conditional for Chrome OS when gcc
1216 # version is upgraded.
1217 '-Wno-unused-result',
1218 ],
1219 }],
[email protected]d8543312010-02-10 17:43:281220 [ 'OS=="win"', {
1221 'defines': [
1222 '_CRT_SECURE_NO_DEPRECATE',
1223 '_CRT_NONSTDC_NO_WARNINGS',
1224 '_CRT_NONSTDC_NO_DEPRECATE',
1225 '_SCL_SECURE_NO_DEPRECATE',
1226 ],
1227 'msvs_disabled_warnings': [4800],
1228 'msvs_settings': {
1229 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111230 'WarningLevel': '3',
1231 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281232 'Detect64BitPortabilityProblems': 'false',
1233 },
1234 },
1235 }],
[email protected]ea47b6a2011-07-17 19:39:421236 # TODO(darin): Unfortunately, some third_party code depends on base/
1237 [ 'OS=="win" and component=="shared_library"', {
1238 'msvs_disabled_warnings': [
1239 4251, # class 'std::xx' needs to have dll-interface.
1240 ],
1241 }],
[email protected]d8543312010-02-10 17:43:281242 [ 'OS=="mac"', {
1243 'xcode_settings': {
1244 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061245 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281246 },
1247 }],
[email protected]c14d8e772010-02-09 22:06:151248 ],
1249 }, {
1250 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1251 # C99 macros on Mac and Linux.
1252 'defines': [
1253 '__STDC_FORMAT_MACROS',
1254 ],
1255 'conditions': [
1256 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301257 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161258 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301259 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151260 }],
1261 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301262 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161263 ['exclude', '(^|/)(cocoa|mac)/'],
1264 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151265 }],
[email protected]02065c62011-09-23 00:08:461266 ['use_x11!=1', {
1267 'sources/': [
1268 ['exclude', '_(chromeos|x|x11)(_unittest)?\\.(h|cc)$'],
1269 ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
1270 ],
1271 }],
[email protected]79e2336c2011-05-12 18:18:341272 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151273 'sources/': [
[email protected]3ce52b72011-11-10 23:01:191274 ['exclude', '_gtk(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161275 ['exclude', '(^|/)gtk/'],
[email protected]02065c62011-09-23 00:08:461276 ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131277 ],
1278 }],
[email protected]69a48a92011-11-14 15:18:011279 ['OS!="linux" and OS!="openbsd"', {
[email protected]3ce52b72011-11-10 23:01:191280 'sources/': [
1281 ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
1282 ],
1283 }],
[email protected]f1b2cd02011-08-10 16:50:441284 ['use_wayland!=1', {
1285 'sources/': [
1286 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1287 ['exclude', '(^|/)wayland/'],
1288 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1289 ],
1290 }],
[email protected]167ec822011-10-24 22:05:271291 # Do not exclude the linux files on OpenBSD since most of them can be
1292 # shared at this point.
1293 # In case a file is not needed, it is going to be excluded later on.
1294 ['OS!="linux" and OS!="openbsd"', {
[email protected]18cff3d2010-02-17 18:03:131295 'sources/': [
[email protected]40519592010-11-16 15:23:301296 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161297 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131298 ],
[email protected]c14d8e772010-02-09 22:06:151299 }],
[email protected]f98d7b92011-09-09 10:17:351300 ['OS!="android"', {
1301 'sources/': [
1302 ['exclude', '_android(_unittest)?\\.cc$'],
1303 ['exclude', '(^|/)android/'],
1304 ],
1305 }],
[email protected]c14d8e772010-02-09 22:06:151306 # We use "POSIX" to refer to all non-Windows operating systems.
1307 ['OS=="win"', {
[email protected]d4af1e72011-10-21 17:45:431308 'sources/': [ ['exclude', '_posix(_unittest)?\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071309 # turn on warnings for signed/unsigned mismatch on chromium code.
1310 'msvs_settings': {
1311 'VCCLCompilerTool': {
1312 'AdditionalOptions': ['/we4389'],
1313 },
1314 },
[email protected]c14d8e772010-02-09 22:06:151315 }],
[email protected]63e39a282011-07-13 20:41:281316 ['OS=="win" and component=="shared_library"', {
1317 'msvs_disabled_warnings': [
1318 4251, # class 'std::xx' needs to have dll-interface.
1319 ],
1320 }],
[email protected]c14d8e772010-02-09 22:06:151321 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301322 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151323 }],
[email protected]06c756182010-04-27 18:31:311324 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301325 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151326 }],
[email protected]41423092011-08-25 15:39:581327 ['use_aura==0', {
[email protected]f941f47a2011-10-15 18:44:511328 'sources/': [ ['exclude', '_aura\\.(h|cc)$'],
1329 ['exclude', '(^|/)aura/'],
1330 ]
[email protected]41423092011-08-25 15:39:581331 }],
[email protected]50ea9262011-10-10 15:42:431332 ['use_aura==0 or use_x11==0', {
1333 'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ]
1334 }],
1335 ['use_aura==0 or OS!="win"', {
1336 'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ]
1337 }],
[email protected]2ddfe432011-11-07 19:26:301338 ['touchui!=1', {
1339 'sources/': [ ['exclude', '_touch\\.(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]f36f3742011-11-21 13:12:141926 # 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]f36f3742011-11-21 13:12:141930 '-faddress-sanitizer',
[email protected]74a26d72011-09-29 17:29:031931 '-w',
[email protected]f36f3742011-11-21 13:12:141932 '-DADDRESS_SANITIZER',
[email protected]92799b632011-08-15 14:33:061933 ],
1934 'ldflags': [
1935 '-fasan',
[email protected]f36f3742011-11-21 13:12:141936 '-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 ],
2087 'libraries!': [
2088 '-lrt', # librt is built into Bionic.
2089 # Not supported by Android toolchain.
2090 # Where do these come from? Can't find references in
2091 # any Chromium gyp or gypi file. Maybe they come from
2092 # gyp itself?
2093 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
2094 ],
2095 'libraries': [
2096 '-l<(android_stlport_library)',
2097 # Manually link the libgcc.a that the cross compiler uses.
2098 '<!($CROSS_CC -print-libgcc-file-name)',
2099 '-lc',
2100 '-ldl',
2101 '-lstdc++',
2102 '-lm',
2103 ],
2104 'conditions': [
2105 ['android_build_type==0', {
2106 'ldflags': [
2107 '-Wl,-rpath-link=<(android_ndk_lib)',
2108 '-L<(android_ndk_lib)',
2109 ],
2110 }],
2111 # NOTE: The stlport header include paths below are specified in
2112 # cflags rather than include_dirs because they need to come
2113 # after include_dirs. Think of them like system headers, but
2114 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2115 # toolchain (circa Gingerbread) will exhibit strange errors.
2116 # The include ordering here is important; change with caution.
2117 ['use_system_stlport==0', {
2118 'cflags': [
2119 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2120 ],
2121 'conditions': [
2122 ['target_arch=="arm" and armv7==1', {
2123 'ldflags': [
2124 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2125 ],
2126 }],
2127 ['target_arch=="arm" and armv7==0', {
2128 'ldflags': [
2129 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2130 ],
2131 }],
2132 ['target_arch=="ia32"', {
2133 'ldflags': [
2134 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2135 ],
2136 }],
2137 ],
2138 }],
2139 ['target_arch=="ia32"', {
2140 # The x86 toolchain currently has problems with stack-protector.
2141 'cflags!': [
2142 '-fstack-protector',
2143 ],
2144 'cflags': [
2145 '-fno-stack-protector',
2146 ],
2147 }],
2148 ],
2149 'target_conditions': [
2150 ['_type=="executable"', {
2151 'ldflags': [
2152 '-Bdynamic',
2153 '-Wl,-dynamic-linker,/system/bin/linker',
2154 '-Wl,--gc-sections',
2155 '-Wl,-z,nocopyreloc',
2156 # crtbegin_dynamic.o should be the last item in ldflags.
2157 '<(android_ndk_lib)/crtbegin_dynamic.o',
2158 ],
2159 'libraries': [
2160 # crtend_android.o needs to be the last item in libraries.
2161 # Do not add any libraries after this!
2162 '<(android_ndk_lib)/crtend_android.o',
2163 ],
2164 }],
2165 ['_type=="shared_library"', {
2166 'ldflags': [
2167 '-Wl,-shared,-Bsymbolic',
2168 ],
2169 }],
2170 ],
2171 }],
2172 # Settings for building host targets using the system toolchain.
2173 ['_toolset=="host"', {
2174 'ldflags!': [
2175 '-Wl,-z,noexecstack',
2176 '-Wl,--gc-sections',
2177 '-Wl,-O1',
2178 '-Wl,--as-needed',
2179 ],
[email protected]965b6b22011-09-29 16:07:282180 'sources/': [
2181 ['exclude', '_android(_unittest)?\\.cc$'],
2182 ['exclude', '(^|/)android/']
2183 ],
[email protected]da1c8d692011-09-20 20:35:012184 }],
2185 ],
2186 },
2187 }],
[email protected]93f21e42010-04-01 00:35:152188 ['OS=="solaris"', {
2189 'cflags!': ['-fvisibility=hidden'],
2190 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2191 }],
[email protected]2f80c312009-02-25 21:26:552192 ['OS=="mac"', {
2193 'target_defaults': {
[email protected]24700642009-06-01 16:01:202194 'variables': {
[email protected]162407f2011-09-08 15:33:172195 # These should end with %, but there seems to be a bug with % in
2196 # variables that are intended to be set to different values in
2197 # different targets, like these.
2198 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202199 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382200 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202201 },
[email protected]d92c7c012009-03-19 19:26:422202 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552203 'xcode_settings': {
2204 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042205 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2206 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2207 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2208 # (Equivalent to -fPIC)
2209 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2210 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2211 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252212 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2213 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042214 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2215 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2216 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2217 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552218 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042219 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252220 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2221 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112222 # Keep pch files below xcodebuild/.
2223 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552224 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192225 'OTHER_CFLAGS': [
2226 '-fno-strict-aliasing', # See http://crbug.com/32204
2227 ],
[email protected]080e86f2010-06-21 15:19:042228 'WARNING_CFLAGS': [
2229 '-Wall',
2230 '-Wendif-labels',
2231 '-Wextra',
2232 # Don't warn about unused function parameters.
2233 '-Wno-unused-parameter',
2234 # Don't warn about the "struct foo f = {0};" initialization
2235 # pattern.
2236 '-Wno-missing-field-initializers',
2237 ],
[email protected]b3fb8092009-03-12 19:09:242238 'conditions': [
2239 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592240 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2241 ],
[email protected]66733172010-09-22 00:09:282242 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302243 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2244 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382245
2246 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2247 # when buliding with clang. This warning is triggered when the
2248 # override keyword is used via the OVERRIDE macro from
2249 # base/compiler_specific.h.
2250 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
2251
[email protected]34f40892011-09-06 21:53:302252 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282253 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072254 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282255 # Don't die on dtoa code that uses a char as an array index.
2256 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2257 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452258 # Clang spots more unused functions.
2259 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332260 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052261 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302262 # WebKit uses nullptr in a legit way, other that that this
2263 # warning doesn't fire.
2264 '-Wno-c++0x-compat',
2265 # This (rightyfully) complains about 'override', which we use
2266 # heavily.
2267 '-Wno-c++11-extensions',
[email protected]66733172010-09-22 00:09:282268 ],
2269 }],
[email protected]5d451ad2011-02-11 16:43:462270 ['clang==1 and clang_use_chrome_plugins==1', {
2271 'OTHER_CFLAGS': [
2272 '<(clang_chrome_plugins_flags)',
2273 ],
2274 }],
[email protected]5e781232011-01-28 02:57:592275 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
2276 'OTHER_CFLAGS': [
2277 '-Xclang', '-load', '-Xclang', '<(clang_load)',
2278 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2279 ],
2280 }],
[email protected]b3fb8092009-03-12 19:09:242281 ],
[email protected]2f80c312009-02-25 21:26:552282 },
[email protected]34f40892011-09-06 21:53:302283 'conditions': [
2284 ['clang==1', {
2285 'variables': {
2286 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2287 },
2288 }],
2289 ],
[email protected]2f80c312009-02-25 21:26:552290 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552291 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462292 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2293 }],
2294 ['_mac_bundle', {
2295 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082296 }],
[email protected]6303fed2011-08-11 01:12:102297 ['_type=="executable"', {
2298 'postbuilds': [
2299 {
2300 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362301 # code execution when running on Mac OS X 10.7 ("Lion"), and
2302 # ensures that the position-independent executable (PIE) bit
2303 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102304 'variables': {
[email protected]8c40f322011-08-24 03:33:362305 # Define change_mach_o_flags in a variable ending in _path
2306 # so that GYP understands it's a path and performs proper
2307 # relativization during dict merging.
2308 'change_mach_o_flags_path':
2309 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172310 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132311 ],
2312 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172313 ['mac_pie==0 or release_valgrind_build==1', {
2314 # Don't enable PIE if it's unwanted. It's unwanted if
2315 # the target specifies mac_pie=0 or if building for
2316 # Valgrind, because Valgrind doesn't understand slide.
2317 # See the similar mac_pie/release_valgrind_build check
2318 # below.
[email protected]081c0342011-08-24 14:59:132319 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132320 '--no-pie',
2321 ],
2322 }],
2323 ],
[email protected]6303fed2011-08-11 01:12:102324 },
[email protected]8c40f322011-08-24 03:33:362325 'postbuild_name': 'Change Mach-O Flags',
2326 'action': [
2327 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132328 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362329 ],
[email protected]6303fed2011-08-11 01:12:102330 },
2331 ],
[email protected]5a5d97aa2011-09-02 15:34:002332 'conditions': [
2333 ['asan==1', {
2334 'variables': {
2335 'asan_saves_file': 'asan.saves',
2336 },
2337 'xcode_settings': {
2338 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
2339 },
2340 }],
2341 ],
[email protected]162407f2011-09-08 15:33:172342 'target_conditions': [
2343 ['mac_pie==1 and release_valgrind_build==0', {
2344 # Turn on position-independence (ASLR) for executables. When
2345 # PIE is on for the Chrome executables, the framework will
2346 # also be subject to ASLR.
2347 # Don't do this when building for Valgrind, because Valgrind
2348 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2349 # understand slide, and get rid of the Valgrind check.
2350 'xcode_settings': {
2351 'OTHER_LDFLAGS': [
2352 '-Wl,-pie', # Position-independent executable (MH_PIE)
2353 ],
2354 },
2355 }],
2356 ],
[email protected]6a0242bc2011-07-01 00:34:462357 }],
[email protected]9a5e72862010-09-02 16:16:582358 ['(_type=="executable" or _type=="shared_library" or \
2359 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202360 'target_conditions': [
2361 ['mac_real_dsym == 1', {
2362 # To get a real .dSYM bundle produced by dsymutil, set the
2363 # debug information format to dwarf-with-dsym. Since
2364 # strip_from_xcode will not be used, set Xcode to do the
2365 # stripping as well.
2366 'configurations': {
[email protected]5153767c2009-12-22 01:52:502367 'Release_Base': {
[email protected]24700642009-06-01 16:01:202368 'xcode_settings': {
2369 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2370 'DEPLOYMENT_POSTPROCESSING': 'YES',
2371 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072372 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252373 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072374 # The Xcode default is to strip debugging symbols
2375 # only (-S). Local symbols should be stripped as
2376 # well, which will be handled by -x. Xcode will
2377 # continue to insert -S when stripping even when
2378 # additional flags are added with STRIPFLAGS.
2379 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252380 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072381 ], # target_conditions
2382 }, # xcode_settings
2383 }, # configuration "Release"
2384 }, # configurations
[email protected]24700642009-06-01 16:01:202385 }, { # mac_real_dsym != 1
2386 # To get a fast fake .dSYM bundle, use a post-build step to
2387 # produce the .dSYM and strip the executable. strip_from_xcode
2388 # only operates in the Release configuration.
2389 'postbuilds': [
2390 {
2391 'variables': {
2392 # Define strip_from_xcode in a variable ending in _path
2393 # so that gyp understands it's a path and performs proper
2394 # relativization during dict merging.
2395 'strip_from_xcode_path': 'mac/strip_from_xcode',
2396 },
2397 'postbuild_name': 'Strip If Needed',
2398 'action': ['<(strip_from_xcode_path)'],
2399 },
[email protected]e14a9f92009-08-05 19:26:072400 ], # postbuilds
2401 }], # mac_real_dsym
2402 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582403 }], # (_type=="executable" or _type=="shared_library" or
2404 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072405 ], # target_conditions
2406 }, # target_defaults
2407 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552408 ['OS=="win"', {
2409 'target_defaults': {
2410 'defines': [
[email protected]a89e0942011-09-26 16:06:472411 '_WIN32_WINNT=0x0601',
2412 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552413 'WIN32',
2414 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552415 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282416 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552417 '_CRT_RAND_S',
2418 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2419 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272420 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452421 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552422 ],
[email protected]8974e042010-06-21 18:06:522423 'conditions': [
2424 ['component=="static_library"', {
2425 'defines': [
2426 '_HAS_EXCEPTIONS=0',
2427 ],
2428 }],
[email protected]3e2648a2011-03-21 20:58:502429 ['secure_atl', {
2430 'defines': [
2431 '_SECURE_ATL',
2432 ],
2433 }],
[email protected]8974e042010-06-21 18:06:522434 ],
[email protected]5b5ca7cb2009-07-20 23:00:202435 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:522436 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:372437 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:552438 '$(VSInstallDir)/VC/atlmfc/include',
2439 ],
[email protected]a8d99cef2009-08-26 20:47:492440 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112441 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2442 # TODO(maruel): These warnings are level 4. They will be slowly
2443 # removed as code is fixed.
2444 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2445 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2446 4702, 4706,
2447 ],
[email protected]2f80c312009-02-25 21:26:552448 'msvs_settings': {
2449 'VCCLCompilerTool': {
2450 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552451 'BufferSecurityCheck': 'true',
2452 'EnableFunctionLevelLinking': 'true',
2453 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112454 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552455 'WarnAsError': 'true',
2456 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582457 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502458 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162459 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552460 }],
[email protected]3e2648a2011-03-21 20:58:502461 ['MSVS_VERSION=="2005e"', {
2462 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2463 }],
[email protected]8974e042010-06-21 18:06:522464 ['component=="shared_library"', {
2465 'ExceptionHandling': '1', # /EHsc
2466 }, {
2467 'ExceptionHandling': '0',
2468 }],
[email protected]3fef6e62009-07-31 19:58:582469 ],
[email protected]2f80c312009-02-25 21:26:552470 },
2471 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162472 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372473 'AdditionalLibraryDirectories': [
2474 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2475 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2476 ],
[email protected]2f80c312009-02-25 21:26:552477 },
2478 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552479 'AdditionalDependencies': [
2480 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502481 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552482 'version.lib',
2483 'msimg32.lib',
2484 'ws2_32.lib',
2485 'usp10.lib',
2486 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082487 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482488 'winmm.lib',
2489 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552490 ],
[email protected]4de39f82011-03-28 12:01:292491 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502492 ['msvs_express', {
2493 # Explicitly required when using the ATL with express
2494 'AdditionalDependencies': [
2495 'atlthunk.lib',
2496 ],
2497 }],
2498 ['MSVS_VERSION=="2005e"', {
2499 # Non-express versions link automatically to these
2500 'AdditionalDependencies': [
2501 'advapi32.lib',
2502 'comdlg32.lib',
2503 'ole32.lib',
2504 'shell32.lib',
2505 'user32.lib',
2506 'winspool.lib',
2507 ],
2508 }],
2509 ],
[email protected]a78da50e2010-06-09 21:31:372510 'AdditionalLibraryDirectories': [
2511 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2512 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2513 ],
[email protected]2f80c312009-02-25 21:26:552514 'GenerateDebugInformation': 'true',
2515 'MapFileName': '$(OutDir)\\$(TargetName).map',
2516 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552517 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482518 # SubSystem values:
2519 # 0 == not set
2520 # 1 == /SUBSYSTEM:CONSOLE
2521 # 2 == /SUBSYSTEM:WINDOWS
2522 # Most of the executables we'll ever create are tests
2523 # and utilities with console output.
2524 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552525 },
2526 'VCMIDLTool': {
2527 'GenerateStublessProxies': 'true',
2528 'TypeLibraryName': '$(InputName).tlb',
2529 'OutputDirectory': '$(IntDir)',
2530 'HeaderFileName': '$(InputName).h',
2531 'DLLDataFileName': 'dlldata.c',
2532 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2533 'ProxyFileName': '$(InputName)_p.c',
2534 },
2535 'VCResourceCompilerTool': {
2536 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382537 'AdditionalIncludeDirectories': [
2538 '<(DEPTH)',
2539 '<(SHARED_INTERMEDIATE_DIR)',
2540 ],
[email protected]2f80c312009-02-25 21:26:552541 },
2542 },
2543 },
2544 }],
[email protected]79e2336c2011-05-12 18:18:342545 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312546 'target_defaults': {
2547 'defines': [
2548 'DISABLE_NACL',
2549 ],
2550 },
2551 }],
[email protected]cfbf9bc2009-12-07 22:07:562552 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192553 'target_defaults': {
2554 'msvs_settings': {
2555 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192556 'DelayLoadDLLs': [
2557 'dbghelp.dll',
2558 'dwmapi.dll',
2559 'uxtheme.dll',
2560 ],
2561 },
2562 },
[email protected]ef4fa4072009-12-04 22:46:502563 'configurations': {
[email protected]5153767c2009-12-22 01:52:502564 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502565 'msvs_settings': {
2566 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162567 'AdditionalOptions': [
2568 '/safeseh',
2569 '/dynamicbase',
2570 '/ignore:4199',
2571 '/ignore:4221',
2572 '/nxcompat',
2573 ],
[email protected]ef4fa4072009-12-04 22:46:502574 },
2575 },
2576 },
[email protected]5153767c2009-12-22 01:52:502577 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502578 'msvs_settings': {
2579 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162580 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502581 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162582 '/dynamicbase',
2583 '/ignore:4199',
2584 '/ignore:4221',
2585 '/nxcompat',
2586 ],
[email protected]ef4fa4072009-12-04 22:46:502587 },
2588 },
2589 },
2590 },
[email protected]48c7af72009-07-03 22:00:192591 },
2592 }],
[email protected]9821d0d2010-04-16 22:40:372593 ['enable_new_npdevice_api==1', {
2594 'target_defaults': {
2595 'defines': [
2596 'ENABLE_NEW_NPDEVICE_API',
2597 ],
2598 },
2599 }],
[email protected]34f40892011-09-06 21:53:302600 ['clang==1', {
2601 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242602 ['CC', '<(make_clang_dir)/bin/clang'],
2603 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072604 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302605 ['CC.host', '$(CC)'],
2606 ['CXX.host', '$(CXX)'],
2607 ['LINK.host', '$(LINK)'],
2608 ],
2609 }],
[email protected]2f80c312009-02-25 21:26:552610 ],
2611 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502612 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2613 # This block adds *project-wide* configuration settings to each project
2614 # file. It's almost always wrong to put things here. Specify your
2615 # custom xcode_settings in target_defaults to add them to targets instead.
2616
2617 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2618 # setting sets the SDK on a project-wide basis. In order to get the
2619 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2620 # here at the project level.
2621 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2622
[email protected]2f80c312009-02-25 21:26:552623 # The Xcode generator will look for an xcode_settings section at the root
2624 # of each dict and use it to apply settings on a file-wide basis. Most
2625 # settings should not be here, they should be in target-specific
2626 # xcode_settings sections, or better yet, should use non-Xcode-specific
2627 # settings in target dicts. SYMROOT is a special case, because many other
2628 # Xcode variables depend on it, including variables such as
2629 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2630 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2631 # files to appear (when present) in the UI as actual files and not red
2632 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2633 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162634 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552635 },
[email protected]ee28c9f2009-09-04 01:53:012636}