blob: 7361dffc1523324dd5ce4ae05a951c5d62cad450 [file] [log] [blame]
[email protected]ed329be2012-01-03 22:02:161# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]21642ab2009-09-15 23:52:145# IMPORTANT:
6# Please don't directly include this file if you are building via gyp_chromium,
7# since gyp_chromium is automatically forcing its inclusion.
[email protected]2f80c312009-02-25 21:26:558{
[email protected]e72e55b2011-01-06 22:19:309 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
[email protected]2f80c312009-02-25 21:26:5511 'variables': {
[email protected]e14a9f92009-08-05 19:26:0712 # Putting a variables dict inside another variables dict looks kind of
[email protected]e72e55b2011-01-06 22:19:3013 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
[email protected]e14a9f92009-08-05 19:26:0714 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
[email protected]9a8175892012-03-20 02:11:5816 # dict that operate on these variables.
[email protected]e14a9f92009-08-05 19:26:0717 'variables': {
[email protected]e72e55b2011-01-06 22:19:3018 'variables': {
[email protected]bb6aba32011-01-07 19:04:4319 'variables': {
20 # Whether we're building a ChromeOS build.
21 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3022
[email protected]3fa441d2011-09-18 17:28:5023 # Whether we are using Views Toolkit
24 'toolkit_views%': 0,
25
[email protected]ed329be2012-01-03 22:02:1626 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5827 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2828
[email protected]ed329be2012-01-03 22:02:1629 # Whether or not we are building the Ash shell.
30 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4231
32 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
33 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2734
35 # Disable Virtual keyboard support by default.
36 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4837
[email protected]7ddea9802012-02-22 23:08:0538 # Disable viewport meta tag by default.
39 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2440
41 # Enable HiDPI support.
42 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4043
[email protected]6155e702012-05-02 17:56:0644 # Enable touch optimized art assets and metrics.
45 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1846
[email protected]e1de87f2012-05-02 17:20:4547 # Enable inclusion of touch-optimized resources.
48 # TODO(joi): Rename to enable_touch_assets.
[email protected]8973c3a2012-04-25 02:24:1849 'enable_metro%': 0,
[email protected]219c7312012-05-10 20:32:4050
[email protected]e0825562012-05-10 01:50:4751 # Is this change part of the android upstream bringup?
52 # Allows us to *temporarily* disable certain things for
53 # staging. Only set to 1 in a GYP_DEFINES.
54 'android_upstream_bringup%': 0,
[email protected]bb6aba32011-01-07 19:04:4355 },
56 # Copy conditionally-set variables out one scope.
57 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5858 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1659 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4260 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2761 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0562 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2463 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:0664 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]8973c3a2012-04-25 02:24:1865 'enable_metro%': '<(enable_metro)',
[email protected]e0825562012-05-10 01:50:4766 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]e72e55b2011-01-06 22:19:3067
[email protected]e72e55b2011-01-06 22:19:3068 # Compute the architecture that we're building on.
69 'conditions': [
[email protected]177cd082011-10-04 18:36:3870 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3771 'host_arch%': 'ia32',
72 }, {
[email protected]79e2336c2011-05-12 18:18:3473 # This handles the Unix platforms for which there is some support.
74 # Anything else gets passed through, which probably won't work very
75 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3076 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3477 '<!(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:3078 }],
[email protected]1353a092012-01-13 03:34:2879
[email protected]838a3cd2012-03-19 16:10:5580 # Chromeos implies ash.
[email protected]5f887612012-03-01 21:34:0681 ['chromeos==1', {
82 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1683 'use_aura%': 1,
84 }],
[email protected]bb6aba32011-01-07 19:04:4385
[email protected]5f887612012-03-01 21:34:0686 # For now, Windows *AND* Linux builds that |use_aura| should also
87 # imply using ash. This rule should be removed for the future when
88 # both Linux and Windows are using the aura windows without the ash
89 # interface.
90 ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', {
91 'use_ash%': 1,
92 }],
[email protected]d02c4162012-05-04 20:51:5193 ['use_ash==1', {
94 'use_aura%': 1,
95 }],
[email protected]5f887612012-03-01 21:34:0696
[email protected]ab2017e2012-02-07 01:54:5097 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:3598 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4399 'toolkit_views%': 1,
100 }, {
101 'toolkit_views%': 0,
102 }],
[email protected]1efbaaa2012-04-24 02:43:24103
104 # Enable HiDPI on Mac OS.
105 ['OS=="mac"', {
106 'enable_hidpi%': 1,
107 }],
[email protected]219c7312012-05-10 20:32:40108
[email protected]6155e702012-05-02 17:56:06109 # Enable touch UI on Metro and Chrome OS.
110 ['enable_metro==1 or chromeos==1', {
111 'enable_touch_ui%': 1,
112 }],
[email protected]e72e55b2011-01-06 22:19:30113 ],
114 },
115
116 # Copy conditionally-set variables out one scope.
117 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30118 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43119 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:58120 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16121 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42122 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:27123 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05124 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24125 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06126 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]8973c3a2012-04-25 02:24:18127 'enable_metro%': '<(enable_metro)',
[email protected]08d910e22012-05-11 05:42:35128 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]023d8242011-11-22 01:25:27129
[email protected]8fb0ef02011-05-20 00:53:50130 # We used to provide a variable for changing how libraries were built.
131 # This variable remains until we can clean up all the users.
132 # This needs to be one nested variables dict in so that dependent
133 # gyp files can make use of it in their outer variables. (Yikes!)
134 # http://code.google.com/p/chromium/issues/detail?id=83308
135 'library%': 'static_library',
136
[email protected]e14a9f92009-08-05 19:26:07137 # Override branding to select the desired branding flavor.
138 'branding%': 'Chromium',
139
[email protected]22d6dd72012-05-15 07:29:55140 # Override buildtype to select the desired build flavor.
141 # Dev - everyday build for development/testing
142 # Official - release build (generally implies additional processing)
143 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
144 # conversion is done), some of the things which are now controlled by
145 # 'branding', such as symbol generation, will need to be refactored based
146 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
147 # builds).
148 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27149
[email protected]e72e55b2011-01-06 22:19:30150 # Default architecture we're building for is the architecture we're
151 # building on.
152 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17153
[email protected]e72e55b2011-01-06 22:19:30154 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
155 # are built under a chromium full build (1) or a webkit.org chromium
156 # build (0).
157 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52158
[email protected]e72e55b2011-01-06 22:19:30159 # Set to 1 to enable fast builds. It disables debug info for fastest
160 # compilation.
161 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49162
[email protected]20960e072011-09-20 20:59:01163 # Set to 1 to enable dcheck in release without having to use the flag.
164 'dcheck_always_on%': 0,
165
[email protected]464750f2011-10-24 23:16:18166 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51167 'file_manager_extension%': 0,
168
[email protected]5f16f8a2012-03-14 07:38:23169 # Disable WebUI TaskManager by default.
170 'webui_task_manager%': 0,
[email protected]8b2e9f392011-08-05 04:00:47171
[email protected]e72e55b2011-01-06 22:19:30172 # Python version.
[email protected]a43c5a02011-05-27 06:54:51173 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17174
[email protected]e72e55b2011-01-06 22:19:30175 # Set ARM-v7 compilation flags
176 'armv7%': 0,
177
178 # Set Neon compilation flags (only meaningful if armv7==1).
179 'arm_neon%': 1,
180
181 # The system root for cross-compiles. Default: none.
182 'sysroot%': '',
183
[email protected]945361a2011-09-30 04:38:43184 # The system libdir used for this ABI.
185 'system_libdir%': 'lib',
186
[email protected]e72e55b2011-01-06 22:19:30187 # On Linux, we build with sse2 for Chromium builds.
188 'disable_sse2%': 0,
189
190 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03191 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30192
193 # Variable 'component' is for cases where we would like to build some
194 # components as dynamic shared libraries but still need variable
195 # 'library' for static libraries.
196 # By default, component is set to whatever library is set to and
197 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53198 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30199
[email protected]bb6aba32011-01-07 19:04:43200 # Set to select the Title Case versions of strings in GRD files.
201 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21202
[email protected]98da0042011-02-02 00:10:27203 # Use translations provided by volunteers at launchpad.net. This
204 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19205 'use_third_party_translations%': 0,
206
[email protected]9a425422011-01-11 00:53:18207 # Remoting compilation is enabled by default. Set to 0 to disable.
208 'remoting%': 1,
209
[email protected]a026daa2011-04-20 15:49:51210 # P2P APIs are compiled in by default. Set to 0 to disable.
211 # Also note that this should be enabled for remoting to compile.
212 'p2p_apis%': 1,
213
[email protected]1ec68c42011-06-01 13:56:25214 # Configuration policy is enabled by default. Set to 0 to disable.
215 'configuration_policy%': 1,
216
[email protected]4b58e7d2011-07-11 10:22:56217 # Safe browsing is compiled in by default. Set to 0 to disable.
218 'safe_browsing%': 1,
219
[email protected]9eb100e2011-10-14 05:08:22220 # Speech input is compiled in by default. Set to 0 to disable.
221 'input_speech%': 1,
222
[email protected]7cce3232011-10-28 10:41:57223 # Notifications are compiled in by default. Set to 0 to disable.
224 'notifications%' : 1,
225
[email protected]5d451ad2011-02-11 16:43:46226 # If this is set, the clang plugins used on the buildbot will be used.
227 # Run tools/clang/scripts/update.sh to make sure they are compiled.
228 # This causes 'clang_chrome_plugins_flags' to be set.
229 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08230 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46231
[email protected]f36f3742011-11-21 13:12:14232 # Enable building with ASAN (Clang's -faddress-sanitizer option).
233 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06234 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
235 'asan%': 0,
236
[email protected]00b0a7f2012-01-25 15:30:46237 # Use the provided profiled order file to link Chrome image with it.
238 # This makes Chrome faster by better using CPU cache when executing code.
239 # This is known as PGO (profile guided optimization).
240 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
241 'order_text_section%' : "",
242
[email protected]1ad5a7b2011-06-24 03:15:13243 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
244 # libraries on linux x86-64 and arm, plus ASLR.
245 'linux_fpic%': 1,
246
[email protected]bd7b6fe2012-03-05 21:02:40247 # Whether one-click signin is enabled or not.
248 'enable_one_click_signin%': 0,
249
[email protected]5ffb0a42012-01-27 09:36:11250 # Enable Web Intents support in WebKit, dispatching of intents,
251 # and extensions Web Intents support.
252 'enable_web_intents%': 1,
253
[email protected]6a3cd37e2012-04-17 17:13:34254 # Enable Chrome browser extensions
255 'enable_extensions%': 1,
256
[email protected]5ffb0a42012-01-27 09:36:11257 # Enable Web Intents web content registration via HTML element
258 # and WebUI managing such registrations.
259 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01260
[email protected]dda90ae2011-07-19 22:07:48261 # Webrtc compilation is enabled by default. Set to 0 to disable.
262 'enable_webrtc%': 1,
263
[email protected]67c125d2011-10-11 18:58:22264 # PPAPI by default does not support plugins making calls off the main
265 # thread. Set to 1 to turn on experimental support for out-of-process
266 # plugins to make call of the main thread.
267 'enable_pepper_threading%': 0,
268
[email protected]cdb756ef2012-04-05 18:34:53269 # Enables use of the session service, which is enabled by default.
270 # Support for disabling depends on the platform.
271 'enable_session_service%': 1,
272
[email protected]6b40bb582012-03-15 20:50:38273 # Enables theme support, which is enabled by default. Support for
274 # disabling depends on the platform.
275 'enable_themes%': 1,
276
[email protected]0acdd772012-04-05 22:53:00277 # Enables support for background apps.
278 'enable_background%': 1,
279
[email protected]44879ed2012-04-06 01:11:02280 # Enable the task manager by default.
281 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45282
[email protected]58242012012-04-12 16:14:31283 # Enables support for promo resource service.
284 'enable_promo_resource_service%': 1,
[email protected]44879ed2012-04-06 01:11:02285
[email protected]22d6dd72012-05-15 07:29:55286 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
287 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
288 # the input value also defines the required XI2 minor minimum version.
289 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
290 'use_xi2_mt%': 0,
291
[email protected]9061bee82012-01-16 11:45:17292 # Use of precompiled headers on Windows.
293 #
294 # This is on by default in VS 2010, but off by default for VS
295 # 2008 because of complications that it can cause with our
296 # trybots etc.
297 #
298 # This variable may be explicitly set to 1 (enabled) or 0
299 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
300 # This setting will override the default.
301 #
302 # Note that a setting of 1 is probably suitable for most or all
303 # Windows developers using VS 2008, since precompiled headers
304 # provide a build speedup of 20-25%. There are a couple of
305 # small workarounds you may need to use when using VS 2008 (but
306 # not 2010), see
307 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
308 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16309 'chromium_win_pch%': 0,
310
[email protected]3bb37e62012-04-19 03:40:08311 # Set this to true when building with Clang.
312 # See http://code.google.com/p/chromium/wiki/Clang for details.
313 'clang%': 0,
314
[email protected]18e0f39b2012-01-17 16:47:34315 # Enable plug-in installation by default.
316 'enable_plugin_installation%': 1,
317
[email protected]ddcaa412012-03-30 19:57:29318 # Enable protector service by default.
319 'enable_protector_service%': 1,
320
[email protected]62424a52012-03-18 03:09:50321 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42322 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35323 # Chrome UI.
324 # TODO(asvitkine): Enable this on all platforms and delete this flag.
325 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50326 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35327
[email protected]a9318c72012-03-01 01:29:47328 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
329 # with one of those tools.
330 'build_for_tool%': '',
331
[email protected]01971642012-03-07 14:39:56332 # Whether tests targets should be run, archived or just have the
333 # dependencies verified. All the tests targets have the '_run' suffix,
334 # e.g. base_unittests_run runs the target base_unittests. The test target
335 # always calls tools/isolate/isolate.py. See the script's --help for more
336 # information and the valid --mode values. Meant to be overriden with
337 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13338 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
339 # be done while the builders are being reconfigured to check out test data
340 # files.
[email protected]0ef3a522012-05-15 14:56:33341 'test_isolation_mode%': 'noop',
342 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise
343 # gyp will remove duplicate flags, causing isolate.py to be confused.
344 'test_isolation_outdir%': '<(PRODUCT_DIR)/',
[email protected]01971642012-03-07 14:39:56345
[email protected]81d9b72d2012-03-26 22:29:17346 # Force rlz to use chrome's networking stack.
347 'force_rlz_use_chrome_net%': 1,
348
[email protected]49ae3e52012-04-12 09:50:12349 'platformsdk_path%': '<(DEPTH)/third_party/platformsdk_win7/files',
350 'wix_path%': '<(DEPTH)/third_party/wix',
351
[email protected]bb6aba32011-01-07 19:04:43352 'conditions': [
[email protected]33423fa2011-09-23 18:18:14353 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
354 # the 'conditions' clause. Initial attempts resulted in chromium and
355 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22356 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21357 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22358 }, {
359 'use_skia%': 1,
360 }],
361
[email protected]79e2336c2011-05-12 18:18:34362 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37363 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34364 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37365 }, {
366 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34367 }],
368
[email protected]df9167b2011-11-14 19:15:25369 # A flag for BSD platforms
370 ['OS=="freebsd" or OS=="openbsd"', {
371 'os_bsd%': 1,
372 }, {
373 'os_bsd%': 0,
374 }],
375
[email protected]c329adf82011-10-05 14:34:57376 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42377 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57378 'use_nss%': 1,
379 }, {
380 'use_nss%': 0,
381 }],
[email protected]e0b85a52011-10-06 03:30:42382
[email protected]258dca42011-09-21 00:17:19383 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01384 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19385 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34386 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37387 }, {
[email protected]258dca42011-09-21 00:17:19388 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37389 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34390 }],
[email protected]9a8175892012-03-20 02:11:58391
392 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]17b11af2012-03-21 21:46:17393 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
[email protected]9a8175892012-03-20 02:11:58394 'toolkit_uses_gtk%': 1,
395 }, {
396 'toolkit_uses_gtk%': 0,
397 }],
398
[email protected]efadeacf2011-10-27 19:01:00399 # We always use skia text rendering in Aura on Windows, since GDI
400 # doesn't agree with our BackingStore.
401 # TODO(beng): remove once skia text rendering is on by default.
402 ['use_aura==1 and OS=="win"', {
403 'enable_skia_text%': 1,
404 }],
[email protected]9edeb712011-09-20 21:20:33405
[email protected]63692212010-09-16 00:22:21406 # A flag to enable or disable our compile-time dependency
407 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
408 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49409 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50410 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21411 'use_gnome_keyring%': 0,
412 }, {
413 'use_gnome_keyring%': 1,
414 }],
[email protected]0afe5212010-10-01 18:56:11415
[email protected]bb6aba32011-01-07 19:04:43416 ['toolkit_views==0 or OS=="mac"', {
417 # GTK+ and Mac wants Title Case strings
418 'use_titlecase_in_grd_files%': 1,
419 }],
420
[email protected]5f887612012-03-01 21:34:06421 # Enable file manager extension on Chrome OS.
422 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50423 'file_manager_extension%': 1,
424 }, {
[email protected]3d38d8e2011-04-16 20:48:51425 'file_manager_extension%': 0,
426 }],
[email protected]7de46352011-09-12 15:39:19427
[email protected]febc41db2012-03-24 02:44:43428 # Enable WebUI TaskManager on Chrome OS or Aura.
429 ['chromeos==1 or use_aura==1', {
430 'webui_task_manager%': 1,
[email protected]5f16f8a2012-03-14 07:38:23431 }],
432
[email protected]da1c8d692011-09-20 20:35:01433 ['OS=="android"', {
434 'proprietary_codecs%': 1,
435 'enable_webrtc%': 0,
436 }],
[email protected]839d5172011-10-13 17:18:11437
438 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27439 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01440 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33441 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11442 }, {
[email protected]1ee7c56c2011-10-19 14:51:33443 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11444 }],
[email protected]9061bee82012-01-16 11:45:17445
[email protected]75de7212012-05-12 01:14:46446 # Turn precompiled headers on by default for VS 2010.
[email protected]22d6dd72012-05-15 07:29:55447 ['OS=="win" and MSVS_VERSION=="2010"', {
[email protected]9061bee82012-01-16 11:45:17448 'chromium_win_pch%': 1
449 }],
[email protected]18e0f39b2012-01-17 16:47:34450
[email protected]3d5173ec2012-03-27 04:08:23451 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34452 'enable_plugin_installation%': 0,
453 }, {
454 'enable_plugin_installation%': 1,
455 }],
[email protected]b07806c12012-02-03 22:44:59456
[email protected]ddcaa412012-03-30 19:57:29457 ['OS=="android"', {
458 'enable_protector_service%': 0,
459 }, {
460 'enable_protector_service%': 1,
461 }],
462
[email protected]8d726a42012-02-09 03:49:00463 # linux_use_gold_binary: whether to use the binary checked into
464 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40465 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51466 'linux_use_gold_binary%': 1,
467 }, {
468 'linux_use_gold_binary%': 0,
469 }],
470
[email protected]be239492012-02-09 19:00:17471 # linux_use_gold_flags: whether to use build flags that rely on gold.
472 # On by default for x64 Linux. Temporarily off for ChromeOS as
473 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40474 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17475 'linux_use_gold_flags%': 1,
476 }, {
[email protected]8d726a42012-02-09 03:49:00477 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59478 }],
[email protected]2e22e2f2012-03-15 21:53:10479
480 # Enable automation on platforms other than Android.
481 ['OS=="android"', {
482 'enable_automation%': 0,
483 }, {
484 'enable_automation%': 1,
485 }],
[email protected]3bd47e022012-03-22 04:19:12486
487 # Enable Skia UI text drawing incrementally on different platforms.
488 # http://crbug.com/105550
489 #
490 # On Aura, this allows per-tile painting to be used in the browser
491 # compositor.
[email protected]70a377c2012-04-04 14:01:17492 ['use_aura==1 or OS=="win"', {
[email protected]3bd47e022012-03-22 04:19:12493 'use_canvas_skia%': 1,
494 }],
[email protected]b3f23ba2010-04-26 22:58:17495 ],
[email protected]e14a9f92009-08-05 19:26:07496 },
497
[email protected]e72e55b2011-01-06 22:19:30498 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07499 'branding%': '<(branding)',
500 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27501 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59502 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50503 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44504 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33505 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58506 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16507 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42508 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57509 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25510 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34511 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19512 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34513 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22514 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34515 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21516 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11517 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22518 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44519 'chromeos%': '<(chromeos)',
[email protected]2cc81d32011-10-04 17:03:18520 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05521 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24522 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06523 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]8973c3a2012-04-25 02:24:18524 'enable_metro%': '<(enable_metro)',
[email protected]f56797b2011-09-25 00:04:35525 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20526 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47527 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21528 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54529 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01530 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36531 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43532 'armv7%': '<(armv7)',
533 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23534 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43535 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22536 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52537 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43538 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17539 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18540 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40541 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48542 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16543 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51544 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25545 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56546 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22547 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57548 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46549 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06550 'asan%': '<(asan)',
[email protected]00b0a7f2012-01-25 15:30:46551 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34552 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07553 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11554 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34555 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]ddcaa412012-03-30 19:57:29556 'enable_protector_service%': '<(enable_protector_service)',
[email protected]cdb756ef2012-04-05 18:34:53557 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38558 'enable_themes%': '<(enable_themes)',
[email protected]0acdd772012-04-05 22:53:00559 'enable_background%': '<(enable_background)',
[email protected]58242012012-04-12 16:14:31560 'enable_promo_resource_service%': '<(enable_promo_resource_service)',
[email protected]b07806c12012-02-03 22:44:59561 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00562 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50563 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33564 'test_isolation_mode%': '<(test_isolation_mode)',
565 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10566 'enable_automation%': '<(enable_automation)',
[email protected]81d9b72d2012-03-26 22:29:17567 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)',
[email protected]44879ed2012-04-06 01:11:02568 'enable_task_manager%': '<(enable_task_manager)',
[email protected]49ae3e52012-04-12 09:50:12569 'platformsdk_path%': '<(platformsdk_path)',
570 'wix_path%': '<(wix_path)',
[email protected]08d910e22012-05-11 05:42:35571 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]01971642012-03-07 14:39:56572
[email protected]371e1092011-10-12 20:37:36573 # Use system yasm instead of bundled one.
574 'use_system_yasm%': 0,
575
[email protected]cd00bd862012-02-29 00:40:36576 # Default to enabled PIE; this is important for ASLR but we may need to be
577 # able to turn it off for various reasons.
578 'linux_disable_pie%': 0,
579
[email protected]caa95c82009-11-23 22:39:32580 # The release channel that this build targets. This is used to restrict
581 # channel-specific build options, like which installer packages to create.
582 # The default is 'all', which does no channel-specific filtering.
583 'channel%': 'all',
584
[email protected]b3fb8092009-03-12 19:09:24585 # Override chromium_mac_pch and set it to 0 to suppress the use of
586 # precompiled headers on the Mac. Prefix header injection may still be
587 # used, but prefix headers will not be precompiled. This is useful when
588 # using distcc to distribute a build to compile slaves that don't
589 # share the same compiler executable as the system driving the compilation,
590 # because precompiled headers rely on pointers into a specific compiler
591 # executable's image. Setting this to 0 is needed to use an experimental
592 # Linux-Mac cross compiler distcc farm.
593 'chromium_mac_pch%': 1,
594
[email protected]3224dcd2009-09-16 17:31:25595 # Mac OS X SDK and deployment target support.
596 # The SDK identifies the version of the system headers that will be used,
597 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
598 # "Maximum allowed" refers to the operating system version whose APIs are
599 # available in the headers.
600 # The deployment target identifies the minimum system version that the
601 # built products are expected to function on. It corresponds to the
602 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
603 # To ensure these macros are available, #include <AvailabilityMacros.h>.
604 # Additional documentation on these macros is available at
605 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
606 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
607 # deployment target to 10.5. Other projects, such as O3D, may override
608 # these defaults.
609 'mac_sdk%': '10.5',
610 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59611
[email protected]27b687ec42012-03-26 22:22:15612 # The default value for mac_strip in target_defaults. This cannot be
613 # set there, per the comment about variable% in a target_defaults.
614 'mac_strip_release%': 1,
615
[email protected]f5ecbba12009-04-03 04:35:18616 # Set to 1 to enable code coverage. In addition to build changes
617 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
618 # project file called "coverage".
619 # Currently ignored on Windows.
620 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49621
[email protected]7477ea6f2009-12-22 23:28:15622 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47623 # environment variable, the libcmt shim it uses sometimes gets in
624 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
625 # 'win_use_allocator_shim': 0,
626 # 'win_release_RuntimeLibrary': 2
627 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52628 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11629
[email protected]95ff8082009-11-13 22:21:01630 # Whether usage of OpenMAX is enabled.
631 'enable_openmax%': 0,
632
[email protected]d01120e62010-05-10 17:04:48633 # Whether proprietary audio/video codecs are assumed to be included with
634 # this build (only meaningful if branding!=Chrome).
635 'proprietary_codecs%': 0,
636
[email protected]e5b2eaa2009-04-14 01:39:12637 # TODO(bradnelson): eliminate this when possible.
638 # To allow local gyp files to prevent release.vsprops from being included.
639 # Yes(1) means include release.vsprops.
640 # Once all vsprops settings are migrated into gyp, this can go away.
641 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23642
[email protected]cbd5fd52009-08-26 00:14:27643 # TODO(bradnelson): eliminate this when possible.
644 # To allow local gyp files to override additional linker options for msvs.
645 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19646 'msvs_use_common_linker_extras%': 1,
647
[email protected]1ffb6502009-06-02 07:46:24648 # TODO(sgk): eliminate this if possible.
649 # It would be nicer to support this via a setting in 'target_defaults'
650 # in chrome/app/locales/locales.gypi overriding the setting in the
651 # 'Debug' configuration in the 'target_defaults' dict below,
652 # but that doesn't work as we'd like.
653 'msvs_debug_link_incremental%': '2',
654
[email protected]1f790ef2011-01-11 20:45:36655 # Needed for some of the largest modules.
656 'msvs_debug_link_nonincremental%': '1',
657
[email protected]5ab8f482011-08-18 18:30:06658 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
659 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51660 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06661
[email protected]573136142009-07-15 22:48:37662 # This is the location of the sandbox binary. Chrome looks for this before
663 # running the zygote process. If found, and SUID, it will be used to
664 # sandbox the zygote process and, thus, all renderer processes.
665 'linux_sandbox_path%': '',
666
[email protected]ad6d2c42009-09-15 20:13:38667 # Set this to true to enable SELinux support.
668 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57669
[email protected]3bb37e62012-04-19 03:40:08670 # Clang stuff.
671 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24672 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15673
[email protected]5e781232011-01-28 02:57:59674 # These two variables can be set in GYP_DEFINES while running
675 # |gclient runhooks| to let clang run a plugin in every compilation.
676 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
677 # Example:
[email protected]93120fe2011-02-03 20:46:42678 # 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:59679
680 'clang_load%': '',
681 'clang_add_plugin%': '',
682
[email protected]da1c8d692011-09-20 20:35:01683 # The default type of gtest.
684 'gtest_target_type%': 'executable',
685
[email protected]7664ab32011-02-01 23:35:25686 # Enable sampling based profiler.
687 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
688 'profiling%': '0',
689
[email protected]93b373502011-08-16 19:06:22690 # Enable strict glibc debug mode.
691 'glibcxx_debug%': 0,
692
[email protected]36532f332010-08-25 00:22:01693 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
694 'linux_breakpad%': 0,
695 # And if we want to dump symbols for Breakpad-enabled builds.
696 'linux_dump_symbols%': 0,
697 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03698 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49699 # Strip the test binaries needed for Linux reliability tests.
700 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03701
[email protected]46ce5b562010-06-16 18:39:53702 # Enable TCMalloc.
703 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24704
[email protected]39ca7de2010-04-16 08:04:03705 # Disable TCMalloc's debugallocation.
706 'linux_use_debugallocation%': 0,
707
[email protected]d8b60602010-03-26 09:41:22708 # Disable TCMalloc's heapchecker.
709 'linux_use_heapchecker%': 0,
710
[email protected]64e2d4a42010-08-27 10:13:21711 # Disable shadow stack keeping used by heapcheck to unwind the stacks
712 # better.
713 'linux_keep_shadow_stacks%': 0,
714
[email protected]556c5d72010-06-10 05:45:01715 # Set to 1 to link against libgnome-keyring instead of using dlopen().
716 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35717 # Set to 1 to link against gsettings APIs instead of using dlopen().
718 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01719
[email protected]77c1b29392009-12-04 06:21:29720 # Set Thumb compilation flags.
721 'arm_thumb%': 0,
722
[email protected]53e0f642010-03-05 01:41:56723 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
724 # arm_neon==0).
725 'arm_fpu%': 'vfpv3',
726
[email protected]5252af72012-05-04 19:26:40727 # Set ARM float abi compilation flag.
728 'arm_float_abi%': 'softfp',
729
[email protected]9821d0d2010-04-16 22:40:37730 # Enable new NPDevice API.
731 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50732
733 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14734 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50735
[email protected]6f51b27e2010-06-22 20:43:53736 # Enable a variable used elsewhere throughout the GYP files to determine
737 # whether to compile in the sources for the GPU plugin / process.
738 'enable_gpu%': 1,
739
[email protected]e72e55b2011-01-06 22:19:30740 # .gyp files or targets should set chromium_code to 1 if they build
741 # Chromium-specific code, as opposed to external code. This variable is
742 # used to control such things as the set of warnings to enable, and
743 # whether warnings are treated as errors.
744 'chromium_code%': 0,
745
[email protected]8d726a42012-02-09 03:49:00746 'release_valgrind_build%': 0,
747
[email protected]b1eb341c2011-11-09 18:46:07748 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
749 'enable_wexit_time_destructors%': 0,
750
[email protected]e72e55b2011-01-06 22:19:30751 # Set to 1 to compile with the built in pdf viewer.
752 'internal_pdf%': 0,
753
754 # This allows to use libcros from the current system, ie. /usr/lib/
755 # The cros_api will be pulled in as a static library, and all headers
756 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43757 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30758
[email protected]e72e55b2011-01-06 22:19:30759 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
760 # so Cocoa is happy (http://crbug.com/20441).
761 'locales': [
762 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
763 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
764 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19765 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30766 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
767 'vi', 'zh-CN', 'zh-TW',
768 ],
769
[email protected]cc0322d2011-07-24 09:29:19770 # Pseudo locales are special locales which are used for testing and
771 # debugging. They don't get copied to the final app. For more info,
772 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
773 'pseudo_locales': [
774 'fake-bidi',
775 ],
776
[email protected]bb6aba32011-01-07 19:04:43777 'grit_defines': [],
778
[email protected]bd3bd442011-03-28 07:58:51779 # If debug_devtools is set to 1, JavaScript files for DevTools are
780 # stored as is and loaded from disk. Otherwise, a concatenated file
781 # is stored in resources.pak. It is still possible to load JS files
782 # from disk by passing --debug-devtools cmdline switch.
783 'debug_devtools%': 0,
784
[email protected]464750f2011-10-24 23:16:18785 # The Java Bridge is not compiled in by default.
786 'java_bridge%': 0,
787
[email protected]33e1c372011-12-14 16:32:07788 # This flag is only used when disable_nacl==0 and disables all those
789 # subcomponents which would require the installation of a native_client
790 # untrusted toolchain.
791 'disable_nacl_untrusted%': 0,
792
[email protected]407dfa632011-12-23 11:59:35793 # Disable Dart by default.
794 'enable_dart%': 0,
795
[email protected]ff10b132012-02-29 22:53:30796 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
797 'msbuild_toolset%': '',
798
[email protected]836285f22012-04-03 16:19:26799 # Native Client is enabled by default.
800 'disable_nacl%': 0,
801
[email protected]49ae3e52012-04-12 09:50:12802 'platformsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py <(platformsdk_path))',
803 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
804
[email protected]912c55c2009-07-31 23:33:55805 'conditions': [
[email protected]da1c8d692011-09-20 20:35:01806 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10807 # This will set gcc_version to XY if you are running gcc X.Y.*.
808 # This is used to tweak build flags for gcc 4.4.
809 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23810 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43811 '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:27812 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10813 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27814 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27815 }],
[email protected]4c9cc6c2009-10-01 18:54:57816 # All Chrome builds have breakpad symbols, but only process the
817 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08818 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57819 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57820 }],
[email protected]cbd5fd52009-08-26 00:14:27821 ],
[email protected]da1c8d692011-09-20 20:35:01822 }], # os_posix==1 and OS!="mac" and OS!="android"
823 ['OS=="android"', {
824 # Location of Android NDK.
825 'variables': {
826 'variables': {
827 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
[email protected]219c7312012-05-10 20:32:40828 # Android uses x86 instead of ia32 for their target_arch
[email protected]febd3572012-05-03 09:17:45829 # designation.
[email protected]219c7312012-05-10 20:32:40830 # TODO(wistoch): Adjust the target_arch naming scheme to avoid
[email protected]febd3572012-05-03 09:17:45831 # confusion.
832 # http://crbug.com/125329
833 'conditions': [
834 ['target_arch == "ia32"', {
835 'target_arch': 'x86',
836 }],
837 ],
[email protected]bb6aba32011-01-07 19:04:43838
[email protected]da1c8d692011-09-20 20:35:01839 # Switch between different build types, currently only '0' is
840 # supported.
841 'android_build_type%': 0,
842 },
843 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febc41db2012-03-24 02:44:43844 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)',
[email protected]da1c8d692011-09-20 20:35:01845 'android_build_type%': '<(android_build_type)',
846 },
847 'android_ndk_root%': '<(android_ndk_root)',
848 'android_ndk_sysroot': '<(android_ndk_sysroot)',
849 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
850 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
851
852 # Uses Android's crash report system
853 'linux_breakpad%': 0,
854
855 # Always uses openssl.
856 'use_openssl%': 1,
857
858 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:02859 'enable_task_manager%': 0,
[email protected]da1c8d692011-09-20 20:35:01860 'safe_browsing%': 0,
861 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22862 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56863 'enable_web_intents%': 0,
[email protected]6a3cd37e2012-04-17 17:13:34864 'enable_extensions%': 0,
[email protected]464750f2011-10-24 23:16:18865 'java_bridge%': 1,
[email protected]6b40bb582012-03-15 20:50:38866 # Android does not support themes.
867 'enable_themes%': 0,
[email protected]58242012012-04-12 16:14:31868
869 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:00870 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:11871
[email protected]58242012012-04-12 16:14:31872 # Android does not support promo resources service.
873 'enable_promo_resource_service%': 0,
874
[email protected]cdb756ef2012-04-05 18:34:53875 # Sessions are store separately in the Java side.
876 'enable_session_service%': 0,
877
[email protected]5fd2e842012-03-01 00:29:11878 # Set to 1 once we have a notification system for Android.
879 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57880 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01881
[email protected]c6911392012-03-24 04:44:41882 'gtest_target_type%': '<(gtest_target_type)',
[email protected]d9f96952012-04-19 21:02:09883 # TODO(jrg): when 'gtest_target_type'=='shared_libary' and
884 # OS==android, make all gtest_targets depend on
885 # testing/android/native_test.gyp:native_test_apk.
886 ### 'gtest_target_type': 'shared_libary',
[email protected]da1c8d692011-09-20 20:35:01887
888 # Uses system APIs for decoding audio and video.
889 'use_libffmpeg%': '0',
890
891 # Always use the chromium skia. The use_system_harfbuzz needs to
892 # match use_system_skia.
893 'use_system_skia%': '0',
894 'use_system_harfbuzz%': '0',
895
896 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28897 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01898
[email protected]7c3dc4732012-04-13 07:37:15899 # TODO(yfriedman): Remove once unit_tests can link for Android.
900 # To override it specify:
901 # GYP_DEFINES="$GYP_DEFINES android_unit_test_target_type=executable"
902 # android_gyp
903 'android_unit_test_target_type%': 'static_library',
904
[email protected]da1c8d692011-09-20 20:35:01905 # Choose static link by build type.
906 'conditions': [
907 ['android_build_type==0', {
908 'static_link_system_icu%': 1,
909 }, {
910 'static_link_system_icu%': 0,
911 }],
912 ],
913 # Enable to use system sqlite.
914 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16915 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01916 'use_system_libjpeg%': '<(android_build_type)',
917 # Enable to use the system libexpat.
918 'use_system_libexpat%': '<(android_build_type)',
919 # Enable to use the system stlport, otherwise statically
920 # link the NDK one?
921 'use_system_stlport%': '<(android_build_type)',
922 # Copy it out one scope.
923 'android_build_type%': '<(android_build_type)',
924 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07925 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11926 # Enable clang on mac by default!
927 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56928 # Compile in Breakpad support by default so that it can be
929 # tested, even if it is not enabled by default at runtime.
930 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07931 'conditions': [
932 # mac_product_name is set to the name of the .app bundle as it should
933 # appear on disk. This duplicates data from
934 # chrome/app/theme/chromium/BRANDING and
935 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
936 # these names into the build system.
937 ['branding=="Chrome"', {
938 'mac_product_name%': 'Google Chrome',
939 }, { # else: branding!="Chrome"
940 'mac_product_name%': 'Chromium',
941 }],
942
[email protected]e14a9f92009-08-05 19:26:07943 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56944 # Enable uploading crash dumps.
945 'mac_breakpad_uploads%': 1,
946 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07947 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56948 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07949 'mac_keystone%': 1,
950 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56951 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07952 'mac_breakpad%': 0,
953 'mac_keystone%': 0,
954 }],
955 ],
956 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43957
[email protected]912c55c2009-07-31 23:33:55958 ['OS=="win"', {
959 'conditions': [
[email protected]8974e042010-06-21 18:06:52960 ['component=="shared_library"', {
961 'win_use_allocator_shim%': 0,
962 }],
[email protected]2212d272011-12-20 21:37:37963 # Whether to use multiple cores to compile with visual studio. This is
964 # optional because it sometimes causes corruption on VS 2005.
965 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55966 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13967 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55968 },{
969 'msvs_multi_core_compile%': 1,
970 }],
[email protected]10bb8c92009-08-07 21:16:03971 # Don't do incremental linking for large modules on 32-bit.
972 ['MSVS_OS_BITS==32', {
973 'msvs_large_module_debug_link_mode%': '1', # No
974 },{
975 'msvs_large_module_debug_link_mode%': '2', # Yes
976 }],
[email protected]3e2648a2011-03-21 20:58:50977 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
978 'msvs_express%': 1,
979 'secure_atl%': 0,
980 },{
981 'msvs_express%': 0,
982 'secure_atl%': 1,
983 }],
[email protected]912c55c2009-07-31 23:33:55984 ],
[email protected]ef4fa4072009-12-04 22:46:50985 'nacl_win64_defines': [
986 # This flag is used to minimize dependencies when building
987 # Native Client loader for 64-bit Windows.
988 'NACL_WIN64',
989 ],
[email protected]912c55c2009-07-31 23:33:55990 }],
[email protected]bb6aba32011-01-07 19:04:43991
[email protected]febd3572012-05-03 09:17:45992 ['os_posix==1 and chromeos==0 and OS!="android"', {
[email protected]8e553f492010-10-25 20:05:44993 'use_cups%': 1,
994 }, {
995 'use_cups%': 0,
996 }],
[email protected]bb6aba32011-01-07 19:04:43997
[email protected]19fe8f0b2010-12-07 07:27:27998 # Set the relative path from this file to the GYP file of the JPEG
999 # library used by Chromium.
1000 ['use_libjpeg_turbo==1', {
1001 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1002 }, {
1003 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
1004 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:431005
[email protected]abcc9ac2011-05-16 20:04:351006 # Options controlling the use of GConf (the classic GNOME configuration
1007 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311008 ['chromeos==1', {
1009 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351010 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311011 }, {
1012 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351013 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311014 }],
1015
[email protected]4de39f82011-03-28 12:01:291016 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291017 ['branding=="Chrome"', {
1018 # TODO(mmoss) The .grd files look for _google_chrome, but for
1019 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291020 'grit_defines': ['-D', '_google_chrome',
1021 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291022 }, {
[email protected]4de39f82011-03-28 12:01:291023 'grit_defines': ['-D', '_chromium',
1024 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291025 }],
[email protected]bb6aba32011-01-07 19:04:431026 ['chromeos==1', {
1027 'grit_defines': ['-D', 'chromeos'],
1028 }],
1029 ['toolkit_views==1', {
1030 'grit_defines': ['-D', 'toolkit_views'],
1031 }],
[email protected]8dd791d2011-09-16 16:37:301032 ['use_aura==1', {
1033 'grit_defines': ['-D', 'use_aura'],
1034 }],
[email protected]ed329be2012-01-03 22:02:161035 ['use_ash==1', {
1036 'grit_defines': ['-D', 'use_ash'],
1037 }],
[email protected]c329adf82011-10-05 14:34:571038 ['use_nss==1', {
1039 'grit_defines': ['-D', 'use_nss'],
1040 }],
[email protected]2cc81d32011-10-04 17:03:181041 ['use_virtual_keyboard==1', {
1042 'grit_defines': ['-D', 'use_virtual_keyboard'],
1043 }],
[email protected]e47c32032011-03-01 19:26:201044 ['file_manager_extension==1', {
1045 'grit_defines': ['-D', 'file_manager_extension'],
1046 }],
[email protected]8b2e9f392011-08-05 04:00:471047 ['webui_task_manager==1', {
1048 'grit_defines': ['-D', 'webui_task_manager'],
1049 }],
[email protected]9a425422011-01-11 00:53:181050 ['remoting==1', {
1051 'grit_defines': ['-D', 'remoting'],
1052 }],
[email protected]bb6aba32011-01-07 19:04:431053 ['use_titlecase_in_grd_files==1', {
1054 'grit_defines': ['-D', 'use_titlecase'],
1055 }],
[email protected]00dc155832011-02-01 18:51:191056 ['use_third_party_translations==1', {
1057 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:121058 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161059 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1060 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:121061 ],
[email protected]00dc155832011-02-01 18:51:191062 }],
[email protected]da1c8d692011-09-20 20:35:011063 ['OS=="android"', {
1064 'grit_defines': ['-D', 'android'],
1065 }],
[email protected]6a3cd37e2012-04-17 17:13:341066 ['enable_extensions==1', {
1067 'grit_defines': ['-D', 'enable_extensions'],
1068 }],
[email protected]3bb37e62012-04-19 03:40:081069 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]5d451ad2011-02-11 16:43:461070 'clang_chrome_plugins_flags':
1071 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
1072 }],
[email protected]cfa2e1102011-04-27 22:30:231073
[email protected]452da69e2011-05-24 02:36:051074 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:271075 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:231076 'use_ibus%': 1,
1077 }, {
1078 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:561079 }],
1080
[email protected]5ffb0a42012-01-27 09:36:111081 ['enable_web_intents_tag==1', {
1082 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071083 }],
1084
[email protected]92799b632011-08-15 14:33:061085 ['asan==1', {
1086 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:201087 # Do not use Chrome plugins for Clang. The Clang version in
1088 # third_party/asan may be different from the default one.
1089 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:061090 }],
[email protected]a9318c72012-03-01 01:29:471091
1092 # On valgrind bots, override the optimizer settings so we don't inline too
1093 # much and make the stacks harder to figure out.
1094 #
1095 # TODO(rnk): Kill off variables that no one else uses and just implement
1096 # them under a build_for_tool== condition.
1097 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1098 # gcc flags
1099 'mac_debug_optimization': '1',
1100 'mac_release_optimization': '1',
1101 'release_optimize': '1',
1102 'no_gc_sections': 1,
1103 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1104 '-fno-builtin -fno-optimize-sibling-calls',
1105 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1106 '-fno-builtin -fno-optimize-sibling-calls',
1107
1108 # MSVS flags for TSan on Pin and Windows.
1109 'win_debug_RuntimeChecks': '0',
1110 'win_debug_disable_iterator_debugging': '1',
1111 'win_debug_Optimization': '1',
1112 'win_debug_InlineFunctionExpansion': '0',
1113 'win_release_InlineFunctionExpansion': '0',
1114 'win_release_OmitFramePointers': '0',
1115
1116 'linux_use_tcmalloc': 1,
1117 'release_valgrind_build': 1,
1118 'werror': '',
1119 'component': 'static_library',
1120 'use_system_zlib': 0,
1121 }],
1122
1123 # Build tweaks for DrMemory.
1124 # TODO(rnk): Combine with tsan config to share the builder.
1125 # http://crbug.com/108155
1126 ['build_for_tool=="drmemory"', {
1127 # DrMemory can't handle the debug CRT dll, so build static.
1128 'component': 'static_library',
1129 # These runtime checks force initialization of stack vars which blocks
1130 # DrMemory's uninit detection.
1131 'win_debug_RuntimeChecks': '0',
1132 # Iterator debugging is slow.
1133 'win_debug_disable_iterator_debugging': '1',
1134 # Try to disable optimizations that mess up stacks in a release build.
1135 'win_release_InlineFunctionExpansion': '0',
1136 'win_release_OmitFramePointers': '0',
1137 # Keep the code under #ifndef NVALGRIND.
1138 'release_valgrind_build': 1,
1139 }],
[email protected]912c55c2009-07-31 23:33:551140 ],
[email protected]a9318c72012-03-01 01:29:471141
[email protected]35958422011-09-28 02:03:591142 # List of default apps to install in new profiles. The first list contains
1143 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061144 # contains the destination location for each of the files. When a crx
1145 # is added or removed from the list, the chrome/browser/resources/
1146 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591147 'default_apps_list': [
1148 'browser/resources/default_apps/external_extensions.json',
[email protected]219c7312012-05-10 20:32:401149 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591150 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061151 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591152 'browser/resources/default_apps/youtube.crx',
1153 ],
1154 'default_apps_list_linux_dest': [
1155 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
[email protected]219c7312012-05-10 20:32:401156 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591157 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061158 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591159 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1160 ],
[email protected]2f80c312009-02-25 21:26:551161 },
1162 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261163 'variables': {
[email protected]a6e22132010-02-10 20:43:181164 # The condition that operates on chromium_code is in a target_conditions
1165 # section, and will not have access to the default fallback value of
1166 # chromium_code at the top of this file, or to the chromium_code
1167 # variable placed at the root variables scope of .gyp files, because
1168 # those variables are not set at target scope. As a workaround,
1169 # if chromium_code is not set at target scope, define it in target scope
1170 # to contain whatever value it has during early variable expansion.
1171 # That's enough to make it available during target conditional
1172 # processing.
1173 'chromium_code%': '<(chromium_code)',
1174
[email protected]7e0d664a2009-12-03 21:07:471175 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291176 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001177 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331178
[email protected]7e0d664a2009-12-03 21:07:471179 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1180 'win_release_Optimization%': '2', # 2 = /Os
1181 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331182
1183 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241184 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:331185 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:241186 # Tri-state: blank is default, 1 on, 0 off
1187 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331188
[email protected]6b0507b2010-05-07 07:41:211189 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1190 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331191
[email protected]6b0507b2010-05-07 07:41:211192 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151193 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1194 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331195
[email protected]fac10d12010-11-08 16:00:311196 # VS inserts quite a lot of extra checks to algorithms like
1197 # std::partial_sort in Debug build which make them O(N^2)
1198 # instead of O(N*logN). This is particularly slow under memory
1199 # tools like ThreadSanitizer so we want it to be disablable.
1200 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1201 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471202
[email protected]ffd984b12009-09-11 19:37:001203 'release_extra_cflags%': '',
1204 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001205
1206 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521207
[email protected]ef5c5f1b2011-12-17 02:16:241208 # the non-qualified versions are widely assumed to be *nix-only
1209 'win_release_extra_cflags%': '',
1210 'win_debug_extra_cflags%': '',
1211
[email protected]b1eb341c2011-11-09 18:46:071212 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1213 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1214
[email protected]ef3326702011-10-06 18:06:441215 # Only used by Windows build for now. Can be used to build into a
1216 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1217 # output files in src/build/VS2010_{Debug,Release}.
1218 'build_dir_prefix%': '',
1219
[email protected]8974e042010-06-21 18:06:521220 'conditions': [
1221 ['OS=="win" and component=="shared_library"', {
1222 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161223 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1224 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521225 }, {
1226 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1227 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1228 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1229 }],
1230 ],
[email protected]1c966092009-08-20 21:19:261231 },
[email protected]32aa8cc2009-03-04 21:36:391232 'conditions': [
[email protected]ff10b132012-02-29 22:53:301233 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1234 'msbuild_toolset': '<(msbuild_toolset)',
1235 }],
[email protected]32aa8cc2009-03-04 21:36:391236 ['branding=="Chrome"', {
1237 'defines': ['GOOGLE_CHROME_BUILD'],
1238 }, { # else: branding!="Chrome"
1239 'defines': ['CHROMIUM_BUILD'],
1240 }],
[email protected]81d9b72d2012-03-26 22:29:171241 ['branding=="Chrome" and (OS=="win" or OS=="mac")', {
1242 'defines': ['ENABLE_RLZ'],
1243 }],
[email protected]63e39a282011-07-13 20:41:281244 ['component=="shared_library"', {
1245 'defines': ['COMPONENT_BUILD'],
1246 }],
[email protected]06c756182010-04-27 18:31:311247 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171248 'defines': ['TOOLKIT_VIEWS=1'],
1249 }],
[email protected]1ee7c56c2011-10-19 14:51:331250 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111251 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1252 }],
[email protected]41423092011-08-25 15:39:581253 ['use_aura==1', {
1254 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351255 }],
[email protected]ed329be2012-01-03 22:02:161256 ['use_ash==1', {
1257 'defines': ['USE_ASH=1'],
1258 }],
[email protected]c329adf82011-10-05 14:34:571259 ['use_nss==1', {
1260 'defines': ['USE_NSS=1'],
1261 }],
[email protected]bd7b6fe2012-03-05 21:02:401262 ['enable_one_click_signin==1', {
1263 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1264 }],
[email protected]a47aa892011-11-22 03:12:311265 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1266 # TODO(erg): We are progressively sealing up use of deprecated features
1267 # in gtk in preparation for an eventual porting to gtk3.
1268 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1269 }],
[email protected]fdc5bed2010-01-09 01:16:571270 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291271 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501272 }],
[email protected]2cc81d32011-10-04 17:03:181273 ['use_virtual_keyboard==1', {
1274 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1275 }],
[email protected]f56797b2011-09-25 00:04:351276 ['use_xi2_mt!=0', {
1277 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1278 }],
[email protected]e47c32032011-03-01 19:26:201279 ['file_manager_extension==1', {
1280 'defines': ['FILE_MANAGER_EXTENSION=1'],
1281 }],
[email protected]8b2e9f392011-08-05 04:00:471282 ['webui_task_manager==1', {
1283 'defines': ['WEBUI_TASK_MANAGER=1'],
1284 }],
[email protected]7664ab32011-02-01 23:35:251285 ['profiling==1', {
1286 'defines': ['ENABLE_PROFILING=1'],
1287 }],
[email protected]93b373502011-08-16 19:06:221288 ['OS=="linux" and glibcxx_debug==1', {
1289 'defines': ['_GLIBCXX_DEBUG=1',],
1290 'cflags_cc!': ['-fno-rtti'],
1291 'cflags_cc+': ['-frtti', '-g'],
1292 }],
[email protected]542bf24a2010-06-11 23:08:171293 ['remoting==1', {
1294 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001295 }],
[email protected]5b87e782012-02-09 18:19:321296 ['enable_webrtc==1', {
1297 'defines': ['ENABLE_WEBRTC=1'],
1298 }],
[email protected]a026daa2011-04-20 15:49:511299 ['p2p_apis==1', {
1300 'defines': ['ENABLE_P2P_APIS=1'],
1301 }],
[email protected]d01120e62010-05-10 17:04:481302 ['proprietary_codecs==1', {
1303 'defines': ['USE_PROPRIETARY_CODECS'],
1304 }],
[email protected]67c125d2011-10-11 18:58:221305 ['enable_pepper_threading==1', {
1306 'defines': ['ENABLE_PEPPER_THREADING'],
1307 }],
[email protected]7ddea9802012-02-22 23:08:051308 ['enable_viewport==1', {
1309 'defines': ['ENABLE_VIEWPORT'],
1310 }],
[email protected]f31e2e52011-07-14 16:01:191311 ['configuration_policy==1', {
1312 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1313 }],
[email protected]9eb100e2011-10-14 05:08:221314 ['input_speech==1', {
1315 'defines': ['ENABLE_INPUT_SPEECH'],
1316 }],
[email protected]7cce3232011-10-28 10:41:571317 ['notifications==1', {
1318 'defines': ['ENABLE_NOTIFICATIONS'],
1319 }],
[email protected]1efbaaa2012-04-24 02:43:241320 ['enable_hidpi==1', {
1321 'defines': ['ENABLE_HIDPI=1'],
1322 }],
[email protected]8973c3a2012-04-25 02:24:181323 ['enable_metro==1', {
1324 'defines': ['ENABLE_METRO=1'],
1325 }],
[email protected]9c1949e2009-10-02 19:59:541326 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171327
[email protected]9c1949e2009-10-02 19:59:541328 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141329 # For Windows and Mac, we don't genererate debug information.
1330 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541331 'msvs_settings': {
1332 'VCLinkerTool': {
1333 'GenerateDebugInformation': 'false',
1334 },
1335 'VCCLCompilerTool': {
1336 'DebugInformationFormat': '0',
1337 }
[email protected]da4d4ea2011-09-22 20:23:141338 },
1339 'xcode_settings': {
1340 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1341 },
[email protected]1cc2fa72010-07-03 08:49:241342 }, { # else: OS != "win", generate less debug information.
1343 'variables': {
1344 'debug_extra_cflags': '-g1',
1345 },
[email protected]37c84192010-04-14 21:37:401346 }],
[email protected]aecc4d12011-01-19 05:32:331347 # Clang creates chubby debug information, which makes linking very
1348 # slow. For now, don't create debug information with clang. See
1349 # http://crbug.com/70000
1350 ['OS=="linux" and clang==1', {
1351 'variables': {
1352 'debug_extra_cflags': '-g0',
1353 },
1354 }],
[email protected]9c1949e2009-10-02 19:59:541355 ], # conditions for fastbuild.
1356 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011357 ['dcheck_always_on!=0', {
1358 'defines': ['DCHECK_ALWAYS_ON=1'],
1359 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381360 ['selinux==1', {
1361 'defines': ['CHROMIUM_SELINUX=1'],
1362 }],
[email protected]7e0d664a2009-12-03 21:07:471363 ['win_use_allocator_shim==0', {
1364 'conditions': [
1365 ['OS=="win"', {
1366 'defines': ['NO_TCMALLOC'],
1367 }],
1368 ],
1369 }],
[email protected]43f28f832010-02-03 02:28:481370 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151371 'defines': [
1372 'ENABLE_GPU=1',
1373 ],
1374 }],
[email protected]b1c2a5542010-10-08 12:44:401375 ['use_openssl==1', {
1376 'defines': [
1377 'USE_OPENSSL=1',
1378 ],
1379 }],
[email protected]ed154592010-04-29 00:18:501380 ['enable_eglimage==1', {
1381 'defines': [
1382 'ENABLE_EGLIMAGE=1',
1383 ],
1384 }],
[email protected]7d7564a12011-06-21 19:20:221385 ['use_skia==1', {
1386 'defines': [
1387 'USE_SKIA=1',
1388 ],
1389 }],
[email protected]f5ecbba12009-04-03 04:35:181390 ['coverage!=0', {
1391 'conditions': [
1392 ['OS=="mac"', {
1393 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041394 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1395 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471396 },
[email protected]e4fb84c2009-12-28 20:45:431397 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101398 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431399 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181400 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431401 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181402 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471403 }],
1404 ],
1405 }],
[email protected]da1c8d692011-09-20 20:35:011406 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181407 'cflags': [ '-ftest-coverage',
1408 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001409 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181410 }],
[email protected]e8f6ff42009-07-07 18:20:531411 # Finally, for Windows, we simply turn on profiling.
1412 ['OS=="win"', {
1413 'msvs_settings': {
1414 'VCLinkerTool': {
1415 'Profile': 'true',
1416 },
[email protected]10bb8c92009-08-07 21:16:031417 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531418 # /Z7, not /Zi, so coverage is happyb
1419 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161420 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531421 }
1422 }
1423 }], # OS==win
1424 ], # conditions for coverage
1425 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381426 ['OS=="win"', {
1427 'defines': [
1428 '__STD_C',
1429 '_CRT_SECURE_NO_DEPRECATE',
1430 '_SCL_SECURE_NO_DEPRECATE',
1431 ],
1432 'include_dirs': [
1433 '<(DEPTH)/third_party/wtl/include',
1434 ],
1435 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021436 ['enable_task_manager==1', {
1437 'defines': [
1438 'ENABLE_TASK_MANAGER=1',
1439 ],
1440 }],
[email protected]41ed4e82011-08-25 23:02:071441 ['enable_web_intents==1', {
1442 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471443 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071444 ],
1445 }],
[email protected]6a3cd37e2012-04-17 17:13:341446 ['enable_extensions==1', {
1447 'defines': [
1448 'ENABLE_EXTENSIONS=1',
1449 ],
1450 }],
[email protected]13eb97d2012-01-05 01:07:121451 ['OS=="win" and branding=="Chrome"', {
1452 'defines': ['ENABLE_SWIFTSHADER'],
1453 }],
[email protected]407dfa632011-12-23 11:59:351454 ['enable_dart==1', {
1455 'defines': ['WEBKIT_USING_DART=1'],
1456 }],
[email protected]18e0f39b2012-01-17 16:47:341457 ['enable_plugin_installation==1', {
1458 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1459 }],
[email protected]ddcaa412012-03-30 19:57:291460 ['enable_protector_service==1', {
1461 'defines': ['ENABLE_PROTECTOR_SERVICE=1'],
1462 }],
[email protected]cdb756ef2012-04-05 18:34:531463 ['enable_session_service==1', {
1464 'defines': ['ENABLE_SESSION_SERVICE=1'],
1465 }],
[email protected]6b40bb582012-03-15 20:50:381466 ['enable_themes==1', {
1467 'defines': ['ENABLE_THEMES=1'],
1468 }],
[email protected]0acdd772012-04-05 22:53:001469 ['enable_background==1', {
1470 'defines': ['ENABLE_BACKGROUND=1'],
1471 }],
[email protected]58242012012-04-12 16:14:311472 ['enable_promo_resource_service==1', {
1473 'defines': ['ENABLE_PROMO_RESOURCE_SERVICE=1'],
1474 }],
[email protected]2e22e2f2012-03-15 21:53:101475 ['enable_automation==1', {
1476 'defines': ['ENABLE_AUTOMATION=1'],
1477 }],
[email protected]a6e22132010-02-10 20:43:181478 ], # conditions for 'target_defaults'
1479 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071480 ['enable_wexit_time_destructors==1', {
1481 'conditions': [
1482 [ 'clang==1', {
1483 'cflags': [
1484 '-Wexit-time-destructors',
1485 ],
1486 'xcode_settings': {
1487 'WARNING_CFLAGS': [
1488 '-Wexit-time-destructors',
1489 ],
1490 },
1491 }],
1492 ],
1493 }],
[email protected]c14d8e772010-02-09 22:06:151494 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281495 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341496 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331497 # We don't want to get warnings from third-party code,
1498 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281499 'cflags!': [
1500 '-Wall',
1501 '-Wextra',
1502 '-Werror',
1503 ],
[email protected]167ec822011-10-24 22:05:271504 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001505 # Don't warn about hash_map in third-party code.
1506 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271507 ],
1508 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331509 # Don't warn about printf format problems.
1510 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221511 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001512 ],
[email protected]d16bd642011-07-25 23:59:181513 'cflags_cc!': [
1514 # TODO(fischman): remove this.
1515 # http://code.google.com/p/chromium/issues/detail?id=90453
1516 '-Wsign-compare',
1517 ]
[email protected]d8543312010-02-10 17:43:281518 }],
[email protected]bc073c062012-01-13 06:28:031519 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111520 'cflags': [
1521 # Don't warn about ignoring the return value from e.g. close().
1522 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031523 # BSD systems do not support this option, since they are usually
1524 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111525 '-Wno-unused-result',
1526 ],
1527 }],
[email protected]d8543312010-02-10 17:43:281528 [ 'OS=="win"', {
1529 'defines': [
1530 '_CRT_SECURE_NO_DEPRECATE',
1531 '_CRT_NONSTDC_NO_WARNINGS',
1532 '_CRT_NONSTDC_NO_DEPRECATE',
1533 '_SCL_SECURE_NO_DEPRECATE',
1534 ],
1535 'msvs_disabled_warnings': [4800],
1536 'msvs_settings': {
1537 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111538 'WarningLevel': '3',
1539 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281540 'Detect64BitPortabilityProblems': 'false',
1541 },
1542 },
1543 }],
[email protected]ea47b6a2011-07-17 19:39:421544 # TODO(darin): Unfortunately, some third_party code depends on base/
1545 [ 'OS=="win" and component=="shared_library"', {
1546 'msvs_disabled_warnings': [
1547 4251, # class 'std::xx' needs to have dll-interface.
1548 ],
1549 }],
[email protected]d8543312010-02-10 17:43:281550 [ 'OS=="mac"', {
1551 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:061552 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281553 },
[email protected]3a352c362012-05-08 19:45:491554 'conditions': [
1555 ['buildtype=="Official"', {
1556 'xcode_settings': {
1557 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
1558 },
1559 }],
1560 ],
[email protected]d8543312010-02-10 17:43:281561 }],
[email protected]c14d8e772010-02-09 22:06:151562 ],
1563 }, {
[email protected]a5c598152012-01-27 04:55:131564 'includes': [
1565 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1566 'filename_rules.gypi',
1567 ],
[email protected]c14d8e772010-02-09 22:06:151568 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1569 # C99 macros on Mac and Linux.
1570 'defines': [
1571 '__STDC_FORMAT_MACROS',
1572 ],
1573 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151574 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071575 # turn on warnings for signed/unsigned mismatch on chromium code.
1576 'msvs_settings': {
1577 'VCCLCompilerTool': {
1578 'AdditionalOptions': ['/we4389'],
1579 },
1580 },
[email protected]c14d8e772010-02-09 22:06:151581 }],
[email protected]63e39a282011-07-13 20:41:281582 ['OS=="win" and component=="shared_library"', {
1583 'msvs_disabled_warnings': [
1584 4251, # class 'std::xx' needs to have dll-interface.
1585 ],
1586 }],
[email protected]c14d8e772010-02-09 22:06:151587 ],
1588 }],
[email protected]a6e22132010-02-10 20:43:181589 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551590 'default_configuration': 'Debug',
1591 'configurations': {
[email protected]5153767c2009-12-22 01:52:501592 # VCLinkerTool LinkIncremental values below:
1593 # 0 == default
1594 # 1 == /INCREMENTAL:NO
1595 # 2 == /INCREMENTAL
1596 # Debug links incremental, Release does not.
1597 #
[email protected]7b99801e2010-11-03 17:26:231598 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501599 #
1600 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561601 'abstract': 1,
1602 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511603 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561604 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1605 'CharacterSet': '1',
1606 },
[email protected]5153767c2009-12-22 01:52:501607 },
1608 'x86_Base': {
1609 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501610 'msvs_settings': {
1611 'VCLinkerTool': {
1612 'TargetMachine': '1',
1613 },
1614 },
[email protected]2fa40782009-11-01 21:17:341615 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561616 },
[email protected]5153767c2009-12-22 01:52:501617 'x64_Base': {
1618 'abstract': 1,
1619 'msvs_configuration_platform': 'x64',
1620 'msvs_settings': {
1621 'VCLinkerTool': {
1622 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501623 'AdditionalLibraryDirectories!':
1624 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1625 'AdditionalLibraryDirectories':
1626 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1627 },
[email protected]d26b4418ab2010-03-24 22:06:351628 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501629 'AdditionalLibraryDirectories!':
1630 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1631 'AdditionalLibraryDirectories':
1632 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1633 },
1634 },
1635 'defines': [
1636 # Not sure if tcmalloc works on 64-bit Windows.
1637 'NO_TCMALLOC',
1638 ],
1639 },
1640 'Debug_Base': {
1641 'abstract': 1,
[email protected]14339762011-04-05 07:36:581642 'defines': [
1643 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1644 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1645 ],
[email protected]1c966092009-08-20 21:19:261646 'xcode_settings': {
1647 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291648 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491649 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491650 '<@(debug_extra_cflags)',
1651 ],
[email protected]1c966092009-08-20 21:19:261652 },
[email protected]bb05e452009-10-29 21:24:561653 'msvs_settings': {
1654 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471655 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561656 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211657 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471658 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151659 'conditions': [
1660 # According to MSVS, InlineFunctionExpansion=0 means
1661 # "default inlining", not "/Ob0".
1662 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1663 ['win_debug_InlineFunctionExpansion==0', {
1664 'AdditionalOptions': ['/Ob0'],
1665 }],
1666 ['win_debug_InlineFunctionExpansion!=""', {
1667 'InlineFunctionExpansion':
1668 '<(win_debug_InlineFunctionExpansion)',
1669 }],
[email protected]fac10d12010-11-08 16:00:311670 ['win_debug_disable_iterator_debugging==1', {
1671 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1672 }],
[email protected]ef5c5f1b2011-12-17 02:16:241673
1674 # if win_debug_OmitFramePointers is blank, leave as default
1675 ['win_debug_OmitFramePointers==1', {
1676 'OmitFramePointers': 'true',
1677 }],
1678 ['win_debug_OmitFramePointers==0', {
1679 'OmitFramePointers': 'false',
1680 # The above is not sufficient (http://crbug.com/106711): it
1681 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1682 # perform FPO regardless, so we must explicitly disable.
1683 # We still want the false setting above to avoid having
1684 # "/Oy /Oy-" and warnings about overriding.
1685 'AdditionalOptions': ['/Oy-'],
1686 }],
[email protected]2ae6e022010-05-07 13:19:151687 ],
[email protected]ef5c5f1b2011-12-17 02:16:241688 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561689 },
1690 'VCLinkerTool': {
1691 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331692 # ASLR makes debugging with windbg difficult because Chrome.exe and
1693 # Chrome.dll share the same base name. As result, windbg will
1694 # name the Chrome.dll module like chrome_<base address>, where
1695 # <base address> typically changes with each launch. This in turn
1696 # means that breakpoints in Chrome.dll don't stick from one launch
1697 # to the next. For this reason, we turn ASLR off in debug builds.
1698 # Note that this is a three-way bool, where 0 means to pick up
1699 # the default setting, 1 is off and 2 is on.
1700 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561701 },
1702 'VCResourceCompilerTool': {
1703 'PreprocessorDefinitions': ['_DEBUG'],
1704 },
1705 },
[email protected]2f80c312009-02-25 21:26:551706 'conditions': [
[email protected]bb05e452009-10-29 21:24:561707 ['OS=="linux"', {
1708 'cflags': [
1709 '<@(debug_extra_cflags)',
1710 ],
[email protected]2f80c312009-02-25 21:26:551711 }],
[email protected]56cca4e2011-07-01 21:33:351712 ['release_valgrind_build==0', {
1713 'xcode_settings': {
1714 'OTHER_CFLAGS': [
1715 '-fstack-protector-all', # Implies -fstack-protector
1716 ],
1717 },
1718 }],
[email protected]2f80c312009-02-25 21:26:551719 ],
1720 },
[email protected]5153767c2009-12-22 01:52:501721 'Release_Base': {
1722 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551723 'defines': [
1724 'NDEBUG',
1725 ],
[email protected]1c966092009-08-20 21:19:261726 'xcode_settings': {
1727 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1728 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001729 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261730 },
[email protected]bb05e452009-10-29 21:24:561731 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471732 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471733 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151734 'conditions': [
[email protected]2212d272011-12-20 21:37:371735 # In official builds, each target will self-select
1736 # an optimization level.
1737 ['buildtype!="Official"', {
1738 'Optimization': '<(win_release_Optimization)',
1739 },
1740 ],
[email protected]2ae6e022010-05-07 13:19:151741 # According to MSVS, InlineFunctionExpansion=0 means
1742 # "default inlining", not "/Ob0".
1743 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1744 ['win_release_InlineFunctionExpansion==0', {
1745 'AdditionalOptions': ['/Ob0'],
1746 }],
1747 ['win_release_InlineFunctionExpansion!=""', {
1748 'InlineFunctionExpansion':
1749 '<(win_release_InlineFunctionExpansion)',
1750 }],
[email protected]626d2d22011-10-11 15:47:331751
[email protected]ef5c5f1b2011-12-17 02:16:241752 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331753 ['win_release_OmitFramePointers==1', {
1754 'OmitFramePointers': 'true',
1755 }],
1756 ['win_release_OmitFramePointers==0', {
1757 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241758 # The above is not sufficient (http://crbug.com/106711): it
1759 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1760 # perform FPO regardless, so we must explicitly disable.
1761 # We still want the false setting above to avoid having
1762 # "/Oy /Oy-" and warnings about overriding.
1763 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331764 }],
[email protected]2ae6e022010-05-07 13:19:151765 ],
[email protected]ef5c5f1b2011-12-17 02:16:241766 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471767 },
[email protected]bb05e452009-10-29 21:24:561768 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341769 # LinkIncremental is a tri-state boolean, where 0 means default
1770 # (i.e., inherit from parent solution), 1 means false, and
1771 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561772 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341773 # This corresponds to the /PROFILE flag which ensures the PDB
1774 # file contains FIXUP information (growing the PDB file by about
1775 # 5%) but does not otherwise alter the output binary. This
1776 # information is used by the Syzygy optimization tool when
1777 # decomposing the release image.
1778 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561779 },
1780 },
[email protected]2f80c312009-02-25 21:26:551781 'conditions': [
[email protected]92822e82009-09-18 14:26:561782 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581783 'defines': [
1784 'NVALGRIND',
1785 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1786 ],
[email protected]ee857512010-05-14 08:24:421787 }, {
[email protected]14339762011-04-05 07:36:581788 'defines': [
1789 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1790 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1791 ],
[email protected]92822e82009-09-18 14:26:561792 }],
[email protected]7e0d664a2009-12-03 21:07:471793 ['win_use_allocator_shim==0', {
1794 'defines': ['NO_TCMALLOC'],
1795 }],
[email protected]bb05e452009-10-29 21:24:561796 ['OS=="linux"', {
1797 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001798 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561799 ],
1800 }],
[email protected]2f80c312009-02-25 21:26:551801 ],
1802 },
[email protected]5153767c2009-12-22 01:52:501803 #
1804 # Concrete configurations
1805 #
1806 'Debug': {
1807 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1808 },
1809 'Release': {
1810 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1811 'conditions': [
1812 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161813 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501814 }],
1815 ]
1816 },
[email protected]f926fa0a2009-08-04 22:50:131817 'conditions': [
1818 [ 'OS=="win"', {
1819 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501820 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501821 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301822 },
1823 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501824 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301825 },
[email protected]f926fa0a2009-08-04 22:50:131826 }],
1827 ],
[email protected]2f80c312009-02-25 21:26:551828 },
1829 },
1830 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341831 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261832 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271833 # Enable -Werror by default, but put it in a variable so it can
1834 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1835 'variables': {
[email protected]cbbb3472012-01-25 18:32:311836 'werror%': '-Werror',
[email protected]b7cc5321c2012-04-12 21:24:361837 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:271838 },
[email protected]6863896f2012-01-25 17:51:361839 'defines': [
1840 '_FILE_OFFSET_BITS=64',
1841 ],
[email protected]9d384032009-03-20 23:13:261842 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161843 '<(werror)', # See note above about the werror variable.
1844 '-pthread',
1845 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291846 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161847 '-Wall',
[email protected]0fa17082010-03-26 00:48:051848 # TODO(evan): turn this back on once all the builds work.
1849 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201850 # Don't warn about unused function params. We use those everywhere.
1851 '-Wno-unused-parameter',
1852 # Don't warn about the "struct foo f = {0};" initialization pattern.
1853 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121854 # Don't export any symbols (for example, to plugins we dlopen()).
1855 # Note: this is *required* to make some plugins work.
1856 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351857 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241858 ],
1859 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221860 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241861 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361862 # Make inline functions have hidden visiblity by default.
1863 # Surprisingly, not covered by -fvisibility=hidden.
1864 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171865 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1866 # so we specify it explicitly.
1867 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181868 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171869 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261870 ],
[email protected]a6cf87e2009-04-03 04:07:381871 'ldflags': [
[email protected]138241f2010-03-30 23:53:101872 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261873 ],
[email protected]b7cc5321c2012-04-12 21:24:361874 'libraries' : [
1875 '<(libraries_for_target)',
1876 ],
[email protected]3aacaf952009-04-02 15:34:091877 'configurations': {
[email protected]5153767c2009-12-22 01:52:501878 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311879 'variables': {
1880 'debug_optimize%': '0',
1881 },
[email protected]3aacaf952009-04-02 15:34:091882 'defines': [
1883 '_DEBUG',
1884 ],
1885 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041886 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091887 '-g',
1888 ],
[email protected]da1c8d692011-09-20 20:35:011889 'conditions' : [
1890 ['OS=="android"', {
1891 'cflags': [
1892 '-fno-omit-frame-pointer',
1893 ],
1894 }],
1895 ],
1896 'target_conditions' : [
1897 ['_toolset=="target"', {
1898 'conditions': [
[email protected]d42124bc2012-05-10 05:40:501899 ['OS=="android" and debug_optimize==0 and target_arch=="arm"', {
[email protected]da1c8d692011-09-20 20:35:011900 'cflags': [
1901 '-mlong-calls', # Needed when compiling with -O0
1902 ],
1903 }],
1904 ['arm_thumb==1', {
1905 'cflags': [
1906 '-marm',
1907 ],
1908 }],
1909 ],
1910 }],
1911 ],
[email protected]5315f2842009-04-28 00:43:271912 },
[email protected]5153767c2009-12-22 01:52:501913 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011914 'variables': {
1915 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511916 # Binaries become big and gold is unable to perform GC
1917 # and remove unused sections for some of test targets
1918 # on 32 bit platform.
1919 # (This is currently observed only in chromeos valgrind bots)
1920 # The following flag is to disable --gc-sections linker
1921 # option for these bots.
1922 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121923
1924 # TODO(bradnelson): reexamine how this is done if we change the
1925 # expansion of configurations
1926 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011927 },
[email protected]3aacaf952009-04-02 15:34:091928 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041929 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531930 # Don't emit the GCC version ident directives, they just end up
1931 # in the .comment section taking up binary size.
1932 '-fno-ident',
1933 # Put data and code in their own sections, so that unused symbols
1934 # can be removed at link time with --gc-sections.
1935 '-fdata-sections',
1936 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091937 ],
[email protected]c902f2cba2010-08-06 20:04:181938 'ldflags': [
1939 # Specifically tell the linker to perform optimizations.
1940 # See http://lwn.net/Articles/192624/ .
1941 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221942 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181943 ],
[email protected]1dd529642010-05-15 01:02:511944 'conditions' : [
1945 ['no_gc_sections==0', {
1946 'ldflags': [
1947 '-Wl,--gc-sections',
1948 ],
1949 }],
[email protected]da1c8d692011-09-20 20:35:011950 ['OS=="android"', {
1951 'cflags': [
1952 '-fomit-frame-pointer',
1953 ],
1954 }],
[email protected]ecf7b6482010-10-13 09:15:201955 ['clang==1', {
1956 'cflags!': [
1957 '-fno-ident',
1958 ],
1959 }],
[email protected]7664ab32011-02-01 23:35:251960 ['profiling==1', {
1961 'cflags': [
1962 '-fno-omit-frame-pointer',
1963 '-g',
1964 ],
1965 }],
[email protected]8d726a42012-02-09 03:49:001966 ],
[email protected]3aacaf952009-04-02 15:34:091967 },
1968 },
[email protected]601b540222009-04-03 21:32:041969 'variants': {
1970 'coverage': {
1971 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1972 'ldflags': ['-fprofile-arcs'],
1973 },
1974 'profile': {
1975 'cflags': ['-pg', '-g'],
1976 'ldflags': ['-pg'],
1977 },
1978 'symbols': {
1979 'cflags': ['-g'],
1980 },
1981 },
[email protected]606116d22009-05-06 22:38:231982 'conditions': [
[email protected]04b482602011-09-14 02:36:211983 ['target_arch=="ia32"', {
1984 'target_conditions': [
1985 ['_toolset=="target"', {
1986 'asflags': [
1987 # Needed so that libs with .s files (e.g. libicudata.a)
1988 # are compatible with the general 32-bit-ness.
1989 '-32',
1990 ],
1991 # All floating-point computations on x87 happens in 80-bit
1992 # precision. Because the C and C++ language standards allow
1993 # the compiler to keep the floating-point values in higher
1994 # precision than what's specified in the source and doing so
1995 # is more efficient than constantly rounding up to 64-bit or
1996 # 32-bit precision as specified in the source, the compiler,
1997 # especially in the optimized mode, tries very hard to keep
1998 # values in x87 floating-point stack (in 80-bit precision)
1999 # as long as possible. This has important side effects, that
2000 # the real value used in computation may change depending on
2001 # how the compiler did the optimization - that is, the value
2002 # kept in 80-bit is different than the value rounded down to
2003 # 64-bit or 32-bit. There are possible compiler options to
2004 # make this behavior consistent (e.g. -ffloat-store would keep
2005 # all floating-values in the memory, thus force them to be
2006 # rounded to its original precision) but they have significant
2007 # runtime performance penalty.
2008 #
2009 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2010 # which keep floating-point values in SSE registers in its
2011 # native precision (32-bit for single precision, and 64-bit
2012 # for double precision values). This means the floating-point
2013 # value used during computation does not change depending on
2014 # how the compiler optimized the code, since the value is
2015 # always kept in its specified precision.
2016 'conditions': [
2017 ['branding=="Chromium" and disable_sse2==0', {
2018 'cflags': [
2019 '-march=pentium4',
2020 '-msse2',
2021 '-mfpmath=sse',
2022 ],
2023 }],
2024 # ChromeOS targets Pinetrail, which is sse3, but most of the
2025 # benefit comes from sse2 so this setting allows ChromeOS
2026 # to build on other CPUs. In the future -march=atom would
2027 # help but requires a newer compiler.
2028 ['chromeos==1 and disable_sse2==0', {
2029 'cflags': [
2030 '-msse2',
2031 ],
2032 }],
2033 # Install packages have started cropping up with
2034 # different headers between the 32-bit and 64-bit
2035 # versions, so we have to shadow those differences off
2036 # and make sure a 32-bit-on-64-bit build picks up the
2037 # right files.
[email protected]32594022012-05-10 03:22:282038 # For android build, use NDK headers instead of host headers
2039 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212040 'include_dirs+': [
2041 '/usr/include32',
2042 ],
2043 }],
2044 ],
2045 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2046 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062047 'cflags': [
[email protected]04b482602011-09-14 02:36:212048 '-m32',
2049 '-mmmx',
2050 ],
2051 'ldflags': [
2052 '-m32',
[email protected]ffde7932009-05-29 00:39:062053 ],
2054 }],
[email protected]606116d22009-05-06 22:38:232055 ],
2056 }],
[email protected]3dda8a962009-08-10 18:58:072057 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292058 'target_conditions': [
2059 ['_toolset=="target"', {
2060 'cflags_cc': [
2061 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2062 # has changed whenever it encounters a varargs function. This
2063 # silences those warnings, as they are not helpful and
2064 # clutter legitimate warnings.
2065 '-Wno-abi',
2066 ],
2067 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012068 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292069 'cflags': [
2070 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292071 ]
2072 }],
2073 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252074 'cflags': [
2075 '-march=armv7-a',
2076 '-mtune=cortex-a8',
[email protected]5252af72012-05-04 19:26:402077 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252078 ],
[email protected]eafc0b452010-02-26 21:53:432079 'conditions': [
2080 ['arm_neon==1', {
2081 'cflags': [ '-mfpu=neon', ],
2082 }, {
[email protected]53e0f642010-03-05 01:41:562083 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:432084 }]
2085 ],
[email protected]dc9711f2009-11-13 19:30:252086 }],
[email protected]da1c8d692011-09-20 20:35:012087 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532088 # Most of the following flags are derived from what Android
2089 # uses by default when building for arm, reference for which
2090 # can be found in the following file in the Android NDK:
2091 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2092 'cflags': [
2093 # The tree-sra optimization (scalar replacement for
2094 # aggregates enabling subsequent optimizations) leads to
2095 # invalid code generation when using the Android NDK's
2096 # compiler (r5-r7). This can be verified using
2097 # TestWebKitAPI's WTF.Checked_int8_t test.
2098 '-fno-tree-sra',
2099 '-Wno-psabi',
2100 ],
[email protected]da1c8d692011-09-20 20:35:012101 'conditions': [
2102 ['arm_thumb == 1', {
2103 # Android toolchain doesn't support -mimplicit-it=thumb
2104 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
2105 'cflags': [ '-mthumb-interwork', ],
2106 }],
2107 ['armv7==0', {
2108 # Flags suitable for Android emulator
2109 'cflags': [
2110 '-march=armv5te',
2111 '-mtune=xscale',
2112 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362113 ],
2114 'defines': [
2115 '__ARM_ARCH_5__',
2116 '__ARM_ARCH_5T__',
2117 '__ARM_ARCH_5E__',
2118 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012119 ],
2120 }],
2121 ],
2122 }],
[email protected]3dda8a962009-08-10 18:58:072123 ],
2124 }],
2125 ],
2126 }],
[email protected]2fb843b2010-08-12 02:11:082127 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582128 'cflags': [
2129 '-fPIC',
2130 ],
[email protected]d3f692b32011-12-14 19:04:352131 'ldflags': [
2132 '-fPIC',
2133 ],
[email protected]c76723a2010-01-25 23:10:582134 }],
[email protected]ee28c9f2009-09-04 01:53:012135 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572136 'target_conditions': [
2137 ['_toolset=="target"', {
2138 'cflags': [
2139 '--sysroot=<(sysroot)',
2140 ],
2141 'ldflags': [
2142 '--sysroot=<(sysroot)',
2143 ],
2144 }]]
[email protected]ee28c9f2009-09-04 01:53:012145 }],
[email protected]58680ce2010-09-18 00:09:152146 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122147 'cflags': [
2148 '-Wheader-hygiene',
2149 # Clang spots more unused functions.
2150 '-Wno-unused-function',
2151 # Don't die on dtoa code that uses a char as an array index.
2152 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332153 # Especially needed for gtest macros using enum values from Mac
2154 # system headers.
2155 # TODO(pkasting): In C++11 this is legal, so this should be
2156 # removed when we change to that. (This is also why we don't
2157 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122158 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302159 # This (rightyfully) complains about 'override', which we use
2160 # heavily.
2161 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102162
2163 # Warns on switches on enums that cover all enum values but
2164 # also contain a default: branch. Chrome is full of that.
2165 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122166 ],
2167 'cflags!': [
2168 # Clang doesn't seem to know know this flag.
2169 '-mfpmath=sse',
2170 ],
[email protected]58680ce2010-09-18 00:09:152171 }],
[email protected]5d451ad2011-02-11 16:43:462172 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262173 'cflags': [
2174 '<(clang_chrome_plugins_flags)',
2175 ],
[email protected]5d451ad2011-02-11 16:43:462176 }],
[email protected]4a9ac22e2011-12-02 03:41:532177 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262178 'cflags': [
2179 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532180 ],
2181 }],
2182 ['clang==1 and clang_add_plugin!=""', {
2183 'cflags': [
[email protected]d23720682011-08-11 00:16:262184 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2185 ],
[email protected]5e781232011-01-28 02:57:592186 }],
[email protected]2616d45d2012-01-19 03:15:482187 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2188 'cflags': [
2189 # See http://crbug.com/110262
2190 '-fcolor-diagnostics',
2191 ],
2192 }],
[email protected]92799b632011-08-15 14:33:062193 ['asan==1', {
[email protected]92799b632011-08-15 14:33:062194 'cflags': [
[email protected]6a4cad02011-11-25 07:26:562195 '-faddress-sanitizer',
[email protected]0ac773032011-12-21 17:37:082196 '-fno-omit-frame-pointer',
[email protected]74a26d72011-09-29 17:29:032197 '-w',
[email protected]92799b632011-08-15 14:33:062198 ],
2199 'ldflags': [
[email protected]6a4cad02011-11-25 07:26:562200 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:062201 ],
[email protected]921c7b52011-11-25 10:34:352202 'defines': [
2203 'ADDRESS_SANITIZER',
2204 ],
[email protected]92799b632011-08-15 14:33:062205 }],
[email protected]cbd5fd52009-08-26 00:14:272206 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172207 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272208 'defines': ['USE_LINUX_BREAKPAD'],
2209 }],
[email protected]d8b60602010-03-26 09:41:222210 ['linux_use_heapchecker==1', {
2211 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402212 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222213 }],
[email protected]61a9b2d82010-02-26 00:31:082214 ['linux_use_tcmalloc==0', {
2215 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242216 }],
[email protected]64e2d4a42010-08-27 10:13:212217 ['linux_keep_shadow_stacks==1', {
2218 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a74202012-02-23 19:10:512219 'cflags': [
2220 '-finstrument-functions',
2221 # Allow mmx intrinsics to inline, so that the compiler can expand
2222 # the intrinsics.
2223 '-finstrument-functions-exclude-file-list=mmintrin.h',
2224 ],
[email protected]64e2d4a42010-08-27 10:13:212225 }],
[email protected]8d726a42012-02-09 03:49:002226 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172227 'ldflags': [
2228 # Experimentation found that using four linking threads
2229 # saved ~20% of link time.
2230 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2231 '-Wl,--threads',
2232 '-Wl,--thread-count=4',
2233 ],
[email protected]8d726a42012-02-09 03:49:002234 'conditions': [
2235 ['release_valgrind_build==0', {
2236 'target_conditions': [
2237 ['_toolset=="target"', {
2238 'ldflags': [
2239 # There seems to be a conflict of --icf and -pie
2240 # in gold which can generate crashy binaries. As
2241 # a security measure, -pie takes precendence for
2242 # now.
2243 #'-Wl,--icf=safe',
2244 '-Wl,--icf=none',
2245 ],
2246 }],
2247 ],
2248 }],
2249 ],
2250 }],
[email protected]b07806c12012-02-03 22:44:592251 ['linux_use_gold_binary==1', {
2252 'variables': {
[email protected]516312d2012-02-28 05:17:262253 'conditions': [
2254 ['inside_chromium_build==1', {
2255 # We pass the path to gold to the compiler. gyp leaves
2256 # unspecified what the cwd is when running the compiler,
2257 # so the normal gyp path-munging fails us. This hack
2258 # gets the right path.
2259 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2260 }, {
2261 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2262 }]
2263 ]
[email protected]b07806c12012-02-03 22:44:592264 },
2265 'ldflags': [
2266 # Put our gold binary in the search path for the linker.
2267 '-B<(gold_path)',
2268 ],
2269 }],
[email protected]606116d22009-05-06 22:38:232270 ],
[email protected]9d384032009-03-20 23:13:262271 },
2272 }],
[email protected]c51e8d52009-12-11 20:04:062273 # FreeBSD-specific options; note that most FreeBSD options are set above,
2274 # with Linux.
2275 ['OS=="freebsd"', {
2276 'target_defaults': {
2277 'ldflags': [
2278 '-Wl,--no-keep-memory',
2279 ],
2280 },
2281 }],
[email protected]da1c8d692011-09-20 20:35:012282 # Android-specific options; note that most are set above with Linux.
2283 ['OS=="android"', {
2284 'variables': {
[email protected]febc41db2012-03-24 02:44:432285 'target_arch%': 'arm', # target_arch in android terms.
[email protected]da1c8d692011-09-20 20:35:012286 'conditions': [
2287 # Android uses x86 instead of ia32 for their target_arch designation.
2288 ['target_arch=="ia32"', {
[email protected]febc41db2012-03-24 02:44:432289 'target_arch%': 'x86',
[email protected]da1c8d692011-09-20 20:35:012290 }],
2291 # Use shared stlport library when system one used.
2292 # Figure this out early since it needs symbols from libgcc.a, so it
2293 # has to be before that in the set of libraries.
2294 ['use_system_stlport==1', {
2295 'android_stlport_library': 'stlport',
2296 }, {
2297 'android_stlport_library': 'stlport_static',
2298 }],
2299 ],
2300
2301 # Placing this variable here prevents from forking libvpx, used
2302 # by remoting. Remoting is off, so it needn't built,
2303 # so forking it's deps seems like overkill.
2304 # But this variable need defined to properly run gyp.
2305 # A proper solution is to have an OS==android conditional
2306 # in third_party/libvpx/libvpx.gyp to define it.
2307 'libvpx_path': 'lib/linux/arm',
2308 },
2309 'target_defaults': {
2310 # Build a Release build by default to match Android build behavior.
2311 # This is typical with Android because Debug builds tend to be much
2312 # larger and run very slowly on constrained devices. It is still
2313 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2314 # 'make' command line.
2315 'default_configuration': 'Release',
2316
2317 'variables': {
2318 'release_extra_cflags%': '',
2319 },
2320
2321 'target_conditions': [
2322 # Settings for building device targets using Android's toolchain.
2323 # These are based on the setup.mk file from the Android NDK.
2324 #
2325 # The NDK Android executable link step looks as follows:
2326 # $LDFLAGS
2327 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2328 # $(PRIVATE_OBJECTS) <-- The .o that we built
2329 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2330 # $(TARGET_LIBGCC) <-- libgcc.a
2331 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2332 # $(PRIVATE_LDLIBS) <-- System .so
2333 # $(TARGET_CRTEND_O) <-- crtend.o
2334 #
2335 # For now the above are approximated for executables by adding
2336 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2337 # of 'libraries'.
2338 #
2339 # The NDK Android shared library link step looks as follows:
2340 # $LDFLAGS
2341 # $(PRIVATE_OBJECTS) <-- The .o that we built
2342 # -l,--whole-archive
2343 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2344 # -l,--no-whole-archive
2345 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2346 # $(TARGET_LIBGCC) <-- libgcc.a
2347 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2348 # $(PRIVATE_LDLIBS) <-- System .so
2349 #
2350 # For now, assume not need any whole static libs.
2351 #
2352 # For both executables and shared libraries, add the proper
2353 # libgcc.a to the start of libraries which puts it in the
2354 # proper spot after .o and .a files get linked in.
2355 #
2356 # TODO: The proper thing to do longer-tem would be proper gyp
2357 # support for a custom link command line.
2358 ['_toolset=="target"', {
2359 'cflags!': [
2360 '-pthread', # Not supported by Android toolchain.
2361 ],
2362 'cflags': [
2363 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2364 '-ffunction-sections',
2365 '-funwind-tables',
2366 '-g',
2367 '-fstack-protector',
2368 '-fno-short-enums',
2369 '-finline-limit=64',
2370 '-Wa,--noexecstack',
2371 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2372 '<@(release_extra_cflags)',
2373 # Note: This include is in cflags to ensure that it comes after
2374 # all of the includes.
2375 '-I<(android_ndk_include)',
2376 ],
2377 'defines': [
2378 'ANDROID',
2379 '__GNU_SOURCE=1', # Necessary for clone()
2380 'USE_STLPORT=1',
2381 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2382 'HAVE_OFF64_T',
2383 'HAVE_SYS_UIO_H',
2384 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2385 ],
2386 'ldflags!': [
2387 '-pthread', # Not supported by Android toolchain.
2388 ],
2389 'ldflags': [
2390 '-nostdlib',
2391 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012392 # Don't export symbols from statically linked libraries.
2393 '-Wl,--exclude-libs=ALL',
2394 ],
[email protected]a0e48b02011-11-22 07:53:012395 'libraries': [
2396 '-l<(android_stlport_library)',
2397 # Manually link the libgcc.a that the cross compiler uses.
[email protected]d10e2cc2012-03-20 10:45:272398 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012399 '-lc',
2400 '-ldl',
2401 '-lstdc++',
2402 '-lm',
[email protected]da1c8d692011-09-20 20:35:012403 ],
2404 'conditions': [
[email protected]e0825562012-05-10 01:50:472405 ['android_upstream_bringup==1', {
2406 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2407 }],
[email protected]da1c8d692011-09-20 20:35:012408 ['android_build_type==0', {
2409 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522410 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012411 ],
2412 }],
[email protected]febd3572012-05-03 09:17:452413 ['target_arch == "arm"', {
2414 'ldflags': [
2415 # Enable identical code folding to reduce size.
2416 '-Wl,--icf=safe',
2417 ],
2418 }],
[email protected]da1c8d692011-09-20 20:35:012419 # NOTE: The stlport header include paths below are specified in
2420 # cflags rather than include_dirs because they need to come
2421 # after include_dirs. Think of them like system headers, but
2422 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2423 # toolchain (circa Gingerbread) will exhibit strange errors.
2424 # The include ordering here is important; change with caution.
2425 ['use_system_stlport==0', {
2426 'cflags': [
2427 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2428 ],
2429 'conditions': [
2430 ['target_arch=="arm" and armv7==1', {
2431 'ldflags': [
2432 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2433 ],
2434 }],
2435 ['target_arch=="arm" and armv7==0', {
2436 'ldflags': [
2437 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2438 ],
2439 }],
2440 ['target_arch=="ia32"', {
2441 'ldflags': [
2442 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2443 ],
2444 }],
2445 ],
2446 }],
2447 ['target_arch=="ia32"', {
2448 # The x86 toolchain currently has problems with stack-protector.
2449 'cflags!': [
2450 '-fstack-protector',
2451 ],
2452 'cflags': [
2453 '-fno-stack-protector',
2454 ],
2455 }],
2456 ],
2457 'target_conditions': [
2458 ['_type=="executable"', {
2459 'ldflags': [
2460 '-Bdynamic',
2461 '-Wl,-dynamic-linker,/system/bin/linker',
2462 '-Wl,--gc-sections',
2463 '-Wl,-z,nocopyreloc',
2464 # crtbegin_dynamic.o should be the last item in ldflags.
2465 '<(android_ndk_lib)/crtbegin_dynamic.o',
2466 ],
2467 'libraries': [
2468 # crtend_android.o needs to be the last item in libraries.
2469 # Do not add any libraries after this!
2470 '<(android_ndk_lib)/crtend_android.o',
2471 ],
2472 }],
2473 ['_type=="shared_library"', {
2474 'ldflags': [
2475 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:462476 # crtbegin_so.o should be the last item in ldflags.
2477 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:012478 ],
[email protected]a08029b42012-04-25 03:18:462479 'libraries': [
2480 # crtend_so.o needs to be the last item in libraries.
2481 # Do not add any libraries after this!
2482 '<(android_ndk_lib)/crtend_so.o',
2483 ],
[email protected]da1c8d692011-09-20 20:35:012484 }],
2485 ],
2486 }],
2487 # Settings for building host targets using the system toolchain.
2488 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122489 'cflags!': [
2490 # Due to issues in Clang build system, using ASan on 32-bit
2491 # binaries on x86_64 host is problematic.
2492 # TODO(eugenis): re-enable.
2493 '-faddress-sanitizer',
2494 ],
[email protected]da1c8d692011-09-20 20:35:012495 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122496 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012497 '-Wl,-z,noexecstack',
2498 '-Wl,--gc-sections',
2499 '-Wl,-O1',
2500 '-Wl,--as-needed',
2501 ],
[email protected]965b6b22011-09-29 16:07:282502 'sources/': [
2503 ['exclude', '_android(_unittest)?\\.cc$'],
2504 ['exclude', '(^|/)android/']
2505 ],
[email protected]da1c8d692011-09-20 20:35:012506 }],
2507 ],
2508 },
2509 }],
[email protected]93f21e42010-04-01 00:35:152510 ['OS=="solaris"', {
2511 'cflags!': ['-fvisibility=hidden'],
2512 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2513 }],
[email protected]2f80c312009-02-25 21:26:552514 ['OS=="mac"', {
2515 'target_defaults': {
[email protected]24700642009-06-01 16:01:202516 'variables': {
[email protected]162407f2011-09-08 15:33:172517 # These should end with %, but there seems to be a bug with % in
2518 # variables that are intended to be set to different values in
2519 # different targets, like these.
2520 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202521 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]27b687ec42012-03-26 22:22:152522 # Strip debugging symbols from the target.
2523 'mac_strip': '<(mac_strip_release)',
[email protected]24700642009-06-01 16:01:202524 },
[email protected]d92c7c012009-03-19 19:26:422525 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552526 'xcode_settings': {
2527 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042528 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2529 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2530 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2531 # (Equivalent to -fPIC)
2532 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2533 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2534 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252535 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2536 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042537 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2538 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2539 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2540 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552541 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042542 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252543 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2544 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112545 # Keep pch files below xcodebuild/.
2546 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552547 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192548 'OTHER_CFLAGS': [
2549 '-fno-strict-aliasing', # See http://crbug.com/32204
2550 ],
[email protected]080e86f2010-06-21 15:19:042551 'WARNING_CFLAGS': [
2552 '-Wall',
2553 '-Wendif-labels',
2554 '-Wextra',
2555 # Don't warn about unused function parameters.
2556 '-Wno-unused-parameter',
2557 # Don't warn about the "struct foo f = {0};" initialization
2558 # pattern.
2559 '-Wno-missing-field-initializers',
2560 ],
[email protected]b3fb8092009-03-12 19:09:242561 'conditions': [
2562 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592563 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2564 ],
[email protected]66733172010-09-22 00:09:282565 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302566 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2567 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382568
[email protected]6c648f12011-12-24 07:50:432569 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2570 # when buliding with clang. This warning is triggered when the
2571 # override keyword is used via the OVERRIDE macro from
2572 # base/compiler_specific.h.
2573 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382574
[email protected]34f40892011-09-06 21:53:302575 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282576 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072577 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282578 # Don't die on dtoa code that uses a char as an array index.
2579 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2580 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452581 # Clang spots more unused functions.
2582 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332583 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052584 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302585 # This (rightyfully) complains about 'override', which we use
2586 # heavily.
2587 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102588
2589 # Warns on switches on enums that cover all enum values but
2590 # also contain a default: branch. Chrome is full of that.
2591 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:282592 ],
2593 }],
[email protected]5d451ad2011-02-11 16:43:462594 ['clang==1 and clang_use_chrome_plugins==1', {
2595 'OTHER_CFLAGS': [
2596 '<(clang_chrome_plugins_flags)',
2597 ],
2598 }],
[email protected]4a9ac22e2011-12-02 03:41:532599 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592600 'OTHER_CFLAGS': [
2601 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532602 ],
2603 }],
2604 ['clang==1 and clang_add_plugin!=""', {
2605 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592606 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2607 ],
2608 }],
[email protected]2616d45d2012-01-19 03:15:482609 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2610 'OTHER_CFLAGS': [
2611 # See http://crbug.com/110262
2612 '-fcolor-diagnostics',
2613 ],
2614 }],
[email protected]b3fb8092009-03-12 19:09:242615 ],
[email protected]2f80c312009-02-25 21:26:552616 },
[email protected]34f40892011-09-06 21:53:302617 'conditions': [
2618 ['clang==1', {
2619 'variables': {
2620 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2621 },
2622 }],
[email protected]921c7b52011-11-25 10:34:352623 ['asan==1', {
2624 'xcode_settings': {
2625 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352626 '-faddress-sanitizer',
2627 '-w',
2628 ],
2629 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352630 '-faddress-sanitizer',
2631 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372632 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352633 # on the prior OS X versions. Because Chromium is currently
2634 # targeting 10.5.0, we need to explicitly mark these
2635 # symbols as dynamic_lookup.
2636 '-Wl,-U,_malloc_default_purgeable_zone',
2637 '-Wl,-U,_malloc_zone_memalign',
2638 '-Wl,-U,_dispatch_sync_f',
2639 '-Wl,-U,_dispatch_async_f',
2640 '-Wl,-U,_dispatch_barrier_async_f',
2641 '-Wl,-U,_dispatch_group_async_f',
2642 '-Wl,-U,_dispatch_after_f',
2643 ],
2644 },
2645 'defines': [
2646 'ADDRESS_SANITIZER',
2647 ],
2648 }],
[email protected]34f40892011-09-06 21:53:302649 ],
[email protected]2f80c312009-02-25 21:26:552650 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552651 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462652 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2653 }],
2654 ['_mac_bundle', {
2655 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082656 }],
[email protected]6303fed2011-08-11 01:12:102657 ['_type=="executable"', {
2658 'postbuilds': [
2659 {
2660 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362661 # code execution when running on Mac OS X 10.7 ("Lion"), and
2662 # ensures that the position-independent executable (PIE) bit
2663 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102664 'variables': {
[email protected]8c40f322011-08-24 03:33:362665 # Define change_mach_o_flags in a variable ending in _path
2666 # so that GYP understands it's a path and performs proper
2667 # relativization during dict merging.
2668 'change_mach_o_flags_path':
2669 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172670 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132671 ],
2672 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172673 ['mac_pie==0 or release_valgrind_build==1', {
2674 # Don't enable PIE if it's unwanted. It's unwanted if
2675 # the target specifies mac_pie=0 or if building for
2676 # Valgrind, because Valgrind doesn't understand slide.
2677 # See the similar mac_pie/release_valgrind_build check
2678 # below.
[email protected]081c0342011-08-24 14:59:132679 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132680 '--no-pie',
2681 ],
2682 }],
2683 ],
[email protected]6303fed2011-08-11 01:12:102684 },
[email protected]8c40f322011-08-24 03:33:362685 'postbuild_name': 'Change Mach-O Flags',
2686 'action': [
2687 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132688 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362689 ],
[email protected]6303fed2011-08-11 01:12:102690 },
2691 ],
[email protected]5a5d97aa2011-09-02 15:34:002692 'conditions': [
2693 ['asan==1', {
2694 'variables': {
2695 'asan_saves_file': 'asan.saves',
2696 },
2697 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562698 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002699 },
2700 }],
2701 ],
[email protected]162407f2011-09-08 15:33:172702 'target_conditions': [
2703 ['mac_pie==1 and release_valgrind_build==0', {
2704 # Turn on position-independence (ASLR) for executables. When
2705 # PIE is on for the Chrome executables, the framework will
2706 # also be subject to ASLR.
2707 # Don't do this when building for Valgrind, because Valgrind
2708 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2709 # understand slide, and get rid of the Valgrind check.
2710 'xcode_settings': {
2711 'OTHER_LDFLAGS': [
2712 '-Wl,-pie', # Position-independent executable (MH_PIE)
2713 ],
2714 },
2715 }],
2716 ],
[email protected]6a0242bc2011-07-01 00:34:462717 }],
[email protected]9a5e72862010-09-02 16:16:582718 ['(_type=="executable" or _type=="shared_library" or \
2719 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202720 'target_conditions': [
2721 ['mac_real_dsym == 1', {
2722 # To get a real .dSYM bundle produced by dsymutil, set the
2723 # debug information format to dwarf-with-dsym. Since
2724 # strip_from_xcode will not be used, set Xcode to do the
2725 # stripping as well.
2726 'configurations': {
[email protected]5153767c2009-12-22 01:52:502727 'Release_Base': {
[email protected]24700642009-06-01 16:01:202728 'xcode_settings': {
2729 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2730 'DEPLOYMENT_POSTPROCESSING': 'YES',
2731 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072732 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252733 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072734 # The Xcode default is to strip debugging symbols
2735 # only (-S). Local symbols should be stripped as
2736 # well, which will be handled by -x. Xcode will
2737 # continue to insert -S when stripping even when
2738 # additional flags are added with STRIPFLAGS.
2739 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252740 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072741 ], # target_conditions
2742 }, # xcode_settings
2743 }, # configuration "Release"
2744 }, # configurations
[email protected]24700642009-06-01 16:01:202745 }, { # mac_real_dsym != 1
2746 # To get a fast fake .dSYM bundle, use a post-build step to
2747 # produce the .dSYM and strip the executable. strip_from_xcode
2748 # only operates in the Release configuration.
2749 'postbuilds': [
2750 {
2751 'variables': {
2752 # Define strip_from_xcode in a variable ending in _path
2753 # so that gyp understands it's a path and performs proper
2754 # relativization during dict merging.
2755 'strip_from_xcode_path': 'mac/strip_from_xcode',
2756 },
2757 'postbuild_name': 'Strip If Needed',
2758 'action': ['<(strip_from_xcode_path)'],
2759 },
[email protected]e14a9f92009-08-05 19:26:072760 ], # postbuilds
2761 }], # mac_real_dsym
2762 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582763 }], # (_type=="executable" or _type=="shared_library" or
2764 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072765 ], # target_conditions
2766 }, # target_defaults
2767 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552768 ['OS=="win"', {
2769 'target_defaults': {
2770 'defines': [
[email protected]a89e0942011-09-26 16:06:472771 '_WIN32_WINNT=0x0601',
2772 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552773 'WIN32',
2774 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552775 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282776 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552777 '_CRT_RAND_S',
2778 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2779 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272780 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:552781 ],
[email protected]8974e042010-06-21 18:06:522782 'conditions': [
[email protected]2212d272011-12-20 21:37:372783 ['buildtype=="Official"', {
2784 # In official builds, targets can self-select an optimization
2785 # level by defining a variable named 'optimize', and setting it
2786 # to one of
2787 # - "size", optimizes for minimal code size - the default.
2788 # - "speed", optimizes for speed over code size.
2789 # - "max", whole program optimization and link-time code
2790 # generation. This is very expensive and should be used
2791 # sparingly.
2792 'variables': {
2793 'optimize%': 'size',
2794 },
2795 'target_conditions': [
2796 ['optimize=="size"', {
2797 'msvs_settings': {
2798 'VCCLCompilerTool': {
2799 # 1, optimizeMinSpace, Minimize Size (/O1)
2800 'Optimization': '1',
2801 # 2, favorSize - Favor small code (/Os)
2802 'FavorSizeOrSpeed': '2',
2803 },
2804 },
2805 },
2806 ],
2807 ['optimize=="speed"', {
2808 'msvs_settings': {
2809 'VCCLCompilerTool': {
2810 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2811 'Optimization': '2',
2812 # 1, favorSpeed - Favor fast code (/Ot)
2813 'FavorSizeOrSpeed': '1',
2814 },
2815 },
2816 },
2817 ],
2818 ['optimize=="max"', {
2819 'msvs_settings': {
2820 'VCCLCompilerTool': {
2821 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2822 'Optimization': '2',
2823 # 1, favorSpeed - Favor fast code (/Ot)
2824 'FavorSizeOrSpeed': '1',
2825 # This implies link time code generation.
2826 'WholeProgramOptimization': 'true',
2827 },
2828 },
2829 },
2830 ],
2831 ],
2832 },
2833 ],
[email protected]8974e042010-06-21 18:06:522834 ['component=="static_library"', {
2835 'defines': [
2836 '_HAS_EXCEPTIONS=0',
2837 ],
2838 }],
[email protected]455e64b2012-05-15 14:06:572839 # To support installing a component build (where the DLLs are not in
2840 # same directory as chrome.exe and setup.exe):
2841 # create_installer_archive.py writes custom manifests for all the
2842 # DLLs. The setting below prevents VS from automatically generating
2843 # the usual manifests for those DLLs which would override the custom
2844 # external manifests.
2845 ['component=="shared_library"', {
2846 'target_conditions': [
2847 ['_type=="shared_library"', {
2848 'msvs_settings': {
2849 'VCLinkerTool': {
2850 'GenerateManifest': 'false',
2851 },
2852 },
2853 }],
2854 ],
2855 }],
[email protected]c7b95392012-03-28 00:25:202856 ['MSVS_VERSION=="2008"', {
2857 'defines': [
2858 '_HAS_TR1=0',
2859 ],
2860 }],
[email protected]3e2648a2011-03-21 20:58:502861 ['secure_atl', {
2862 'defines': [
2863 '_SECURE_ATL',
2864 ],
2865 }],
[email protected]8974e042010-06-21 18:06:522866 ],
[email protected]5b5ca7cb2009-07-20 23:00:202867 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372868 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542869 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552870 '$(VSInstallDir)/VC/atlmfc/include',
2871 ],
[email protected]a8d99cef2009-08-26 20:47:492872 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112873 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2874 # TODO(maruel): These warnings are level 4. They will be slowly
2875 # removed as code is fixed.
2876 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2877 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2878 4702, 4706,
2879 ],
[email protected]2f80c312009-02-25 21:26:552880 'msvs_settings': {
2881 'VCCLCompilerTool': {
2882 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552883 'BufferSecurityCheck': 'true',
2884 'EnableFunctionLevelLinking': 'true',
2885 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112886 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552887 'WarnAsError': 'true',
2888 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582889 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502890 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162891 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552892 }],
[email protected]3e2648a2011-03-21 20:58:502893 ['MSVS_VERSION=="2005e"', {
2894 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2895 }],
[email protected]8974e042010-06-21 18:06:522896 ['component=="shared_library"', {
2897 'ExceptionHandling': '1', # /EHsc
2898 }, {
2899 'ExceptionHandling': '0',
2900 }],
[email protected]3fef6e62009-07-31 19:58:582901 ],
[email protected]2f80c312009-02-25 21:26:552902 },
2903 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162904 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372905 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372906 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542907 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372908 ],
[email protected]2f80c312009-02-25 21:26:552909 },
2910 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552911 'AdditionalDependencies': [
2912 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502913 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552914 'version.lib',
2915 'msimg32.lib',
2916 'ws2_32.lib',
2917 'usp10.lib',
2918 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082919 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482920 'winmm.lib',
2921 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552922 ],
[email protected]60c219832012-03-21 22:59:322923
[email protected]4de39f82011-03-28 12:01:292924 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502925 ['msvs_express', {
2926 # Explicitly required when using the ATL with express
2927 'AdditionalDependencies': [
2928 'atlthunk.lib',
2929 ],
[email protected]60c219832012-03-21 22:59:322930
2931 # ATL 8.0 included in WDK 7.1 makes the linker to generate
2932 # almost eight hundred LNK4254 and LNK4078 warnings:
2933 # - warning LNK4254: section 'ATL' (50000040) merged into
2934 # '.rdata' (40000040) with different attributes
2935 # - warning LNK4078: multiple 'ATL' sections found with
2936 # different attributes
2937 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
[email protected]3e2648a2011-03-21 20:58:502938 }],
2939 ['MSVS_VERSION=="2005e"', {
2940 # Non-express versions link automatically to these
2941 'AdditionalDependencies': [
2942 'advapi32.lib',
2943 'comdlg32.lib',
2944 'ole32.lib',
2945 'shell32.lib',
2946 'user32.lib',
2947 'winspool.lib',
2948 ],
2949 }],
2950 ],
[email protected]a78da50e2010-06-09 21:31:372951 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372952 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542953 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372954 ],
[email protected]2f80c312009-02-25 21:26:552955 'GenerateDebugInformation': 'true',
2956 'MapFileName': '$(OutDir)\\$(TargetName).map',
2957 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552958 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482959 # SubSystem values:
2960 # 0 == not set
2961 # 1 == /SUBSYSTEM:CONSOLE
2962 # 2 == /SUBSYSTEM:WINDOWS
2963 # Most of the executables we'll ever create are tests
2964 # and utilities with console output.
2965 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552966 },
2967 'VCMIDLTool': {
2968 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:092969 'TypeLibraryName': '$(InputName).tlb',
2970 'OutputDirectory': '$(IntDir)',
2971 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:332972 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:092973 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2974 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:552975 },
2976 'VCResourceCompilerTool': {
2977 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382978 'AdditionalIncludeDirectories': [
2979 '<(DEPTH)',
2980 '<(SHARED_INTERMEDIATE_DIR)',
2981 ],
[email protected]2f80c312009-02-25 21:26:552982 },
2983 },
2984 },
2985 }],
[email protected]79e2336c2011-05-12 18:18:342986 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312987 'target_defaults': {
2988 'defines': [
2989 'DISABLE_NACL',
2990 ],
2991 },
2992 }],
[email protected]cfbf9bc2009-12-07 22:07:562993 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192994 'target_defaults': {
2995 'msvs_settings': {
2996 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192997 'DelayLoadDLLs': [
2998 'dbghelp.dll',
2999 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013000 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193001 'uxtheme.dll',
3002 ],
3003 },
3004 },
[email protected]ef4fa4072009-12-04 22:46:503005 'configurations': {
[email protected]5153767c2009-12-22 01:52:503006 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503007 'msvs_settings': {
3008 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163009 'AdditionalOptions': [
3010 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333011 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163012 '/ignore:4199',
3013 '/ignore:4221',
3014 '/nxcompat',
3015 ],
[email protected]ef4fa4072009-12-04 22:46:503016 },
3017 },
3018 },
[email protected]5153767c2009-12-22 01:52:503019 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503020 'msvs_settings': {
3021 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163022 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503023 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333024 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163025 '/ignore:4199',
3026 '/ignore:4221',
3027 '/nxcompat',
3028 ],
[email protected]ef4fa4072009-12-04 22:46:503029 },
3030 },
3031 },
3032 },
[email protected]48c7af72009-07-03 22:00:193033 },
3034 }],
[email protected]9821d0d2010-04-16 22:40:373035 ['enable_new_npdevice_api==1', {
3036 'target_defaults': {
3037 'defines': [
3038 'ENABLE_NEW_NPDEVICE_API',
3039 ],
3040 },
3041 }],
[email protected]d10e2cc2012-03-20 10:45:273042 ['clang==1 and OS!="android"', {
[email protected]34f40892011-09-06 21:53:303043 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:243044 ['CC', '<(make_clang_dir)/bin/clang'],
3045 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:073046 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:303047 ['CC.host', '$(CC)'],
3048 ['CXX.host', '$(CXX)'],
3049 ['LINK.host', '$(LINK)'],
3050 ],
3051 }],
[email protected]d10e2cc2012-03-20 10:45:273052 ['OS=="android" and "<(GENERATOR)"!="ninja"', {
3053 # Hardcode the compiler names in the Makefile so that
3054 # it won't depend on the environment at make time.
3055 'make_global_settings': [
3056 ['CC', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
3057 ['CXX', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'],
3058 ['LINK', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
3059 ['CC.host', '<!(which gcc)'],
3060 ['CXX.host', '<!(which g++)'],
3061 ['LINK.host', '<!(which g++)'],
3062 ],
3063 }],
[email protected]2f80c312009-02-25 21:26:553064 ],
3065 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503066 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3067 # This block adds *project-wide* configuration settings to each project
3068 # file. It's almost always wrong to put things here. Specify your
3069 # custom xcode_settings in target_defaults to add them to targets instead.
3070
3071 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3072 # setting sets the SDK on a project-wide basis. In order to get the
3073 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3074 # here at the project level.
3075 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
3076
[email protected]2f80c312009-02-25 21:26:553077 # The Xcode generator will look for an xcode_settings section at the root
3078 # of each dict and use it to apply settings on a file-wide basis. Most
3079 # settings should not be here, they should be in target-specific
3080 # xcode_settings sections, or better yet, should use non-Xcode-specific
3081 # settings in target dicts. SYMROOT is a special case, because many other
3082 # Xcode variables depend on it, including variables such as
3083 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3084 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3085 # files to appear (when present) in the UI as actual files and not red
3086 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3087 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163088 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553089 },
[email protected]ee28c9f2009-09-04 01:53:013090}