blob: 1bf2eabc59adab87ef0de7da2250babcbac19ce8 [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]1b546692011-06-30 18:22:3027 # Whether the Views toolkit can use its Pure form when available
28 # or if it must only use GTK (the default at the moment).
29 # This is an intermediate step until all of Views is 'Pure',
30 # at which point we plan to remove those switches.
[email protected]fd88a8842011-09-13 02:50:2231 # This turns on the USE_ONLY_PURE_VIEWS macro.
32 'use_only_pure_views%': 0,
[email protected]1b546692011-06-30 18:22:3033
[email protected]bb6aba32011-01-07 19:04:4334 # Disable touch support by default.
35 'touchui%': 0,
[email protected]9c8a1982011-05-24 23:08:5836
37 # Whether the compositor is enabled on views.
38 'views_compositor%': 0,
[email protected]7de46352011-09-12 15:39:1939
[email protected]e599f0132011-08-24 19:03:3540 # Whether or not we are building with the Aura window manager.
[email protected]41423092011-08-25 15:39:5841 'use_aura%': 0,
[email protected]bb6aba32011-01-07 19:04:4342 },
43 # Copy conditionally-set variables out one scope.
44 'chromeos%': '<(chromeos)',
[email protected]fd88a8842011-09-13 02:50:2245 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4346 'touchui%': '<(touchui)',
[email protected]9c8a1982011-05-24 23:08:5847 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:5848 'use_aura%': '<(use_aura)',
[email protected]e72e55b2011-01-06 22:19:3049
[email protected]e72e55b2011-01-06 22:19:3050 # Compute the architecture that we're building on.
51 'conditions': [
[email protected]177cd082011-10-04 18:36:3852 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3753 'host_arch%': 'ia32',
54 }, {
[email protected]79e2336c2011-05-12 18:18:3455 # This handles the Unix platforms for which there is some support.
56 # Anything else gets passed through, which probably won't work very
57 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3058 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3459 '<!(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:3060 }],
[email protected]bb6aba32011-01-07 19:04:4361
[email protected]fd88a8842011-09-13 02:50:2262 # Set default value of toolkit_views on for Windows, Chrome OS,
63 # Touch and PureView.
[email protected]3fa441d2011-09-18 17:28:5064 ['OS=="win" or chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4365 'toolkit_views%': 1,
66 }, {
67 'toolkit_views%': 0,
68 }],
[email protected]1b546692011-06-30 18:22:3069
[email protected]3fa441d2011-09-18 17:28:5070 # Views are always Pure in Touch and Aura case.
71 ['touchui==1 or use_aura==1', {
[email protected]fd88a8842011-09-13 02:50:2272 'use_only_pure_views%': 1,
[email protected]1b546692011-06-30 18:22:3073 }, {
[email protected]fd88a8842011-09-13 02:50:2274 'use_only_pure_views%': 0,
[email protected]1b546692011-06-30 18:22:3075 }],
[email protected]8ebc9b42011-07-14 15:22:1876
[email protected]2cc81d32011-10-04 17:03:1877 # Use virtual keyboard by default in TouchUI builds.
78 ['touchui==1', {
79 'use_virtual_keyboard%': 1,
80 }, {
81 'use_virtual_keyboard%': 0,
82 }],
83
[email protected]4916d622011-09-28 23:45:3884 # Use the views compositor when using the Aura window manager or
85 # touch.
86 ['use_aura==1 or touchui==1', {
[email protected]e599f0132011-08-24 19:03:3587 'views_compositor%': 1,
88 }],
[email protected]e72e55b2011-01-06 22:19:3089 ],
90 },
91
92 # Copy conditionally-set variables out one scope.
93 'chromeos%': '<(chromeos)',
94 'touchui%': '<(touchui)',
[email protected]2cc81d32011-10-04 17:03:1895 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]e72e55b2011-01-06 22:19:3096 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4397 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:2298 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:5899 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58100 'use_aura%': '<(use_aura)',
[email protected]e72e55b2011-01-06 22:19:30101
[email protected]8fb0ef02011-05-20 00:53:50102 # We used to provide a variable for changing how libraries were built.
103 # This variable remains until we can clean up all the users.
104 # This needs to be one nested variables dict in so that dependent
105 # gyp files can make use of it in their outer variables. (Yikes!)
106 # http://code.google.com/p/chromium/issues/detail?id=83308
107 'library%': 'static_library',
108
[email protected]e14a9f92009-08-05 19:26:07109 # Override branding to select the desired branding flavor.
110 'branding%': 'Chromium',
111
112 # Override buildtype to select the desired build flavor.
113 # Dev - everyday build for development/testing
114 # Official - release build (generally implies additional processing)
115 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
116 # conversion is done), some of the things which are now controlled by
117 # 'branding', such as symbol generation, will need to be refactored based
118 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
119 # builds).
120 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27121
[email protected]e72e55b2011-01-06 22:19:30122 # Default architecture we're building for is the architecture we're
123 # building on.
124 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17125
[email protected]e72e55b2011-01-06 22:19:30126 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
127 # are built under a chromium full build (1) or a webkit.org chromium
128 # build (0).
129 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52130
[email protected]e72e55b2011-01-06 22:19:30131 # Set to 1 to enable fast builds. It disables debug info for fastest
132 # compilation.
133 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49134
[email protected]20960e072011-09-20 20:59:01135 # Set to 1 to enable dcheck in release without having to use the flag.
136 'dcheck_always_on%': 0,
137
[email protected]3d38d8e2011-04-16 20:48:51138 # Disable file manager component extension by default.
139 'file_manager_extension%': 0,
140
[email protected]8b2e9f392011-08-05 04:00:47141 # Disable WebUI TaskManager by default.
142 'webui_task_manager%': 0,
143
[email protected]e72e55b2011-01-06 22:19:30144 # Python version.
[email protected]a43c5a02011-05-27 06:54:51145 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17146
[email protected]e72e55b2011-01-06 22:19:30147 # Set ARM-v7 compilation flags
148 'armv7%': 0,
149
150 # Set Neon compilation flags (only meaningful if armv7==1).
151 'arm_neon%': 1,
152
153 # The system root for cross-compiles. Default: none.
154 'sysroot%': '',
155
[email protected]945361a2011-09-30 04:38:43156 # The system libdir used for this ABI.
157 'system_libdir%': 'lib',
158
[email protected]e72e55b2011-01-06 22:19:30159 # On Linux, we build with sse2 for Chromium builds.
160 'disable_sse2%': 0,
161
162 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03163 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30164
165 # Variable 'component' is for cases where we would like to build some
166 # components as dynamic shared libraries but still need variable
167 # 'library' for static libraries.
168 # By default, component is set to whatever library is set to and
169 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53170 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30171
[email protected]bb6aba32011-01-07 19:04:43172 # Set to select the Title Case versions of strings in GRD files.
173 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21174
[email protected]98da0042011-02-02 00:10:27175 # Use translations provided by volunteers at launchpad.net. This
176 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19177 'use_third_party_translations%': 0,
178
[email protected]9a425422011-01-11 00:53:18179 # Remoting compilation is enabled by default. Set to 0 to disable.
180 'remoting%': 1,
181
[email protected]5834f4392011-09-13 20:06:17182 # Threaded compositing
183 'use_threaded_compositing%': 0,
184
[email protected]a026daa2011-04-20 15:49:51185 # P2P APIs are compiled in by default. Set to 0 to disable.
186 # Also note that this should be enabled for remoting to compile.
187 'p2p_apis%': 1,
188
[email protected]1ec68c42011-06-01 13:56:25189 # Configuration policy is enabled by default. Set to 0 to disable.
190 'configuration_policy%': 1,
191
[email protected]4b58e7d2011-07-11 10:22:56192 # Safe browsing is compiled in by default. Set to 0 to disable.
193 'safe_browsing%': 1,
194
[email protected]5d451ad2011-02-11 16:43:46195 # If this is set, the clang plugins used on the buildbot will be used.
196 # Run tools/clang/scripts/update.sh to make sure they are compiled.
197 # This causes 'clang_chrome_plugins_flags' to be set.
198 # Has no effect if 'clang' is not set as well.
199 'clang_use_chrome_plugins%': 0,
200
[email protected]92799b632011-08-15 14:33:06201 # Enable building with ASAN (Clang's -fasan option).
202 # -fasan only works with clang, but asan=1 implies clang=1
203 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
204 'asan%': 0,
205
[email protected]1ad5a7b2011-06-24 03:15:13206 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
207 # libraries on linux x86-64 and arm, plus ASLR.
208 'linux_fpic%': 1,
209
[email protected]c6a1f94172011-07-05 02:35:00210 # Enable navigator.registerProtocolHandler and supporting UI.
211 'enable_register_protocol_handler%': 1,
212
[email protected]62af76e2011-08-01 02:34:01213 # Enable Web Intents and supporting UI.
214 'enable_web_intents%': 0,
215
[email protected]32877d302011-07-07 17:57:49216 # Smooth scrolling is disabled by default.
217 'enable_smooth_scrolling%': 0,
218
[email protected]dda90ae2011-07-19 22:07:48219 # Webrtc compilation is enabled by default. Set to 0 to disable.
220 'enable_webrtc%': 1,
221
[email protected]f56797b2011-09-25 00:04:35222 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
223 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
224 # the input value also defines the required XI2 minor minimum version.
225 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
226 'use_xi2_mt%': 0,
227
[email protected]d5cf9fb2011-09-27 00:15:16228 # Use of precompiled headers on Windows is off by default
229 # because of complications that it can cause with our
230 # infrastructure (trybots etc.). Enable by setting to 1 in
231 # ~/.gyp/include.gypi or via the GYP command line for ~20-25%
232 # faster builds.
233 'chromium_win_pch%': 0,
234
[email protected]bb6aba32011-01-07 19:04:43235 'conditions': [
[email protected]33423fa2011-09-23 18:18:14236 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
237 # the 'conditions' clause. Initial attempts resulted in chromium and
238 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22239 ['OS=="mac"', {
[email protected]46bcd232011-09-27 16:30:55240 'use_skia%': 0,
[email protected]e4dbede82011-09-16 16:11:07241 # Mac uses clang by default, so turn on the plugin as well.
242 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22243 }, {
244 'use_skia%': 1,
245 }],
246
[email protected]79e2336c2011-05-12 18:18:34247 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37248 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34249 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37250 }, {
251 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34252 }],
253
[email protected]c329adf82011-10-05 14:34:57254 # NSS usage.
255 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
256 'use_nss%': 1,
257 }, {
258 'use_nss%': 0,
259 }],
260
[email protected]258dca42011-09-21 00:17:19261 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01262 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19263 'use_glib%': 0,
264 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34265 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37266 }, {
[email protected]258dca42011-09-21 00:17:19267 # TODO(dnicoara) Wayland build should have these disabled, but
268 # currently GTK and X is too spread and it's hard to completely
269 # remove every dependency.
270 'use_glib%': 1,
271 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37272 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34273 }],
[email protected]258dca42011-09-21 00:17:19274 ['use_aura==1 and OS!="win"', {
[email protected]9d43e372011-09-22 19:39:52275 'toolkit_uses_gtk%': 0,
[email protected]9edeb712011-09-20 21:20:33276 }],
277
[email protected]63692212010-09-16 00:22:21278 # A flag to enable or disable our compile-time dependency
279 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
280 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49281 # for Linux distributions and for Aura.
282 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21283 'use_gnome_keyring%': 0,
284 }, {
285 'use_gnome_keyring%': 1,
286 }],
[email protected]0afe5212010-10-01 18:56:11287
[email protected]bb6aba32011-01-07 19:04:43288 ['toolkit_views==0 or OS=="mac"', {
289 # GTK+ and Mac wants Title Case strings
290 'use_titlecase_in_grd_files%': 1,
291 }],
292
[email protected]1b4209f2011-01-07 00:25:40293 # Enable some hacks to support Flapper only on Chrome OS.
294 ['chromeos==1', {
295 'enable_flapper_hacks%': 1,
296 }, {
297 'enable_flapper_hacks%': 0,
298 }],
[email protected]3d38d8e2011-04-16 20:48:51299
[email protected]f6e680912011-09-21 20:26:19300 # Enable file manager extension on Chrome OS, Touch, PureView, Aura.
301 ['chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', {
[email protected]3d38d8e2011-04-16 20:48:51302 'file_manager_extension%': 1,
303 }, {
304 'file_manager_extension%': 0,
305 }],
[email protected]7de46352011-09-12 15:39:19306
[email protected]fd88a8842011-09-13 02:50:22307 # Enable WebUI TaskManager only on Chrome OS, Touch or PureView.
[email protected]3fa441d2011-09-18 17:28:50308 ['chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', {
[email protected]8b2e9f392011-08-05 04:00:47309 'webui_task_manager%': 1,
310 }, {
311 'webui_task_manager%': 0,
312 }],
313
[email protected]da1c8d692011-09-20 20:35:01314 ['OS=="android"', {
315 'proprietary_codecs%': 1,
316 'enable_webrtc%': 0,
317 }],
318
[email protected]554b7062011-09-03 03:09:40319 # Enable smooth scrolling for Mac, Win, Linux and ChromeOS
320 ['OS=="linux" or OS=="mac" or OS=="win"', {
[email protected]32877d302011-07-07 17:57:49321 'enable_smooth_scrolling%': 1,
322 }, {
323 'enable_smooth_scrolling%': 0,
324 }],
[email protected]b3f23ba2010-04-26 22:58:17325 ],
[email protected]e14a9f92009-08-05 19:26:07326 },
327
[email protected]e72e55b2011-01-06 22:19:30328 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07329 'branding%': '<(branding)',
330 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27331 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59332 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50333 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44334 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:22335 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58336 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58337 'use_aura%': '<(use_aura)',
[email protected]c329adf82011-10-05 14:34:57338 'use_nss%': '<(use_nss)',
[email protected]79e2336c2011-05-12 18:18:34339 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19340 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34341 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22342 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34343 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21344 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11345 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40346 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44347 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49348 'touchui%': '<(touchui)',
[email protected]2cc81d32011-10-04 17:03:18349 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]f56797b2011-09-25 00:04:35350 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20351 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47352 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21353 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54354 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01355 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36356 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43357 'armv7%': '<(armv7)',
358 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23359 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43360 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22361 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52362 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43363 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17364 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18365 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17366 'use_threaded_compositing%': '<(use_threaded_compositing)',
[email protected]dda90ae2011-07-19 22:07:48367 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16368 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51369 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25370 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56371 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46372 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06373 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56374 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49375 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]41ed4e82011-08-25 23:02:07376 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22377 # Whether to build for Wayland display server
378 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39379
[email protected]caa95c82009-11-23 22:39:32380 # The release channel that this build targets. This is used to restrict
381 # channel-specific build options, like which installer packages to create.
382 # The default is 'all', which does no channel-specific filtering.
383 'channel%': 'all',
384
[email protected]b3fb8092009-03-12 19:09:24385 # Override chromium_mac_pch and set it to 0 to suppress the use of
386 # precompiled headers on the Mac. Prefix header injection may still be
387 # used, but prefix headers will not be precompiled. This is useful when
388 # using distcc to distribute a build to compile slaves that don't
389 # share the same compiler executable as the system driving the compilation,
390 # because precompiled headers rely on pointers into a specific compiler
391 # executable's image. Setting this to 0 is needed to use an experimental
392 # Linux-Mac cross compiler distcc farm.
393 'chromium_mac_pch%': 1,
394
[email protected]3224dcd2009-09-16 17:31:25395 # Mac OS X SDK and deployment target support.
396 # The SDK identifies the version of the system headers that will be used,
397 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
398 # "Maximum allowed" refers to the operating system version whose APIs are
399 # available in the headers.
400 # The deployment target identifies the minimum system version that the
401 # built products are expected to function on. It corresponds to the
402 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
403 # To ensure these macros are available, #include <AvailabilityMacros.h>.
404 # Additional documentation on these macros is available at
405 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
406 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
407 # deployment target to 10.5. Other projects, such as O3D, may override
408 # these defaults.
409 'mac_sdk%': '10.5',
410 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59411
[email protected]f5ecbba12009-04-03 04:35:18412 # Set to 1 to enable code coverage. In addition to build changes
413 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
414 # project file called "coverage".
415 # Currently ignored on Windows.
416 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49417
[email protected]7477ea6f2009-12-22 23:28:15418 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47419 # environment variable, the libcmt shim it uses sometimes gets in
420 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
421 # 'win_use_allocator_shim': 0,
422 # 'win_release_RuntimeLibrary': 2
423 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52424 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11425
[email protected]95ff8082009-11-13 22:21:01426 # Whether usage of OpenMAX is enabled.
427 'enable_openmax%': 0,
428
[email protected]d01120e62010-05-10 17:04:48429 # Whether proprietary audio/video codecs are assumed to be included with
430 # this build (only meaningful if branding!=Chrome).
431 'proprietary_codecs%': 0,
432
[email protected]e5b2eaa2009-04-14 01:39:12433 # TODO(bradnelson): eliminate this when possible.
434 # To allow local gyp files to prevent release.vsprops from being included.
435 # Yes(1) means include release.vsprops.
436 # Once all vsprops settings are migrated into gyp, this can go away.
437 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23438
[email protected]cbd5fd52009-08-26 00:14:27439 # TODO(bradnelson): eliminate this when possible.
440 # To allow local gyp files to override additional linker options for msvs.
441 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19442 'msvs_use_common_linker_extras%': 1,
443
[email protected]1ffb6502009-06-02 07:46:24444 # TODO(sgk): eliminate this if possible.
445 # It would be nicer to support this via a setting in 'target_defaults'
446 # in chrome/app/locales/locales.gypi overriding the setting in the
447 # 'Debug' configuration in the 'target_defaults' dict below,
448 # but that doesn't work as we'd like.
449 'msvs_debug_link_incremental%': '2',
450
[email protected]1f790ef2011-01-11 20:45:36451 # Needed for some of the largest modules.
452 'msvs_debug_link_nonincremental%': '1',
453
[email protected]5ab8f482011-08-18 18:30:06454 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
455 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51456 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06457
[email protected]573136142009-07-15 22:48:37458 # This is the location of the sandbox binary. Chrome looks for this before
459 # running the zygote process. If found, and SUID, it will be used to
460 # sandbox the zygote process and, thus, all renderer processes.
461 'linux_sandbox_path%': '',
462
[email protected]ad6d2c42009-09-15 20:13:38463 # Set this to true to enable SELinux support.
464 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57465
[email protected]58680ce2010-09-18 00:09:15466 # Set this to true when building with Clang.
467 # See http://code.google.com/p/chromium/wiki/Clang for details.
468 # TODO: eventually clang should behave identically to gcc, and this
469 # won't be necessary.
470 'clang%': 0,
471
[email protected]5e781232011-01-28 02:57:59472 # These two variables can be set in GYP_DEFINES while running
473 # |gclient runhooks| to let clang run a plugin in every compilation.
474 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
475 # Example:
[email protected]93120fe2011-02-03 20:46:42476 # 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:59477
478 'clang_load%': '',
479 'clang_add_plugin%': '',
480
[email protected]da1c8d692011-09-20 20:35:01481 # The default type of gtest.
482 'gtest_target_type%': 'executable',
483
[email protected]7664ab32011-02-01 23:35:25484 # Enable sampling based profiler.
485 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
486 'profiling%': '0',
487
[email protected]93b373502011-08-16 19:06:22488 # Enable strict glibc debug mode.
489 'glibcxx_debug%': 0,
490
[email protected]36532f332010-08-25 00:22:01491 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
492 'linux_breakpad%': 0,
493 # And if we want to dump symbols for Breakpad-enabled builds.
494 'linux_dump_symbols%': 0,
495 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03496 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49497 # Strip the test binaries needed for Linux reliability tests.
498 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03499
[email protected]46ce5b562010-06-16 18:39:53500 # Enable TCMalloc.
501 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24502
[email protected]39ca7de2010-04-16 08:04:03503 # Disable TCMalloc's debugallocation.
504 'linux_use_debugallocation%': 0,
505
[email protected]d8b60602010-03-26 09:41:22506 # Disable TCMalloc's heapchecker.
507 'linux_use_heapchecker%': 0,
508
[email protected]64e2d4a42010-08-27 10:13:21509 # Disable shadow stack keeping used by heapcheck to unwind the stacks
510 # better.
511 'linux_keep_shadow_stacks%': 0,
512
[email protected]556c5d72010-06-10 05:45:01513 # Set to 1 to link against libgnome-keyring instead of using dlopen().
514 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35515 # Set to 1 to link against gsettings APIs instead of using dlopen().
516 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01517
[email protected]d8c7cbcc2009-10-02 19:00:31518 # Used to disable Native Client at compile time, for platforms where it
519 # isn't supported
520 'disable_nacl%': 0,
521
[email protected]77c1b29392009-12-04 06:21:29522 # Set Thumb compilation flags.
523 'arm_thumb%': 0,
524
[email protected]53e0f642010-03-05 01:41:56525 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
526 # arm_neon==0).
527 'arm_fpu%': 'vfpv3',
528
[email protected]9821d0d2010-04-16 22:40:37529 # Enable new NPDevice API.
530 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50531
532 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14533 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50534
[email protected]6f51b27e2010-06-22 20:43:53535 # Enable a variable used elsewhere throughout the GYP files to determine
536 # whether to compile in the sources for the GPU plugin / process.
537 'enable_gpu%': 1,
538
[email protected]32e1dee2010-12-09 18:36:24539 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44540 'use_openssl%': 0,
541
[email protected]e72e55b2011-01-06 22:19:30542 # .gyp files or targets should set chromium_code to 1 if they build
543 # Chromium-specific code, as opposed to external code. This variable is
544 # used to control such things as the set of warnings to enable, and
545 # whether warnings are treated as errors.
546 'chromium_code%': 0,
547
548 # Set to 1 to compile with the built in pdf viewer.
549 'internal_pdf%': 0,
550
551 # This allows to use libcros from the current system, ie. /usr/lib/
552 # The cros_api will be pulled in as a static library, and all headers
553 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43554 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30555
[email protected]e72e55b2011-01-06 22:19:30556 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
557 # so Cocoa is happy (http://crbug.com/20441).
558 'locales': [
559 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
560 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
561 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
562 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
563 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
564 'vi', 'zh-CN', 'zh-TW',
565 ],
566
[email protected]cc0322d2011-07-24 09:29:19567 # Pseudo locales are special locales which are used for testing and
568 # debugging. They don't get copied to the final app. For more info,
569 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
570 'pseudo_locales': [
571 'fake-bidi',
572 ],
573
[email protected]bb6aba32011-01-07 19:04:43574 'grit_defines': [],
575
[email protected]29c2daea2011-01-05 20:38:50576 # Use Harfbuzz-NG instead of Harfbuzz.
577 # Under development: http://crbug.com/68551
578 'use_harfbuzz_ng%': 0,
579
[email protected]bd3bd442011-03-28 07:58:51580 # If debug_devtools is set to 1, JavaScript files for DevTools are
581 # stored as is and loaded from disk. Otherwise, a concatenated file
582 # is stored in resources.pak. It is still possible to load JS files
583 # from disk by passing --debug-devtools cmdline switch.
584 'debug_devtools%': 0,
585
[email protected]be8a9272011-02-10 22:06:07586 # Point to ICU directory.
587 'icu_src_dir': '../third_party/icu',
588
[email protected]912c55c2009-07-31 23:33:55589 'conditions': [
[email protected]da1c8d692011-09-20 20:35:01590 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10591 # This will set gcc_version to XY if you are running gcc X.Y.*.
592 # This is used to tweak build flags for gcc 4.4.
593 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23594 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43595 '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:27596 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10597 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27598 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27599 }],
[email protected]4c9cc6c2009-10-01 18:54:57600 # All Chrome builds have breakpad symbols, but only process the
601 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08602 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57603 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57604 }],
[email protected]cbd5fd52009-08-26 00:14:27605 ],
[email protected]da1c8d692011-09-20 20:35:01606 }], # os_posix==1 and OS!="mac" and OS!="android"
607 ['OS=="android"', {
608 # Location of Android NDK.
609 'variables': {
610 'variables': {
611 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
612 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43613
[email protected]da1c8d692011-09-20 20:35:01614 # Switch between different build types, currently only '0' is
615 # supported.
616 'android_build_type%': 0,
617 },
618 'android_ndk_root%': '<(android_ndk_root)',
619 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
620 'android_build_type%': '<(android_build_type)',
621 },
622 'android_ndk_root%': '<(android_ndk_root)',
623 'android_ndk_sysroot': '<(android_ndk_sysroot)',
624 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
625 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
626
627 # Uses Android's crash report system
628 'linux_breakpad%': 0,
629
630 # Always uses openssl.
631 'use_openssl%': 1,
632
633 'proprietary_codecs%': '<(proprietary_codecs)',
634 'safe_browsing%': 0,
635 'configuration_policy%': 0,
636
637 # Builds the gtest targets as a shared_library.
638 # TODO(michaelbai): Use the fixed value 'shared_library' once it
639 # is fully supported.
640 'gtest_target_type%': '<(gtest_target_type)',
641
642 # Uses system APIs for decoding audio and video.
643 'use_libffmpeg%': '0',
644
645 # Always use the chromium skia. The use_system_harfbuzz needs to
646 # match use_system_skia.
647 'use_system_skia%': '0',
648 'use_system_harfbuzz%': '0',
649
650 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28651 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01652
653 # Choose static link by build type.
654 'conditions': [
655 ['android_build_type==0', {
656 'static_link_system_icu%': 1,
657 }, {
658 'static_link_system_icu%': 0,
659 }],
660 ],
661 # Enable to use system sqlite.
662 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16663 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01664 'use_system_libjpeg%': '<(android_build_type)',
665 # Enable to use the system libexpat.
666 'use_system_libexpat%': '<(android_build_type)',
667 # Enable to use the system stlport, otherwise statically
668 # link the NDK one?
669 'use_system_stlport%': '<(android_build_type)',
670 # Copy it out one scope.
671 'android_build_type%': '<(android_build_type)',
672 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07673 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11674 # Enable clang on mac by default!
675 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07676 'conditions': [
677 # mac_product_name is set to the name of the .app bundle as it should
678 # appear on disk. This duplicates data from
679 # chrome/app/theme/chromium/BRANDING and
680 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
681 # these names into the build system.
682 ['branding=="Chrome"', {
683 'mac_product_name%': 'Google Chrome',
684 }, { # else: branding!="Chrome"
685 'mac_product_name%': 'Chromium',
686 }],
687
688 # Feature variables for enabling Mac Breakpad and Keystone auto-update
689 # support. Both features are on by default in official builds with
690 # Chrome branding.
691 ['branding=="Chrome" and buildtype=="Official"', {
692 'mac_breakpad%': 1,
693 'mac_keystone%': 1,
694 }, { # else: branding!="Chrome" or buildtype!="Official"
695 'mac_breakpad%': 0,
696 'mac_keystone%': 0,
697 }],
698 ],
699 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43700
[email protected]912c55c2009-07-31 23:33:55701 # Whether to use multiple cores to compile with visual studio. This is
702 # optional because it sometimes causes corruption on VS 2005.
703 # It is on by default on VS 2008 and off on VS 2005.
704 ['OS=="win"', {
705 'conditions': [
[email protected]8974e042010-06-21 18:06:52706 ['component=="shared_library"', {
707 'win_use_allocator_shim%': 0,
708 }],
[email protected]912c55c2009-07-31 23:33:55709 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13710 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55711 },{
712 'msvs_multi_core_compile%': 1,
713 }],
[email protected]10bb8c92009-08-07 21:16:03714 # Don't do incremental linking for large modules on 32-bit.
715 ['MSVS_OS_BITS==32', {
716 'msvs_large_module_debug_link_mode%': '1', # No
717 },{
718 'msvs_large_module_debug_link_mode%': '2', # Yes
719 }],
[email protected]3e2648a2011-03-21 20:58:50720 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
721 'msvs_express%': 1,
722 'secure_atl%': 0,
723 },{
724 'msvs_express%': 0,
725 'secure_atl%': 1,
726 }],
[email protected]912c55c2009-07-31 23:33:55727 ],
[email protected]ef4fa4072009-12-04 22:46:50728 'nacl_win64_defines': [
729 # This flag is used to minimize dependencies when building
730 # Native Client loader for 64-bit Windows.
731 'NACL_WIN64',
732 ],
[email protected]912c55c2009-07-31 23:33:55733 }],
[email protected]bb6aba32011-01-07 19:04:43734
[email protected]79e2336c2011-05-12 18:18:34735 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44736 'use_cups%': 1,
737 }, {
738 'use_cups%': 0,
739 }],
[email protected]bb6aba32011-01-07 19:04:43740
[email protected]19fe8f0b2010-12-07 07:27:27741 # Set the relative path from this file to the GYP file of the JPEG
742 # library used by Chromium.
743 ['use_libjpeg_turbo==1', {
744 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
745 }, {
746 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
747 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43748
[email protected]abcc9ac2011-05-16 20:04:35749 # Options controlling the use of GConf (the classic GNOME configuration
750 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31751 ['chromeos==1', {
752 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35753 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31754 }, {
755 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35756 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31757 }],
758
[email protected]4de39f82011-03-28 12:01:29759 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29760 ['branding=="Chrome"', {
761 # TODO(mmoss) The .grd files look for _google_chrome, but for
762 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29763 'grit_defines': ['-D', '_google_chrome',
764 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29765 }, {
[email protected]4de39f82011-03-28 12:01:29766 'grit_defines': ['-D', '_chromium',
767 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29768 }],
[email protected]bb6aba32011-01-07 19:04:43769 ['chromeos==1', {
770 'grit_defines': ['-D', 'chromeos'],
771 }],
772 ['toolkit_views==1', {
773 'grit_defines': ['-D', 'toolkit_views'],
774 }],
[email protected]fd88a8842011-09-13 02:50:22775 ['use_only_pure_views==1', {
776 'grit_defines': ['-D', 'use_only_pure_views'],
[email protected]1b546692011-06-30 18:22:30777 }],
[email protected]8dd791d2011-09-16 16:37:30778 ['use_aura==1', {
779 'grit_defines': ['-D', 'use_aura'],
780 }],
[email protected]c329adf82011-10-05 14:34:57781 ['use_nss==1', {
782 'grit_defines': ['-D', 'use_nss'],
783 }],
[email protected]bb6aba32011-01-07 19:04:43784 ['touchui==1', {
785 'grit_defines': ['-D', 'touchui'],
786 }],
[email protected]2cc81d32011-10-04 17:03:18787 ['use_virtual_keyboard==1', {
788 'grit_defines': ['-D', 'use_virtual_keyboard'],
789 }],
[email protected]e47c32032011-03-01 19:26:20790 ['file_manager_extension==1', {
791 'grit_defines': ['-D', 'file_manager_extension'],
792 }],
[email protected]8b2e9f392011-08-05 04:00:47793 ['webui_task_manager==1', {
794 'grit_defines': ['-D', 'webui_task_manager'],
795 }],
[email protected]9a425422011-01-11 00:53:18796 ['remoting==1', {
797 'grit_defines': ['-D', 'remoting'],
798 }],
[email protected]bb6aba32011-01-07 19:04:43799 ['use_titlecase_in_grd_files==1', {
800 'grit_defines': ['-D', 'use_titlecase'],
801 }],
[email protected]00dc155832011-02-01 18:51:19802 ['use_third_party_translations==1', {
803 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12804 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16805 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
806 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12807 ],
[email protected]00dc155832011-02-01 18:51:19808 }],
[email protected]da1c8d692011-09-20 20:35:01809 ['OS=="android"', {
810 'grit_defines': ['-D', 'android'],
811 }],
[email protected]5d451ad2011-02-11 16:43:46812 ['clang_use_chrome_plugins==1', {
813 'clang_chrome_plugins_flags':
814 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
815 }],
[email protected]cfa2e1102011-04-27 22:30:23816
[email protected]452da69e2011-05-24 02:36:05817 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23818 ['touchui==1 and chromeos==1', {
819 'use_ibus%': 1,
820 }, {
821 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56822 }],
823
824 ['enable_register_protocol_handler==1', {
825 'grit_defines': ['-D', 'enable_register_protocol_handler'],
826 }],
[email protected]92799b632011-08-15 14:33:06827
[email protected]41ed4e82011-08-25 23:02:07828 ['enable_web_intents==1', {
829 'grit_defines': ['-D', 'enable_web_intents'],
830 }],
831
[email protected]92799b632011-08-15 14:33:06832 ['asan==1', {
833 'clang%': 1,
834 }],
[email protected]912c55c2009-07-31 23:33:55835 ],
[email protected]35958422011-09-28 02:03:59836 # List of default apps to install in new profiles. The first list contains
837 # the source files as found in svn. The second list, used only for linux,
838 # contains the destination location for each of the files.
839 'default_apps_list': [
840 'browser/resources/default_apps/external_extensions.json',
841 'browser/resources/default_apps/gmail.crx',
842 'browser/resources/default_apps/youtube.crx',
843 ],
844 'default_apps_list_linux_dest': [
845 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
846 '<(PRODUCT_DIR)/default_apps/gmail.crx',
847 '<(PRODUCT_DIR)/default_apps/youtube.crx',
848 ],
[email protected]2f80c312009-02-25 21:26:55849 },
850 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26851 'variables': {
[email protected]a6e22132010-02-10 20:43:18852 # The condition that operates on chromium_code is in a target_conditions
853 # section, and will not have access to the default fallback value of
854 # chromium_code at the top of this file, or to the chromium_code
855 # variable placed at the root variables scope of .gyp files, because
856 # those variables are not set at target scope. As a workaround,
857 # if chromium_code is not set at target scope, define it in target scope
858 # to contain whatever value it has during early variable expansion.
859 # That's enough to make it available during target conditional
860 # processing.
861 'chromium_code%': '<(chromium_code)',
862
[email protected]7e0d664a2009-12-03 21:07:47863 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29864 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00865 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47866 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
867 'win_release_Optimization%': '2', # 2 = /Os
868 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21869 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
870 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
871 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15872 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
873 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31874 # VS inserts quite a lot of extra checks to algorithms like
875 # std::partial_sort in Debug build which make them O(N^2)
876 # instead of O(N*logN). This is particularly slow under memory
877 # tools like ThreadSanitizer so we want it to be disablable.
878 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
879 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47880
[email protected]ffd984b12009-09-11 19:37:00881 'release_extra_cflags%': '',
882 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56883 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52884
885 'conditions': [
886 ['OS=="win" and component=="shared_library"', {
887 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
888 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
889 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
890 }, {
891 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
892 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
893 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
894 }],
895 ],
[email protected]1c966092009-08-20 21:19:26896 },
[email protected]32aa8cc2009-03-04 21:36:39897 'conditions': [
898 ['branding=="Chrome"', {
899 'defines': ['GOOGLE_CHROME_BUILD'],
900 }, { # else: branding!="Chrome"
901 'defines': ['CHROMIUM_BUILD'],
902 }],
[email protected]63e39a282011-07-13 20:41:28903 ['component=="shared_library"', {
904 'defines': ['COMPONENT_BUILD'],
905 }],
[email protected]06c756182010-04-27 18:31:31906 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17907 'defines': ['TOOLKIT_VIEWS=1'],
908 }],
[email protected]fd88a8842011-09-13 02:50:22909 ['use_only_pure_views==1', {
910 'defines': ['USE_ONLY_PURE_VIEWS=1'],
[email protected]1b546692011-06-30 18:22:30911 }],
[email protected]9c8a1982011-05-24 23:08:58912 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27913 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58914 }],
[email protected]41423092011-08-25 15:39:58915 ['use_aura==1', {
916 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:35917 }],
[email protected]c329adf82011-10-05 14:34:57918 ['use_nss==1', {
919 'defines': ['USE_NSS=1'],
920 }],
[email protected]9d43e372011-09-22 19:39:52921 ['toolkit_uses_gtk==1', {
922 'defines': ['TOOLKIT_USES_GTK=1'],
923 }],
[email protected]fdc5bed2010-01-09 01:16:57924 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29925 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50926 }],
[email protected]0094fbe2010-07-15 21:51:43927 ['touchui==1', {
928 'defines': ['TOUCH_UI=1'],
929 }],
[email protected]2cc81d32011-10-04 17:03:18930 ['use_virtual_keyboard==1', {
931 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
932 }],
[email protected]f56797b2011-09-25 00:04:35933 ['use_xi2_mt!=0', {
934 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
935 }],
[email protected]236754a2011-07-28 17:38:23936 ['use_wayland==1', {
937 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
938 }],
[email protected]e47c32032011-03-01 19:26:20939 ['file_manager_extension==1', {
940 'defines': ['FILE_MANAGER_EXTENSION=1'],
941 }],
[email protected]8b2e9f392011-08-05 04:00:47942 ['webui_task_manager==1', {
943 'defines': ['WEBUI_TASK_MANAGER=1'],
944 }],
[email protected]7664ab32011-02-01 23:35:25945 ['profiling==1', {
946 'defines': ['ENABLE_PROFILING=1'],
947 }],
[email protected]93b373502011-08-16 19:06:22948 ['OS=="linux" and glibcxx_debug==1', {
949 'defines': ['_GLIBCXX_DEBUG=1',],
950 'cflags_cc!': ['-fno-rtti'],
951 'cflags_cc+': ['-frtti', '-g'],
952 }],
[email protected]542bf24a2010-06-11 23:08:17953 ['remoting==1', {
954 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00955 }],
[email protected]5834f4392011-09-13 20:06:17956 ['use_threaded_compositing==1', {
957 'defines': ['WTF_USE_THREADED_COMPOSITING'],
958 }],
[email protected]a026daa2011-04-20 15:49:51959 ['p2p_apis==1', {
960 'defines': ['ENABLE_P2P_APIS=1'],
961 }],
[email protected]d01120e62010-05-10 17:04:48962 ['proprietary_codecs==1', {
963 'defines': ['USE_PROPRIETARY_CODECS'],
964 }],
[email protected]1b4209f2011-01-07 00:25:40965 ['enable_flapper_hacks==1', {
966 'defines': ['ENABLE_FLAPPER_HACKS=1'],
967 }],
[email protected]f31e2e52011-07-14 16:01:19968 ['configuration_policy==1', {
969 'defines': ['ENABLE_CONFIGURATION_POLICY'],
970 }],
[email protected]9c1949e2009-10-02 19:59:54971 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:17972
[email protected]9c1949e2009-10-02 19:59:54973 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:14974 # For Windows and Mac, we don't genererate debug information.
975 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:54976 'msvs_settings': {
977 'VCLinkerTool': {
978 'GenerateDebugInformation': 'false',
979 },
980 'VCCLCompilerTool': {
981 'DebugInformationFormat': '0',
982 }
[email protected]da4d4ea2011-09-22 20:23:14983 },
984 'xcode_settings': {
985 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
986 },
[email protected]1cc2fa72010-07-03 08:49:24987 }, { # else: OS != "win", generate less debug information.
988 'variables': {
989 'debug_extra_cflags': '-g1',
990 },
[email protected]37c84192010-04-14 21:37:40991 }],
[email protected]aecc4d12011-01-19 05:32:33992 # Clang creates chubby debug information, which makes linking very
993 # slow. For now, don't create debug information with clang. See
994 # http://crbug.com/70000
995 ['OS=="linux" and clang==1', {
996 'variables': {
997 'debug_extra_cflags': '-g0',
998 },
999 }],
[email protected]9c1949e2009-10-02 19:59:541000 ], # conditions for fastbuild.
1001 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011002 ['dcheck_always_on!=0', {
1003 'defines': ['DCHECK_ALWAYS_ON=1'],
1004 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381005 ['selinux==1', {
1006 'defines': ['CHROMIUM_SELINUX=1'],
1007 }],
[email protected]7e0d664a2009-12-03 21:07:471008 ['win_use_allocator_shim==0', {
1009 'conditions': [
1010 ['OS=="win"', {
1011 'defines': ['NO_TCMALLOC'],
1012 }],
1013 ],
1014 }],
[email protected]43f28f832010-02-03 02:28:481015 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151016 'defines': [
1017 'ENABLE_GPU=1',
1018 ],
1019 }],
[email protected]b1c2a5542010-10-08 12:44:401020 ['use_openssl==1', {
1021 'defines': [
1022 'USE_OPENSSL=1',
1023 ],
1024 }],
[email protected]ed154592010-04-29 00:18:501025 ['enable_eglimage==1', {
1026 'defines': [
1027 'ENABLE_EGLIMAGE=1',
1028 ],
1029 }],
[email protected]7d7564a12011-06-21 19:20:221030 ['use_skia==1', {
1031 'defines': [
1032 'USE_SKIA=1',
1033 ],
1034 }],
[email protected]f5ecbba12009-04-03 04:35:181035 ['coverage!=0', {
1036 'conditions': [
1037 ['OS=="mac"', {
1038 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041039 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1040 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471041 },
[email protected]e4fb84c2009-12-28 20:45:431042 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101043 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431044 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181045 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431046 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181047 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471048 }],
1049 ],
1050 }],
[email protected]da1c8d692011-09-20 20:35:011051 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181052 'cflags': [ '-ftest-coverage',
1053 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001054 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181055 }],
[email protected]e8f6ff42009-07-07 18:20:531056 # Finally, for Windows, we simply turn on profiling.
1057 ['OS=="win"', {
1058 'msvs_settings': {
1059 'VCLinkerTool': {
1060 'Profile': 'true',
1061 },
[email protected]10bb8c92009-08-07 21:16:031062 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531063 # /Z7, not /Zi, so coverage is happyb
1064 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161065 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531066 }
1067 }
1068 }], # OS==win
1069 ], # conditions for coverage
1070 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381071 ['OS=="win"', {
1072 'defines': [
1073 '__STD_C',
1074 '_CRT_SECURE_NO_DEPRECATE',
1075 '_SCL_SECURE_NO_DEPRECATE',
1076 ],
1077 'include_dirs': [
1078 '<(DEPTH)/third_party/wtl/include',
1079 ],
1080 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561081 ['enable_register_protocol_handler==1', {
1082 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191083 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561084 ],
1085 }],
[email protected]41ed4e82011-08-25 23:02:071086 ['enable_web_intents==1', {
1087 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471088 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071089 ],
1090 }],
[email protected]a6e22132010-02-10 20:43:181091 ], # conditions for 'target_defaults'
1092 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:151093 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281094 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341095 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331096 # We don't want to get warnings from third-party code,
1097 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281098 'cflags!': [
1099 '-Wall',
1100 '-Wextra',
1101 '-Werror',
1102 ],
[email protected]ec1d155be2011-02-08 22:19:001103 'cflags': [
1104 # Don't warn about hash_map in third-party code.
1105 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:331106 # Don't warn about printf format problems.
1107 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221108 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001109 ],
[email protected]d16bd642011-07-25 23:59:181110 'cflags_cc!': [
1111 # TODO(fischman): remove this.
1112 # http://code.google.com/p/chromium/issues/detail?id=90453
1113 '-Wsign-compare',
1114 ]
[email protected]d8543312010-02-10 17:43:281115 }],
[email protected]6e4451892011-07-27 10:32:111116 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
1117 'cflags': [
1118 # Don't warn about ignoring the return value from e.g. close().
1119 # This is off by default in some gccs but on by default in others.
1120 # Currently this option is not set for Chrome OS build because
1121 # the current version of gcc (4.3.4) used for building Chrome in
1122 # Chrome OS chroot doesn't support this option.
1123 # TODO(mazda): remove the conditional for Chrome OS when gcc
1124 # version is upgraded.
1125 '-Wno-unused-result',
1126 ],
1127 }],
[email protected]d8543312010-02-10 17:43:281128 [ 'OS=="win"', {
1129 'defines': [
1130 '_CRT_SECURE_NO_DEPRECATE',
1131 '_CRT_NONSTDC_NO_WARNINGS',
1132 '_CRT_NONSTDC_NO_DEPRECATE',
1133 '_SCL_SECURE_NO_DEPRECATE',
1134 ],
1135 'msvs_disabled_warnings': [4800],
1136 'msvs_settings': {
1137 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111138 'WarningLevel': '3',
1139 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281140 'Detect64BitPortabilityProblems': 'false',
1141 },
1142 },
1143 }],
[email protected]ea47b6a2011-07-17 19:39:421144 # TODO(darin): Unfortunately, some third_party code depends on base/
1145 [ 'OS=="win" and component=="shared_library"', {
1146 'msvs_disabled_warnings': [
1147 4251, # class 'std::xx' needs to have dll-interface.
1148 ],
1149 }],
[email protected]d8543312010-02-10 17:43:281150 [ 'OS=="mac"', {
1151 'xcode_settings': {
1152 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061153 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281154 },
1155 }],
[email protected]c14d8e772010-02-09 22:06:151156 ],
1157 }, {
1158 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1159 # C99 macros on Mac and Linux.
1160 'defines': [
1161 '__STDC_FORMAT_MACROS',
1162 ],
1163 'conditions': [
1164 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301165 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161166 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301167 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151168 }],
1169 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301170 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161171 ['exclude', '(^|/)(cocoa|mac)/'],
1172 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151173 }],
[email protected]02065c62011-09-23 00:08:461174 ['use_x11!=1', {
1175 'sources/': [
1176 ['exclude', '_(chromeos|x|x11)(_unittest)?\\.(h|cc)$'],
1177 ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
1178 ],
1179 }],
[email protected]79e2336c2011-05-12 18:18:341180 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151181 'sources/': [
[email protected]02065c62011-09-23 00:08:461182 ['exclude', '_(gtk|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161183 ['exclude', '(^|/)gtk/'],
[email protected]02065c62011-09-23 00:08:461184 ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131185 ],
1186 }],
[email protected]f1b2cd02011-08-10 16:50:441187 ['use_wayland!=1', {
1188 'sources/': [
1189 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1190 ['exclude', '(^|/)wayland/'],
1191 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1192 ],
1193 }],
[email protected]18cff3d2010-02-17 18:03:131194 ['OS!="linux"', {
1195 'sources/': [
[email protected]40519592010-11-16 15:23:301196 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161197 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131198 ],
[email protected]c14d8e772010-02-09 22:06:151199 }],
[email protected]f98d7b92011-09-09 10:17:351200 ['OS!="android"', {
1201 'sources/': [
1202 ['exclude', '_android(_unittest)?\\.cc$'],
1203 ['exclude', '(^|/)android/'],
1204 ],
1205 }],
[email protected]c14d8e772010-02-09 22:06:151206 # We use "POSIX" to refer to all non-Windows operating systems.
1207 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301208 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071209 # turn on warnings for signed/unsigned mismatch on chromium code.
1210 'msvs_settings': {
1211 'VCCLCompilerTool': {
1212 'AdditionalOptions': ['/we4389'],
1213 },
1214 },
[email protected]c14d8e772010-02-09 22:06:151215 }],
[email protected]63e39a282011-07-13 20:41:281216 ['OS=="win" and component=="shared_library"', {
1217 'msvs_disabled_warnings': [
1218 4251, # class 'std::xx' needs to have dll-interface.
1219 ],
1220 }],
[email protected]c14d8e772010-02-09 22:06:151221 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301222 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151223 }],
[email protected]06c756182010-04-27 18:31:311224 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301225 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151226 }],
[email protected]41423092011-08-25 15:39:581227 ['use_aura==0', {
1228 'sources/': [ ['exclude', '_aura\\.(h|cc)$'] ]
1229 }],
[email protected]c14d8e772010-02-09 22:06:151230 ],
1231 }],
[email protected]a6e22132010-02-10 20:43:181232 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551233 'default_configuration': 'Debug',
1234 'configurations': {
[email protected]534303c2011-09-28 00:02:511235 'variables' : {
1236 # Only used by Windows build for now. Can be used to build into a
1237 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1238 # output files in src/build/VS2010_{Debug,Release}.
1239 'build_dir_prefix%': '',
1240 },
[email protected]5153767c2009-12-22 01:52:501241 # VCLinkerTool LinkIncremental values below:
1242 # 0 == default
1243 # 1 == /INCREMENTAL:NO
1244 # 2 == /INCREMENTAL
1245 # Debug links incremental, Release does not.
1246 #
[email protected]7b99801e2010-11-03 17:26:231247 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501248 #
1249 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561250 'abstract': 1,
1251 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511252 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561253 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1254 'CharacterSet': '1',
1255 },
[email protected]5153767c2009-12-22 01:52:501256 },
1257 'x86_Base': {
1258 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501259 'msvs_settings': {
1260 'VCLinkerTool': {
1261 'TargetMachine': '1',
1262 },
1263 },
[email protected]2fa40782009-11-01 21:17:341264 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561265 },
[email protected]5153767c2009-12-22 01:52:501266 'x64_Base': {
1267 'abstract': 1,
1268 'msvs_configuration_platform': 'x64',
1269 'msvs_settings': {
1270 'VCLinkerTool': {
1271 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501272 'AdditionalLibraryDirectories!':
1273 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1274 'AdditionalLibraryDirectories':
1275 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1276 },
[email protected]d26b4418ab2010-03-24 22:06:351277 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501278 'AdditionalLibraryDirectories!':
1279 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1280 'AdditionalLibraryDirectories':
1281 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1282 },
1283 },
1284 'defines': [
1285 # Not sure if tcmalloc works on 64-bit Windows.
1286 'NO_TCMALLOC',
1287 ],
1288 },
1289 'Debug_Base': {
1290 'abstract': 1,
[email protected]14339762011-04-05 07:36:581291 'defines': [
1292 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1293 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1294 ],
[email protected]1c966092009-08-20 21:19:261295 'xcode_settings': {
1296 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291297 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491298 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491299 '<@(debug_extra_cflags)',
1300 ],
[email protected]1c966092009-08-20 21:19:261301 },
[email protected]bb05e452009-10-29 21:24:561302 'msvs_settings': {
1303 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471304 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561305 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211306 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471307 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151308 'conditions': [
1309 # According to MSVS, InlineFunctionExpansion=0 means
1310 # "default inlining", not "/Ob0".
1311 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1312 ['win_debug_InlineFunctionExpansion==0', {
1313 'AdditionalOptions': ['/Ob0'],
1314 }],
1315 ['win_debug_InlineFunctionExpansion!=""', {
1316 'InlineFunctionExpansion':
1317 '<(win_debug_InlineFunctionExpansion)',
1318 }],
[email protected]fac10d12010-11-08 16:00:311319 ['win_debug_disable_iterator_debugging==1', {
1320 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1321 }],
[email protected]2ae6e022010-05-07 13:19:151322 ],
[email protected]bb05e452009-10-29 21:24:561323 },
1324 'VCLinkerTool': {
1325 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021326 # ASLR makes debugging with windbg difficult because Chrome.exe and
1327 # Chrome.dll share the same base name. As result, windbg will
1328 # name the Chrome.dll module like chrome_<base address>, where
1329 # <base address> typically changes with each launch. This in turn
1330 # means that breakpoints in Chrome.dll don't stick from one launch
1331 # to the next. For this reason, we turn ASLR off in debug builds.
1332 # Note that this is a three-way bool, where 0 means to pick up
1333 # the default setting, 1 is off and 2 is on.
1334 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561335 },
1336 'VCResourceCompilerTool': {
1337 'PreprocessorDefinitions': ['_DEBUG'],
1338 },
1339 },
[email protected]2f80c312009-02-25 21:26:551340 'conditions': [
[email protected]bb05e452009-10-29 21:24:561341 ['OS=="linux"', {
1342 'cflags': [
1343 '<@(debug_extra_cflags)',
1344 ],
[email protected]2f80c312009-02-25 21:26:551345 }],
[email protected]56cca4e2011-07-01 21:33:351346 ['release_valgrind_build==0', {
1347 'xcode_settings': {
1348 'OTHER_CFLAGS': [
1349 '-fstack-protector-all', # Implies -fstack-protector
1350 ],
1351 },
1352 }],
[email protected]2f80c312009-02-25 21:26:551353 ],
1354 },
[email protected]5153767c2009-12-22 01:52:501355 'Release_Base': {
1356 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551357 'defines': [
1358 'NDEBUG',
1359 ],
[email protected]1c966092009-08-20 21:19:261360 'xcode_settings': {
1361 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1362 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001363 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261364 },
[email protected]bb05e452009-10-29 21:24:561365 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471366 'VCCLCompilerTool': {
1367 'Optimization': '<(win_release_Optimization)',
1368 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151369 'conditions': [
1370 # According to MSVS, InlineFunctionExpansion=0 means
1371 # "default inlining", not "/Ob0".
1372 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1373 ['win_release_InlineFunctionExpansion==0', {
1374 'AdditionalOptions': ['/Ob0'],
1375 }],
1376 ['win_release_InlineFunctionExpansion!=""', {
1377 'InlineFunctionExpansion':
1378 '<(win_release_InlineFunctionExpansion)',
1379 }],
1380 ],
[email protected]7e0d664a2009-12-03 21:07:471381 },
[email protected]bb05e452009-10-29 21:24:561382 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341383 # LinkIncremental is a tri-state boolean, where 0 means default
1384 # (i.e., inherit from parent solution), 1 means false, and
1385 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561386 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341387 # This corresponds to the /PROFILE flag which ensures the PDB
1388 # file contains FIXUP information (growing the PDB file by about
1389 # 5%) but does not otherwise alter the output binary. This
1390 # information is used by the Syzygy optimization tool when
1391 # decomposing the release image.
1392 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561393 },
1394 },
[email protected]2f80c312009-02-25 21:26:551395 'conditions': [
[email protected]92822e82009-09-18 14:26:561396 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581397 'defines': [
1398 'NVALGRIND',
1399 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1400 ],
[email protected]ee857512010-05-14 08:24:421401 }, {
[email protected]14339762011-04-05 07:36:581402 'defines': [
1403 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1404 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1405 ],
[email protected]92822e82009-09-18 14:26:561406 }],
[email protected]7e0d664a2009-12-03 21:07:471407 ['win_use_allocator_shim==0', {
1408 'defines': ['NO_TCMALLOC'],
1409 }],
[email protected]bb05e452009-10-29 21:24:561410 ['OS=="linux"', {
1411 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001412 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561413 ],
1414 }],
[email protected]2f80c312009-02-25 21:26:551415 ],
1416 },
[email protected]5153767c2009-12-22 01:52:501417 #
1418 # Concrete configurations
1419 #
1420 'Debug': {
1421 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1422 },
1423 'Release': {
1424 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1425 'conditions': [
1426 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161427 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501428 }],
1429 ]
1430 },
[email protected]f926fa0a2009-08-04 22:50:131431 'conditions': [
1432 [ 'OS=="win"', {
1433 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501434 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501435 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301436 },
1437 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501438 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301439 },
[email protected]f926fa0a2009-08-04 22:50:131440 }],
1441 ],
[email protected]2f80c312009-02-25 21:26:551442 },
1443 },
1444 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341445 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261446 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271447 # Enable -Werror by default, but put it in a variable so it can
1448 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1449 'variables': {
[email protected]57e94022011-05-04 15:33:191450 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421451 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341452 'conditions': [
1453 ['OS=="linux"', {
1454 'werror%': '-Werror',
1455 }, { # turn off -Werror on other Unices
1456 'werror%': '',
1457 }],
[email protected]47deeb62009-12-17 14:49:391458 ],
[email protected]5315f2842009-04-28 00:43:271459 },
[email protected]9d384032009-03-20 23:13:261460 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161461 '<(werror)', # See note above about the werror variable.
1462 '-pthread',
1463 '-fno-exceptions',
1464 '-Wall',
[email protected]0fa17082010-03-26 00:48:051465 # TODO(evan): turn this back on once all the builds work.
1466 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201467 # Don't warn about unused function params. We use those everywhere.
1468 '-Wno-unused-parameter',
1469 # Don't warn about the "struct foo f = {0};" initialization pattern.
1470 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161471 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121472 # Don't export any symbols (for example, to plugins we dlopen()).
1473 # Note: this is *required* to make some plugins work.
1474 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351475 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241476 ],
1477 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221478 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241479 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361480 # Make inline functions have hidden visiblity by default.
1481 # Surprisingly, not covered by -fvisibility=hidden.
1482 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171483 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1484 # so we specify it explicitly.
1485 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181486 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171487 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261488 ],
[email protected]a6cf87e2009-04-03 04:07:381489 'ldflags': [
[email protected]138241f2010-03-30 23:53:101490 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261491 ],
[email protected]3aacaf952009-04-02 15:34:091492 'configurations': {
[email protected]5153767c2009-12-22 01:52:501493 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311494 'variables': {
1495 'debug_optimize%': '0',
1496 },
[email protected]3aacaf952009-04-02 15:34:091497 'defines': [
1498 '_DEBUG',
1499 ],
1500 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041501 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091502 '-g',
1503 ],
[email protected]da1c8d692011-09-20 20:35:011504 'conditions' : [
1505 ['OS=="android"', {
1506 'cflags': [
1507 '-fno-omit-frame-pointer',
1508 ],
1509 }],
1510 ],
1511 'target_conditions' : [
1512 ['_toolset=="target"', {
1513 'conditions': [
1514 ['OS=="android" and debug_optimize==0', {
1515 'cflags': [
1516 '-mlong-calls', # Needed when compiling with -O0
1517 ],
1518 }],
1519 ['arm_thumb==1', {
1520 'cflags': [
1521 '-marm',
1522 ],
1523 }],
1524 ],
1525 }],
1526 ],
[email protected]5315f2842009-04-28 00:43:271527 },
[email protected]5153767c2009-12-22 01:52:501528 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011529 'variables': {
1530 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511531 # Binaries become big and gold is unable to perform GC
1532 # and remove unused sections for some of test targets
1533 # on 32 bit platform.
1534 # (This is currently observed only in chromeos valgrind bots)
1535 # The following flag is to disable --gc-sections linker
1536 # option for these bots.
1537 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121538
1539 # TODO(bradnelson): reexamine how this is done if we change the
1540 # expansion of configurations
1541 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011542 },
[email protected]3aacaf952009-04-02 15:34:091543 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041544 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531545 # Don't emit the GCC version ident directives, they just end up
1546 # in the .comment section taking up binary size.
1547 '-fno-ident',
1548 # Put data and code in their own sections, so that unused symbols
1549 # can be removed at link time with --gc-sections.
1550 '-fdata-sections',
1551 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091552 ],
[email protected]c902f2cba2010-08-06 20:04:181553 'ldflags': [
1554 # Specifically tell the linker to perform optimizations.
1555 # See http://lwn.net/Articles/192624/ .
1556 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221557 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181558 ],
[email protected]1dd529642010-05-15 01:02:511559 'conditions' : [
1560 ['no_gc_sections==0', {
1561 'ldflags': [
1562 '-Wl,--gc-sections',
1563 ],
1564 }],
[email protected]da1c8d692011-09-20 20:35:011565 ['OS=="android"', {
1566 'cflags': [
1567 '-fomit-frame-pointer',
1568 ],
1569 }],
[email protected]ecf7b6482010-10-13 09:15:201570 ['clang==1', {
1571 'cflags!': [
1572 '-fno-ident',
1573 ],
1574 }],
[email protected]7664ab32011-02-01 23:35:251575 ['profiling==1', {
1576 'cflags': [
1577 '-fno-omit-frame-pointer',
1578 '-g',
1579 ],
1580 }],
[email protected]c75f33e42011-05-04 18:11:521581 # At gyp time, we test the linker for ICF support; this flag
1582 # is then provided to us by gyp. (Currently only gold supports
1583 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531584 # There seems to be a conflict of --icf and -pie in gold which
1585 # can generate crashy binaries. As a security measure, -pie
1586 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121587 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461588 'target_conditions': [
1589 ['_toolset=="target"', {
1590 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531591 #'-Wl,--icf=safe',
1592 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461593 ]
1594 }]
[email protected]c75f33e42011-05-04 18:11:521595 ]
1596 }],
[email protected]1dd529642010-05-15 01:02:511597 ]
[email protected]3aacaf952009-04-02 15:34:091598 },
1599 },
[email protected]601b540222009-04-03 21:32:041600 'variants': {
1601 'coverage': {
1602 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1603 'ldflags': ['-fprofile-arcs'],
1604 },
1605 'profile': {
1606 'cflags': ['-pg', '-g'],
1607 'ldflags': ['-pg'],
1608 },
1609 'symbols': {
1610 'cflags': ['-g'],
1611 },
1612 },
[email protected]606116d22009-05-06 22:38:231613 'conditions': [
[email protected]04b482602011-09-14 02:36:211614 ['target_arch=="ia32"', {
1615 'target_conditions': [
1616 ['_toolset=="target"', {
1617 'asflags': [
1618 # Needed so that libs with .s files (e.g. libicudata.a)
1619 # are compatible with the general 32-bit-ness.
1620 '-32',
1621 ],
1622 # All floating-point computations on x87 happens in 80-bit
1623 # precision. Because the C and C++ language standards allow
1624 # the compiler to keep the floating-point values in higher
1625 # precision than what's specified in the source and doing so
1626 # is more efficient than constantly rounding up to 64-bit or
1627 # 32-bit precision as specified in the source, the compiler,
1628 # especially in the optimized mode, tries very hard to keep
1629 # values in x87 floating-point stack (in 80-bit precision)
1630 # as long as possible. This has important side effects, that
1631 # the real value used in computation may change depending on
1632 # how the compiler did the optimization - that is, the value
1633 # kept in 80-bit is different than the value rounded down to
1634 # 64-bit or 32-bit. There are possible compiler options to
1635 # make this behavior consistent (e.g. -ffloat-store would keep
1636 # all floating-values in the memory, thus force them to be
1637 # rounded to its original precision) but they have significant
1638 # runtime performance penalty.
1639 #
1640 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1641 # which keep floating-point values in SSE registers in its
1642 # native precision (32-bit for single precision, and 64-bit
1643 # for double precision values). This means the floating-point
1644 # value used during computation does not change depending on
1645 # how the compiler optimized the code, since the value is
1646 # always kept in its specified precision.
1647 'conditions': [
1648 ['branding=="Chromium" and disable_sse2==0', {
1649 'cflags': [
1650 '-march=pentium4',
1651 '-msse2',
1652 '-mfpmath=sse',
1653 ],
1654 }],
1655 # ChromeOS targets Pinetrail, which is sse3, but most of the
1656 # benefit comes from sse2 so this setting allows ChromeOS
1657 # to build on other CPUs. In the future -march=atom would
1658 # help but requires a newer compiler.
1659 ['chromeos==1 and disable_sse2==0', {
1660 'cflags': [
1661 '-msse2',
1662 ],
1663 }],
1664 # Install packages have started cropping up with
1665 # different headers between the 32-bit and 64-bit
1666 # versions, so we have to shadow those differences off
1667 # and make sure a 32-bit-on-64-bit build picks up the
1668 # right files.
1669 ['host_arch!="ia32"', {
1670 'include_dirs+': [
1671 '/usr/include32',
1672 ],
1673 }],
1674 ],
1675 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1676 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061677 'cflags': [
[email protected]04b482602011-09-14 02:36:211678 '-m32',
1679 '-mmmx',
1680 ],
1681 'ldflags': [
1682 '-m32',
[email protected]ffde7932009-05-29 00:39:061683 ],
1684 }],
[email protected]606116d22009-05-06 22:38:231685 ],
1686 }],
[email protected]3dda8a962009-08-10 18:58:071687 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291688 'target_conditions': [
1689 ['_toolset=="target"', {
1690 'cflags_cc': [
1691 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1692 # has changed whenever it encounters a varargs function. This
1693 # silences those warnings, as they are not helpful and
1694 # clutter legitimate warnings.
1695 '-Wno-abi',
1696 ],
1697 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011698 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291699 'cflags': [
1700 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291701 ]
1702 }],
1703 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251704 'cflags': [
1705 '-march=armv7-a',
1706 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251707 '-mfloat-abi=softfp',
1708 ],
[email protected]eafc0b452010-02-26 21:53:431709 'conditions': [
1710 ['arm_neon==1', {
1711 'cflags': [ '-mfpu=neon', ],
1712 }, {
[email protected]53e0f642010-03-05 01:41:561713 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431714 }]
1715 ],
[email protected]dc9711f2009-11-13 19:30:251716 }],
[email protected]da1c8d692011-09-20 20:35:011717 ['OS=="android"', {
1718 # The following flags are derived from what Android uses
1719 # by default when building for arm.
1720 'cflags': [ '-Wno-psabi', ],
1721 'conditions': [
1722 ['arm_thumb == 1', {
1723 # Android toolchain doesn't support -mimplicit-it=thumb
1724 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1725 'cflags': [ '-mthumb-interwork', ],
1726 }],
1727 ['armv7==0', {
1728 # Flags suitable for Android emulator
1729 'cflags': [
1730 '-march=armv5te',
1731 '-mtune=xscale',
1732 '-msoft-float',
1733 '-D__ARM_ARCH_5__',
1734 '-D__ARM_ARCH_5T__',
1735 '-D__ARM_ARCH_5E__',
1736 '-D__ARM_ARCH_5TE__',
1737 ],
1738 }],
1739 ],
1740 }],
[email protected]3dda8a962009-08-10 18:58:071741 ],
1742 }],
1743 ],
1744 }],
[email protected]2fb843b2010-08-12 02:11:081745 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581746 'cflags': [
1747 '-fPIC',
1748 ],
1749 }],
[email protected]ee28c9f2009-09-04 01:53:011750 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571751 'target_conditions': [
1752 ['_toolset=="target"', {
1753 'cflags': [
1754 '--sysroot=<(sysroot)',
1755 ],
1756 'ldflags': [
1757 '--sysroot=<(sysroot)',
1758 ],
1759 }]]
[email protected]ee28c9f2009-09-04 01:53:011760 }],
[email protected]58680ce2010-09-18 00:09:151761 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121762 'cflags': [
1763 '-Wheader-hygiene',
1764 # Clang spots more unused functions.
1765 '-Wno-unused-function',
1766 # Don't die on dtoa code that uses a char as an array index.
1767 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331768 # Especially needed for gtest macros using enum values from Mac
1769 # system headers.
1770 # TODO(pkasting): In C++11 this is legal, so this should be
1771 # removed when we change to that. (This is also why we don't
1772 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121773 '-Wno-unnamed-type-template-args',
1774 ],
1775 'cflags!': [
1776 # Clang doesn't seem to know know this flag.
1777 '-mfpmath=sse',
1778 ],
[email protected]58680ce2010-09-18 00:09:151779 }],
[email protected]5d451ad2011-02-11 16:43:461780 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261781 'cflags': [
1782 '<(clang_chrome_plugins_flags)',
1783 ],
[email protected]5d451ad2011-02-11 16:43:461784 }],
[email protected]5e781232011-01-28 02:57:591785 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261786 'cflags': [
1787 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1788 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1789 ],
[email protected]5e781232011-01-28 02:57:591790 }],
[email protected]92799b632011-08-15 14:33:061791 ['asan==1', {
1792 # Only in the linux section for now, since ASAN doesn't
1793 # work on Mac yet.
1794 'cflags': [
[email protected]74a26d72011-09-29 17:29:031795 '-fasan',
1796 '-w',
[email protected]92799b632011-08-15 14:33:061797 ],
1798 'ldflags': [
1799 '-fasan',
1800 ],
1801 }],
[email protected]cc4219a2009-08-14 05:30:521802 ['no_strict_aliasing==1', {
1803 'cflags': [
1804 '-fno-strict-aliasing',
1805 ],
1806 }],
[email protected]cbd5fd52009-08-26 00:14:271807 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171808 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271809 'defines': ['USE_LINUX_BREAKPAD'],
1810 }],
[email protected]d8b60602010-03-26 09:41:221811 ['linux_use_heapchecker==1', {
1812 'variables': {'linux_use_tcmalloc%': 1},
1813 }],
[email protected]61a9b2d82010-02-26 00:31:081814 ['linux_use_tcmalloc==0', {
1815 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241816 }],
[email protected]d8b60602010-03-26 09:41:221817 ['linux_use_heapchecker==0', {
1818 'defines': ['NO_HEAPCHECKER'],
1819 }],
[email protected]64e2d4a42010-08-27 10:13:211820 ['linux_keep_shadow_stacks==1', {
1821 'defines': ['KEEP_SHADOW_STACKS'],
1822 'cflags': ['-finstrument-functions'],
1823 }],
[email protected]606116d22009-05-06 22:38:231824 ],
[email protected]9d384032009-03-20 23:13:261825 },
1826 }],
[email protected]c51e8d52009-12-11 20:04:061827 # FreeBSD-specific options; note that most FreeBSD options are set above,
1828 # with Linux.
1829 ['OS=="freebsd"', {
1830 'target_defaults': {
1831 'ldflags': [
1832 '-Wl,--no-keep-memory',
1833 ],
1834 },
1835 }],
[email protected]da1c8d692011-09-20 20:35:011836 # Android-specific options; note that most are set above with Linux.
1837 ['OS=="android"', {
1838 'variables': {
1839 'android_target_arch%': 'arm', # target_arch in android terms.
1840 'conditions': [
1841 # Android uses x86 instead of ia32 for their target_arch designation.
1842 ['target_arch=="ia32"', {
1843 'android_target_arch%': 'x86',
1844 }],
1845 # Use shared stlport library when system one used.
1846 # Figure this out early since it needs symbols from libgcc.a, so it
1847 # has to be before that in the set of libraries.
1848 ['use_system_stlport==1', {
1849 'android_stlport_library': 'stlport',
1850 }, {
1851 'android_stlport_library': 'stlport_static',
1852 }],
1853 ],
1854
1855 # Placing this variable here prevents from forking libvpx, used
1856 # by remoting. Remoting is off, so it needn't built,
1857 # so forking it's deps seems like overkill.
1858 # But this variable need defined to properly run gyp.
1859 # A proper solution is to have an OS==android conditional
1860 # in third_party/libvpx/libvpx.gyp to define it.
1861 'libvpx_path': 'lib/linux/arm',
1862 },
1863 'target_defaults': {
1864 # Build a Release build by default to match Android build behavior.
1865 # This is typical with Android because Debug builds tend to be much
1866 # larger and run very slowly on constrained devices. It is still
1867 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
1868 # 'make' command line.
1869 'default_configuration': 'Release',
1870
1871 'variables': {
1872 'release_extra_cflags%': '',
1873 },
1874
1875 'target_conditions': [
1876 # Settings for building device targets using Android's toolchain.
1877 # These are based on the setup.mk file from the Android NDK.
1878 #
1879 # The NDK Android executable link step looks as follows:
1880 # $LDFLAGS
1881 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
1882 # $(PRIVATE_OBJECTS) <-- The .o that we built
1883 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
1884 # $(TARGET_LIBGCC) <-- libgcc.a
1885 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
1886 # $(PRIVATE_LDLIBS) <-- System .so
1887 # $(TARGET_CRTEND_O) <-- crtend.o
1888 #
1889 # For now the above are approximated for executables by adding
1890 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
1891 # of 'libraries'.
1892 #
1893 # The NDK Android shared library link step looks as follows:
1894 # $LDFLAGS
1895 # $(PRIVATE_OBJECTS) <-- The .o that we built
1896 # -l,--whole-archive
1897 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
1898 # -l,--no-whole-archive
1899 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
1900 # $(TARGET_LIBGCC) <-- libgcc.a
1901 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
1902 # $(PRIVATE_LDLIBS) <-- System .so
1903 #
1904 # For now, assume not need any whole static libs.
1905 #
1906 # For both executables and shared libraries, add the proper
1907 # libgcc.a to the start of libraries which puts it in the
1908 # proper spot after .o and .a files get linked in.
1909 #
1910 # TODO: The proper thing to do longer-tem would be proper gyp
1911 # support for a custom link command line.
1912 ['_toolset=="target"', {
1913 'cflags!': [
1914 '-pthread', # Not supported by Android toolchain.
1915 ],
1916 'cflags': [
1917 '-U__linux__', # Don't allow toolchain to claim -D__linux__
1918 '-ffunction-sections',
1919 '-funwind-tables',
1920 '-g',
1921 '-fstack-protector',
1922 '-fno-short-enums',
1923 '-finline-limit=64',
1924 '-Wa,--noexecstack',
1925 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
1926 '<@(release_extra_cflags)',
1927 # Note: This include is in cflags to ensure that it comes after
1928 # all of the includes.
1929 '-I<(android_ndk_include)',
1930 ],
1931 'defines': [
1932 'ANDROID',
1933 '__GNU_SOURCE=1', # Necessary for clone()
1934 'USE_STLPORT=1',
1935 '_STLP_USE_PTR_SPECIALIZATIONS=1',
1936 'HAVE_OFF64_T',
1937 'HAVE_SYS_UIO_H',
1938 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
1939 ],
1940 'ldflags!': [
1941 '-pthread', # Not supported by Android toolchain.
1942 ],
1943 'ldflags': [
1944 '-nostdlib',
1945 '-Wl,--no-undefined',
1946 '-Wl,--icf=safe', # Enable identical code folding to reduce size
1947 # Don't export symbols from statically linked libraries.
1948 '-Wl,--exclude-libs=ALL',
1949 ],
1950 'libraries!': [
1951 '-lrt', # librt is built into Bionic.
1952 # Not supported by Android toolchain.
1953 # Where do these come from? Can't find references in
1954 # any Chromium gyp or gypi file. Maybe they come from
1955 # gyp itself?
1956 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
1957 ],
1958 'libraries': [
1959 '-l<(android_stlport_library)',
1960 # Manually link the libgcc.a that the cross compiler uses.
1961 '<!($CROSS_CC -print-libgcc-file-name)',
1962 '-lc',
1963 '-ldl',
1964 '-lstdc++',
1965 '-lm',
1966 ],
1967 'conditions': [
1968 ['android_build_type==0', {
1969 'ldflags': [
1970 '-Wl,-rpath-link=<(android_ndk_lib)',
1971 '-L<(android_ndk_lib)',
1972 ],
1973 }],
1974 # NOTE: The stlport header include paths below are specified in
1975 # cflags rather than include_dirs because they need to come
1976 # after include_dirs. Think of them like system headers, but
1977 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
1978 # toolchain (circa Gingerbread) will exhibit strange errors.
1979 # The include ordering here is important; change with caution.
1980 ['use_system_stlport==0', {
1981 'cflags': [
1982 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
1983 ],
1984 'conditions': [
1985 ['target_arch=="arm" and armv7==1', {
1986 'ldflags': [
1987 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
1988 ],
1989 }],
1990 ['target_arch=="arm" and armv7==0', {
1991 'ldflags': [
1992 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
1993 ],
1994 }],
1995 ['target_arch=="ia32"', {
1996 'ldflags': [
1997 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
1998 ],
1999 }],
2000 ],
2001 }],
2002 ['target_arch=="ia32"', {
2003 # The x86 toolchain currently has problems with stack-protector.
2004 'cflags!': [
2005 '-fstack-protector',
2006 ],
2007 'cflags': [
2008 '-fno-stack-protector',
2009 ],
2010 }],
2011 ],
2012 'target_conditions': [
2013 ['_type=="executable"', {
2014 'ldflags': [
2015 '-Bdynamic',
2016 '-Wl,-dynamic-linker,/system/bin/linker',
2017 '-Wl,--gc-sections',
2018 '-Wl,-z,nocopyreloc',
2019 # crtbegin_dynamic.o should be the last item in ldflags.
2020 '<(android_ndk_lib)/crtbegin_dynamic.o',
2021 ],
2022 'libraries': [
2023 # crtend_android.o needs to be the last item in libraries.
2024 # Do not add any libraries after this!
2025 '<(android_ndk_lib)/crtend_android.o',
2026 ],
2027 }],
2028 ['_type=="shared_library"', {
2029 'ldflags': [
2030 '-Wl,-shared,-Bsymbolic',
2031 ],
2032 }],
2033 ],
2034 }],
2035 # Settings for building host targets using the system toolchain.
2036 ['_toolset=="host"', {
2037 'ldflags!': [
2038 '-Wl,-z,noexecstack',
2039 '-Wl,--gc-sections',
2040 '-Wl,-O1',
2041 '-Wl,--as-needed',
2042 ],
[email protected]965b6b22011-09-29 16:07:282043 'sources/': [
2044 ['exclude', '_android(_unittest)?\\.cc$'],
2045 ['exclude', '(^|/)android/']
2046 ],
[email protected]da1c8d692011-09-20 20:35:012047 }],
2048 ],
2049 },
2050 }],
[email protected]93f21e42010-04-01 00:35:152051 ['OS=="solaris"', {
2052 'cflags!': ['-fvisibility=hidden'],
2053 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2054 }],
[email protected]2f80c312009-02-25 21:26:552055 ['OS=="mac"', {
2056 'target_defaults': {
[email protected]24700642009-06-01 16:01:202057 'variables': {
[email protected]162407f2011-09-08 15:33:172058 # These should end with %, but there seems to be a bug with % in
2059 # variables that are intended to be set to different values in
2060 # different targets, like these.
2061 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202062 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382063 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202064 },
[email protected]d92c7c012009-03-19 19:26:422065 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552066 'xcode_settings': {
2067 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042068 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2069 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2070 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2071 # (Equivalent to -fPIC)
2072 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2073 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2074 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252075 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2076 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042077 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2078 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2079 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2080 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552081 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042082 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252083 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2084 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:042085 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]e1ece302011-09-15 03:58:112086 # Keep pch files below xcodebuild/.
2087 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552088 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192089 'OTHER_CFLAGS': [
2090 '-fno-strict-aliasing', # See http://crbug.com/32204
2091 ],
[email protected]080e86f2010-06-21 15:19:042092 'WARNING_CFLAGS': [
2093 '-Wall',
2094 '-Wendif-labels',
2095 '-Wextra',
2096 # Don't warn about unused function parameters.
2097 '-Wno-unused-parameter',
2098 # Don't warn about the "struct foo f = {0};" initialization
2099 # pattern.
2100 '-Wno-missing-field-initializers',
2101 ],
[email protected]b3fb8092009-03-12 19:09:242102 'conditions': [
2103 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592104 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2105 ],
[email protected]66733172010-09-22 00:09:282106 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302107 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2108 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382109
2110 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2111 # when buliding with clang. This warning is triggered when the
2112 # override keyword is used via the OVERRIDE macro from
2113 # base/compiler_specific.h.
2114 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
2115
[email protected]34f40892011-09-06 21:53:302116 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282117 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072118 '-Wheader-hygiene',
[email protected]a79fd882011-10-03 18:22:382119
[email protected]66733172010-09-22 00:09:282120 # Don't die on dtoa code that uses a char as an array index.
2121 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2122 '-Wno-char-subscripts',
[email protected]a79fd882011-10-03 18:22:382123
[email protected]25d3bb722010-11-22 14:31:452124 # Clang spots more unused functions.
2125 '-Wno-unused-function',
[email protected]a79fd882011-10-03 18:22:382126
[email protected]d6431722011-09-01 00:46:332127 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052128 '-Wno-unnamed-type-template-args',
[email protected]a79fd882011-10-03 18:22:382129
[email protected]d53680932011-06-08 16:40:062130 # TODO(thakis): Reenable once the one instance this warns on
2131 # is fixed.
2132 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:282133 ],
2134 }],
[email protected]5d451ad2011-02-11 16:43:462135 ['clang==1 and clang_use_chrome_plugins==1', {
2136 'OTHER_CFLAGS': [
2137 '<(clang_chrome_plugins_flags)',
2138 ],
2139 }],
[email protected]5e781232011-01-28 02:57:592140 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
2141 'OTHER_CFLAGS': [
2142 '-Xclang', '-load', '-Xclang', '<(clang_load)',
2143 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2144 ],
2145 }],
[email protected]b3fb8092009-03-12 19:09:242146 ],
[email protected]2f80c312009-02-25 21:26:552147 },
[email protected]34f40892011-09-06 21:53:302148 'conditions': [
2149 ['clang==1', {
2150 'variables': {
2151 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2152 },
2153 }],
2154 ],
[email protected]2f80c312009-02-25 21:26:552155 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552156 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462157 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2158 }],
2159 ['_mac_bundle', {
2160 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082161 }],
[email protected]6303fed2011-08-11 01:12:102162 ['_type=="executable"', {
2163 'postbuilds': [
2164 {
2165 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362166 # code execution when running on Mac OS X 10.7 ("Lion"), and
2167 # ensures that the position-independent executable (PIE) bit
2168 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102169 'variables': {
[email protected]8c40f322011-08-24 03:33:362170 # Define change_mach_o_flags in a variable ending in _path
2171 # so that GYP understands it's a path and performs proper
2172 # relativization during dict merging.
2173 'change_mach_o_flags_path':
2174 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172175 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132176 ],
2177 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172178 ['mac_pie==0 or release_valgrind_build==1', {
2179 # Don't enable PIE if it's unwanted. It's unwanted if
2180 # the target specifies mac_pie=0 or if building for
2181 # Valgrind, because Valgrind doesn't understand slide.
2182 # See the similar mac_pie/release_valgrind_build check
2183 # below.
[email protected]081c0342011-08-24 14:59:132184 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132185 '--no-pie',
2186 ],
2187 }],
2188 ],
[email protected]6303fed2011-08-11 01:12:102189 },
[email protected]8c40f322011-08-24 03:33:362190 'postbuild_name': 'Change Mach-O Flags',
2191 'action': [
2192 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132193 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362194 ],
[email protected]6303fed2011-08-11 01:12:102195 },
2196 ],
[email protected]5a5d97aa2011-09-02 15:34:002197 'conditions': [
2198 ['asan==1', {
2199 'variables': {
2200 'asan_saves_file': 'asan.saves',
2201 },
2202 'xcode_settings': {
2203 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
2204 },
2205 }],
2206 ],
[email protected]162407f2011-09-08 15:33:172207 'target_conditions': [
2208 ['mac_pie==1 and release_valgrind_build==0', {
2209 # Turn on position-independence (ASLR) for executables. When
2210 # PIE is on for the Chrome executables, the framework will
2211 # also be subject to ASLR.
2212 # Don't do this when building for Valgrind, because Valgrind
2213 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2214 # understand slide, and get rid of the Valgrind check.
2215 'xcode_settings': {
2216 'OTHER_LDFLAGS': [
2217 '-Wl,-pie', # Position-independent executable (MH_PIE)
2218 ],
2219 },
2220 }],
2221 ],
[email protected]6a0242bc2011-07-01 00:34:462222 }],
[email protected]9a5e72862010-09-02 16:16:582223 ['(_type=="executable" or _type=="shared_library" or \
2224 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202225 'target_conditions': [
2226 ['mac_real_dsym == 1', {
2227 # To get a real .dSYM bundle produced by dsymutil, set the
2228 # debug information format to dwarf-with-dsym. Since
2229 # strip_from_xcode will not be used, set Xcode to do the
2230 # stripping as well.
2231 'configurations': {
[email protected]5153767c2009-12-22 01:52:502232 'Release_Base': {
[email protected]24700642009-06-01 16:01:202233 'xcode_settings': {
2234 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2235 'DEPLOYMENT_POSTPROCESSING': 'YES',
2236 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072237 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252238 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072239 # The Xcode default is to strip debugging symbols
2240 # only (-S). Local symbols should be stripped as
2241 # well, which will be handled by -x. Xcode will
2242 # continue to insert -S when stripping even when
2243 # additional flags are added with STRIPFLAGS.
2244 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252245 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072246 ], # target_conditions
2247 }, # xcode_settings
2248 }, # configuration "Release"
2249 }, # configurations
[email protected]24700642009-06-01 16:01:202250 }, { # mac_real_dsym != 1
2251 # To get a fast fake .dSYM bundle, use a post-build step to
2252 # produce the .dSYM and strip the executable. strip_from_xcode
2253 # only operates in the Release configuration.
2254 'postbuilds': [
2255 {
2256 'variables': {
2257 # Define strip_from_xcode in a variable ending in _path
2258 # so that gyp understands it's a path and performs proper
2259 # relativization during dict merging.
2260 'strip_from_xcode_path': 'mac/strip_from_xcode',
2261 },
2262 'postbuild_name': 'Strip If Needed',
2263 'action': ['<(strip_from_xcode_path)'],
2264 },
[email protected]e14a9f92009-08-05 19:26:072265 ], # postbuilds
2266 }], # mac_real_dsym
2267 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582268 }], # (_type=="executable" or _type=="shared_library" or
2269 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072270 ], # target_conditions
2271 }, # target_defaults
2272 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552273 ['OS=="win"', {
2274 'target_defaults': {
2275 'defines': [
[email protected]a89e0942011-09-26 16:06:472276 '_WIN32_WINNT=0x0601',
2277 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552278 'WIN32',
2279 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552280 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282281 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552282 '_CRT_RAND_S',
2283 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2284 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272285 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452286 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552287 ],
[email protected]8974e042010-06-21 18:06:522288 'conditions': [
2289 ['component=="static_library"', {
2290 'defines': [
2291 '_HAS_EXCEPTIONS=0',
2292 ],
2293 }],
[email protected]3e2648a2011-03-21 20:58:502294 ['secure_atl', {
2295 'defines': [
2296 '_SECURE_ATL',
2297 ],
2298 }],
[email protected]8974e042010-06-21 18:06:522299 ],
[email protected]5b5ca7cb2009-07-20 23:00:202300 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:522301 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:372302 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:552303 '$(VSInstallDir)/VC/atlmfc/include',
2304 ],
[email protected]a8d99cef2009-08-26 20:47:492305 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112306 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2307 # TODO(maruel): These warnings are level 4. They will be slowly
2308 # removed as code is fixed.
2309 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2310 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2311 4702, 4706,
2312 ],
[email protected]2f80c312009-02-25 21:26:552313 'msvs_settings': {
2314 'VCCLCompilerTool': {
2315 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552316 'BufferSecurityCheck': 'true',
2317 'EnableFunctionLevelLinking': 'true',
2318 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112319 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552320 'WarnAsError': 'true',
2321 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582322 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502323 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162324 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552325 }],
[email protected]3e2648a2011-03-21 20:58:502326 ['MSVS_VERSION=="2005e"', {
2327 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2328 }],
[email protected]8974e042010-06-21 18:06:522329 ['component=="shared_library"', {
2330 'ExceptionHandling': '1', # /EHsc
2331 }, {
2332 'ExceptionHandling': '0',
2333 }],
[email protected]3fef6e62009-07-31 19:58:582334 ],
[email protected]2f80c312009-02-25 21:26:552335 },
2336 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162337 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372338 'AdditionalLibraryDirectories': [
2339 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2340 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2341 ],
[email protected]2f80c312009-02-25 21:26:552342 },
2343 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552344 'AdditionalDependencies': [
2345 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502346 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552347 'version.lib',
2348 'msimg32.lib',
2349 'ws2_32.lib',
2350 'usp10.lib',
2351 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082352 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482353 'winmm.lib',
2354 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552355 ],
[email protected]4de39f82011-03-28 12:01:292356 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502357 ['msvs_express', {
2358 # Explicitly required when using the ATL with express
2359 'AdditionalDependencies': [
2360 'atlthunk.lib',
2361 ],
2362 }],
2363 ['MSVS_VERSION=="2005e"', {
2364 # Non-express versions link automatically to these
2365 'AdditionalDependencies': [
2366 'advapi32.lib',
2367 'comdlg32.lib',
2368 'ole32.lib',
2369 'shell32.lib',
2370 'user32.lib',
2371 'winspool.lib',
2372 ],
2373 }],
2374 ],
[email protected]a78da50e2010-06-09 21:31:372375 'AdditionalLibraryDirectories': [
2376 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2377 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2378 ],
[email protected]2f80c312009-02-25 21:26:552379 'GenerateDebugInformation': 'true',
2380 'MapFileName': '$(OutDir)\\$(TargetName).map',
2381 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552382 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482383 # SubSystem values:
2384 # 0 == not set
2385 # 1 == /SUBSYSTEM:CONSOLE
2386 # 2 == /SUBSYSTEM:WINDOWS
2387 # Most of the executables we'll ever create are tests
2388 # and utilities with console output.
2389 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552390 },
2391 'VCMIDLTool': {
2392 'GenerateStublessProxies': 'true',
2393 'TypeLibraryName': '$(InputName).tlb',
2394 'OutputDirectory': '$(IntDir)',
2395 'HeaderFileName': '$(InputName).h',
2396 'DLLDataFileName': 'dlldata.c',
2397 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2398 'ProxyFileName': '$(InputName)_p.c',
2399 },
2400 'VCResourceCompilerTool': {
2401 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382402 'AdditionalIncludeDirectories': [
2403 '<(DEPTH)',
2404 '<(SHARED_INTERMEDIATE_DIR)',
2405 ],
[email protected]2f80c312009-02-25 21:26:552406 },
2407 },
2408 },
2409 }],
[email protected]79e2336c2011-05-12 18:18:342410 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312411 'target_defaults': {
2412 'defines': [
2413 'DISABLE_NACL',
2414 ],
2415 },
2416 }],
[email protected]cfbf9bc2009-12-07 22:07:562417 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192418 'target_defaults': {
2419 'msvs_settings': {
2420 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192421 'DelayLoadDLLs': [
2422 'dbghelp.dll',
2423 'dwmapi.dll',
2424 'uxtheme.dll',
2425 ],
2426 },
2427 },
[email protected]ef4fa4072009-12-04 22:46:502428 'configurations': {
[email protected]5153767c2009-12-22 01:52:502429 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502430 'msvs_settings': {
2431 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162432 'AdditionalOptions': [
2433 '/safeseh',
2434 '/dynamicbase',
2435 '/ignore:4199',
2436 '/ignore:4221',
2437 '/nxcompat',
2438 ],
[email protected]ef4fa4072009-12-04 22:46:502439 },
2440 },
2441 },
[email protected]5153767c2009-12-22 01:52:502442 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502443 'msvs_settings': {
2444 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162445 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502446 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162447 '/dynamicbase',
2448 '/ignore:4199',
2449 '/ignore:4221',
2450 '/nxcompat',
2451 ],
[email protected]ef4fa4072009-12-04 22:46:502452 },
2453 },
2454 },
2455 },
[email protected]48c7af72009-07-03 22:00:192456 },
2457 }],
[email protected]9821d0d2010-04-16 22:40:372458 ['enable_new_npdevice_api==1', {
2459 'target_defaults': {
2460 'defines': [
2461 'ENABLE_NEW_NPDEVICE_API',
2462 ],
2463 },
2464 }],
[email protected]34f40892011-09-06 21:53:302465 ['clang==1', {
2466 'make_global_settings': [
2467 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
2468 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072469 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302470 ['CC.host', '$(CC)'],
2471 ['CXX.host', '$(CXX)'],
2472 ['LINK.host', '$(LINK)'],
2473 ],
2474 }],
[email protected]2f80c312009-02-25 21:26:552475 ],
2476 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502477 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2478 # This block adds *project-wide* configuration settings to each project
2479 # file. It's almost always wrong to put things here. Specify your
2480 # custom xcode_settings in target_defaults to add them to targets instead.
2481
2482 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2483 # setting sets the SDK on a project-wide basis. In order to get the
2484 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2485 # here at the project level.
2486 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2487
[email protected]2f80c312009-02-25 21:26:552488 # The Xcode generator will look for an xcode_settings section at the root
2489 # of each dict and use it to apply settings on a file-wide basis. Most
2490 # settings should not be here, they should be in target-specific
2491 # xcode_settings sections, or better yet, should use non-Xcode-specific
2492 # settings in target dicts. SYMROOT is a special case, because many other
2493 # Xcode variables depend on it, including variables such as
2494 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2495 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2496 # files to appear (when present) in the UI as actual files and not red
2497 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2498 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162499 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552500 },
[email protected]ee28c9f2009-09-04 01:53:012501}