blob: 3cc9053eadf2199e170251a5942ae38cc8bb3b0a [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]f1f362b42012-05-15 17:46:5855
56 # Override buildtype to select the desired build flavor.
57 # Dev - everyday build for development/testing
58 # Official - release build (generally implies additional processing)
59 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
60 # conversion is done), some of the things which are now controlled by
61 # 'branding', such as symbol generation, will need to be refactored
62 # based on 'buildtype' (i.e. we don't care about saving symbols for
63 # non-Official # builds).
64 'buildtype%': 'Dev',
[email protected]bb6aba32011-01-07 19:04:4365 },
66 # Copy conditionally-set variables out one scope.
67 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5868 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1669 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4270 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2771 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0572 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2473 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:0674 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]8973c3a2012-04-25 02:24:1875 'enable_metro%': '<(enable_metro)',
[email protected]e0825562012-05-10 01:50:4776 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]f1f362b42012-05-15 17:46:5877 'buildtype%': '<(buildtype)',
78
[email protected]e72e55b2011-01-06 22:19:3079 # Compute the architecture that we're building on.
80 'conditions': [
[email protected]177cd082011-10-04 18:36:3881 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3782 'host_arch%': 'ia32',
83 }, {
[email protected]79e2336c2011-05-12 18:18:3484 # This handles the Unix platforms for which there is some support.
85 # Anything else gets passed through, which probably won't work very
86 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3087 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3488 '<!(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:3089 }],
[email protected]1353a092012-01-13 03:34:2890
[email protected]838a3cd2012-03-19 16:10:5591 # Chromeos implies ash.
[email protected]5f887612012-03-01 21:34:0692 ['chromeos==1', {
93 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1694 'use_aura%': 1,
95 }],
[email protected]bb6aba32011-01-07 19:04:4396
[email protected]5f887612012-03-01 21:34:0697 # For now, Windows *AND* Linux builds that |use_aura| should also
98 # imply using ash. This rule should be removed for the future when
99 # both Linux and Windows are using the aura windows without the ash
100 # interface.
[email protected]bfd4b902012-05-17 19:32:53101 ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', {
[email protected]5f887612012-03-01 21:34:06102 'use_ash%': 1,
103 }],
[email protected]d02c4162012-05-04 20:51:51104 ['use_ash==1', {
105 'use_aura%': 1,
106 }],
[email protected]5f887612012-03-01 21:34:06107
[email protected]ab2017e2012-02-07 01:54:50108 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35109 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43110 'toolkit_views%': 1,
111 }, {
112 'toolkit_views%': 0,
113 }],
[email protected]1efbaaa2012-04-24 02:43:24114
115 # Enable HiDPI on Mac OS.
116 ['OS=="mac"', {
117 'enable_hidpi%': 1,
118 }],
[email protected]219c7312012-05-10 20:32:40119
[email protected]6155e702012-05-02 17:56:06120 # Enable touch UI on Metro and Chrome OS.
121 ['enable_metro==1 or chromeos==1', {
122 'enable_touch_ui%': 1,
123 }],
[email protected]e72e55b2011-01-06 22:19:30124 ],
125 },
126
127 # Copy conditionally-set variables out one scope.
128 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30129 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43130 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:58131 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16132 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42133 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:27134 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05135 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24136 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06137 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]8973c3a2012-04-25 02:24:18138 'enable_metro%': '<(enable_metro)',
[email protected]08d910e22012-05-11 05:42:35139 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]023d8242011-11-22 01:25:27140
[email protected]8fb0ef02011-05-20 00:53:50141 # We used to provide a variable for changing how libraries were built.
142 # This variable remains until we can clean up all the users.
143 # This needs to be one nested variables dict in so that dependent
144 # gyp files can make use of it in their outer variables. (Yikes!)
145 # http://code.google.com/p/chromium/issues/detail?id=83308
146 'library%': 'static_library',
147
[email protected]e14a9f92009-08-05 19:26:07148 # Override branding to select the desired branding flavor.
149 'branding%': 'Chromium',
150
[email protected]f1f362b42012-05-15 17:46:58151 'buildtype%': '<(buildtype)',
[email protected]cbd5fd52009-08-26 00:14:27152
[email protected]e72e55b2011-01-06 22:19:30153 # Default architecture we're building for is the architecture we're
154 # building on.
155 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17156
[email protected]e72e55b2011-01-06 22:19:30157 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
158 # are built under a chromium full build (1) or a webkit.org chromium
159 # build (0).
160 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52161
[email protected]e72e55b2011-01-06 22:19:30162 # Set to 1 to enable fast builds. It disables debug info for fastest
163 # compilation.
164 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49165
[email protected]20960e072011-09-20 20:59:01166 # Set to 1 to enable dcheck in release without having to use the flag.
167 'dcheck_always_on%': 0,
168
[email protected]464750f2011-10-24 23:16:18169 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51170 'file_manager_extension%': 0,
171
[email protected]5f16f8a2012-03-14 07:38:23172 # Disable WebUI TaskManager by default.
173 'webui_task_manager%': 0,
[email protected]8b2e9f392011-08-05 04:00:47174
[email protected]e72e55b2011-01-06 22:19:30175 # Python version.
[email protected]a43c5a02011-05-27 06:54:51176 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17177
[email protected]e72e55b2011-01-06 22:19:30178 # Set ARM-v7 compilation flags
179 'armv7%': 0,
180
181 # Set Neon compilation flags (only meaningful if armv7==1).
182 'arm_neon%': 1,
183
184 # The system root for cross-compiles. Default: none.
185 'sysroot%': '',
186
[email protected]945361a2011-09-30 04:38:43187 # The system libdir used for this ABI.
188 'system_libdir%': 'lib',
189
[email protected]e72e55b2011-01-06 22:19:30190 # On Linux, we build with sse2 for Chromium builds.
191 'disable_sse2%': 0,
192
193 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03194 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30195
196 # Variable 'component' is for cases where we would like to build some
197 # components as dynamic shared libraries but still need variable
198 # 'library' for static libraries.
199 # By default, component is set to whatever library is set to and
200 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53201 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30202
[email protected]bb6aba32011-01-07 19:04:43203 # Set to select the Title Case versions of strings in GRD files.
204 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21205
[email protected]98da0042011-02-02 00:10:27206 # Use translations provided by volunteers at launchpad.net. This
207 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19208 'use_third_party_translations%': 0,
209
[email protected]9a425422011-01-11 00:53:18210 # Remoting compilation is enabled by default. Set to 0 to disable.
211 'remoting%': 1,
212
[email protected]a026daa2011-04-20 15:49:51213 # P2P APIs are compiled in by default. Set to 0 to disable.
214 # Also note that this should be enabled for remoting to compile.
215 'p2p_apis%': 1,
216
[email protected]1ec68c42011-06-01 13:56:25217 # Configuration policy is enabled by default. Set to 0 to disable.
218 'configuration_policy%': 1,
219
[email protected]4b58e7d2011-07-11 10:22:56220 # Safe browsing is compiled in by default. Set to 0 to disable.
221 'safe_browsing%': 1,
222
[email protected]9eb100e2011-10-14 05:08:22223 # Speech input is compiled in by default. Set to 0 to disable.
224 'input_speech%': 1,
225
[email protected]7cce3232011-10-28 10:41:57226 # Notifications are compiled in by default. Set to 0 to disable.
227 'notifications%' : 1,
228
[email protected]5d451ad2011-02-11 16:43:46229 # If this is set, the clang plugins used on the buildbot will be used.
230 # Run tools/clang/scripts/update.sh to make sure they are compiled.
231 # This causes 'clang_chrome_plugins_flags' to be set.
232 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08233 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46234
[email protected]f36f3742011-11-21 13:12:14235 # Enable building with ASAN (Clang's -faddress-sanitizer option).
236 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06237 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
238 'asan%': 0,
239
[email protected]8a6abd12012-05-16 10:04:44240 # Set to true to instrument the code with function call logger.
241 # See src/third_party/cygprofile/cyg-profile.cc for details.
242 'order_profiling%': 0,
243
[email protected]00b0a7f2012-01-25 15:30:46244 # Use the provided profiled order file to link Chrome image with it.
245 # This makes Chrome faster by better using CPU cache when executing code.
246 # This is known as PGO (profile guided optimization).
247 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
248 'order_text_section%' : "",
249
[email protected]1ad5a7b2011-06-24 03:15:13250 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
251 # libraries on linux x86-64 and arm, plus ASLR.
252 'linux_fpic%': 1,
253
[email protected]bd7b6fe2012-03-05 21:02:40254 # Whether one-click signin is enabled or not.
255 'enable_one_click_signin%': 0,
256
[email protected]5ffb0a42012-01-27 09:36:11257 # Enable Web Intents support in WebKit, dispatching of intents,
258 # and extensions Web Intents support.
259 'enable_web_intents%': 1,
260
[email protected]6a3cd37e2012-04-17 17:13:34261 # Enable Chrome browser extensions
262 'enable_extensions%': 1,
263
[email protected]5ffb0a42012-01-27 09:36:11264 # Enable Web Intents web content registration via HTML element
265 # and WebUI managing such registrations.
266 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01267
[email protected]dda90ae2011-07-19 22:07:48268 # Webrtc compilation is enabled by default. Set to 0 to disable.
269 'enable_webrtc%': 1,
270
[email protected]67c125d2011-10-11 18:58:22271 # PPAPI by default does not support plugins making calls off the main
272 # thread. Set to 1 to turn on experimental support for out-of-process
273 # plugins to make call of the main thread.
274 'enable_pepper_threading%': 0,
275
[email protected]b11afaf2012-05-17 22:25:10276 # Include the PPAPI IPC proxy for NaCl. This is a work-in-progress; this
277 # allows us to build this feature locally without it affecting others
278 # working in affected subsystems like base and ipc.
279 'build_ppapi_ipc_proxy_untrusted%': 0,
280
[email protected]cdb756ef2012-04-05 18:34:53281 # Enables use of the session service, which is enabled by default.
282 # Support for disabling depends on the platform.
283 'enable_session_service%': 1,
284
[email protected]6b40bb582012-03-15 20:50:38285 # Enables theme support, which is enabled by default. Support for
286 # disabling depends on the platform.
287 'enable_themes%': 1,
288
[email protected]0acdd772012-04-05 22:53:00289 # Enables support for background apps.
290 'enable_background%': 1,
291
[email protected]44879ed2012-04-06 01:11:02292 # Enable the task manager by default.
293 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45294
[email protected]58242012012-04-12 16:14:31295 # Enables support for promo resource service.
296 'enable_promo_resource_service%': 1,
[email protected]44879ed2012-04-06 01:11:02297
[email protected]22d6dd72012-05-15 07:29:55298 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
299 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
300 # the input value also defines the required XI2 minor minimum version.
301 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
302 'use_xi2_mt%': 0,
303
[email protected]9061bee82012-01-16 11:45:17304 # Use of precompiled headers on Windows.
305 #
306 # This is on by default in VS 2010, but off by default for VS
307 # 2008 because of complications that it can cause with our
308 # trybots etc.
309 #
310 # This variable may be explicitly set to 1 (enabled) or 0
311 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
312 # This setting will override the default.
313 #
314 # Note that a setting of 1 is probably suitable for most or all
315 # Windows developers using VS 2008, since precompiled headers
316 # provide a build speedup of 20-25%. There are a couple of
317 # small workarounds you may need to use when using VS 2008 (but
318 # not 2010), see
319 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
320 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16321 'chromium_win_pch%': 0,
322
[email protected]3bb37e62012-04-19 03:40:08323 # Set this to true when building with Clang.
324 # See http://code.google.com/p/chromium/wiki/Clang for details.
325 'clang%': 0,
326
[email protected]18e0f39b2012-01-17 16:47:34327 # Enable plug-in installation by default.
328 'enable_plugin_installation%': 1,
329
[email protected]ddcaa412012-03-30 19:57:29330 # Enable protector service by default.
331 'enable_protector_service%': 1,
332
[email protected]62424a52012-03-18 03:09:50333 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42334 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35335 # Chrome UI.
336 # TODO(asvitkine): Enable this on all platforms and delete this flag.
337 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50338 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35339
[email protected]a9318c72012-03-01 01:29:47340 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
341 # with one of those tools.
342 'build_for_tool%': '',
343
[email protected]01971642012-03-07 14:39:56344 # Whether tests targets should be run, archived or just have the
345 # dependencies verified. All the tests targets have the '_run' suffix,
346 # e.g. base_unittests_run runs the target base_unittests. The test target
347 # always calls tools/isolate/isolate.py. See the script's --help for more
348 # information and the valid --mode values. Meant to be overriden with
349 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13350 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
351 # be done while the builders are being reconfigured to check out test data
352 # files.
[email protected]0ef3a522012-05-15 14:56:33353 'test_isolation_mode%': 'noop',
354 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise
355 # gyp will remove duplicate flags, causing isolate.py to be confused.
356 'test_isolation_outdir%': '<(PRODUCT_DIR)/',
[email protected]01971642012-03-07 14:39:56357
[email protected]81d9b72d2012-03-26 22:29:17358 # Force rlz to use chrome's networking stack.
359 'force_rlz_use_chrome_net%': 1,
360
[email protected]49ae3e52012-04-12 09:50:12361 'platformsdk_path%': '<(DEPTH)/third_party/platformsdk_win7/files',
362 'wix_path%': '<(DEPTH)/third_party/wix',
363
[email protected]bb6aba32011-01-07 19:04:43364 'conditions': [
[email protected]33423fa2011-09-23 18:18:14365 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
366 # the 'conditions' clause. Initial attempts resulted in chromium and
367 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22368 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21369 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22370 }, {
371 'use_skia%': 1,
372 }],
373
[email protected]79e2336c2011-05-12 18:18:34374 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37375 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34376 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37377 }, {
378 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34379 }],
380
[email protected]df9167b2011-11-14 19:15:25381 # A flag for BSD platforms
382 ['OS=="freebsd" or OS=="openbsd"', {
383 'os_bsd%': 1,
384 }, {
385 'os_bsd%': 0,
386 }],
387
[email protected]c329adf82011-10-05 14:34:57388 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42389 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57390 'use_nss%': 1,
391 }, {
392 'use_nss%': 0,
393 }],
[email protected]e0b85a52011-10-06 03:30:42394
[email protected]258dca42011-09-21 00:17:19395 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01396 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19397 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34398 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37399 }, {
[email protected]258dca42011-09-21 00:17:19400 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37401 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34402 }],
[email protected]9a8175892012-03-20 02:11:58403
404 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]17b11af2012-03-21 21:46:17405 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
[email protected]9a8175892012-03-20 02:11:58406 'toolkit_uses_gtk%': 1,
407 }, {
408 'toolkit_uses_gtk%': 0,
409 }],
410
[email protected]efadeacf2011-10-27 19:01:00411 # We always use skia text rendering in Aura on Windows, since GDI
412 # doesn't agree with our BackingStore.
413 # TODO(beng): remove once skia text rendering is on by default.
414 ['use_aura==1 and OS=="win"', {
415 'enable_skia_text%': 1,
416 }],
[email protected]9edeb712011-09-20 21:20:33417
[email protected]63692212010-09-16 00:22:21418 # A flag to enable or disable our compile-time dependency
419 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
420 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49421 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50422 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21423 'use_gnome_keyring%': 0,
424 }, {
425 'use_gnome_keyring%': 1,
426 }],
[email protected]0afe5212010-10-01 18:56:11427
[email protected]bb6aba32011-01-07 19:04:43428 ['toolkit_views==0 or OS=="mac"', {
429 # GTK+ and Mac wants Title Case strings
430 'use_titlecase_in_grd_files%': 1,
431 }],
432
[email protected]5f887612012-03-01 21:34:06433 # Enable file manager extension on Chrome OS.
434 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50435 'file_manager_extension%': 1,
436 }, {
[email protected]3d38d8e2011-04-16 20:48:51437 'file_manager_extension%': 0,
438 }],
[email protected]7de46352011-09-12 15:39:19439
[email protected]febc41db2012-03-24 02:44:43440 # Enable WebUI TaskManager on Chrome OS or Aura.
441 ['chromeos==1 or use_aura==1', {
442 'webui_task_manager%': 1,
[email protected]5f16f8a2012-03-14 07:38:23443 }],
444
[email protected]da1c8d692011-09-20 20:35:01445 ['OS=="android"', {
446 'proprietary_codecs%': 1,
447 'enable_webrtc%': 0,
448 }],
[email protected]839d5172011-10-13 17:18:11449
450 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27451 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01452 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33453 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11454 }, {
[email protected]1ee7c56c2011-10-19 14:51:33455 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11456 }],
[email protected]9061bee82012-01-16 11:45:17457
[email protected]75de7212012-05-12 01:14:46458 # Turn precompiled headers on by default for VS 2010.
[email protected]f1f362b42012-05-15 17:46:58459 ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17460 'chromium_win_pch%': 1
461 }],
[email protected]18e0f39b2012-01-17 16:47:34462
[email protected]3d5173ec2012-03-27 04:08:23463 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34464 'enable_plugin_installation%': 0,
465 }, {
466 'enable_plugin_installation%': 1,
467 }],
[email protected]b07806c12012-02-03 22:44:59468
[email protected]ddcaa412012-03-30 19:57:29469 ['OS=="android"', {
470 'enable_protector_service%': 0,
471 }, {
472 'enable_protector_service%': 1,
473 }],
474
[email protected]8d726a42012-02-09 03:49:00475 # linux_use_gold_binary: whether to use the binary checked into
476 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40477 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51478 'linux_use_gold_binary%': 1,
479 }, {
480 'linux_use_gold_binary%': 0,
481 }],
482
[email protected]be239492012-02-09 19:00:17483 # linux_use_gold_flags: whether to use build flags that rely on gold.
484 # On by default for x64 Linux. Temporarily off for ChromeOS as
485 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40486 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17487 'linux_use_gold_flags%': 1,
488 }, {
[email protected]8d726a42012-02-09 03:49:00489 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59490 }],
[email protected]2e22e2f2012-03-15 21:53:10491
492 # Enable automation on platforms other than Android.
493 ['OS=="android"', {
494 'enable_automation%': 0,
495 }, {
496 'enable_automation%': 1,
497 }],
[email protected]3bd47e022012-03-22 04:19:12498
499 # Enable Skia UI text drawing incrementally on different platforms.
500 # http://crbug.com/105550
501 #
502 # On Aura, this allows per-tile painting to be used in the browser
503 # compositor.
[email protected]70a377c2012-04-04 14:01:17504 ['use_aura==1 or OS=="win"', {
[email protected]3bd47e022012-03-22 04:19:12505 'use_canvas_skia%': 1,
506 }],
[email protected]b3f23ba2010-04-26 22:58:17507 ],
[email protected]e14a9f92009-08-05 19:26:07508 },
509
[email protected]e72e55b2011-01-06 22:19:30510 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07511 'branding%': '<(branding)',
512 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27513 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59514 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50515 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44516 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33517 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58518 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16519 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42520 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57521 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25522 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34523 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19524 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34525 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22526 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34527 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21528 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11529 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22530 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]b11afaf2012-05-17 22:25:10531 'build_ppapi_ipc_proxy_untrusted%': '<(build_ppapi_ipc_proxy_untrusted)',
[email protected]c153e5352009-09-22 12:37:44532 'chromeos%': '<(chromeos)',
[email protected]2cc81d32011-10-04 17:03:18533 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05534 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24535 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06536 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]8973c3a2012-04-25 02:24:18537 'enable_metro%': '<(enable_metro)',
[email protected]f56797b2011-09-25 00:04:35538 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20539 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47540 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21541 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54542 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01543 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36544 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43545 'armv7%': '<(armv7)',
546 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23547 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43548 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22549 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52550 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43551 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17552 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18553 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40554 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48555 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16556 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51557 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25558 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56559 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22560 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57561 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46562 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06563 'asan%': '<(asan)',
[email protected]8a6abd12012-05-16 10:04:44564 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46565 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34566 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07567 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11568 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34569 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]ddcaa412012-03-30 19:57:29570 'enable_protector_service%': '<(enable_protector_service)',
[email protected]cdb756ef2012-04-05 18:34:53571 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38572 'enable_themes%': '<(enable_themes)',
[email protected]0acdd772012-04-05 22:53:00573 'enable_background%': '<(enable_background)',
[email protected]58242012012-04-12 16:14:31574 'enable_promo_resource_service%': '<(enable_promo_resource_service)',
[email protected]b07806c12012-02-03 22:44:59575 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00576 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50577 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33578 'test_isolation_mode%': '<(test_isolation_mode)',
579 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10580 'enable_automation%': '<(enable_automation)',
[email protected]81d9b72d2012-03-26 22:29:17581 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)',
[email protected]44879ed2012-04-06 01:11:02582 'enable_task_manager%': '<(enable_task_manager)',
[email protected]49ae3e52012-04-12 09:50:12583 'platformsdk_path%': '<(platformsdk_path)',
584 'wix_path%': '<(wix_path)',
[email protected]08d910e22012-05-11 05:42:35585 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]01971642012-03-07 14:39:56586
[email protected]371e1092011-10-12 20:37:36587 # Use system yasm instead of bundled one.
588 'use_system_yasm%': 0,
589
[email protected]cd00bd862012-02-29 00:40:36590 # Default to enabled PIE; this is important for ASLR but we may need to be
591 # able to turn it off for various reasons.
592 'linux_disable_pie%': 0,
593
[email protected]caa95c82009-11-23 22:39:32594 # The release channel that this build targets. This is used to restrict
595 # channel-specific build options, like which installer packages to create.
596 # The default is 'all', which does no channel-specific filtering.
597 'channel%': 'all',
598
[email protected]b3fb8092009-03-12 19:09:24599 # Override chromium_mac_pch and set it to 0 to suppress the use of
600 # precompiled headers on the Mac. Prefix header injection may still be
601 # used, but prefix headers will not be precompiled. This is useful when
602 # using distcc to distribute a build to compile slaves that don't
603 # share the same compiler executable as the system driving the compilation,
604 # because precompiled headers rely on pointers into a specific compiler
605 # executable's image. Setting this to 0 is needed to use an experimental
606 # Linux-Mac cross compiler distcc farm.
607 'chromium_mac_pch%': 1,
608
[email protected]3224dcd2009-09-16 17:31:25609 # Mac OS X SDK and deployment target support.
610 # The SDK identifies the version of the system headers that will be used,
611 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
612 # "Maximum allowed" refers to the operating system version whose APIs are
613 # available in the headers.
614 # The deployment target identifies the minimum system version that the
615 # built products are expected to function on. It corresponds to the
616 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
617 # To ensure these macros are available, #include <AvailabilityMacros.h>.
618 # Additional documentation on these macros is available at
619 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
620 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
621 # deployment target to 10.5. Other projects, such as O3D, may override
622 # these defaults.
623 'mac_sdk%': '10.5',
624 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59625
[email protected]27b687ec42012-03-26 22:22:15626 # The default value for mac_strip in target_defaults. This cannot be
627 # set there, per the comment about variable% in a target_defaults.
628 'mac_strip_release%': 1,
629
[email protected]f5ecbba12009-04-03 04:35:18630 # Set to 1 to enable code coverage. In addition to build changes
631 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
632 # project file called "coverage".
633 # Currently ignored on Windows.
634 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49635
[email protected]7477ea6f2009-12-22 23:28:15636 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47637 # environment variable, the libcmt shim it uses sometimes gets in
638 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
639 # 'win_use_allocator_shim': 0,
640 # 'win_release_RuntimeLibrary': 2
641 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52642 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11643
[email protected]95ff8082009-11-13 22:21:01644 # Whether usage of OpenMAX is enabled.
645 'enable_openmax%': 0,
646
[email protected]d01120e62010-05-10 17:04:48647 # Whether proprietary audio/video codecs are assumed to be included with
648 # this build (only meaningful if branding!=Chrome).
649 'proprietary_codecs%': 0,
650
[email protected]e5b2eaa2009-04-14 01:39:12651 # TODO(bradnelson): eliminate this when possible.
652 # To allow local gyp files to prevent release.vsprops from being included.
653 # Yes(1) means include release.vsprops.
654 # Once all vsprops settings are migrated into gyp, this can go away.
655 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23656
[email protected]cbd5fd52009-08-26 00:14:27657 # TODO(bradnelson): eliminate this when possible.
658 # To allow local gyp files to override additional linker options for msvs.
659 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19660 'msvs_use_common_linker_extras%': 1,
661
[email protected]1ffb6502009-06-02 07:46:24662 # TODO(sgk): eliminate this if possible.
663 # It would be nicer to support this via a setting in 'target_defaults'
664 # in chrome/app/locales/locales.gypi overriding the setting in the
665 # 'Debug' configuration in the 'target_defaults' dict below,
666 # but that doesn't work as we'd like.
667 'msvs_debug_link_incremental%': '2',
668
[email protected]1f790ef2011-01-11 20:45:36669 # Needed for some of the largest modules.
670 'msvs_debug_link_nonincremental%': '1',
671
[email protected]5ab8f482011-08-18 18:30:06672 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
673 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51674 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06675
[email protected]573136142009-07-15 22:48:37676 # This is the location of the sandbox binary. Chrome looks for this before
677 # running the zygote process. If found, and SUID, it will be used to
678 # sandbox the zygote process and, thus, all renderer processes.
679 'linux_sandbox_path%': '',
680
[email protected]ad6d2c42009-09-15 20:13:38681 # Set this to true to enable SELinux support.
682 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57683
[email protected]3bb37e62012-04-19 03:40:08684 # Clang stuff.
685 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24686 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15687
[email protected]5e781232011-01-28 02:57:59688 # These two variables can be set in GYP_DEFINES while running
689 # |gclient runhooks| to let clang run a plugin in every compilation.
690 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
691 # Example:
[email protected]93120fe2011-02-03 20:46:42692 # 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:59693
694 'clang_load%': '',
695 'clang_add_plugin%': '',
696
[email protected]da1c8d692011-09-20 20:35:01697 # The default type of gtest.
698 'gtest_target_type%': 'executable',
699
[email protected]7664ab32011-02-01 23:35:25700 # Enable sampling based profiler.
701 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
702 'profiling%': '0',
703
[email protected]93b373502011-08-16 19:06:22704 # Enable strict glibc debug mode.
705 'glibcxx_debug%': 0,
706
[email protected]36532f332010-08-25 00:22:01707 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
708 'linux_breakpad%': 0,
709 # And if we want to dump symbols for Breakpad-enabled builds.
710 'linux_dump_symbols%': 0,
711 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03712 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49713 # Strip the test binaries needed for Linux reliability tests.
714 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03715
[email protected]46ce5b562010-06-16 18:39:53716 # Enable TCMalloc.
717 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24718
[email protected]39ca7de2010-04-16 08:04:03719 # Disable TCMalloc's debugallocation.
720 'linux_use_debugallocation%': 0,
721
[email protected]d8b60602010-03-26 09:41:22722 # Disable TCMalloc's heapchecker.
723 'linux_use_heapchecker%': 0,
724
[email protected]64e2d4a42010-08-27 10:13:21725 # Disable shadow stack keeping used by heapcheck to unwind the stacks
726 # better.
727 'linux_keep_shadow_stacks%': 0,
728
[email protected]556c5d72010-06-10 05:45:01729 # Set to 1 to link against libgnome-keyring instead of using dlopen().
730 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35731 # Set to 1 to link against gsettings APIs instead of using dlopen().
732 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01733
[email protected]77c1b29392009-12-04 06:21:29734 # Set Thumb compilation flags.
735 'arm_thumb%': 0,
736
[email protected]53e0f642010-03-05 01:41:56737 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
738 # arm_neon==0).
739 'arm_fpu%': 'vfpv3',
740
[email protected]5252af72012-05-04 19:26:40741 # Set ARM float abi compilation flag.
742 'arm_float_abi%': 'softfp',
743
[email protected]9821d0d2010-04-16 22:40:37744 # Enable new NPDevice API.
745 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50746
747 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14748 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50749
[email protected]6f51b27e2010-06-22 20:43:53750 # Enable a variable used elsewhere throughout the GYP files to determine
751 # whether to compile in the sources for the GPU plugin / process.
752 'enable_gpu%': 1,
753
[email protected]e72e55b2011-01-06 22:19:30754 # .gyp files or targets should set chromium_code to 1 if they build
755 # Chromium-specific code, as opposed to external code. This variable is
756 # used to control such things as the set of warnings to enable, and
757 # whether warnings are treated as errors.
758 'chromium_code%': 0,
759
[email protected]8d726a42012-02-09 03:49:00760 'release_valgrind_build%': 0,
761
[email protected]b1eb341c2011-11-09 18:46:07762 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
763 'enable_wexit_time_destructors%': 0,
764
[email protected]e72e55b2011-01-06 22:19:30765 # Set to 1 to compile with the built in pdf viewer.
766 'internal_pdf%': 0,
767
768 # This allows to use libcros from the current system, ie. /usr/lib/
769 # The cros_api will be pulled in as a static library, and all headers
770 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43771 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30772
[email protected]e72e55b2011-01-06 22:19:30773 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
774 # so Cocoa is happy (http://crbug.com/20441).
775 'locales': [
776 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
777 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
778 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19779 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30780 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
781 'vi', 'zh-CN', 'zh-TW',
782 ],
783
[email protected]cc0322d2011-07-24 09:29:19784 # Pseudo locales are special locales which are used for testing and
785 # debugging. They don't get copied to the final app. For more info,
786 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
787 'pseudo_locales': [
788 'fake-bidi',
789 ],
790
[email protected]bb6aba32011-01-07 19:04:43791 'grit_defines': [],
792
[email protected]bd3bd442011-03-28 07:58:51793 # If debug_devtools is set to 1, JavaScript files for DevTools are
794 # stored as is and loaded from disk. Otherwise, a concatenated file
795 # is stored in resources.pak. It is still possible to load JS files
796 # from disk by passing --debug-devtools cmdline switch.
797 'debug_devtools%': 0,
798
[email protected]464750f2011-10-24 23:16:18799 # The Java Bridge is not compiled in by default.
800 'java_bridge%': 0,
801
[email protected]33e1c372011-12-14 16:32:07802 # This flag is only used when disable_nacl==0 and disables all those
803 # subcomponents which would require the installation of a native_client
804 # untrusted toolchain.
805 'disable_nacl_untrusted%': 0,
806
[email protected]407dfa632011-12-23 11:59:35807 # Disable Dart by default.
808 'enable_dart%': 0,
809
[email protected]ff10b132012-02-29 22:53:30810 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
811 'msbuild_toolset%': '',
812
[email protected]836285f22012-04-03 16:19:26813 # Native Client is enabled by default.
814 'disable_nacl%': 0,
815
[email protected]49ae3e52012-04-12 09:50:12816 'platformsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py <(platformsdk_path))',
817 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
818
[email protected]912c55c2009-07-31 23:33:55819 'conditions': [
[email protected]da1c8d692011-09-20 20:35:01820 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10821 # This will set gcc_version to XY if you are running gcc X.Y.*.
822 # This is used to tweak build flags for gcc 4.4.
823 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23824 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43825 '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:27826 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10827 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27828 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27829 }],
[email protected]4c9cc6c2009-10-01 18:54:57830 # All Chrome builds have breakpad symbols, but only process the
831 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08832 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57833 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57834 }],
[email protected]cbd5fd52009-08-26 00:14:27835 ],
[email protected]da1c8d692011-09-20 20:35:01836 }], # os_posix==1 and OS!="mac" and OS!="android"
837 ['OS=="android"', {
838 # Location of Android NDK.
839 'variables': {
840 'variables': {
841 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
[email protected]219c7312012-05-10 20:32:40842 # Android uses x86 instead of ia32 for their target_arch
[email protected]febd3572012-05-03 09:17:45843 # designation.
[email protected]219c7312012-05-10 20:32:40844 # TODO(wistoch): Adjust the target_arch naming scheme to avoid
[email protected]febd3572012-05-03 09:17:45845 # confusion.
846 # http://crbug.com/125329
847 'conditions': [
848 ['target_arch == "ia32"', {
849 'target_arch': 'x86',
[email protected]de5b7a42012-05-16 06:18:41850 'android_app_abi%': 'x86',
851 }],
852 ['target_arch=="arm" and armv7==0', {
853 'android_app_abi%': 'armeabi',
854 }],
855 ['target_arch=="arm" and armv7==1', {
856 'android_app_abi%': 'armeabi-v7a',
[email protected]febd3572012-05-03 09:17:45857 }],
858 ],
[email protected]bb6aba32011-01-07 19:04:43859
[email protected]da1c8d692011-09-20 20:35:01860 # Switch between different build types, currently only '0' is
861 # supported.
862 'android_build_type%': 0,
863 },
864 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febc41db2012-03-24 02:44:43865 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)',
[email protected]da1c8d692011-09-20 20:35:01866 'android_build_type%': '<(android_build_type)',
[email protected]de5b7a42012-05-16 06:18:41867 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:01868 },
869 'android_ndk_root%': '<(android_ndk_root)',
870 'android_ndk_sysroot': '<(android_ndk_sysroot)',
871 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
872 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]de5b7a42012-05-16 06:18:41873 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:01874
875 # Uses Android's crash report system
876 'linux_breakpad%': 0,
877
878 # Always uses openssl.
879 'use_openssl%': 1,
880
881 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:02882 'enable_task_manager%': 0,
[email protected]da1c8d692011-09-20 20:35:01883 'safe_browsing%': 0,
884 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22885 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56886 'enable_web_intents%': 0,
[email protected]6a3cd37e2012-04-17 17:13:34887 'enable_extensions%': 0,
[email protected]464750f2011-10-24 23:16:18888 'java_bridge%': 1,
[email protected]6b40bb582012-03-15 20:50:38889 # Android does not support themes.
890 'enable_themes%': 0,
[email protected]58242012012-04-12 16:14:31891
892 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:00893 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:11894
[email protected]58242012012-04-12 16:14:31895 # Android does not support promo resources service.
896 'enable_promo_resource_service%': 0,
897
[email protected]cdb756ef2012-04-05 18:34:53898 # Sessions are store separately in the Java side.
899 'enable_session_service%': 0,
900
[email protected]5fd2e842012-03-01 00:29:11901 # Set to 1 once we have a notification system for Android.
902 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57903 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01904
[email protected]c6911392012-03-24 04:44:41905 'gtest_target_type%': '<(gtest_target_type)',
[email protected]d9f96952012-04-19 21:02:09906 # TODO(jrg): when 'gtest_target_type'=='shared_libary' and
907 # OS==android, make all gtest_targets depend on
908 # testing/android/native_test.gyp:native_test_apk.
909 ### 'gtest_target_type': 'shared_libary',
[email protected]da1c8d692011-09-20 20:35:01910
911 # Uses system APIs for decoding audio and video.
912 'use_libffmpeg%': '0',
913
914 # Always use the chromium skia. The use_system_harfbuzz needs to
915 # match use_system_skia.
916 'use_system_skia%': '0',
917 'use_system_harfbuzz%': '0',
918
919 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28920 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01921
[email protected]7c3dc4732012-04-13 07:37:15922 # TODO(yfriedman): Remove once unit_tests can link for Android.
923 # To override it specify:
924 # GYP_DEFINES="$GYP_DEFINES android_unit_test_target_type=executable"
925 # android_gyp
926 'android_unit_test_target_type%': 'static_library',
927
[email protected]da1c8d692011-09-20 20:35:01928 # Choose static link by build type.
929 'conditions': [
930 ['android_build_type==0', {
931 'static_link_system_icu%': 1,
932 }, {
933 'static_link_system_icu%': 0,
934 }],
935 ],
936 # Enable to use system sqlite.
937 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16938 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01939 'use_system_libjpeg%': '<(android_build_type)',
940 # Enable to use the system libexpat.
941 'use_system_libexpat%': '<(android_build_type)',
942 # Enable to use the system stlport, otherwise statically
943 # link the NDK one?
944 'use_system_stlport%': '<(android_build_type)',
945 # Copy it out one scope.
946 'android_build_type%': '<(android_build_type)',
947 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07948 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11949 # Enable clang on mac by default!
950 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56951 # Compile in Breakpad support by default so that it can be
952 # tested, even if it is not enabled by default at runtime.
953 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07954 'conditions': [
955 # mac_product_name is set to the name of the .app bundle as it should
956 # appear on disk. This duplicates data from
957 # chrome/app/theme/chromium/BRANDING and
958 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
959 # these names into the build system.
960 ['branding=="Chrome"', {
961 'mac_product_name%': 'Google Chrome',
962 }, { # else: branding!="Chrome"
963 'mac_product_name%': 'Chromium',
964 }],
965
[email protected]e14a9f92009-08-05 19:26:07966 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56967 # Enable uploading crash dumps.
968 'mac_breakpad_uploads%': 1,
969 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07970 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56971 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07972 'mac_keystone%': 1,
973 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56974 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07975 'mac_breakpad%': 0,
976 'mac_keystone%': 0,
977 }],
978 ],
979 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43980
[email protected]912c55c2009-07-31 23:33:55981 ['OS=="win"', {
982 'conditions': [
[email protected]8974e042010-06-21 18:06:52983 ['component=="shared_library"', {
984 'win_use_allocator_shim%': 0,
985 }],
[email protected]2212d272011-12-20 21:37:37986 # Whether to use multiple cores to compile with visual studio. This is
987 # optional because it sometimes causes corruption on VS 2005.
988 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55989 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13990 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55991 },{
992 'msvs_multi_core_compile%': 1,
993 }],
[email protected]10bb8c92009-08-07 21:16:03994 # Don't do incremental linking for large modules on 32-bit.
995 ['MSVS_OS_BITS==32', {
996 'msvs_large_module_debug_link_mode%': '1', # No
997 },{
998 'msvs_large_module_debug_link_mode%': '2', # Yes
999 }],
[email protected]3e2648a2011-03-21 20:58:501000 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
1001 'msvs_express%': 1,
1002 'secure_atl%': 0,
1003 },{
1004 'msvs_express%': 0,
1005 'secure_atl%': 1,
1006 }],
[email protected]912c55c2009-07-31 23:33:551007 ],
[email protected]ef4fa4072009-12-04 22:46:501008 'nacl_win64_defines': [
1009 # This flag is used to minimize dependencies when building
1010 # Native Client loader for 64-bit Windows.
1011 'NACL_WIN64',
1012 ],
[email protected]912c55c2009-07-31 23:33:551013 }],
[email protected]bb6aba32011-01-07 19:04:431014
[email protected]febd3572012-05-03 09:17:451015 ['os_posix==1 and chromeos==0 and OS!="android"', {
[email protected]8e553f42010-10-25 20:05:441016 'use_cups%': 1,
1017 }, {
1018 'use_cups%': 0,
1019 }],
[email protected]bb6aba32011-01-07 19:04:431020
[email protected]19fe8f0b2010-12-07 07:27:271021 # Set the relative path from this file to the GYP file of the JPEG
1022 # library used by Chromium.
1023 ['use_libjpeg_turbo==1', {
1024 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1025 }, {
1026 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
1027 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:431028
[email protected]abcc9ac2011-05-16 20:04:351029 # Options controlling the use of GConf (the classic GNOME configuration
1030 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311031 ['chromeos==1', {
1032 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351033 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311034 }, {
1035 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351036 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311037 }],
1038
[email protected]4de39f82011-03-28 12:01:291039 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291040 ['branding=="Chrome"', {
1041 # TODO(mmoss) The .grd files look for _google_chrome, but for
1042 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291043 'grit_defines': ['-D', '_google_chrome',
1044 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291045 }, {
[email protected]4de39f82011-03-28 12:01:291046 'grit_defines': ['-D', '_chromium',
1047 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291048 }],
[email protected]bb6aba32011-01-07 19:04:431049 ['chromeos==1', {
1050 'grit_defines': ['-D', 'chromeos'],
1051 }],
1052 ['toolkit_views==1', {
1053 'grit_defines': ['-D', 'toolkit_views'],
1054 }],
[email protected]8dd791d2011-09-16 16:37:301055 ['use_aura==1', {
1056 'grit_defines': ['-D', 'use_aura'],
1057 }],
[email protected]ed329be2012-01-03 22:02:161058 ['use_ash==1', {
1059 'grit_defines': ['-D', 'use_ash'],
1060 }],
[email protected]c329adf82011-10-05 14:34:571061 ['use_nss==1', {
1062 'grit_defines': ['-D', 'use_nss'],
1063 }],
[email protected]2cc81d32011-10-04 17:03:181064 ['use_virtual_keyboard==1', {
1065 'grit_defines': ['-D', 'use_virtual_keyboard'],
1066 }],
[email protected]e47c32032011-03-01 19:26:201067 ['file_manager_extension==1', {
1068 'grit_defines': ['-D', 'file_manager_extension'],
1069 }],
[email protected]8b2e9f392011-08-05 04:00:471070 ['webui_task_manager==1', {
1071 'grit_defines': ['-D', 'webui_task_manager'],
1072 }],
[email protected]9a425422011-01-11 00:53:181073 ['remoting==1', {
1074 'grit_defines': ['-D', 'remoting'],
1075 }],
[email protected]bb6aba32011-01-07 19:04:431076 ['use_titlecase_in_grd_files==1', {
1077 'grit_defines': ['-D', 'use_titlecase'],
1078 }],
[email protected]00dc155832011-02-01 18:51:191079 ['use_third_party_translations==1', {
1080 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121081 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161082 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1083 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121084 ],
[email protected]00dc155832011-02-01 18:51:191085 }],
[email protected]da1c8d692011-09-20 20:35:011086 ['OS=="android"', {
1087 'grit_defines': ['-D', 'android'],
1088 }],
[email protected]6a3cd37e2012-04-17 17:13:341089 ['enable_extensions==1', {
1090 'grit_defines': ['-D', 'enable_extensions'],
1091 }],
[email protected]3bb37e62012-04-19 03:40:081092 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]5d451ad2011-02-11 16:43:461093 'clang_chrome_plugins_flags':
1094 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
1095 }],
[email protected]cfa2e1102011-04-27 22:30:231096
[email protected]452da69e2011-05-24 02:36:051097 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:271098 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:231099 'use_ibus%': 1,
1100 }, {
1101 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:561102 }],
1103
[email protected]5ffb0a42012-01-27 09:36:111104 ['enable_web_intents_tag==1', {
1105 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071106 }],
1107
[email protected]92799b632011-08-15 14:33:061108 ['asan==1', {
1109 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:201110 # Do not use Chrome plugins for Clang. The Clang version in
1111 # third_party/asan may be different from the default one.
1112 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:061113 }],
[email protected]a9318c72012-03-01 01:29:471114
1115 # On valgrind bots, override the optimizer settings so we don't inline too
1116 # much and make the stacks harder to figure out.
1117 #
1118 # TODO(rnk): Kill off variables that no one else uses and just implement
1119 # them under a build_for_tool== condition.
1120 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1121 # gcc flags
1122 'mac_debug_optimization': '1',
1123 'mac_release_optimization': '1',
1124 'release_optimize': '1',
1125 'no_gc_sections': 1,
1126 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1127 '-fno-builtin -fno-optimize-sibling-calls',
1128 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1129 '-fno-builtin -fno-optimize-sibling-calls',
1130
1131 # MSVS flags for TSan on Pin and Windows.
1132 'win_debug_RuntimeChecks': '0',
1133 'win_debug_disable_iterator_debugging': '1',
1134 'win_debug_Optimization': '1',
1135 'win_debug_InlineFunctionExpansion': '0',
1136 'win_release_InlineFunctionExpansion': '0',
1137 'win_release_OmitFramePointers': '0',
1138
1139 'linux_use_tcmalloc': 1,
1140 'release_valgrind_build': 1,
1141 'werror': '',
1142 'component': 'static_library',
1143 'use_system_zlib': 0,
1144 }],
1145
1146 # Build tweaks for DrMemory.
1147 # TODO(rnk): Combine with tsan config to share the builder.
1148 # http://crbug.com/108155
1149 ['build_for_tool=="drmemory"', {
1150 # DrMemory can't handle the debug CRT dll, so build static.
1151 'component': 'static_library',
1152 # These runtime checks force initialization of stack vars which blocks
1153 # DrMemory's uninit detection.
1154 'win_debug_RuntimeChecks': '0',
1155 # Iterator debugging is slow.
1156 'win_debug_disable_iterator_debugging': '1',
1157 # Try to disable optimizations that mess up stacks in a release build.
1158 'win_release_InlineFunctionExpansion': '0',
1159 'win_release_OmitFramePointers': '0',
1160 # Keep the code under #ifndef NVALGRIND.
1161 'release_valgrind_build': 1,
1162 }],
[email protected]912c55c2009-07-31 23:33:551163 ],
[email protected]a9318c72012-03-01 01:29:471164
[email protected]35958422011-09-28 02:03:591165 # List of default apps to install in new profiles. The first list contains
1166 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061167 # contains the destination location for each of the files. When a crx
1168 # is added or removed from the list, the chrome/browser/resources/
1169 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591170 'default_apps_list': [
1171 'browser/resources/default_apps/external_extensions.json',
1172 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061173 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591174 'browser/resources/default_apps/youtube.crx',
1175 ],
1176 'default_apps_list_linux_dest': [
1177 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1178 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061179 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591180 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1181 ],
[email protected]2f80c312009-02-25 21:26:551182 },
1183 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261184 'variables': {
[email protected]a6e22132010-02-10 20:43:181185 # The condition that operates on chromium_code is in a target_conditions
1186 # section, and will not have access to the default fallback value of
1187 # chromium_code at the top of this file, or to the chromium_code
1188 # variable placed at the root variables scope of .gyp files, because
1189 # those variables are not set at target scope. As a workaround,
1190 # if chromium_code is not set at target scope, define it in target scope
1191 # to contain whatever value it has during early variable expansion.
1192 # That's enough to make it available during target conditional
1193 # processing.
1194 'chromium_code%': '<(chromium_code)',
1195
[email protected]7e0d664a2009-12-03 21:07:471196 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291197 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001198 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331199
[email protected]7e0d664a2009-12-03 21:07:471200 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1201 'win_release_Optimization%': '2', # 2 = /Os
1202 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331203
1204 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241205 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:331206 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:241207 # Tri-state: blank is default, 1 on, 0 off
1208 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331209
[email protected]6b0507b2010-05-07 07:41:211210 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1211 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331212
[email protected]6b0507b2010-05-07 07:41:211213 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151214 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1215 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331216
[email protected]fac10d12010-11-08 16:00:311217 # VS inserts quite a lot of extra checks to algorithms like
1218 # std::partial_sort in Debug build which make them O(N^2)
1219 # instead of O(N*logN). This is particularly slow under memory
1220 # tools like ThreadSanitizer so we want it to be disablable.
1221 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1222 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471223
[email protected]ffd984b12009-09-11 19:37:001224 'release_extra_cflags%': '',
1225 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001226
1227 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521228
[email protected]ef5c5f1b2011-12-17 02:16:241229 # the non-qualified versions are widely assumed to be *nix-only
1230 'win_release_extra_cflags%': '',
1231 'win_debug_extra_cflags%': '',
1232
[email protected]b1eb341c2011-11-09 18:46:071233 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1234 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1235
[email protected]ef3326702011-10-06 18:06:441236 # Only used by Windows build for now. Can be used to build into a
1237 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1238 # output files in src/build/VS2010_{Debug,Release}.
1239 'build_dir_prefix%': '',
1240
[email protected]8974e042010-06-21 18:06:521241 'conditions': [
1242 ['OS=="win" and component=="shared_library"', {
1243 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161244 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1245 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521246 }, {
1247 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1248 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1249 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1250 }],
1251 ],
[email protected]1c966092009-08-20 21:19:261252 },
[email protected]32aa8cc2009-03-04 21:36:391253 'conditions': [
[email protected]ff10b132012-02-29 22:53:301254 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1255 'msbuild_toolset': '<(msbuild_toolset)',
1256 }],
[email protected]32aa8cc2009-03-04 21:36:391257 ['branding=="Chrome"', {
1258 'defines': ['GOOGLE_CHROME_BUILD'],
1259 }, { # else: branding!="Chrome"
1260 'defines': ['CHROMIUM_BUILD'],
1261 }],
[email protected]81d9b72d2012-03-26 22:29:171262 ['branding=="Chrome" and (OS=="win" or OS=="mac")', {
1263 'defines': ['ENABLE_RLZ'],
1264 }],
[email protected]63e39a282011-07-13 20:41:281265 ['component=="shared_library"', {
1266 'defines': ['COMPONENT_BUILD'],
1267 }],
[email protected]06c756182010-04-27 18:31:311268 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171269 'defines': ['TOOLKIT_VIEWS=1'],
1270 }],
[email protected]1ee7c56c2011-10-19 14:51:331271 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111272 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1273 }],
[email protected]41423092011-08-25 15:39:581274 ['use_aura==1', {
1275 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351276 }],
[email protected]ed329be2012-01-03 22:02:161277 ['use_ash==1', {
1278 'defines': ['USE_ASH=1'],
1279 }],
[email protected]c329adf82011-10-05 14:34:571280 ['use_nss==1', {
1281 'defines': ['USE_NSS=1'],
1282 }],
[email protected]bd7b6fe2012-03-05 21:02:401283 ['enable_one_click_signin==1', {
1284 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1285 }],
[email protected]a47aa892011-11-22 03:12:311286 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1287 # TODO(erg): We are progressively sealing up use of deprecated features
1288 # in gtk in preparation for an eventual porting to gtk3.
1289 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1290 }],
[email protected]fdc5bed2010-01-09 01:16:571291 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291292 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501293 }],
[email protected]2cc81d32011-10-04 17:03:181294 ['use_virtual_keyboard==1', {
1295 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1296 }],
[email protected]f56797b2011-09-25 00:04:351297 ['use_xi2_mt!=0', {
1298 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1299 }],
[email protected]e47c32032011-03-01 19:26:201300 ['file_manager_extension==1', {
1301 'defines': ['FILE_MANAGER_EXTENSION=1'],
1302 }],
[email protected]8b2e9f392011-08-05 04:00:471303 ['webui_task_manager==1', {
1304 'defines': ['WEBUI_TASK_MANAGER=1'],
1305 }],
[email protected]7664ab32011-02-01 23:35:251306 ['profiling==1', {
1307 'defines': ['ENABLE_PROFILING=1'],
1308 }],
[email protected]93b373502011-08-16 19:06:221309 ['OS=="linux" and glibcxx_debug==1', {
1310 'defines': ['_GLIBCXX_DEBUG=1',],
1311 'cflags_cc!': ['-fno-rtti'],
1312 'cflags_cc+': ['-frtti', '-g'],
1313 }],
[email protected]542bf24a2010-06-11 23:08:171314 ['remoting==1', {
1315 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001316 }],
[email protected]5b87e782012-02-09 18:19:321317 ['enable_webrtc==1', {
1318 'defines': ['ENABLE_WEBRTC=1'],
1319 }],
[email protected]a026daa2011-04-20 15:49:511320 ['p2p_apis==1', {
1321 'defines': ['ENABLE_P2P_APIS=1'],
1322 }],
[email protected]d01120e62010-05-10 17:04:481323 ['proprietary_codecs==1', {
1324 'defines': ['USE_PROPRIETARY_CODECS'],
1325 }],
[email protected]67c125d2011-10-11 18:58:221326 ['enable_pepper_threading==1', {
1327 'defines': ['ENABLE_PEPPER_THREADING'],
1328 }],
[email protected]7ddea9802012-02-22 23:08:051329 ['enable_viewport==1', {
1330 'defines': ['ENABLE_VIEWPORT'],
1331 }],
[email protected]f31e2e52011-07-14 16:01:191332 ['configuration_policy==1', {
1333 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1334 }],
[email protected]9eb100e2011-10-14 05:08:221335 ['input_speech==1', {
1336 'defines': ['ENABLE_INPUT_SPEECH'],
1337 }],
[email protected]7cce3232011-10-28 10:41:571338 ['notifications==1', {
1339 'defines': ['ENABLE_NOTIFICATIONS'],
1340 }],
[email protected]1efbaaa2012-04-24 02:43:241341 ['enable_hidpi==1', {
1342 'defines': ['ENABLE_HIDPI=1'],
1343 }],
[email protected]8973c3a2012-04-25 02:24:181344 ['enable_metro==1', {
1345 'defines': ['ENABLE_METRO=1'],
1346 }],
[email protected]9c1949e2009-10-02 19:59:541347 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171348
[email protected]9c1949e2009-10-02 19:59:541349 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141350 # For Windows and Mac, we don't genererate debug information.
1351 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541352 'msvs_settings': {
1353 'VCLinkerTool': {
1354 'GenerateDebugInformation': 'false',
1355 },
1356 'VCCLCompilerTool': {
1357 'DebugInformationFormat': '0',
1358 }
[email protected]da4d4ea2011-09-22 20:23:141359 },
1360 'xcode_settings': {
1361 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1362 },
[email protected]1cc2fa72010-07-03 08:49:241363 }, { # else: OS != "win", generate less debug information.
1364 'variables': {
1365 'debug_extra_cflags': '-g1',
1366 },
[email protected]37c84192010-04-14 21:37:401367 }],
[email protected]aecc4d12011-01-19 05:32:331368 # Clang creates chubby debug information, which makes linking very
1369 # slow. For now, don't create debug information with clang. See
1370 # http://crbug.com/70000
1371 ['OS=="linux" and clang==1', {
1372 'variables': {
1373 'debug_extra_cflags': '-g0',
1374 },
1375 }],
[email protected]9c1949e2009-10-02 19:59:541376 ], # conditions for fastbuild.
1377 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011378 ['dcheck_always_on!=0', {
1379 'defines': ['DCHECK_ALWAYS_ON=1'],
1380 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381381 ['selinux==1', {
1382 'defines': ['CHROMIUM_SELINUX=1'],
1383 }],
[email protected]7e0d664a2009-12-03 21:07:471384 ['win_use_allocator_shim==0', {
1385 'conditions': [
1386 ['OS=="win"', {
1387 'defines': ['NO_TCMALLOC'],
1388 }],
1389 ],
1390 }],
[email protected]43f28f832010-02-03 02:28:481391 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151392 'defines': [
1393 'ENABLE_GPU=1',
1394 ],
1395 }],
[email protected]b1c2a5542010-10-08 12:44:401396 ['use_openssl==1', {
1397 'defines': [
1398 'USE_OPENSSL=1',
1399 ],
1400 }],
[email protected]ed154592010-04-29 00:18:501401 ['enable_eglimage==1', {
1402 'defines': [
1403 'ENABLE_EGLIMAGE=1',
1404 ],
1405 }],
[email protected]7d7564a12011-06-21 19:20:221406 ['use_skia==1', {
1407 'defines': [
1408 'USE_SKIA=1',
1409 ],
1410 }],
[email protected]f5ecbba12009-04-03 04:35:181411 ['coverage!=0', {
1412 'conditions': [
1413 ['OS=="mac"', {
1414 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041415 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1416 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471417 },
[email protected]e4fb84c2009-12-28 20:45:431418 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101419 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431420 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181421 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431422 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181423 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471424 }],
1425 ],
1426 }],
[email protected]da1c8d692011-09-20 20:35:011427 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181428 'cflags': [ '-ftest-coverage',
1429 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001430 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181431 }],
[email protected]e8f6ff42009-07-07 18:20:531432 # Finally, for Windows, we simply turn on profiling.
1433 ['OS=="win"', {
1434 'msvs_settings': {
1435 'VCLinkerTool': {
1436 'Profile': 'true',
1437 },
[email protected]10bb8c92009-08-07 21:16:031438 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531439 # /Z7, not /Zi, so coverage is happyb
1440 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161441 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531442 }
1443 }
1444 }], # OS==win
1445 ], # conditions for coverage
1446 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381447 ['OS=="win"', {
1448 'defines': [
1449 '__STD_C',
1450 '_CRT_SECURE_NO_DEPRECATE',
1451 '_SCL_SECURE_NO_DEPRECATE',
1452 ],
1453 'include_dirs': [
1454 '<(DEPTH)/third_party/wtl/include',
1455 ],
1456 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021457 ['enable_task_manager==1', {
1458 'defines': [
1459 'ENABLE_TASK_MANAGER=1',
1460 ],
1461 }],
[email protected]41ed4e82011-08-25 23:02:071462 ['enable_web_intents==1', {
1463 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471464 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071465 ],
1466 }],
[email protected]6a3cd37e2012-04-17 17:13:341467 ['enable_extensions==1', {
1468 'defines': [
1469 'ENABLE_EXTENSIONS=1',
1470 ],
1471 }],
[email protected]13eb97d2012-01-05 01:07:121472 ['OS=="win" and branding=="Chrome"', {
1473 'defines': ['ENABLE_SWIFTSHADER'],
1474 }],
[email protected]407dfa632011-12-23 11:59:351475 ['enable_dart==1', {
1476 'defines': ['WEBKIT_USING_DART=1'],
1477 }],
[email protected]18e0f39b2012-01-17 16:47:341478 ['enable_plugin_installation==1', {
1479 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1480 }],
[email protected]ddcaa412012-03-30 19:57:291481 ['enable_protector_service==1', {
1482 'defines': ['ENABLE_PROTECTOR_SERVICE=1'],
1483 }],
[email protected]cdb756ef2012-04-05 18:34:531484 ['enable_session_service==1', {
1485 'defines': ['ENABLE_SESSION_SERVICE=1'],
1486 }],
[email protected]6b40bb582012-03-15 20:50:381487 ['enable_themes==1', {
1488 'defines': ['ENABLE_THEMES=1'],
1489 }],
[email protected]0acdd772012-04-05 22:53:001490 ['enable_background==1', {
1491 'defines': ['ENABLE_BACKGROUND=1'],
1492 }],
[email protected]58242012012-04-12 16:14:311493 ['enable_promo_resource_service==1', {
1494 'defines': ['ENABLE_PROMO_RESOURCE_SERVICE=1'],
1495 }],
[email protected]2e22e2f2012-03-15 21:53:101496 ['enable_automation==1', {
1497 'defines': ['ENABLE_AUTOMATION=1'],
1498 }],
[email protected]a6e22132010-02-10 20:43:181499 ], # conditions for 'target_defaults'
1500 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071501 ['enable_wexit_time_destructors==1', {
1502 'conditions': [
1503 [ 'clang==1', {
1504 'cflags': [
1505 '-Wexit-time-destructors',
1506 ],
1507 'xcode_settings': {
1508 'WARNING_CFLAGS': [
1509 '-Wexit-time-destructors',
1510 ],
1511 },
1512 }],
1513 ],
1514 }],
[email protected]c14d8e772010-02-09 22:06:151515 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281516 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341517 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331518 # We don't want to get warnings from third-party code,
1519 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281520 'cflags!': [
1521 '-Wall',
1522 '-Wextra',
1523 '-Werror',
1524 ],
[email protected]167ec822011-10-24 22:05:271525 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001526 # Don't warn about hash_map in third-party code.
1527 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271528 ],
1529 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331530 # Don't warn about printf format problems.
1531 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221532 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001533 ],
[email protected]d16bd642011-07-25 23:59:181534 'cflags_cc!': [
1535 # TODO(fischman): remove this.
1536 # http://code.google.com/p/chromium/issues/detail?id=90453
1537 '-Wsign-compare',
1538 ]
[email protected]d8543312010-02-10 17:43:281539 }],
[email protected]bc073c062012-01-13 06:28:031540 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111541 'cflags': [
1542 # Don't warn about ignoring the return value from e.g. close().
1543 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031544 # BSD systems do not support this option, since they are usually
1545 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111546 '-Wno-unused-result',
1547 ],
1548 }],
[email protected]d8543312010-02-10 17:43:281549 [ 'OS=="win"', {
1550 'defines': [
1551 '_CRT_SECURE_NO_DEPRECATE',
1552 '_CRT_NONSTDC_NO_WARNINGS',
1553 '_CRT_NONSTDC_NO_DEPRECATE',
1554 '_SCL_SECURE_NO_DEPRECATE',
1555 ],
1556 'msvs_disabled_warnings': [4800],
1557 'msvs_settings': {
1558 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111559 'WarningLevel': '3',
1560 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281561 'Detect64BitPortabilityProblems': 'false',
1562 },
1563 },
1564 }],
[email protected]ea47b6a2011-07-17 19:39:421565 # TODO(darin): Unfortunately, some third_party code depends on base/
1566 [ 'OS=="win" and component=="shared_library"', {
1567 'msvs_disabled_warnings': [
1568 4251, # class 'std::xx' needs to have dll-interface.
1569 ],
1570 }],
[email protected]d8543312010-02-10 17:43:281571 [ 'OS=="mac"', {
1572 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:061573 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281574 },
[email protected]3a352c362012-05-08 19:45:491575 'conditions': [
1576 ['buildtype=="Official"', {
1577 'xcode_settings': {
1578 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
1579 },
1580 }],
1581 ],
[email protected]d8543312010-02-10 17:43:281582 }],
[email protected]c14d8e772010-02-09 22:06:151583 ],
1584 }, {
[email protected]a5c598152012-01-27 04:55:131585 'includes': [
1586 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1587 'filename_rules.gypi',
1588 ],
[email protected]c14d8e772010-02-09 22:06:151589 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1590 # C99 macros on Mac and Linux.
1591 'defines': [
1592 '__STDC_FORMAT_MACROS',
1593 ],
1594 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151595 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071596 # turn on warnings for signed/unsigned mismatch on chromium code.
1597 'msvs_settings': {
1598 'VCCLCompilerTool': {
1599 'AdditionalOptions': ['/we4389'],
1600 },
1601 },
[email protected]c14d8e772010-02-09 22:06:151602 }],
[email protected]63e39a282011-07-13 20:41:281603 ['OS=="win" and component=="shared_library"', {
1604 'msvs_disabled_warnings': [
1605 4251, # class 'std::xx' needs to have dll-interface.
1606 ],
1607 }],
[email protected]c14d8e772010-02-09 22:06:151608 ],
1609 }],
[email protected]a6e22132010-02-10 20:43:181610 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551611 'default_configuration': 'Debug',
1612 'configurations': {
[email protected]5153767c2009-12-22 01:52:501613 # VCLinkerTool LinkIncremental values below:
1614 # 0 == default
1615 # 1 == /INCREMENTAL:NO
1616 # 2 == /INCREMENTAL
1617 # Debug links incremental, Release does not.
1618 #
[email protected]7b99801e2010-11-03 17:26:231619 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501620 #
1621 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561622 'abstract': 1,
1623 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511624 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561625 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1626 'CharacterSet': '1',
1627 },
[email protected]5153767c2009-12-22 01:52:501628 },
1629 'x86_Base': {
1630 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501631 'msvs_settings': {
1632 'VCLinkerTool': {
1633 'TargetMachine': '1',
1634 },
1635 },
[email protected]2fa40782009-11-01 21:17:341636 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561637 },
[email protected]5153767c2009-12-22 01:52:501638 'x64_Base': {
1639 'abstract': 1,
1640 'msvs_configuration_platform': 'x64',
1641 'msvs_settings': {
1642 'VCLinkerTool': {
1643 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501644 'AdditionalLibraryDirectories!':
1645 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1646 'AdditionalLibraryDirectories':
1647 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1648 },
[email protected]d26b4418ab2010-03-24 22:06:351649 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501650 'AdditionalLibraryDirectories!':
1651 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1652 'AdditionalLibraryDirectories':
1653 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1654 },
1655 },
1656 'defines': [
1657 # Not sure if tcmalloc works on 64-bit Windows.
1658 'NO_TCMALLOC',
1659 ],
1660 },
1661 'Debug_Base': {
1662 'abstract': 1,
[email protected]14339762011-04-05 07:36:581663 'defines': [
1664 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1665 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1666 ],
[email protected]1c966092009-08-20 21:19:261667 'xcode_settings': {
1668 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291669 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491670 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491671 '<@(debug_extra_cflags)',
1672 ],
[email protected]1c966092009-08-20 21:19:261673 },
[email protected]bb05e452009-10-29 21:24:561674 'msvs_settings': {
1675 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471676 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561677 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211678 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471679 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151680 'conditions': [
1681 # According to MSVS, InlineFunctionExpansion=0 means
1682 # "default inlining", not "/Ob0".
1683 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1684 ['win_debug_InlineFunctionExpansion==0', {
1685 'AdditionalOptions': ['/Ob0'],
1686 }],
1687 ['win_debug_InlineFunctionExpansion!=""', {
1688 'InlineFunctionExpansion':
1689 '<(win_debug_InlineFunctionExpansion)',
1690 }],
[email protected]fac10d12010-11-08 16:00:311691 ['win_debug_disable_iterator_debugging==1', {
1692 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1693 }],
[email protected]ef5c5f1b2011-12-17 02:16:241694
1695 # if win_debug_OmitFramePointers is blank, leave as default
1696 ['win_debug_OmitFramePointers==1', {
1697 'OmitFramePointers': 'true',
1698 }],
1699 ['win_debug_OmitFramePointers==0', {
1700 'OmitFramePointers': 'false',
1701 # The above is not sufficient (http://crbug.com/106711): it
1702 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1703 # perform FPO regardless, so we must explicitly disable.
1704 # We still want the false setting above to avoid having
1705 # "/Oy /Oy-" and warnings about overriding.
1706 'AdditionalOptions': ['/Oy-'],
1707 }],
[email protected]2ae6e022010-05-07 13:19:151708 ],
[email protected]ef5c5f1b2011-12-17 02:16:241709 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561710 },
1711 'VCLinkerTool': {
1712 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331713 # ASLR makes debugging with windbg difficult because Chrome.exe and
1714 # Chrome.dll share the same base name. As result, windbg will
1715 # name the Chrome.dll module like chrome_<base address>, where
1716 # <base address> typically changes with each launch. This in turn
1717 # means that breakpoints in Chrome.dll don't stick from one launch
1718 # to the next. For this reason, we turn ASLR off in debug builds.
1719 # Note that this is a three-way bool, where 0 means to pick up
1720 # the default setting, 1 is off and 2 is on.
1721 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561722 },
1723 'VCResourceCompilerTool': {
1724 'PreprocessorDefinitions': ['_DEBUG'],
1725 },
1726 },
[email protected]2f80c312009-02-25 21:26:551727 'conditions': [
[email protected]bb05e452009-10-29 21:24:561728 ['OS=="linux"', {
1729 'cflags': [
1730 '<@(debug_extra_cflags)',
1731 ],
[email protected]2f80c312009-02-25 21:26:551732 }],
[email protected]56cca4e2011-07-01 21:33:351733 ['release_valgrind_build==0', {
1734 'xcode_settings': {
1735 'OTHER_CFLAGS': [
1736 '-fstack-protector-all', # Implies -fstack-protector
1737 ],
1738 },
1739 }],
[email protected]2f80c312009-02-25 21:26:551740 ],
1741 },
[email protected]5153767c2009-12-22 01:52:501742 'Release_Base': {
1743 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551744 'defines': [
1745 'NDEBUG',
1746 ],
[email protected]1c966092009-08-20 21:19:261747 'xcode_settings': {
1748 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1749 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001750 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261751 },
[email protected]bb05e452009-10-29 21:24:561752 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471753 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471754 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151755 'conditions': [
[email protected]2212d272011-12-20 21:37:371756 # In official builds, each target will self-select
1757 # an optimization level.
1758 ['buildtype!="Official"', {
1759 'Optimization': '<(win_release_Optimization)',
1760 },
1761 ],
[email protected]2ae6e022010-05-07 13:19:151762 # According to MSVS, InlineFunctionExpansion=0 means
1763 # "default inlining", not "/Ob0".
1764 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1765 ['win_release_InlineFunctionExpansion==0', {
1766 'AdditionalOptions': ['/Ob0'],
1767 }],
1768 ['win_release_InlineFunctionExpansion!=""', {
1769 'InlineFunctionExpansion':
1770 '<(win_release_InlineFunctionExpansion)',
1771 }],
[email protected]626d2d22011-10-11 15:47:331772
[email protected]ef5c5f1b2011-12-17 02:16:241773 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331774 ['win_release_OmitFramePointers==1', {
1775 'OmitFramePointers': 'true',
1776 }],
1777 ['win_release_OmitFramePointers==0', {
1778 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241779 # The above is not sufficient (http://crbug.com/106711): it
1780 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1781 # perform FPO regardless, so we must explicitly disable.
1782 # We still want the false setting above to avoid having
1783 # "/Oy /Oy-" and warnings about overriding.
1784 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331785 }],
[email protected]2ae6e022010-05-07 13:19:151786 ],
[email protected]ef5c5f1b2011-12-17 02:16:241787 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471788 },
[email protected]bb05e452009-10-29 21:24:561789 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341790 # LinkIncremental is a tri-state boolean, where 0 means default
1791 # (i.e., inherit from parent solution), 1 means false, and
1792 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561793 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341794 # This corresponds to the /PROFILE flag which ensures the PDB
1795 # file contains FIXUP information (growing the PDB file by about
1796 # 5%) but does not otherwise alter the output binary. This
1797 # information is used by the Syzygy optimization tool when
1798 # decomposing the release image.
1799 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561800 },
1801 },
[email protected]2f80c312009-02-25 21:26:551802 'conditions': [
[email protected]92822e82009-09-18 14:26:561803 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581804 'defines': [
1805 'NVALGRIND',
1806 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1807 ],
[email protected]ee857512010-05-14 08:24:421808 }, {
[email protected]14339762011-04-05 07:36:581809 'defines': [
1810 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1811 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1812 ],
[email protected]92822e82009-09-18 14:26:561813 }],
[email protected]7e0d664a2009-12-03 21:07:471814 ['win_use_allocator_shim==0', {
1815 'defines': ['NO_TCMALLOC'],
1816 }],
[email protected]bb05e452009-10-29 21:24:561817 ['OS=="linux"', {
1818 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001819 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561820 ],
1821 }],
[email protected]2f80c312009-02-25 21:26:551822 ],
1823 },
[email protected]5153767c2009-12-22 01:52:501824 #
1825 # Concrete configurations
1826 #
1827 'Debug': {
1828 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1829 },
1830 'Release': {
1831 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1832 'conditions': [
1833 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161834 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501835 }],
1836 ]
1837 },
[email protected]f926fa0a2009-08-04 22:50:131838 'conditions': [
1839 [ 'OS=="win"', {
1840 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501841 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501842 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301843 },
1844 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501845 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301846 },
[email protected]f926fa0a2009-08-04 22:50:131847 }],
1848 ],
[email protected]2f80c312009-02-25 21:26:551849 },
1850 },
1851 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341852 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261853 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271854 # Enable -Werror by default, but put it in a variable so it can
1855 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1856 'variables': {
[email protected]cbbb3472012-01-25 18:32:311857 'werror%': '-Werror',
[email protected]b7cc5321c2012-04-12 21:24:361858 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:271859 },
[email protected]6863896f2012-01-25 17:51:361860 'defines': [
1861 '_FILE_OFFSET_BITS=64',
1862 ],
[email protected]9d384032009-03-20 23:13:261863 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161864 '<(werror)', # See note above about the werror variable.
1865 '-pthread',
1866 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291867 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161868 '-Wall',
[email protected]0fa17082010-03-26 00:48:051869 # TODO(evan): turn this back on once all the builds work.
1870 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201871 # Don't warn about unused function params. We use those everywhere.
1872 '-Wno-unused-parameter',
1873 # Don't warn about the "struct foo f = {0};" initialization pattern.
1874 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121875 # Don't export any symbols (for example, to plugins we dlopen()).
1876 # Note: this is *required* to make some plugins work.
1877 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351878 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241879 ],
1880 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221881 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241882 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361883 # Make inline functions have hidden visiblity by default.
1884 # Surprisingly, not covered by -fvisibility=hidden.
1885 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171886 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1887 # so we specify it explicitly.
1888 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181889 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171890 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261891 ],
[email protected]a6cf87e2009-04-03 04:07:381892 'ldflags': [
[email protected]138241f2010-03-30 23:53:101893 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261894 ],
[email protected]b7cc5321c2012-04-12 21:24:361895 'libraries' : [
1896 '<(libraries_for_target)',
1897 ],
[email protected]3aacaf952009-04-02 15:34:091898 'configurations': {
[email protected]5153767c2009-12-22 01:52:501899 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311900 'variables': {
1901 'debug_optimize%': '0',
1902 },
[email protected]3aacaf952009-04-02 15:34:091903 'defines': [
1904 '_DEBUG',
1905 ],
1906 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041907 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091908 '-g',
1909 ],
[email protected]da1c8d692011-09-20 20:35:011910 'conditions' : [
1911 ['OS=="android"', {
1912 'cflags': [
1913 '-fno-omit-frame-pointer',
1914 ],
1915 }],
1916 ],
1917 'target_conditions' : [
1918 ['_toolset=="target"', {
1919 'conditions': [
[email protected]d42124bc2012-05-10 05:40:501920 ['OS=="android" and debug_optimize==0 and target_arch=="arm"', {
[email protected]da1c8d692011-09-20 20:35:011921 'cflags': [
1922 '-mlong-calls', # Needed when compiling with -O0
1923 ],
1924 }],
1925 ['arm_thumb==1', {
1926 'cflags': [
1927 '-marm',
1928 ],
1929 }],
1930 ],
1931 }],
1932 ],
[email protected]5315f2842009-04-28 00:43:271933 },
[email protected]5153767c2009-12-22 01:52:501934 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011935 'variables': {
1936 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511937 # Binaries become big and gold is unable to perform GC
1938 # and remove unused sections for some of test targets
1939 # on 32 bit platform.
1940 # (This is currently observed only in chromeos valgrind bots)
1941 # The following flag is to disable --gc-sections linker
1942 # option for these bots.
1943 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121944
1945 # TODO(bradnelson): reexamine how this is done if we change the
1946 # expansion of configurations
1947 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011948 },
[email protected]3aacaf952009-04-02 15:34:091949 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041950 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531951 # Don't emit the GCC version ident directives, they just end up
1952 # in the .comment section taking up binary size.
1953 '-fno-ident',
1954 # Put data and code in their own sections, so that unused symbols
1955 # can be removed at link time with --gc-sections.
1956 '-fdata-sections',
1957 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091958 ],
[email protected]c902f2c2010-08-06 20:04:181959 'ldflags': [
1960 # Specifically tell the linker to perform optimizations.
1961 # See http://lwn.net/Articles/192624/ .
1962 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221963 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181964 ],
[email protected]1dd529642010-05-15 01:02:511965 'conditions' : [
1966 ['no_gc_sections==0', {
1967 'ldflags': [
1968 '-Wl,--gc-sections',
1969 ],
1970 }],
[email protected]da1c8d692011-09-20 20:35:011971 ['OS=="android"', {
1972 'cflags': [
1973 '-fomit-frame-pointer',
1974 ],
1975 }],
[email protected]ecf7b6482010-10-13 09:15:201976 ['clang==1', {
1977 'cflags!': [
1978 '-fno-ident',
1979 ],
1980 }],
[email protected]7664ab32011-02-01 23:35:251981 ['profiling==1', {
1982 'cflags': [
1983 '-fno-omit-frame-pointer',
1984 '-g',
1985 ],
1986 }],
[email protected]8d726a42012-02-09 03:49:001987 ],
[email protected]3aacaf952009-04-02 15:34:091988 },
1989 },
[email protected]601b540222009-04-03 21:32:041990 'variants': {
1991 'coverage': {
1992 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1993 'ldflags': ['-fprofile-arcs'],
1994 },
1995 'profile': {
1996 'cflags': ['-pg', '-g'],
1997 'ldflags': ['-pg'],
1998 },
1999 'symbols': {
2000 'cflags': ['-g'],
2001 },
2002 },
[email protected]606116d22009-05-06 22:38:232003 'conditions': [
[email protected]04b482602011-09-14 02:36:212004 ['target_arch=="ia32"', {
2005 'target_conditions': [
2006 ['_toolset=="target"', {
2007 'asflags': [
2008 # Needed so that libs with .s files (e.g. libicudata.a)
2009 # are compatible with the general 32-bit-ness.
2010 '-32',
2011 ],
2012 # All floating-point computations on x87 happens in 80-bit
2013 # precision. Because the C and C++ language standards allow
2014 # the compiler to keep the floating-point values in higher
2015 # precision than what's specified in the source and doing so
2016 # is more efficient than constantly rounding up to 64-bit or
2017 # 32-bit precision as specified in the source, the compiler,
2018 # especially in the optimized mode, tries very hard to keep
2019 # values in x87 floating-point stack (in 80-bit precision)
2020 # as long as possible. This has important side effects, that
2021 # the real value used in computation may change depending on
2022 # how the compiler did the optimization - that is, the value
2023 # kept in 80-bit is different than the value rounded down to
2024 # 64-bit or 32-bit. There are possible compiler options to
2025 # make this behavior consistent (e.g. -ffloat-store would keep
2026 # all floating-values in the memory, thus force them to be
2027 # rounded to its original precision) but they have significant
2028 # runtime performance penalty.
2029 #
2030 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2031 # which keep floating-point values in SSE registers in its
2032 # native precision (32-bit for single precision, and 64-bit
2033 # for double precision values). This means the floating-point
2034 # value used during computation does not change depending on
2035 # how the compiler optimized the code, since the value is
2036 # always kept in its specified precision.
2037 'conditions': [
2038 ['branding=="Chromium" and disable_sse2==0', {
2039 'cflags': [
2040 '-march=pentium4',
2041 '-msse2',
2042 '-mfpmath=sse',
2043 ],
2044 }],
2045 # ChromeOS targets Pinetrail, which is sse3, but most of the
2046 # benefit comes from sse2 so this setting allows ChromeOS
2047 # to build on other CPUs. In the future -march=atom would
2048 # help but requires a newer compiler.
2049 ['chromeos==1 and disable_sse2==0', {
2050 'cflags': [
2051 '-msse2',
2052 ],
2053 }],
2054 # Install packages have started cropping up with
2055 # different headers between the 32-bit and 64-bit
2056 # versions, so we have to shadow those differences off
2057 # and make sure a 32-bit-on-64-bit build picks up the
2058 # right files.
[email protected]32594022012-05-10 03:22:282059 # For android build, use NDK headers instead of host headers
2060 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212061 'include_dirs+': [
2062 '/usr/include32',
2063 ],
2064 }],
2065 ],
2066 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2067 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062068 'cflags': [
[email protected]04b482602011-09-14 02:36:212069 '-m32',
2070 '-mmmx',
2071 ],
2072 'ldflags': [
2073 '-m32',
[email protected]ffde7932009-05-29 00:39:062074 ],
2075 }],
[email protected]606116d22009-05-06 22:38:232076 ],
2077 }],
[email protected]3dda8a962009-08-10 18:58:072078 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292079 'target_conditions': [
2080 ['_toolset=="target"', {
2081 'cflags_cc': [
2082 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2083 # has changed whenever it encounters a varargs function. This
2084 # silences those warnings, as they are not helpful and
2085 # clutter legitimate warnings.
2086 '-Wno-abi',
2087 ],
2088 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012089 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292090 'cflags': [
2091 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292092 ]
2093 }],
2094 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252095 'cflags': [
2096 '-march=armv7-a',
2097 '-mtune=cortex-a8',
[email protected]5252af72012-05-04 19:26:402098 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252099 ],
[email protected]eafc0b452010-02-26 21:53:432100 'conditions': [
2101 ['arm_neon==1', {
2102 'cflags': [ '-mfpu=neon', ],
2103 }, {
[email protected]53e0f642010-03-05 01:41:562104 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:432105 }]
2106 ],
[email protected]dc9711f2009-11-13 19:30:252107 }],
[email protected]da1c8d692011-09-20 20:35:012108 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532109 # Most of the following flags are derived from what Android
2110 # uses by default when building for arm, reference for which
2111 # can be found in the following file in the Android NDK:
2112 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2113 'cflags': [
2114 # The tree-sra optimization (scalar replacement for
2115 # aggregates enabling subsequent optimizations) leads to
2116 # invalid code generation when using the Android NDK's
2117 # compiler (r5-r7). This can be verified using
2118 # TestWebKitAPI's WTF.Checked_int8_t test.
2119 '-fno-tree-sra',
2120 '-Wno-psabi',
2121 ],
[email protected]da1c8d692011-09-20 20:35:012122 'conditions': [
2123 ['arm_thumb == 1', {
2124 # Android toolchain doesn't support -mimplicit-it=thumb
2125 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
2126 'cflags': [ '-mthumb-interwork', ],
2127 }],
2128 ['armv7==0', {
2129 # Flags suitable for Android emulator
2130 'cflags': [
2131 '-march=armv5te',
2132 '-mtune=xscale',
2133 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362134 ],
2135 'defines': [
2136 '__ARM_ARCH_5__',
2137 '__ARM_ARCH_5T__',
2138 '__ARM_ARCH_5E__',
2139 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012140 ],
2141 }],
2142 ],
2143 }],
[email protected]3dda8a962009-08-10 18:58:072144 ],
2145 }],
2146 ],
2147 }],
[email protected]2fb843b2010-08-12 02:11:082148 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582149 'cflags': [
2150 '-fPIC',
2151 ],
[email protected]d3f692b32011-12-14 19:04:352152 'ldflags': [
2153 '-fPIC',
2154 ],
[email protected]c76723a2010-01-25 23:10:582155 }],
[email protected]ee28c9f2009-09-04 01:53:012156 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572157 'target_conditions': [
2158 ['_toolset=="target"', {
2159 'cflags': [
2160 '--sysroot=<(sysroot)',
2161 ],
2162 'ldflags': [
2163 '--sysroot=<(sysroot)',
2164 ],
2165 }]]
[email protected]ee28c9f2009-09-04 01:53:012166 }],
[email protected]58680ce2010-09-18 00:09:152167 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122168 'cflags': [
2169 '-Wheader-hygiene',
2170 # Clang spots more unused functions.
2171 '-Wno-unused-function',
2172 # Don't die on dtoa code that uses a char as an array index.
2173 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332174 # Especially needed for gtest macros using enum values from Mac
2175 # system headers.
2176 # TODO(pkasting): In C++11 this is legal, so this should be
2177 # removed when we change to that. (This is also why we don't
2178 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122179 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302180 # This (rightyfully) complains about 'override', which we use
2181 # heavily.
2182 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102183
2184 # Warns on switches on enums that cover all enum values but
2185 # also contain a default: branch. Chrome is full of that.
2186 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122187 ],
2188 'cflags!': [
2189 # Clang doesn't seem to know know this flag.
2190 '-mfpmath=sse',
2191 ],
[email protected]58680ce2010-09-18 00:09:152192 }],
[email protected]5d451ad2011-02-11 16:43:462193 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262194 'cflags': [
2195 '<(clang_chrome_plugins_flags)',
2196 ],
[email protected]5d451ad2011-02-11 16:43:462197 }],
[email protected]4a9ac22e2011-12-02 03:41:532198 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262199 'cflags': [
2200 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532201 ],
2202 }],
2203 ['clang==1 and clang_add_plugin!=""', {
2204 'cflags': [
[email protected]d23720682011-08-11 00:16:262205 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2206 ],
[email protected]5e781232011-01-28 02:57:592207 }],
[email protected]2616d45d2012-01-19 03:15:482208 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2209 'cflags': [
2210 # See http://crbug.com/110262
2211 '-fcolor-diagnostics',
2212 ],
2213 }],
[email protected]92799b632011-08-15 14:33:062214 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422215 'target_conditions': [
2216 ['_toolset=="target"', {
2217 'cflags': [
2218 '-faddress-sanitizer',
2219 '-fno-omit-frame-pointer',
2220 '-w',
2221 ],
2222 'ldflags': [
2223 '-faddress-sanitizer',
2224 ],
2225 'defines': [
2226 'ADDRESS_SANITIZER',
2227 ],
2228 }],
[email protected]921c7b52011-11-25 10:34:352229 ],
[email protected]92799b632011-08-15 14:33:062230 }],
[email protected]8a6abd12012-05-16 10:04:442231 ['order_profiling!=0 and (chromeos==1 or OS=="linux")', {
2232 'target_conditions' : [
2233 ['_toolset=="target"', {
2234 'cflags': [
2235 '-finstrument-functions',
2236 ],
2237 }],
2238 ],
2239 }],
[email protected]cbd5fd52009-08-26 00:14:272240 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172241 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272242 'defines': ['USE_LINUX_BREAKPAD'],
2243 }],
[email protected]d8b60602010-03-26 09:41:222244 ['linux_use_heapchecker==1', {
2245 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402246 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222247 }],
[email protected]61a9b2d82010-02-26 00:31:082248 ['linux_use_tcmalloc==0', {
2249 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242250 }],
[email protected]64e2d4a42010-08-27 10:13:212251 ['linux_keep_shadow_stacks==1', {
2252 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512253 'cflags': [
2254 '-finstrument-functions',
2255 # Allow mmx intrinsics to inline, so that the compiler can expand
2256 # the intrinsics.
2257 '-finstrument-functions-exclude-file-list=mmintrin.h',
2258 ],
[email protected]64e2d4a42010-08-27 10:13:212259 }],
[email protected]8d726a42012-02-09 03:49:002260 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172261 'ldflags': [
2262 # Experimentation found that using four linking threads
2263 # saved ~20% of link time.
2264 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2265 '-Wl,--threads',
2266 '-Wl,--thread-count=4',
2267 ],
[email protected]8d726a42012-02-09 03:49:002268 'conditions': [
2269 ['release_valgrind_build==0', {
2270 'target_conditions': [
2271 ['_toolset=="target"', {
2272 'ldflags': [
2273 # There seems to be a conflict of --icf and -pie
2274 # in gold which can generate crashy binaries. As
2275 # a security measure, -pie takes precendence for
2276 # now.
2277 #'-Wl,--icf=safe',
2278 '-Wl,--icf=none',
2279 ],
2280 }],
2281 ],
2282 }],
2283 ],
2284 }],
[email protected]b07806c12012-02-03 22:44:592285 ['linux_use_gold_binary==1', {
2286 'variables': {
[email protected]516312d2012-02-28 05:17:262287 'conditions': [
2288 ['inside_chromium_build==1', {
2289 # We pass the path to gold to the compiler. gyp leaves
2290 # unspecified what the cwd is when running the compiler,
2291 # so the normal gyp path-munging fails us. This hack
2292 # gets the right path.
2293 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2294 }, {
2295 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2296 }]
2297 ]
[email protected]b07806c12012-02-03 22:44:592298 },
2299 'ldflags': [
2300 # Put our gold binary in the search path for the linker.
2301 '-B<(gold_path)',
2302 ],
2303 }],
[email protected]606116d22009-05-06 22:38:232304 ],
[email protected]9d384032009-03-20 23:13:262305 },
2306 }],
[email protected]c51e8d52009-12-11 20:04:062307 # FreeBSD-specific options; note that most FreeBSD options are set above,
2308 # with Linux.
2309 ['OS=="freebsd"', {
2310 'target_defaults': {
2311 'ldflags': [
2312 '-Wl,--no-keep-memory',
2313 ],
2314 },
2315 }],
[email protected]da1c8d692011-09-20 20:35:012316 # Android-specific options; note that most are set above with Linux.
2317 ['OS=="android"', {
2318 'variables': {
[email protected]febc41db2012-03-24 02:44:432319 'target_arch%': 'arm', # target_arch in android terms.
[email protected]da1c8d692011-09-20 20:35:012320 'conditions': [
2321 # Android uses x86 instead of ia32 for their target_arch designation.
2322 ['target_arch=="ia32"', {
[email protected]febc41db2012-03-24 02:44:432323 'target_arch%': 'x86',
[email protected]da1c8d692011-09-20 20:35:012324 }],
2325 # Use shared stlport library when system one used.
2326 # Figure this out early since it needs symbols from libgcc.a, so it
2327 # has to be before that in the set of libraries.
2328 ['use_system_stlport==1', {
2329 'android_stlport_library': 'stlport',
2330 }, {
2331 'android_stlport_library': 'stlport_static',
2332 }],
2333 ],
2334
2335 # Placing this variable here prevents from forking libvpx, used
2336 # by remoting. Remoting is off, so it needn't built,
2337 # so forking it's deps seems like overkill.
2338 # But this variable need defined to properly run gyp.
2339 # A proper solution is to have an OS==android conditional
2340 # in third_party/libvpx/libvpx.gyp to define it.
2341 'libvpx_path': 'lib/linux/arm',
2342 },
2343 'target_defaults': {
2344 # Build a Release build by default to match Android build behavior.
2345 # This is typical with Android because Debug builds tend to be much
2346 # larger and run very slowly on constrained devices. It is still
2347 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2348 # 'make' command line.
2349 'default_configuration': 'Release',
2350
2351 'variables': {
2352 'release_extra_cflags%': '',
2353 },
2354
2355 'target_conditions': [
2356 # Settings for building device targets using Android's toolchain.
2357 # These are based on the setup.mk file from the Android NDK.
2358 #
2359 # The NDK Android executable link step looks as follows:
2360 # $LDFLAGS
2361 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2362 # $(PRIVATE_OBJECTS) <-- The .o that we built
2363 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2364 # $(TARGET_LIBGCC) <-- libgcc.a
2365 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2366 # $(PRIVATE_LDLIBS) <-- System .so
2367 # $(TARGET_CRTEND_O) <-- crtend.o
2368 #
2369 # For now the above are approximated for executables by adding
2370 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2371 # of 'libraries'.
2372 #
2373 # The NDK Android shared library link step looks as follows:
2374 # $LDFLAGS
2375 # $(PRIVATE_OBJECTS) <-- The .o that we built
2376 # -l,--whole-archive
2377 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2378 # -l,--no-whole-archive
2379 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2380 # $(TARGET_LIBGCC) <-- libgcc.a
2381 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2382 # $(PRIVATE_LDLIBS) <-- System .so
2383 #
2384 # For now, assume not need any whole static libs.
2385 #
2386 # For both executables and shared libraries, add the proper
2387 # libgcc.a to the start of libraries which puts it in the
2388 # proper spot after .o and .a files get linked in.
2389 #
2390 # TODO: The proper thing to do longer-tem would be proper gyp
2391 # support for a custom link command line.
2392 ['_toolset=="target"', {
2393 'cflags!': [
2394 '-pthread', # Not supported by Android toolchain.
2395 ],
2396 'cflags': [
2397 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2398 '-ffunction-sections',
2399 '-funwind-tables',
2400 '-g',
2401 '-fstack-protector',
2402 '-fno-short-enums',
2403 '-finline-limit=64',
2404 '-Wa,--noexecstack',
2405 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2406 '<@(release_extra_cflags)',
2407 # Note: This include is in cflags to ensure that it comes after
2408 # all of the includes.
2409 '-I<(android_ndk_include)',
2410 ],
2411 'defines': [
2412 'ANDROID',
2413 '__GNU_SOURCE=1', # Necessary for clone()
2414 'USE_STLPORT=1',
2415 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2416 'HAVE_OFF64_T',
2417 'HAVE_SYS_UIO_H',
2418 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2419 ],
2420 'ldflags!': [
2421 '-pthread', # Not supported by Android toolchain.
2422 ],
2423 'ldflags': [
2424 '-nostdlib',
2425 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012426 # Don't export symbols from statically linked libraries.
2427 '-Wl,--exclude-libs=ALL',
2428 ],
[email protected]a0e48b02011-11-22 07:53:012429 'libraries': [
2430 '-l<(android_stlport_library)',
2431 # Manually link the libgcc.a that the cross compiler uses.
[email protected]d10e2cc2012-03-20 10:45:272432 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012433 '-lc',
2434 '-ldl',
2435 '-lstdc++',
2436 '-lm',
[email protected]da1c8d692011-09-20 20:35:012437 ],
2438 'conditions': [
[email protected]e0825562012-05-10 01:50:472439 ['android_upstream_bringup==1', {
2440 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2441 }],
[email protected]da1c8d692011-09-20 20:35:012442 ['android_build_type==0', {
2443 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522444 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012445 ],
2446 }],
[email protected]febd3572012-05-03 09:17:452447 ['target_arch == "arm"', {
2448 'ldflags': [
2449 # Enable identical code folding to reduce size.
2450 '-Wl,--icf=safe',
2451 ],
2452 }],
[email protected]da1c8d692011-09-20 20:35:012453 # NOTE: The stlport header include paths below are specified in
2454 # cflags rather than include_dirs because they need to come
2455 # after include_dirs. Think of them like system headers, but
2456 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2457 # toolchain (circa Gingerbread) will exhibit strange errors.
2458 # The include ordering here is important; change with caution.
2459 ['use_system_stlport==0', {
2460 'cflags': [
2461 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2462 ],
2463 'conditions': [
2464 ['target_arch=="arm" and armv7==1', {
2465 'ldflags': [
2466 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2467 ],
2468 }],
2469 ['target_arch=="arm" and armv7==0', {
2470 'ldflags': [
2471 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2472 ],
2473 }],
2474 ['target_arch=="ia32"', {
2475 'ldflags': [
2476 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2477 ],
2478 }],
2479 ],
2480 }],
2481 ['target_arch=="ia32"', {
2482 # The x86 toolchain currently has problems with stack-protector.
2483 'cflags!': [
2484 '-fstack-protector',
2485 ],
2486 'cflags': [
2487 '-fno-stack-protector',
2488 ],
2489 }],
2490 ],
2491 'target_conditions': [
2492 ['_type=="executable"', {
2493 'ldflags': [
2494 '-Bdynamic',
2495 '-Wl,-dynamic-linker,/system/bin/linker',
2496 '-Wl,--gc-sections',
2497 '-Wl,-z,nocopyreloc',
2498 # crtbegin_dynamic.o should be the last item in ldflags.
2499 '<(android_ndk_lib)/crtbegin_dynamic.o',
2500 ],
2501 'libraries': [
2502 # crtend_android.o needs to be the last item in libraries.
2503 # Do not add any libraries after this!
2504 '<(android_ndk_lib)/crtend_android.o',
2505 ],
2506 }],
2507 ['_type=="shared_library"', {
2508 'ldflags': [
2509 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:462510 # crtbegin_so.o should be the last item in ldflags.
2511 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:012512 ],
[email protected]a08029b42012-04-25 03:18:462513 'libraries': [
2514 # crtend_so.o needs to be the last item in libraries.
2515 # Do not add any libraries after this!
2516 '<(android_ndk_lib)/crtend_so.o',
2517 ],
[email protected]da1c8d692011-09-20 20:35:012518 }],
2519 ],
2520 }],
2521 # Settings for building host targets using the system toolchain.
2522 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122523 'cflags!': [
2524 # Due to issues in Clang build system, using ASan on 32-bit
2525 # binaries on x86_64 host is problematic.
2526 # TODO(eugenis): re-enable.
2527 '-faddress-sanitizer',
2528 ],
[email protected]da1c8d692011-09-20 20:35:012529 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122530 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012531 '-Wl,-z,noexecstack',
2532 '-Wl,--gc-sections',
2533 '-Wl,-O1',
2534 '-Wl,--as-needed',
2535 ],
[email protected]965b6b22011-09-29 16:07:282536 'sources/': [
2537 ['exclude', '_android(_unittest)?\\.cc$'],
2538 ['exclude', '(^|/)android/']
2539 ],
[email protected]da1c8d692011-09-20 20:35:012540 }],
2541 ],
2542 },
2543 }],
[email protected]93f21e42010-04-01 00:35:152544 ['OS=="solaris"', {
2545 'cflags!': ['-fvisibility=hidden'],
2546 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2547 }],
[email protected]2f80c312009-02-25 21:26:552548 ['OS=="mac"', {
2549 'target_defaults': {
[email protected]24700642009-06-01 16:01:202550 'variables': {
[email protected]162407f2011-09-08 15:33:172551 # These should end with %, but there seems to be a bug with % in
2552 # variables that are intended to be set to different values in
2553 # different targets, like these.
2554 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202555 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]27b687ec42012-03-26 22:22:152556 # Strip debugging symbols from the target.
2557 'mac_strip': '<(mac_strip_release)',
[email protected]24700642009-06-01 16:01:202558 },
[email protected]d92c7c012009-03-19 19:26:422559 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552560 'xcode_settings': {
2561 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042562 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2563 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2564 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2565 # (Equivalent to -fPIC)
2566 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2567 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2568 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252569 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2570 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042571 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2572 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2573 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2574 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552575 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042576 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252577 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2578 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112579 # Keep pch files below xcodebuild/.
2580 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552581 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192582 'OTHER_CFLAGS': [
2583 '-fno-strict-aliasing', # See http://crbug.com/32204
2584 ],
[email protected]080e86f2010-06-21 15:19:042585 'WARNING_CFLAGS': [
2586 '-Wall',
2587 '-Wendif-labels',
2588 '-Wextra',
2589 # Don't warn about unused function parameters.
2590 '-Wno-unused-parameter',
2591 # Don't warn about the "struct foo f = {0};" initialization
2592 # pattern.
2593 '-Wno-missing-field-initializers',
2594 ],
[email protected]b3fb8092009-03-12 19:09:242595 'conditions': [
2596 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592597 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2598 ],
[email protected]66733172010-09-22 00:09:282599 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302600 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2601 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382602
[email protected]6c648f12011-12-24 07:50:432603 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2604 # when buliding with clang. This warning is triggered when the
2605 # override keyword is used via the OVERRIDE macro from
2606 # base/compiler_specific.h.
2607 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382608
[email protected]34f40892011-09-06 21:53:302609 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282610 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072611 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282612 # Don't die on dtoa code that uses a char as an array index.
2613 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2614 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452615 # Clang spots more unused functions.
2616 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332617 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052618 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302619 # This (rightyfully) complains about 'override', which we use
2620 # heavily.
2621 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102622
2623 # Warns on switches on enums that cover all enum values but
2624 # also contain a default: branch. Chrome is full of that.
2625 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:282626 ],
2627 }],
[email protected]5d451ad2011-02-11 16:43:462628 ['clang==1 and clang_use_chrome_plugins==1', {
2629 'OTHER_CFLAGS': [
2630 '<(clang_chrome_plugins_flags)',
2631 ],
2632 }],
[email protected]4a9ac22e2011-12-02 03:41:532633 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592634 'OTHER_CFLAGS': [
2635 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532636 ],
2637 }],
2638 ['clang==1 and clang_add_plugin!=""', {
2639 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592640 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2641 ],
2642 }],
[email protected]2616d45d2012-01-19 03:15:482643 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2644 'OTHER_CFLAGS': [
2645 # See http://crbug.com/110262
2646 '-fcolor-diagnostics',
2647 ],
2648 }],
[email protected]b3fb8092009-03-12 19:09:242649 ],
[email protected]2f80c312009-02-25 21:26:552650 },
[email protected]34f40892011-09-06 21:53:302651 'conditions': [
2652 ['clang==1', {
2653 'variables': {
2654 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2655 },
2656 }],
[email protected]921c7b52011-11-25 10:34:352657 ['asan==1', {
2658 'xcode_settings': {
2659 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352660 '-faddress-sanitizer',
2661 '-w',
2662 ],
2663 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352664 '-faddress-sanitizer',
2665 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372666 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352667 # on the prior OS X versions. Because Chromium is currently
2668 # targeting 10.5.0, we need to explicitly mark these
2669 # symbols as dynamic_lookup.
2670 '-Wl,-U,_malloc_default_purgeable_zone',
2671 '-Wl,-U,_malloc_zone_memalign',
2672 '-Wl,-U,_dispatch_sync_f',
2673 '-Wl,-U,_dispatch_async_f',
2674 '-Wl,-U,_dispatch_barrier_async_f',
2675 '-Wl,-U,_dispatch_group_async_f',
2676 '-Wl,-U,_dispatch_after_f',
2677 ],
2678 },
2679 'defines': [
2680 'ADDRESS_SANITIZER',
2681 ],
2682 }],
[email protected]34f40892011-09-06 21:53:302683 ],
[email protected]2f80c312009-02-25 21:26:552684 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552685 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462686 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2687 }],
2688 ['_mac_bundle', {
2689 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082690 }],
[email protected]6303fed2011-08-11 01:12:102691 ['_type=="executable"', {
2692 'postbuilds': [
2693 {
2694 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362695 # code execution when running on Mac OS X 10.7 ("Lion"), and
2696 # ensures that the position-independent executable (PIE) bit
2697 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102698 'variables': {
[email protected]8c40f322011-08-24 03:33:362699 # Define change_mach_o_flags in a variable ending in _path
2700 # so that GYP understands it's a path and performs proper
2701 # relativization during dict merging.
2702 'change_mach_o_flags_path':
2703 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172704 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132705 ],
2706 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172707 ['mac_pie==0 or release_valgrind_build==1', {
2708 # Don't enable PIE if it's unwanted. It's unwanted if
2709 # the target specifies mac_pie=0 or if building for
2710 # Valgrind, because Valgrind doesn't understand slide.
2711 # See the similar mac_pie/release_valgrind_build check
2712 # below.
[email protected]081c0342011-08-24 14:59:132713 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132714 '--no-pie',
2715 ],
2716 }],
2717 ],
[email protected]6303fed2011-08-11 01:12:102718 },
[email protected]8c40f322011-08-24 03:33:362719 'postbuild_name': 'Change Mach-O Flags',
2720 'action': [
2721 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132722 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362723 ],
[email protected]6303fed2011-08-11 01:12:102724 },
2725 ],
[email protected]5a5d97aa2011-09-02 15:34:002726 'conditions': [
2727 ['asan==1', {
2728 'variables': {
2729 'asan_saves_file': 'asan.saves',
2730 },
2731 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562732 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002733 },
2734 }],
2735 ],
[email protected]162407f2011-09-08 15:33:172736 'target_conditions': [
2737 ['mac_pie==1 and release_valgrind_build==0', {
2738 # Turn on position-independence (ASLR) for executables. When
2739 # PIE is on for the Chrome executables, the framework will
2740 # also be subject to ASLR.
2741 # Don't do this when building for Valgrind, because Valgrind
2742 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2743 # understand slide, and get rid of the Valgrind check.
2744 'xcode_settings': {
2745 'OTHER_LDFLAGS': [
2746 '-Wl,-pie', # Position-independent executable (MH_PIE)
2747 ],
2748 },
2749 }],
2750 ],
[email protected]6a0242bc2011-07-01 00:34:462751 }],
[email protected]9a5e72862010-09-02 16:16:582752 ['(_type=="executable" or _type=="shared_library" or \
2753 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202754 'target_conditions': [
2755 ['mac_real_dsym == 1', {
2756 # To get a real .dSYM bundle produced by dsymutil, set the
2757 # debug information format to dwarf-with-dsym. Since
2758 # strip_from_xcode will not be used, set Xcode to do the
2759 # stripping as well.
2760 'configurations': {
[email protected]5153767c2009-12-22 01:52:502761 'Release_Base': {
[email protected]24700642009-06-01 16:01:202762 'xcode_settings': {
2763 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2764 'DEPLOYMENT_POSTPROCESSING': 'YES',
2765 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072766 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252767 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072768 # The Xcode default is to strip debugging symbols
2769 # only (-S). Local symbols should be stripped as
2770 # well, which will be handled by -x. Xcode will
2771 # continue to insert -S when stripping even when
2772 # additional flags are added with STRIPFLAGS.
2773 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252774 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072775 ], # target_conditions
2776 }, # xcode_settings
2777 }, # configuration "Release"
2778 }, # configurations
[email protected]24700642009-06-01 16:01:202779 }, { # mac_real_dsym != 1
2780 # To get a fast fake .dSYM bundle, use a post-build step to
2781 # produce the .dSYM and strip the executable. strip_from_xcode
2782 # only operates in the Release configuration.
2783 'postbuilds': [
2784 {
2785 'variables': {
2786 # Define strip_from_xcode in a variable ending in _path
2787 # so that gyp understands it's a path and performs proper
2788 # relativization during dict merging.
2789 'strip_from_xcode_path': 'mac/strip_from_xcode',
2790 },
2791 'postbuild_name': 'Strip If Needed',
2792 'action': ['<(strip_from_xcode_path)'],
2793 },
[email protected]e14a9f92009-08-05 19:26:072794 ], # postbuilds
2795 }], # mac_real_dsym
2796 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582797 }], # (_type=="executable" or _type=="shared_library" or
2798 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072799 ], # target_conditions
2800 }, # target_defaults
2801 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552802 ['OS=="win"', {
2803 'target_defaults': {
2804 'defines': [
[email protected]a89e0942011-09-26 16:06:472805 '_WIN32_WINNT=0x0601',
2806 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552807 'WIN32',
2808 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552809 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282810 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552811 '_CRT_RAND_S',
2812 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2813 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272814 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:552815 ],
[email protected]8974e042010-06-21 18:06:522816 'conditions': [
[email protected]2212d272011-12-20 21:37:372817 ['buildtype=="Official"', {
2818 # In official builds, targets can self-select an optimization
2819 # level by defining a variable named 'optimize', and setting it
2820 # to one of
2821 # - "size", optimizes for minimal code size - the default.
2822 # - "speed", optimizes for speed over code size.
2823 # - "max", whole program optimization and link-time code
2824 # generation. This is very expensive and should be used
2825 # sparingly.
2826 'variables': {
2827 'optimize%': 'size',
2828 },
2829 'target_conditions': [
2830 ['optimize=="size"', {
2831 'msvs_settings': {
2832 'VCCLCompilerTool': {
2833 # 1, optimizeMinSpace, Minimize Size (/O1)
2834 'Optimization': '1',
2835 # 2, favorSize - Favor small code (/Os)
2836 'FavorSizeOrSpeed': '2',
2837 },
2838 },
2839 },
2840 ],
2841 ['optimize=="speed"', {
2842 'msvs_settings': {
2843 'VCCLCompilerTool': {
2844 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2845 'Optimization': '2',
2846 # 1, favorSpeed - Favor fast code (/Ot)
2847 'FavorSizeOrSpeed': '1',
2848 },
2849 },
2850 },
2851 ],
2852 ['optimize=="max"', {
2853 'msvs_settings': {
2854 'VCCLCompilerTool': {
2855 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2856 'Optimization': '2',
2857 # 1, favorSpeed - Favor fast code (/Ot)
2858 'FavorSizeOrSpeed': '1',
2859 # This implies link time code generation.
2860 'WholeProgramOptimization': 'true',
2861 },
2862 },
2863 },
2864 ],
2865 ],
2866 },
2867 ],
[email protected]8974e042010-06-21 18:06:522868 ['component=="static_library"', {
2869 'defines': [
2870 '_HAS_EXCEPTIONS=0',
2871 ],
2872 }],
[email protected]c7b95392012-03-28 00:25:202873 ['MSVS_VERSION=="2008"', {
2874 'defines': [
2875 '_HAS_TR1=0',
2876 ],
2877 }],
[email protected]3e2648a2011-03-21 20:58:502878 ['secure_atl', {
2879 'defines': [
2880 '_SECURE_ATL',
2881 ],
2882 }],
[email protected]8974e042010-06-21 18:06:522883 ],
[email protected]5b5ca7cb2009-07-20 23:00:202884 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372885 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542886 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552887 '$(VSInstallDir)/VC/atlmfc/include',
2888 ],
[email protected]a8d99cef2009-08-26 20:47:492889 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112890 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2891 # TODO(maruel): These warnings are level 4. They will be slowly
2892 # removed as code is fixed.
2893 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2894 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2895 4702, 4706,
2896 ],
[email protected]2f80c312009-02-25 21:26:552897 'msvs_settings': {
2898 'VCCLCompilerTool': {
2899 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552900 'BufferSecurityCheck': 'true',
2901 'EnableFunctionLevelLinking': 'true',
2902 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112903 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552904 'WarnAsError': 'true',
2905 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582906 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502907 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162908 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552909 }],
[email protected]3e2648a2011-03-21 20:58:502910 ['MSVS_VERSION=="2005e"', {
2911 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2912 }],
[email protected]8974e042010-06-21 18:06:522913 ['component=="shared_library"', {
2914 'ExceptionHandling': '1', # /EHsc
2915 }, {
2916 'ExceptionHandling': '0',
2917 }],
[email protected]3fef6e62009-07-31 19:58:582918 ],
[email protected]2f80c312009-02-25 21:26:552919 },
2920 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162921 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372922 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372923 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542924 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372925 ],
[email protected]2f80c312009-02-25 21:26:552926 },
2927 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552928 'AdditionalDependencies': [
2929 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502930 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552931 'version.lib',
2932 'msimg32.lib',
2933 'ws2_32.lib',
2934 'usp10.lib',
2935 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082936 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482937 'winmm.lib',
2938 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552939 ],
[email protected]60c219832012-03-21 22:59:322940
[email protected]4de39f82011-03-28 12:01:292941 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502942 ['msvs_express', {
2943 # Explicitly required when using the ATL with express
2944 'AdditionalDependencies': [
2945 'atlthunk.lib',
2946 ],
[email protected]60c219832012-03-21 22:59:322947
2948 # ATL 8.0 included in WDK 7.1 makes the linker to generate
2949 # almost eight hundred LNK4254 and LNK4078 warnings:
2950 # - warning LNK4254: section 'ATL' (50000040) merged into
2951 # '.rdata' (40000040) with different attributes
2952 # - warning LNK4078: multiple 'ATL' sections found with
2953 # different attributes
2954 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
[email protected]3e2648a2011-03-21 20:58:502955 }],
2956 ['MSVS_VERSION=="2005e"', {
2957 # Non-express versions link automatically to these
2958 'AdditionalDependencies': [
2959 'advapi32.lib',
2960 'comdlg32.lib',
2961 'ole32.lib',
2962 'shell32.lib',
2963 'user32.lib',
2964 'winspool.lib',
2965 ],
2966 }],
2967 ],
[email protected]a78da50e2010-06-09 21:31:372968 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372969 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542970 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372971 ],
[email protected]2f80c312009-02-25 21:26:552972 'GenerateDebugInformation': 'true',
2973 'MapFileName': '$(OutDir)\\$(TargetName).map',
2974 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552975 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482976 # SubSystem values:
2977 # 0 == not set
2978 # 1 == /SUBSYSTEM:CONSOLE
2979 # 2 == /SUBSYSTEM:WINDOWS
2980 # Most of the executables we'll ever create are tests
2981 # and utilities with console output.
2982 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552983 },
2984 'VCMIDLTool': {
2985 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:092986 'TypeLibraryName': '$(InputName).tlb',
2987 'OutputDirectory': '$(IntDir)',
2988 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:332989 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:092990 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2991 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:552992 },
2993 'VCResourceCompilerTool': {
2994 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382995 'AdditionalIncludeDirectories': [
2996 '<(DEPTH)',
2997 '<(SHARED_INTERMEDIATE_DIR)',
2998 ],
[email protected]2f80c312009-02-25 21:26:552999 },
3000 },
3001 },
3002 }],
[email protected]79e2336c2011-05-12 18:18:343003 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313004 'target_defaults': {
3005 'defines': [
3006 'DISABLE_NACL',
3007 ],
3008 },
3009 }],
[email protected]cfbf9bc2009-12-07 22:07:563010 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193011 'target_defaults': {
3012 'msvs_settings': {
3013 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193014 'DelayLoadDLLs': [
3015 'dbghelp.dll',
3016 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013017 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193018 'uxtheme.dll',
3019 ],
3020 },
3021 },
[email protected]ef4fa4072009-12-04 22:46:503022 'configurations': {
[email protected]5153767c2009-12-22 01:52:503023 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503024 'msvs_settings': {
3025 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163026 'AdditionalOptions': [
3027 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333028 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163029 '/ignore:4199',
3030 '/ignore:4221',
3031 '/nxcompat',
3032 ],
[email protected]ef4fa4072009-12-04 22:46:503033 },
3034 },
3035 },
[email protected]5153767c2009-12-22 01:52:503036 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503037 'msvs_settings': {
3038 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163039 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503040 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333041 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163042 '/ignore:4199',
3043 '/ignore:4221',
3044 '/nxcompat',
3045 ],
[email protected]ef4fa4072009-12-04 22:46:503046 },
3047 },
3048 },
3049 },
[email protected]48c7af72009-07-03 22:00:193050 },
3051 }],
[email protected]9821d0d2010-04-16 22:40:373052 ['enable_new_npdevice_api==1', {
3053 'target_defaults': {
3054 'defines': [
3055 'ENABLE_NEW_NPDEVICE_API',
3056 ],
3057 },
3058 }],
[email protected]d10e2cc2012-03-20 10:45:273059 ['clang==1 and OS!="android"', {
[email protected]34f40892011-09-06 21:53:303060 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:243061 ['CC', '<(make_clang_dir)/bin/clang'],
3062 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:073063 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:303064 ['CC.host', '$(CC)'],
3065 ['CXX.host', '$(CXX)'],
3066 ['LINK.host', '$(LINK)'],
3067 ],
3068 }],
[email protected]d10e2cc2012-03-20 10:45:273069 ['OS=="android" and "<(GENERATOR)"!="ninja"', {
3070 # Hardcode the compiler names in the Makefile so that
3071 # it won't depend on the environment at make time.
3072 'make_global_settings': [
3073 ['CC', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
3074 ['CXX', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'],
3075 ['LINK', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
3076 ['CC.host', '<!(which gcc)'],
3077 ['CXX.host', '<!(which g++)'],
3078 ['LINK.host', '<!(which g++)'],
3079 ],
3080 }],
[email protected]2f80c312009-02-25 21:26:553081 ],
3082 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503083 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3084 # This block adds *project-wide* configuration settings to each project
3085 # file. It's almost always wrong to put things here. Specify your
3086 # custom xcode_settings in target_defaults to add them to targets instead.
3087
3088 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3089 # setting sets the SDK on a project-wide basis. In order to get the
3090 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3091 # here at the project level.
3092 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
3093
[email protected]2f80c312009-02-25 21:26:553094 # The Xcode generator will look for an xcode_settings section at the root
3095 # of each dict and use it to apply settings on a file-wide basis. Most
3096 # settings should not be here, they should be in target-specific
3097 # xcode_settings sections, or better yet, should use non-Xcode-specific
3098 # settings in target dicts. SYMROOT is a special case, because many other
3099 # Xcode variables depend on it, including variables such as
3100 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3101 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3102 # files to appear (when present) in the UI as actual files and not red
3103 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3104 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163105 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553106 },
[email protected]ee28c9f2009-09-04 01:53:013107}