blob: d9ac79a895a91f24d00a5d84fd9c40ee881ca283 [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]e72e55b2011-01-06 22:19:3016 # dict that operate on these variables (e.g., for setting 'toolkit_views',
17 # we need to have 'chromeos' already set).
[email protected]e14a9f92009-08-05 19:26:0718 'variables': {
[email protected]e72e55b2011-01-06 22:19:3019 'variables': {
[email protected]bb6aba32011-01-07 19:04:4320 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3023
[email protected]de3c97272012-02-07 16:36:0624 # Whether we're building pre-Aura ChromeOS (using GTK).
25 'chromeos_gtk%': 0,
26
[email protected]3fa441d2011-09-18 17:28:5027 # Whether we are using Views Toolkit
28 'toolkit_views%': 0,
29
[email protected]ed329be2012-01-03 22:02:1630 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5831 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2832
[email protected]ed329be2012-01-03 22:02:1633 # Whether or not we are building the Ash shell.
34 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4235
36 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
37 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2738
39 # Disable Virtual keyboard support by default.
40 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4841
[email protected]7ddea9802012-02-22 23:08:0542 # Disable viewport meta tag by default.
43 'enable_viewport%': 0,
[email protected]bb6aba32011-01-07 19:04:4344 },
45 # Copy conditionally-set variables out one scope.
46 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:0647 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]41423092011-08-25 15:39:5848 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1649 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4250 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2751 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0552 'enable_viewport%': '<(enable_viewport)',
[email protected]e72e55b2011-01-06 22:19:3053
[email protected]e72e55b2011-01-06 22:19:3054 # Compute the architecture that we're building on.
55 'conditions': [
[email protected]177cd082011-10-04 18:36:3856 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3757 'host_arch%': 'ia32',
58 }, {
[email protected]79e2336c2011-05-12 18:18:3459 # This handles the Unix platforms for which there is some support.
60 # Anything else gets passed through, which probably won't work very
61 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3062 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3463 '<!(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:3064 }],
[email protected]1353a092012-01-13 03:34:2865
[email protected]5f887612012-03-01 21:34:0666 # Non-GTK Chromeos implies ash.
67 ['chromeos==1', {
68 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1669 'use_aura%': 1,
70 }],
[email protected]bb6aba32011-01-07 19:04:4371
[email protected]5f887612012-03-01 21:34:0672 # For now, Windows *AND* Linux builds that |use_aura| should also
73 # imply using ash. This rule should be removed for the future when
74 # both Linux and Windows are using the aura windows without the ash
75 # interface.
76 ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', {
77 'use_ash%': 1,
78 }],
79
[email protected]ab2017e2012-02-07 01:54:5080 # Set default value of toolkit_views based on OS.
[email protected]de3c97272012-02-07 16:36:0681 ['OS=="win" or chromeos==1 or chromeos_gtk==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4382 'toolkit_views%': 1,
83 }, {
84 'toolkit_views%': 0,
85 }],
[email protected]de3c97272012-02-07 16:36:0686
87 # ChromeOS GTK implies ChromeOS.
88 ['chromeos_gtk==1', {
89 'chromeos%': 1,
90 }],
[email protected]e72e55b2011-01-06 22:19:3091 ],
92 },
93
94 # Copy conditionally-set variables out one scope.
95 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:0696 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]e72e55b2011-01-06 22:19:3097 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4398 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:5899 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16100 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42101 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:27102 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05103 'enable_viewport%': '<(enable_viewport)',
[email protected]023d8242011-11-22 01:25:27104
[email protected]8fb0ef02011-05-20 00:53:50105 # We used to provide a variable for changing how libraries were built.
106 # This variable remains until we can clean up all the users.
107 # This needs to be one nested variables dict in so that dependent
108 # gyp files can make use of it in their outer variables. (Yikes!)
109 # http://code.google.com/p/chromium/issues/detail?id=83308
110 'library%': 'static_library',
111
[email protected]e14a9f92009-08-05 19:26:07112 # Override branding to select the desired branding flavor.
113 'branding%': 'Chromium',
114
115 # Override buildtype to select the desired build flavor.
116 # Dev - everyday build for development/testing
117 # Official - release build (generally implies additional processing)
118 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
119 # conversion is done), some of the things which are now controlled by
120 # 'branding', such as symbol generation, will need to be refactored based
121 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
122 # builds).
123 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27124
[email protected]e72e55b2011-01-06 22:19:30125 # Default architecture we're building for is the architecture we're
126 # building on.
127 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17128
[email protected]e72e55b2011-01-06 22:19:30129 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
130 # are built under a chromium full build (1) or a webkit.org chromium
131 # build (0).
132 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52133
[email protected]e72e55b2011-01-06 22:19:30134 # Set to 1 to enable fast builds. It disables debug info for fastest
135 # compilation.
136 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49137
[email protected]20960e072011-09-20 20:59:01138 # Set to 1 to enable dcheck in release without having to use the flag.
139 'dcheck_always_on%': 0,
140
[email protected]464750f2011-10-24 23:16:18141 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51142 'file_manager_extension%': 0,
143
[email protected]5f16f8a2012-03-14 07:38:23144 # Disable WebUI TaskManager by default.
145 'webui_task_manager%': 0,
[email protected]8b2e9f392011-08-05 04:00:47146
[email protected]e72e55b2011-01-06 22:19:30147 # Python version.
[email protected]a43c5a02011-05-27 06:54:51148 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17149
[email protected]e72e55b2011-01-06 22:19:30150 # Set ARM-v7 compilation flags
151 'armv7%': 0,
152
153 # Set Neon compilation flags (only meaningful if armv7==1).
154 'arm_neon%': 1,
155
156 # The system root for cross-compiles. Default: none.
157 'sysroot%': '',
158
[email protected]945361a2011-09-30 04:38:43159 # The system libdir used for this ABI.
160 'system_libdir%': 'lib',
161
[email protected]e72e55b2011-01-06 22:19:30162 # On Linux, we build with sse2 for Chromium builds.
163 'disable_sse2%': 0,
164
165 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03166 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30167
168 # Variable 'component' is for cases where we would like to build some
169 # components as dynamic shared libraries but still need variable
170 # 'library' for static libraries.
171 # By default, component is set to whatever library is set to and
172 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53173 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30174
[email protected]bb6aba32011-01-07 19:04:43175 # Set to select the Title Case versions of strings in GRD files.
176 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21177
[email protected]98da0042011-02-02 00:10:27178 # Use translations provided by volunteers at launchpad.net. This
179 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19180 'use_third_party_translations%': 0,
181
[email protected]9a425422011-01-11 00:53:18182 # Remoting compilation is enabled by default. Set to 0 to disable.
183 'remoting%': 1,
184
[email protected]a026daa2011-04-20 15:49:51185 # P2P APIs are compiled in by default. Set to 0 to disable.
186 # Also note that this should be enabled for remoting to compile.
187 'p2p_apis%': 1,
188
[email protected]1ec68c42011-06-01 13:56:25189 # Configuration policy is enabled by default. Set to 0 to disable.
190 'configuration_policy%': 1,
191
[email protected]4b58e7d2011-07-11 10:22:56192 # Safe browsing is compiled in by default. Set to 0 to disable.
193 'safe_browsing%': 1,
194
[email protected]9eb100e2011-10-14 05:08:22195 # Speech input is compiled in by default. Set to 0 to disable.
196 'input_speech%': 1,
197
[email protected]7cce3232011-10-28 10:41:57198 # Notifications are compiled in by default. Set to 0 to disable.
199 'notifications%' : 1,
200
[email protected]5d451ad2011-02-11 16:43:46201 # If this is set, the clang plugins used on the buildbot will be used.
202 # Run tools/clang/scripts/update.sh to make sure they are compiled.
203 # This causes 'clang_chrome_plugins_flags' to be set.
204 # Has no effect if 'clang' is not set as well.
205 'clang_use_chrome_plugins%': 0,
206
[email protected]f36f3742011-11-21 13:12:14207 # Enable building with ASAN (Clang's -faddress-sanitizer option).
208 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06209 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
210 'asan%': 0,
[email protected]3cfa96a62012-02-28 07:27:58211 'asan_blacklist%': '<(PRODUCT_DIR)/../../third_party/asan/ignore.txt',
[email protected]92799b632011-08-15 14:33:06212
[email protected]00b0a7f2012-01-25 15:30:46213 # Use the provided profiled order file to link Chrome image with it.
214 # This makes Chrome faster by better using CPU cache when executing code.
215 # This is known as PGO (profile guided optimization).
216 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
217 'order_text_section%' : "",
218
[email protected]1ad5a7b2011-06-24 03:15:13219 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
220 # libraries on linux x86-64 and arm, plus ASLR.
221 'linux_fpic%': 1,
222
[email protected]bd7b6fe2012-03-05 21:02:40223 # Whether one-click signin is enabled or not.
224 'enable_one_click_signin%': 0,
225
[email protected]c6a1f94172011-07-05 02:35:00226 # Enable navigator.registerProtocolHandler and supporting UI.
227 'enable_register_protocol_handler%': 1,
228
[email protected]5ffb0a42012-01-27 09:36:11229 # Enable Web Intents support in WebKit, dispatching of intents,
230 # and extensions Web Intents support.
231 'enable_web_intents%': 1,
232
233 # Enable Web Intents web content registration via HTML element
234 # and WebUI managing such registrations.
235 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01236
[email protected]dda90ae2011-07-19 22:07:48237 # Webrtc compilation is enabled by default. Set to 0 to disable.
238 'enable_webrtc%': 1,
239
[email protected]67c125d2011-10-11 18:58:22240 # PPAPI by default does not support plugins making calls off the main
241 # thread. Set to 1 to turn on experimental support for out-of-process
242 # plugins to make call of the main thread.
243 'enable_pepper_threading%': 0,
244
[email protected]6b40bb582012-03-15 20:50:38245 # Enables theme support, which is enabled by default. Support for
246 # disabling depends on the platform.
247 'enable_themes%': 1,
248
[email protected]f56797b2011-09-25 00:04:35249 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
250 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
251 # the input value also defines the required XI2 minor minimum version.
252 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
253 'use_xi2_mt%': 0,
254
[email protected]9061bee82012-01-16 11:45:17255 # Use of precompiled headers on Windows.
256 #
257 # This is on by default in VS 2010, but off by default for VS
258 # 2008 because of complications that it can cause with our
259 # trybots etc.
260 #
261 # This variable may be explicitly set to 1 (enabled) or 0
262 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
263 # This setting will override the default.
264 #
265 # Note that a setting of 1 is probably suitable for most or all
266 # Windows developers using VS 2008, since precompiled headers
267 # provide a build speedup of 20-25%. There are a couple of
268 # small workarounds you may need to use when using VS 2008 (but
269 # not 2010), see
270 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
271 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16272 'chromium_win_pch%': 0,
273
[email protected]18e0f39b2012-01-17 16:47:34274 # Enable plug-in installation by default.
275 'enable_plugin_installation%': 1,
276
[email protected]d18e50312012-01-25 17:49:35277 # Specifies whether to use canvas_skia_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42278 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35279 # Chrome UI.
280 # TODO(asvitkine): Enable this on all platforms and delete this flag.
281 # http://crbug.com/105550
282 'use_canvas_skia_skia%': 0,
283
[email protected]a9318c72012-03-01 01:29:47284 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
285 # with one of those tools.
286 'build_for_tool%': '',
287
[email protected]01971642012-03-07 14:39:56288 # Whether tests targets should be run, archived or just have the
289 # dependencies verified. All the tests targets have the '_run' suffix,
290 # e.g. base_unittests_run runs the target base_unittests. The test target
291 # always calls tools/isolate/isolate.py. See the script's --help for more
292 # information and the valid --mode values. Meant to be overriden with
293 # GYP_DEFINES.
294 'tests_run%': 'check',
295
[email protected]bb6aba32011-01-07 19:04:43296 'conditions': [
[email protected]33423fa2011-09-23 18:18:14297 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
298 # the 'conditions' clause. Initial attempts resulted in chromium and
299 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22300 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21301 'use_skia%': 1,
[email protected]e4dbede82011-09-16 16:11:07302 # Mac uses clang by default, so turn on the plugin as well.
303 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22304 }, {
305 'use_skia%': 1,
306 }],
307
[email protected]79e2336c2011-05-12 18:18:34308 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37309 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34310 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37311 }, {
312 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34313 }],
314
[email protected]df9167b2011-11-14 19:15:25315 # A flag for BSD platforms
316 ['OS=="freebsd" or OS=="openbsd"', {
317 'os_bsd%': 1,
318 }, {
319 'os_bsd%': 0,
320 }],
321
[email protected]c329adf82011-10-05 14:34:57322 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42323 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57324 'use_nss%': 1,
325 }, {
326 'use_nss%': 0,
327 }],
[email protected]e0b85a52011-10-06 03:30:42328
[email protected]258dca42011-09-21 00:17:19329 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01330 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19331 'use_glib%': 0,
[email protected]ab2017e2012-02-07 01:54:50332 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34333 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37334 }, {
[email protected]ab2017e2012-02-07 01:54:50335 # TODO(dnicoara) Wayland build should have these disabled, but
336 # currently GTK and X is too spread and it's hard to completely
337 # remove every dependency.
[email protected]258dca42011-09-21 00:17:19338 'use_glib%': 1,
[email protected]ab2017e2012-02-07 01:54:50339 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37340 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34341 }],
[email protected]efadeacf2011-10-27 19:01:00342 # We always use skia text rendering in Aura on Windows, since GDI
343 # doesn't agree with our BackingStore.
344 # TODO(beng): remove once skia text rendering is on by default.
345 ['use_aura==1 and OS=="win"', {
346 'enable_skia_text%': 1,
347 }],
[email protected]ab2017e2012-02-07 01:54:50348 ['use_aura==1 and OS!="win"', {
349 'toolkit_uses_gtk%': 0,
350 }],
[email protected]9edeb712011-09-20 21:20:33351
[email protected]63692212010-09-16 00:22:21352 # A flag to enable or disable our compile-time dependency
353 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
354 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49355 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50356 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21357 'use_gnome_keyring%': 0,
358 }, {
359 'use_gnome_keyring%': 1,
360 }],
[email protected]0afe5212010-10-01 18:56:11361
[email protected]bb6aba32011-01-07 19:04:43362 ['toolkit_views==0 or OS=="mac"', {
363 # GTK+ and Mac wants Title Case strings
364 'use_titlecase_in_grd_files%': 1,
365 }],
366
[email protected]1b4209f2011-01-07 00:25:40367 # Enable some hacks to support Flapper only on Chrome OS.
368 ['chromeos==1', {
369 'enable_flapper_hacks%': 1,
[email protected]3d38d8e2011-04-16 20:48:51370 }, {
[email protected]c5582412012-02-05 20:16:21371 'enable_flapper_hacks%': 0,
[email protected]ab2017e2012-02-07 01:54:50372 }],
373
[email protected]5f887612012-03-01 21:34:06374 # Enable file manager extension on Chrome OS.
375 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50376 'file_manager_extension%': 1,
377 }, {
[email protected]3d38d8e2011-04-16 20:48:51378 'file_manager_extension%': 0,
379 }],
[email protected]7de46352011-09-12 15:39:19380
[email protected]5f16f8a2012-03-14 07:38:23381 # Enable WebUI TaskManager on Chrome OS or Aura.
382 ['chromeos==1 or use_aura==1', {
383 'webui_task_manager%': 1,
384 }],
385
[email protected]bd7b6fe2012-03-05 21:02:40386 # For now one-click signin is enabled only for windows since the UI
387 # is not yet complete for other platforms.
388 ['OS=="win"', {
389 'enable_one_click_signin%': 1,
390 }],
391
[email protected]da1c8d692011-09-20 20:35:01392 ['OS=="android"', {
393 'proprietary_codecs%': 1,
394 'enable_webrtc%': 0,
395 }],
[email protected]839d5172011-10-13 17:18:11396
397 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27398 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01399 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33400 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11401 }, {
[email protected]1ee7c56c2011-10-19 14:51:33402 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11403 }],
[email protected]9061bee82012-01-16 11:45:17404
405 # Turn precompiled headers on by default for VS 2010.
406 ['OS=="win" and MSVS_VERSION=="2010"', {
407 'chromium_win_pch%': 1
408 }],
[email protected]18e0f39b2012-01-17 16:47:34409
[email protected]ab2017e2012-02-07 01:54:50410 ['use_aura==1 or chromeos==1', {
[email protected]18e0f39b2012-01-17 16:47:34411 'enable_plugin_installation%': 0,
412 }, {
413 'enable_plugin_installation%': 1,
414 }],
[email protected]b07806c12012-02-03 22:44:59415
[email protected]8d726a42012-02-09 03:49:00416 # linux_use_gold_binary: whether to use the binary checked into
417 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40418 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51419 'linux_use_gold_binary%': 1,
420 }, {
421 'linux_use_gold_binary%': 0,
422 }],
423
[email protected]be239492012-02-09 19:00:17424 # linux_use_gold_flags: whether to use build flags that rely on gold.
425 # On by default for x64 Linux. Temporarily off for ChromeOS as
426 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40427 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17428 'linux_use_gold_flags%': 1,
429 }, {
[email protected]8d726a42012-02-09 03:49:00430 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59431 }],
[email protected]2e22e2f2012-03-15 21:53:10432
433 # Enable automation on platforms other than Android.
434 ['OS=="android"', {
435 'enable_automation%': 0,
436 }, {
437 'enable_automation%': 1,
438 }],
[email protected]b3f23ba2010-04-26 22:58:17439 ],
[email protected]e14a9f92009-08-05 19:26:07440 },
441
[email protected]e72e55b2011-01-06 22:19:30442 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07443 'branding%': '<(branding)',
444 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27445 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59446 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50447 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44448 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33449 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58450 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16451 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42452 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57453 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25454 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34455 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19456 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34457 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22458 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34459 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21460 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11461 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40462 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22463 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44464 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:06465 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]2cc81d32011-10-04 17:03:18466 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05467 'enable_viewport%': '<(enable_viewport)',
[email protected]f56797b2011-09-25 00:04:35468 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20469 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47470 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21471 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54472 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01473 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36474 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43475 'armv7%': '<(armv7)',
476 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23477 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43478 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22479 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52480 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43481 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17482 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18483 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40484 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48485 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16486 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51487 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25488 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56489 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22490 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57491 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46492 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06493 'asan%': '<(asan)',
[email protected]3cfa96a62012-02-28 07:27:58494 'asan_blacklist%': '<(asan_blacklist)',
[email protected]00b0a7f2012-01-25 15:30:46495 'order_text_section%': '<(order_text_section)',
[email protected]365dd5b92011-05-26 01:30:56496 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07497 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11498 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34499 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6b40bb582012-03-15 20:50:38500 'enable_themes%': '<(enable_themes)',
[email protected]b07806c12012-02-03 22:44:59501 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00502 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]d18e50312012-01-25 17:49:35503 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)',
[email protected]01971642012-03-07 14:39:56504 'tests_run%': '<(tests_run)',
[email protected]2e22e2f2012-03-15 21:53:10505 'enable_automation%': '<(enable_automation)',
[email protected]01971642012-03-07 14:39:56506
[email protected]4076d2f2011-08-11 18:20:22507 # Whether to build for Wayland display server
508 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39509
[email protected]371e1092011-10-12 20:37:36510 # Use system yasm instead of bundled one.
511 'use_system_yasm%': 0,
512
[email protected]cd00bd862012-02-29 00:40:36513 # Default to enabled PIE; this is important for ASLR but we may need to be
514 # able to turn it off for various reasons.
515 'linux_disable_pie%': 0,
516
[email protected]caa95c82009-11-23 22:39:32517 # The release channel that this build targets. This is used to restrict
518 # channel-specific build options, like which installer packages to create.
519 # The default is 'all', which does no channel-specific filtering.
520 'channel%': 'all',
521
[email protected]b3fb8092009-03-12 19:09:24522 # Override chromium_mac_pch and set it to 0 to suppress the use of
523 # precompiled headers on the Mac. Prefix header injection may still be
524 # used, but prefix headers will not be precompiled. This is useful when
525 # using distcc to distribute a build to compile slaves that don't
526 # share the same compiler executable as the system driving the compilation,
527 # because precompiled headers rely on pointers into a specific compiler
528 # executable's image. Setting this to 0 is needed to use an experimental
529 # Linux-Mac cross compiler distcc farm.
530 'chromium_mac_pch%': 1,
531
[email protected]3224dcd2009-09-16 17:31:25532 # Mac OS X SDK and deployment target support.
533 # The SDK identifies the version of the system headers that will be used,
534 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
535 # "Maximum allowed" refers to the operating system version whose APIs are
536 # available in the headers.
537 # The deployment target identifies the minimum system version that the
538 # built products are expected to function on. It corresponds to the
539 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
540 # To ensure these macros are available, #include <AvailabilityMacros.h>.
541 # Additional documentation on these macros is available at
542 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
543 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
544 # deployment target to 10.5. Other projects, such as O3D, may override
545 # these defaults.
546 'mac_sdk%': '10.5',
547 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59548
[email protected]f5ecbba12009-04-03 04:35:18549 # Set to 1 to enable code coverage. In addition to build changes
550 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
551 # project file called "coverage".
552 # Currently ignored on Windows.
553 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49554
[email protected]7477ea6f2009-12-22 23:28:15555 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47556 # environment variable, the libcmt shim it uses sometimes gets in
557 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
558 # 'win_use_allocator_shim': 0,
559 # 'win_release_RuntimeLibrary': 2
560 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52561 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11562
[email protected]95ff8082009-11-13 22:21:01563 # Whether usage of OpenMAX is enabled.
564 'enable_openmax%': 0,
565
[email protected]d01120e62010-05-10 17:04:48566 # Whether proprietary audio/video codecs are assumed to be included with
567 # this build (only meaningful if branding!=Chrome).
568 'proprietary_codecs%': 0,
569
[email protected]e5b2eaa2009-04-14 01:39:12570 # TODO(bradnelson): eliminate this when possible.
571 # To allow local gyp files to prevent release.vsprops from being included.
572 # Yes(1) means include release.vsprops.
573 # Once all vsprops settings are migrated into gyp, this can go away.
574 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23575
[email protected]cbd5fd52009-08-26 00:14:27576 # TODO(bradnelson): eliminate this when possible.
577 # To allow local gyp files to override additional linker options for msvs.
578 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19579 'msvs_use_common_linker_extras%': 1,
580
[email protected]1ffb6502009-06-02 07:46:24581 # TODO(sgk): eliminate this if possible.
582 # It would be nicer to support this via a setting in 'target_defaults'
583 # in chrome/app/locales/locales.gypi overriding the setting in the
584 # 'Debug' configuration in the 'target_defaults' dict below,
585 # but that doesn't work as we'd like.
586 'msvs_debug_link_incremental%': '2',
587
[email protected]1f790ef2011-01-11 20:45:36588 # Needed for some of the largest modules.
589 'msvs_debug_link_nonincremental%': '1',
590
[email protected]5ab8f482011-08-18 18:30:06591 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
592 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51593 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06594
[email protected]573136142009-07-15 22:48:37595 # This is the location of the sandbox binary. Chrome looks for this before
596 # running the zygote process. If found, and SUID, it will be used to
597 # sandbox the zygote process and, thus, all renderer processes.
598 'linux_sandbox_path%': '',
599
[email protected]ad6d2c42009-09-15 20:13:38600 # Set this to true to enable SELinux support.
601 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57602
[email protected]58680ce2010-09-18 00:09:15603 # Set this to true when building with Clang.
604 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15605 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24606 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15607
[email protected]5e781232011-01-28 02:57:59608 # These two variables can be set in GYP_DEFINES while running
609 # |gclient runhooks| to let clang run a plugin in every compilation.
610 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
611 # Example:
[email protected]93120fe2011-02-03 20:46:42612 # 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:59613
614 'clang_load%': '',
615 'clang_add_plugin%': '',
616
[email protected]da1c8d692011-09-20 20:35:01617 # The default type of gtest.
618 'gtest_target_type%': 'executable',
619
[email protected]7664ab32011-02-01 23:35:25620 # Enable sampling based profiler.
621 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
622 'profiling%': '0',
623
[email protected]93b373502011-08-16 19:06:22624 # Enable strict glibc debug mode.
625 'glibcxx_debug%': 0,
626
[email protected]36532f332010-08-25 00:22:01627 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
628 'linux_breakpad%': 0,
629 # And if we want to dump symbols for Breakpad-enabled builds.
630 'linux_dump_symbols%': 0,
631 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03632 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49633 # Strip the test binaries needed for Linux reliability tests.
634 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03635
[email protected]46ce5b562010-06-16 18:39:53636 # Enable TCMalloc.
637 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24638
[email protected]39ca7de2010-04-16 08:04:03639 # Disable TCMalloc's debugallocation.
640 'linux_use_debugallocation%': 0,
641
[email protected]d8b60602010-03-26 09:41:22642 # Disable TCMalloc's heapchecker.
643 'linux_use_heapchecker%': 0,
644
[email protected]64e2d4a42010-08-27 10:13:21645 # Disable shadow stack keeping used by heapcheck to unwind the stacks
646 # better.
647 'linux_keep_shadow_stacks%': 0,
648
[email protected]556c5d72010-06-10 05:45:01649 # Set to 1 to link against libgnome-keyring instead of using dlopen().
650 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35651 # Set to 1 to link against gsettings APIs instead of using dlopen().
652 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01653
[email protected]77c1b29392009-12-04 06:21:29654 # Set Thumb compilation flags.
655 'arm_thumb%': 0,
656
[email protected]53e0f642010-03-05 01:41:56657 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
658 # arm_neon==0).
659 'arm_fpu%': 'vfpv3',
660
[email protected]9821d0d2010-04-16 22:40:37661 # Enable new NPDevice API.
662 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50663
664 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14665 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50666
[email protected]6f51b27e2010-06-22 20:43:53667 # Enable a variable used elsewhere throughout the GYP files to determine
668 # whether to compile in the sources for the GPU plugin / process.
669 'enable_gpu%': 1,
670
[email protected]e72e55b2011-01-06 22:19:30671 # .gyp files or targets should set chromium_code to 1 if they build
672 # Chromium-specific code, as opposed to external code. This variable is
673 # used to control such things as the set of warnings to enable, and
674 # whether warnings are treated as errors.
675 'chromium_code%': 0,
676
[email protected]8d726a42012-02-09 03:49:00677 'release_valgrind_build%': 0,
678
[email protected]b1eb341c2011-11-09 18:46:07679 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
680 'enable_wexit_time_destructors%': 0,
681
[email protected]e72e55b2011-01-06 22:19:30682 # Set to 1 to compile with the built in pdf viewer.
683 'internal_pdf%': 0,
684
685 # This allows to use libcros from the current system, ie. /usr/lib/
686 # The cros_api will be pulled in as a static library, and all headers
687 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43688 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30689
[email protected]e72e55b2011-01-06 22:19:30690 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
691 # so Cocoa is happy (http://crbug.com/20441).
692 'locales': [
693 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
694 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
695 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19696 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30697 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
698 'vi', 'zh-CN', 'zh-TW',
699 ],
700
[email protected]cc0322d2011-07-24 09:29:19701 # Pseudo locales are special locales which are used for testing and
702 # debugging. They don't get copied to the final app. For more info,
703 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
704 'pseudo_locales': [
705 'fake-bidi',
706 ],
707
[email protected]bb6aba32011-01-07 19:04:43708 'grit_defines': [],
709
[email protected]bd3bd442011-03-28 07:58:51710 # If debug_devtools is set to 1, JavaScript files for DevTools are
711 # stored as is and loaded from disk. Otherwise, a concatenated file
712 # is stored in resources.pak. It is still possible to load JS files
713 # from disk by passing --debug-devtools cmdline switch.
714 'debug_devtools%': 0,
715
[email protected]464750f2011-10-24 23:16:18716 # The Java Bridge is not compiled in by default.
717 'java_bridge%': 0,
718
[email protected]33e1c372011-12-14 16:32:07719 # This flag is only used when disable_nacl==0 and disables all those
720 # subcomponents which would require the installation of a native_client
721 # untrusted toolchain.
722 'disable_nacl_untrusted%': 0,
723
[email protected]407dfa632011-12-23 11:59:35724 # Disable Dart by default.
725 'enable_dart%': 0,
726
[email protected]ff10b132012-02-29 22:53:30727 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
728 'msbuild_toolset%': '',
729
[email protected]912c55c2009-07-31 23:33:55730 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11731 # Used to disable Native Client at compile time, for platforms where it
732 # isn't supported (ARM)
[email protected]33e1c372011-12-14 16:32:07733 ['target_arch=="arm" and chromeos == 1', {
[email protected]f0c4fce2011-10-20 18:16:11734 'disable_nacl%': 1,
735 }, {
736 'disable_nacl%': 0,
737 }],
[email protected]da1c8d692011-09-20 20:35:01738 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10739 # This will set gcc_version to XY if you are running gcc X.Y.*.
740 # This is used to tweak build flags for gcc 4.4.
741 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23742 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43743 '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:27744 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10745 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27746 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27747 }],
[email protected]4c9cc6c2009-10-01 18:54:57748 # All Chrome builds have breakpad symbols, but only process the
749 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08750 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57751 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57752 }],
[email protected]cbd5fd52009-08-26 00:14:27753 ],
[email protected]da1c8d692011-09-20 20:35:01754 }], # os_posix==1 and OS!="mac" and OS!="android"
755 ['OS=="android"', {
756 # Location of Android NDK.
757 'variables': {
758 'variables': {
759 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
760 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43761
[email protected]da1c8d692011-09-20 20:35:01762 # Switch between different build types, currently only '0' is
763 # supported.
764 'android_build_type%': 0,
765 },
766 'android_ndk_root%': '<(android_ndk_root)',
767 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
768 'android_build_type%': '<(android_build_type)',
769 },
770 'android_ndk_root%': '<(android_ndk_root)',
771 'android_ndk_sysroot': '<(android_ndk_sysroot)',
772 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
773 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
774
775 # Uses Android's crash report system
776 'linux_breakpad%': 0,
777
778 # Always uses openssl.
779 'use_openssl%': 1,
780
781 'proprietary_codecs%': '<(proprietary_codecs)',
782 'safe_browsing%': 0,
783 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22784 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56785 'enable_web_intents%': 0,
[email protected]464750f2011-10-24 23:16:18786 'java_bridge%': 1,
[email protected]6b40bb582012-03-15 20:50:38787 # Android does not support themes.
788 'enable_themes%': 0,
[email protected]5fd2e842012-03-01 00:29:11789
790 # Set to 1 once we have a notification system for Android.
791 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57792 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01793
794 # Builds the gtest targets as a shared_library.
795 # TODO(michaelbai): Use the fixed value 'shared_library' once it
796 # is fully supported.
797 'gtest_target_type%': '<(gtest_target_type)',
798
799 # Uses system APIs for decoding audio and video.
800 'use_libffmpeg%': '0',
801
802 # Always use the chromium skia. The use_system_harfbuzz needs to
803 # match use_system_skia.
804 'use_system_skia%': '0',
805 'use_system_harfbuzz%': '0',
806
807 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28808 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01809
810 # Choose static link by build type.
811 'conditions': [
812 ['android_build_type==0', {
813 'static_link_system_icu%': 1,
814 }, {
815 'static_link_system_icu%': 0,
816 }],
817 ],
818 # Enable to use system sqlite.
819 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16820 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01821 'use_system_libjpeg%': '<(android_build_type)',
822 # Enable to use the system libexpat.
823 'use_system_libexpat%': '<(android_build_type)',
824 # Enable to use the system stlport, otherwise statically
825 # link the NDK one?
826 'use_system_stlport%': '<(android_build_type)',
827 # Copy it out one scope.
828 'android_build_type%': '<(android_build_type)',
829 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07830 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11831 # Enable clang on mac by default!
832 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56833 # Compile in Breakpad support by default so that it can be
834 # tested, even if it is not enabled by default at runtime.
835 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07836 'conditions': [
837 # mac_product_name is set to the name of the .app bundle as it should
838 # appear on disk. This duplicates data from
839 # chrome/app/theme/chromium/BRANDING and
840 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
841 # these names into the build system.
842 ['branding=="Chrome"', {
843 'mac_product_name%': 'Google Chrome',
844 }, { # else: branding!="Chrome"
845 'mac_product_name%': 'Chromium',
846 }],
847
[email protected]e14a9f92009-08-05 19:26:07848 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56849 # Enable uploading crash dumps.
850 'mac_breakpad_uploads%': 1,
851 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07852 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56853 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07854 'mac_keystone%': 1,
855 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56856 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07857 'mac_breakpad%': 0,
858 'mac_keystone%': 0,
859 }],
860 ],
861 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43862
[email protected]912c55c2009-07-31 23:33:55863 ['OS=="win"', {
864 'conditions': [
[email protected]8974e042010-06-21 18:06:52865 ['component=="shared_library"', {
866 'win_use_allocator_shim%': 0,
867 }],
[email protected]2212d272011-12-20 21:37:37868 # Whether to use multiple cores to compile with visual studio. This is
869 # optional because it sometimes causes corruption on VS 2005.
870 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55871 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13872 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55873 },{
874 'msvs_multi_core_compile%': 1,
875 }],
[email protected]10bb8c92009-08-07 21:16:03876 # Don't do incremental linking for large modules on 32-bit.
877 ['MSVS_OS_BITS==32', {
878 'msvs_large_module_debug_link_mode%': '1', # No
879 },{
880 'msvs_large_module_debug_link_mode%': '2', # Yes
881 }],
[email protected]3e2648a2011-03-21 20:58:50882 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
883 'msvs_express%': 1,
884 'secure_atl%': 0,
885 },{
886 'msvs_express%': 0,
887 'secure_atl%': 1,
888 }],
[email protected]912c55c2009-07-31 23:33:55889 ],
[email protected]ef4fa4072009-12-04 22:46:50890 'nacl_win64_defines': [
891 # This flag is used to minimize dependencies when building
892 # Native Client loader for 64-bit Windows.
893 'NACL_WIN64',
894 ],
[email protected]912c55c2009-07-31 23:33:55895 }],
[email protected]bb6aba32011-01-07 19:04:43896
[email protected]79e2336c2011-05-12 18:18:34897 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44898 'use_cups%': 1,
899 }, {
900 'use_cups%': 0,
901 }],
[email protected]bb6aba32011-01-07 19:04:43902
[email protected]19fe8f0b2010-12-07 07:27:27903 # Set the relative path from this file to the GYP file of the JPEG
904 # library used by Chromium.
905 ['use_libjpeg_turbo==1', {
906 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
907 }, {
908 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
909 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43910
[email protected]abcc9ac2011-05-16 20:04:35911 # Options controlling the use of GConf (the classic GNOME configuration
912 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31913 ['chromeos==1', {
914 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35915 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31916 }, {
917 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35918 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31919 }],
920
[email protected]4de39f82011-03-28 12:01:29921 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29922 ['branding=="Chrome"', {
923 # TODO(mmoss) The .grd files look for _google_chrome, but for
924 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29925 'grit_defines': ['-D', '_google_chrome',
926 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29927 }, {
[email protected]4de39f82011-03-28 12:01:29928 'grit_defines': ['-D', '_chromium',
929 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29930 }],
[email protected]bb6aba32011-01-07 19:04:43931 ['chromeos==1', {
932 'grit_defines': ['-D', 'chromeos'],
933 }],
934 ['toolkit_views==1', {
935 'grit_defines': ['-D', 'toolkit_views'],
936 }],
[email protected]8dd791d2011-09-16 16:37:30937 ['use_aura==1', {
938 'grit_defines': ['-D', 'use_aura'],
939 }],
[email protected]ed329be2012-01-03 22:02:16940 ['use_ash==1', {
941 'grit_defines': ['-D', 'use_ash'],
942 }],
[email protected]c329adf82011-10-05 14:34:57943 ['use_nss==1', {
944 'grit_defines': ['-D', 'use_nss'],
945 }],
[email protected]2cc81d32011-10-04 17:03:18946 ['use_virtual_keyboard==1', {
947 'grit_defines': ['-D', 'use_virtual_keyboard'],
948 }],
[email protected]e47c32032011-03-01 19:26:20949 ['file_manager_extension==1', {
950 'grit_defines': ['-D', 'file_manager_extension'],
951 }],
[email protected]8b2e9f392011-08-05 04:00:47952 ['webui_task_manager==1', {
953 'grit_defines': ['-D', 'webui_task_manager'],
954 }],
[email protected]9a425422011-01-11 00:53:18955 ['remoting==1', {
956 'grit_defines': ['-D', 'remoting'],
957 }],
[email protected]bb6aba32011-01-07 19:04:43958 ['use_titlecase_in_grd_files==1', {
959 'grit_defines': ['-D', 'use_titlecase'],
960 }],
[email protected]00dc155832011-02-01 18:51:19961 ['use_third_party_translations==1', {
962 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12963 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16964 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
965 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12966 ],
[email protected]00dc155832011-02-01 18:51:19967 }],
[email protected]da1c8d692011-09-20 20:35:01968 ['OS=="android"', {
969 'grit_defines': ['-D', 'android'],
970 }],
[email protected]5d451ad2011-02-11 16:43:46971 ['clang_use_chrome_plugins==1', {
972 'clang_chrome_plugins_flags':
973 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
974 }],
[email protected]cfa2e1102011-04-27 22:30:23975
[email protected]452da69e2011-05-24 02:36:05976 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27977 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23978 'use_ibus%': 1,
979 }, {
980 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56981 }],
982
983 ['enable_register_protocol_handler==1', {
984 'grit_defines': ['-D', 'enable_register_protocol_handler'],
985 }],
[email protected]92799b632011-08-15 14:33:06986
[email protected]5ffb0a42012-01-27 09:36:11987 ['enable_web_intents_tag==1', {
988 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:07989 }],
990
[email protected]92799b632011-08-15 14:33:06991 ['asan==1', {
992 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20993 # Do not use Chrome plugins for Clang. The Clang version in
994 # third_party/asan may be different from the default one.
995 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06996 }],
[email protected]a9318c72012-03-01 01:29:47997
998 # On valgrind bots, override the optimizer settings so we don't inline too
999 # much and make the stacks harder to figure out.
1000 #
1001 # TODO(rnk): Kill off variables that no one else uses and just implement
1002 # them under a build_for_tool== condition.
1003 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1004 # gcc flags
1005 'mac_debug_optimization': '1',
1006 'mac_release_optimization': '1',
1007 'release_optimize': '1',
1008 'no_gc_sections': 1,
1009 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1010 '-fno-builtin -fno-optimize-sibling-calls',
1011 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1012 '-fno-builtin -fno-optimize-sibling-calls',
1013
1014 # MSVS flags for TSan on Pin and Windows.
1015 'win_debug_RuntimeChecks': '0',
1016 'win_debug_disable_iterator_debugging': '1',
1017 'win_debug_Optimization': '1',
1018 'win_debug_InlineFunctionExpansion': '0',
1019 'win_release_InlineFunctionExpansion': '0',
1020 'win_release_OmitFramePointers': '0',
1021
1022 'linux_use_tcmalloc': 1,
1023 'release_valgrind_build': 1,
1024 'werror': '',
1025 'component': 'static_library',
1026 'use_system_zlib': 0,
1027 }],
1028
1029 # Build tweaks for DrMemory.
1030 # TODO(rnk): Combine with tsan config to share the builder.
1031 # http://crbug.com/108155
1032 ['build_for_tool=="drmemory"', {
1033 # DrMemory can't handle the debug CRT dll, so build static.
1034 'component': 'static_library',
1035 # These runtime checks force initialization of stack vars which blocks
1036 # DrMemory's uninit detection.
1037 'win_debug_RuntimeChecks': '0',
1038 # Iterator debugging is slow.
1039 'win_debug_disable_iterator_debugging': '1',
1040 # Try to disable optimizations that mess up stacks in a release build.
1041 'win_release_InlineFunctionExpansion': '0',
1042 'win_release_OmitFramePointers': '0',
1043 # Keep the code under #ifndef NVALGRIND.
1044 'release_valgrind_build': 1,
1045 }],
[email protected]912c55c2009-07-31 23:33:551046 ],
[email protected]a9318c72012-03-01 01:29:471047
[email protected]35958422011-09-28 02:03:591048 # List of default apps to install in new profiles. The first list contains
1049 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061050 # contains the destination location for each of the files. When a crx
1051 # is added or removed from the list, the chrome/browser/resources/
1052 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591053 'default_apps_list': [
1054 'browser/resources/default_apps/external_extensions.json',
1055 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061056 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591057 'browser/resources/default_apps/youtube.crx',
1058 ],
1059 'default_apps_list_linux_dest': [
1060 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1061 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061062 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591063 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1064 ],
[email protected]2f80c312009-02-25 21:26:551065 },
1066 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261067 'variables': {
[email protected]a6e22132010-02-10 20:43:181068 # The condition that operates on chromium_code is in a target_conditions
1069 # section, and will not have access to the default fallback value of
1070 # chromium_code at the top of this file, or to the chromium_code
1071 # variable placed at the root variables scope of .gyp files, because
1072 # those variables are not set at target scope. As a workaround,
1073 # if chromium_code is not set at target scope, define it in target scope
1074 # to contain whatever value it has during early variable expansion.
1075 # That's enough to make it available during target conditional
1076 # processing.
1077 'chromium_code%': '<(chromium_code)',
1078
[email protected]7e0d664a2009-12-03 21:07:471079 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291080 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001081 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331082
[email protected]7e0d664a2009-12-03 21:07:471083 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1084 'win_release_Optimization%': '2', # 2 = /Os
1085 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331086
1087 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241088 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:331089 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:241090 # Tri-state: blank is default, 1 on, 0 off
1091 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331092
[email protected]6b0507b2010-05-07 07:41:211093 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1094 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331095
[email protected]6b0507b2010-05-07 07:41:211096 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151097 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1098 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331099
[email protected]fac10d12010-11-08 16:00:311100 # VS inserts quite a lot of extra checks to algorithms like
1101 # std::partial_sort in Debug build which make them O(N^2)
1102 # instead of O(N*logN). This is particularly slow under memory
1103 # tools like ThreadSanitizer so we want it to be disablable.
1104 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1105 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471106
[email protected]ffd984b12009-09-11 19:37:001107 'release_extra_cflags%': '',
1108 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001109
1110 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521111
[email protected]ef5c5f1b2011-12-17 02:16:241112 # the non-qualified versions are widely assumed to be *nix-only
1113 'win_release_extra_cflags%': '',
1114 'win_debug_extra_cflags%': '',
1115
[email protected]b1eb341c2011-11-09 18:46:071116 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1117 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1118
[email protected]ef3326702011-10-06 18:06:441119 # Only used by Windows build for now. Can be used to build into a
1120 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1121 # output files in src/build/VS2010_{Debug,Release}.
1122 'build_dir_prefix%': '',
1123
[email protected]8974e042010-06-21 18:06:521124 'conditions': [
1125 ['OS=="win" and component=="shared_library"', {
1126 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161127 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1128 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521129 }, {
1130 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1131 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1132 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1133 }],
1134 ],
[email protected]1c966092009-08-20 21:19:261135 },
[email protected]32aa8cc2009-03-04 21:36:391136 'conditions': [
[email protected]ff10b132012-02-29 22:53:301137 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1138 'msbuild_toolset': '<(msbuild_toolset)',
1139 }],
[email protected]32aa8cc2009-03-04 21:36:391140 ['branding=="Chrome"', {
1141 'defines': ['GOOGLE_CHROME_BUILD'],
1142 }, { # else: branding!="Chrome"
1143 'defines': ['CHROMIUM_BUILD'],
1144 }],
[email protected]63e39a282011-07-13 20:41:281145 ['component=="shared_library"', {
1146 'defines': ['COMPONENT_BUILD'],
1147 }],
[email protected]5cba9ff72011-11-16 21:55:181148 ['component=="shared_library" and incremental_chrome_dll==1', {
1149 # TODO(dpranke): We can't incrementally link chrome when
1150 # content is being built as a DLL because chrome links in
1151 # webkit_glue and webkit_glue depends on symbols defined in
1152 # content. We can remove this when we fix glue.
1153 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
1154 'defines': ['COMPILE_CONTENT_STATICALLY'],
1155 }],
[email protected]06c756182010-04-27 18:31:311156 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171157 'defines': ['TOOLKIT_VIEWS=1'],
1158 }],
[email protected]1ee7c56c2011-10-19 14:51:331159 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111160 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1161 }],
[email protected]41423092011-08-25 15:39:581162 ['use_aura==1', {
1163 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351164 }],
[email protected]ed329be2012-01-03 22:02:161165 ['use_ash==1', {
1166 'defines': ['USE_ASH=1'],
1167 }],
[email protected]c329adf82011-10-05 14:34:571168 ['use_nss==1', {
1169 'defines': ['USE_NSS=1'],
1170 }],
[email protected]bd7b6fe2012-03-05 21:02:401171 ['enable_one_click_signin==1', {
1172 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1173 }],
[email protected]9d43e372011-09-22 19:39:521174 ['toolkit_uses_gtk==1', {
1175 'defines': ['TOOLKIT_USES_GTK=1'],
1176 }],
[email protected]a47aa892011-11-22 03:12:311177 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1178 # TODO(erg): We are progressively sealing up use of deprecated features
1179 # in gtk in preparation for an eventual porting to gtk3.
1180 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1181 }],
[email protected]fdc5bed2010-01-09 01:16:571182 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291183 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501184 }],
[email protected]2cc81d32011-10-04 17:03:181185 ['use_virtual_keyboard==1', {
1186 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1187 }],
[email protected]f56797b2011-09-25 00:04:351188 ['use_xi2_mt!=0', {
1189 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1190 }],
[email protected]236754a2011-07-28 17:38:231191 ['use_wayland==1', {
1192 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1193 }],
[email protected]e47c32032011-03-01 19:26:201194 ['file_manager_extension==1', {
1195 'defines': ['FILE_MANAGER_EXTENSION=1'],
1196 }],
[email protected]8b2e9f392011-08-05 04:00:471197 ['webui_task_manager==1', {
1198 'defines': ['WEBUI_TASK_MANAGER=1'],
1199 }],
[email protected]7664ab32011-02-01 23:35:251200 ['profiling==1', {
1201 'defines': ['ENABLE_PROFILING=1'],
1202 }],
[email protected]93b373502011-08-16 19:06:221203 ['OS=="linux" and glibcxx_debug==1', {
1204 'defines': ['_GLIBCXX_DEBUG=1',],
1205 'cflags_cc!': ['-fno-rtti'],
1206 'cflags_cc+': ['-frtti', '-g'],
1207 }],
[email protected]542bf24a2010-06-11 23:08:171208 ['remoting==1', {
1209 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001210 }],
[email protected]5b87e782012-02-09 18:19:321211 ['enable_webrtc==1', {
1212 'defines': ['ENABLE_WEBRTC=1'],
1213 }],
[email protected]a026daa2011-04-20 15:49:511214 ['p2p_apis==1', {
1215 'defines': ['ENABLE_P2P_APIS=1'],
1216 }],
[email protected]d01120e62010-05-10 17:04:481217 ['proprietary_codecs==1', {
1218 'defines': ['USE_PROPRIETARY_CODECS'],
1219 }],
[email protected]1b4209f2011-01-07 00:25:401220 ['enable_flapper_hacks==1', {
1221 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1222 }],
[email protected]67c125d2011-10-11 18:58:221223 ['enable_pepper_threading==1', {
1224 'defines': ['ENABLE_PEPPER_THREADING'],
1225 }],
[email protected]7ddea9802012-02-22 23:08:051226 ['enable_viewport==1', {
1227 'defines': ['ENABLE_VIEWPORT'],
1228 }],
[email protected]f31e2e52011-07-14 16:01:191229 ['configuration_policy==1', {
1230 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1231 }],
[email protected]9eb100e2011-10-14 05:08:221232 ['input_speech==1', {
1233 'defines': ['ENABLE_INPUT_SPEECH'],
1234 }],
[email protected]7cce3232011-10-28 10:41:571235 ['notifications==1', {
1236 'defines': ['ENABLE_NOTIFICATIONS'],
1237 }],
[email protected]9c1949e2009-10-02 19:59:541238 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171239
[email protected]9c1949e2009-10-02 19:59:541240 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141241 # For Windows and Mac, we don't genererate debug information.
1242 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541243 'msvs_settings': {
1244 'VCLinkerTool': {
1245 'GenerateDebugInformation': 'false',
1246 },
1247 'VCCLCompilerTool': {
1248 'DebugInformationFormat': '0',
1249 }
[email protected]da4d4ea2011-09-22 20:23:141250 },
1251 'xcode_settings': {
1252 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1253 },
[email protected]1cc2fa72010-07-03 08:49:241254 }, { # else: OS != "win", generate less debug information.
1255 'variables': {
1256 'debug_extra_cflags': '-g1',
1257 },
[email protected]37c84192010-04-14 21:37:401258 }],
[email protected]aecc4d12011-01-19 05:32:331259 # Clang creates chubby debug information, which makes linking very
1260 # slow. For now, don't create debug information with clang. See
1261 # http://crbug.com/70000
1262 ['OS=="linux" and clang==1', {
1263 'variables': {
1264 'debug_extra_cflags': '-g0',
1265 },
1266 }],
[email protected]9c1949e2009-10-02 19:59:541267 ], # conditions for fastbuild.
1268 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011269 ['dcheck_always_on!=0', {
1270 'defines': ['DCHECK_ALWAYS_ON=1'],
1271 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381272 ['selinux==1', {
1273 'defines': ['CHROMIUM_SELINUX=1'],
1274 }],
[email protected]7e0d664a2009-12-03 21:07:471275 ['win_use_allocator_shim==0', {
1276 'conditions': [
1277 ['OS=="win"', {
1278 'defines': ['NO_TCMALLOC'],
1279 }],
1280 ],
1281 }],
[email protected]43f28f832010-02-03 02:28:481282 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151283 'defines': [
1284 'ENABLE_GPU=1',
1285 ],
1286 }],
[email protected]b1c2a5542010-10-08 12:44:401287 ['use_openssl==1', {
1288 'defines': [
1289 'USE_OPENSSL=1',
1290 ],
1291 }],
[email protected]ed154592010-04-29 00:18:501292 ['enable_eglimage==1', {
1293 'defines': [
1294 'ENABLE_EGLIMAGE=1',
1295 ],
1296 }],
[email protected]7d7564a12011-06-21 19:20:221297 ['use_skia==1', {
1298 'defines': [
1299 'USE_SKIA=1',
1300 ],
1301 }],
[email protected]f5ecbba12009-04-03 04:35:181302 ['coverage!=0', {
1303 'conditions': [
1304 ['OS=="mac"', {
1305 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041306 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1307 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471308 },
[email protected]e4fb84c2009-12-28 20:45:431309 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101310 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431311 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181312 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431313 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181314 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471315 }],
1316 ],
1317 }],
[email protected]da1c8d692011-09-20 20:35:011318 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181319 'cflags': [ '-ftest-coverage',
1320 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001321 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181322 }],
[email protected]e8f6ff42009-07-07 18:20:531323 # Finally, for Windows, we simply turn on profiling.
1324 ['OS=="win"', {
1325 'msvs_settings': {
1326 'VCLinkerTool': {
1327 'Profile': 'true',
1328 },
[email protected]10bb8c92009-08-07 21:16:031329 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531330 # /Z7, not /Zi, so coverage is happyb
1331 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161332 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531333 }
1334 }
1335 }], # OS==win
1336 ], # conditions for coverage
1337 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381338 ['OS=="win"', {
1339 'defines': [
1340 '__STD_C',
1341 '_CRT_SECURE_NO_DEPRECATE',
1342 '_SCL_SECURE_NO_DEPRECATE',
1343 ],
1344 'include_dirs': [
1345 '<(DEPTH)/third_party/wtl/include',
1346 ],
1347 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561348 ['enable_register_protocol_handler==1', {
1349 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191350 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561351 ],
1352 }],
[email protected]41ed4e82011-08-25 23:02:071353 ['enable_web_intents==1', {
1354 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471355 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071356 ],
1357 }],
[email protected]13eb97d2012-01-05 01:07:121358 ['OS=="win" and branding=="Chrome"', {
1359 'defines': ['ENABLE_SWIFTSHADER'],
1360 }],
[email protected]407dfa632011-12-23 11:59:351361 ['enable_dart==1', {
1362 'defines': ['WEBKIT_USING_DART=1'],
1363 }],
[email protected]18e0f39b2012-01-17 16:47:341364 ['enable_plugin_installation==1', {
1365 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1366 }],
[email protected]6b40bb582012-03-15 20:50:381367 ['enable_themes==1', {
1368 'defines': ['ENABLE_THEMES=1'],
1369 }],
[email protected]2e22e2f2012-03-15 21:53:101370 ['enable_automation==1', {
1371 'defines': ['ENABLE_AUTOMATION=1'],
1372 }],
[email protected]a6e22132010-02-10 20:43:181373 ], # conditions for 'target_defaults'
1374 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071375 ['enable_wexit_time_destructors==1', {
1376 'conditions': [
1377 [ 'clang==1', {
1378 'cflags': [
1379 '-Wexit-time-destructors',
1380 ],
1381 'xcode_settings': {
1382 'WARNING_CFLAGS': [
1383 '-Wexit-time-destructors',
1384 ],
1385 },
1386 }],
1387 ],
1388 }],
[email protected]c14d8e772010-02-09 22:06:151389 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281390 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341391 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331392 # We don't want to get warnings from third-party code,
1393 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281394 'cflags!': [
1395 '-Wall',
1396 '-Wextra',
1397 '-Werror',
1398 ],
[email protected]167ec822011-10-24 22:05:271399 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001400 # Don't warn about hash_map in third-party code.
1401 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271402 ],
1403 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331404 # Don't warn about printf format problems.
1405 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221406 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001407 ],
[email protected]d16bd642011-07-25 23:59:181408 'cflags_cc!': [
1409 # TODO(fischman): remove this.
1410 # http://code.google.com/p/chromium/issues/detail?id=90453
1411 '-Wsign-compare',
1412 ]
[email protected]d8543312010-02-10 17:43:281413 }],
[email protected]bc073c062012-01-13 06:28:031414 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111415 'cflags': [
1416 # Don't warn about ignoring the return value from e.g. close().
1417 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031418 # BSD systems do not support this option, since they are usually
1419 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111420 '-Wno-unused-result',
1421 ],
1422 }],
[email protected]d8543312010-02-10 17:43:281423 [ 'OS=="win"', {
1424 'defines': [
1425 '_CRT_SECURE_NO_DEPRECATE',
1426 '_CRT_NONSTDC_NO_WARNINGS',
1427 '_CRT_NONSTDC_NO_DEPRECATE',
1428 '_SCL_SECURE_NO_DEPRECATE',
1429 ],
1430 'msvs_disabled_warnings': [4800],
1431 'msvs_settings': {
1432 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111433 'WarningLevel': '3',
1434 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281435 'Detect64BitPortabilityProblems': 'false',
1436 },
1437 },
1438 }],
[email protected]ea47b6a2011-07-17 19:39:421439 # TODO(darin): Unfortunately, some third_party code depends on base/
1440 [ 'OS=="win" and component=="shared_library"', {
1441 'msvs_disabled_warnings': [
1442 4251, # class 'std::xx' needs to have dll-interface.
1443 ],
1444 }],
[email protected]d8543312010-02-10 17:43:281445 [ 'OS=="mac"', {
1446 'xcode_settings': {
1447 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061448 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281449 },
1450 }],
[email protected]c14d8e772010-02-09 22:06:151451 ],
1452 }, {
[email protected]a5c598152012-01-27 04:55:131453 'includes': [
1454 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1455 'filename_rules.gypi',
1456 ],
[email protected]c14d8e772010-02-09 22:06:151457 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1458 # C99 macros on Mac and Linux.
1459 'defines': [
1460 '__STDC_FORMAT_MACROS',
1461 ],
1462 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151463 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071464 # turn on warnings for signed/unsigned mismatch on chromium code.
1465 'msvs_settings': {
1466 'VCCLCompilerTool': {
1467 'AdditionalOptions': ['/we4389'],
1468 },
1469 },
[email protected]c14d8e772010-02-09 22:06:151470 }],
[email protected]63e39a282011-07-13 20:41:281471 ['OS=="win" and component=="shared_library"', {
1472 'msvs_disabled_warnings': [
1473 4251, # class 'std::xx' needs to have dll-interface.
1474 ],
1475 }],
[email protected]c14d8e772010-02-09 22:06:151476 ],
1477 }],
[email protected]a6e22132010-02-10 20:43:181478 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551479 'default_configuration': 'Debug',
1480 'configurations': {
[email protected]5153767c2009-12-22 01:52:501481 # VCLinkerTool LinkIncremental values below:
1482 # 0 == default
1483 # 1 == /INCREMENTAL:NO
1484 # 2 == /INCREMENTAL
1485 # Debug links incremental, Release does not.
1486 #
[email protected]7b99801e2010-11-03 17:26:231487 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501488 #
1489 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561490 'abstract': 1,
1491 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511492 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561493 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1494 'CharacterSet': '1',
1495 },
[email protected]5153767c2009-12-22 01:52:501496 },
1497 'x86_Base': {
1498 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501499 'msvs_settings': {
1500 'VCLinkerTool': {
1501 'TargetMachine': '1',
1502 },
1503 },
[email protected]2fa40782009-11-01 21:17:341504 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561505 },
[email protected]5153767c2009-12-22 01:52:501506 'x64_Base': {
1507 'abstract': 1,
1508 'msvs_configuration_platform': 'x64',
1509 'msvs_settings': {
1510 'VCLinkerTool': {
1511 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501512 'AdditionalLibraryDirectories!':
1513 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1514 'AdditionalLibraryDirectories':
1515 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1516 },
[email protected]d26b4418ab2010-03-24 22:06:351517 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501518 'AdditionalLibraryDirectories!':
1519 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1520 'AdditionalLibraryDirectories':
1521 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1522 },
1523 },
1524 'defines': [
1525 # Not sure if tcmalloc works on 64-bit Windows.
1526 'NO_TCMALLOC',
1527 ],
1528 },
1529 'Debug_Base': {
1530 'abstract': 1,
[email protected]14339762011-04-05 07:36:581531 'defines': [
1532 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1533 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1534 ],
[email protected]1c966092009-08-20 21:19:261535 'xcode_settings': {
1536 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291537 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491538 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491539 '<@(debug_extra_cflags)',
1540 ],
[email protected]1c966092009-08-20 21:19:261541 },
[email protected]bb05e452009-10-29 21:24:561542 'msvs_settings': {
1543 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471544 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561545 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211546 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471547 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151548 'conditions': [
1549 # According to MSVS, InlineFunctionExpansion=0 means
1550 # "default inlining", not "/Ob0".
1551 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1552 ['win_debug_InlineFunctionExpansion==0', {
1553 'AdditionalOptions': ['/Ob0'],
1554 }],
1555 ['win_debug_InlineFunctionExpansion!=""', {
1556 'InlineFunctionExpansion':
1557 '<(win_debug_InlineFunctionExpansion)',
1558 }],
[email protected]fac10d12010-11-08 16:00:311559 ['win_debug_disable_iterator_debugging==1', {
1560 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1561 }],
[email protected]ef5c5f1b2011-12-17 02:16:241562
1563 # if win_debug_OmitFramePointers is blank, leave as default
1564 ['win_debug_OmitFramePointers==1', {
1565 'OmitFramePointers': 'true',
1566 }],
1567 ['win_debug_OmitFramePointers==0', {
1568 'OmitFramePointers': 'false',
1569 # The above is not sufficient (http://crbug.com/106711): it
1570 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1571 # perform FPO regardless, so we must explicitly disable.
1572 # We still want the false setting above to avoid having
1573 # "/Oy /Oy-" and warnings about overriding.
1574 'AdditionalOptions': ['/Oy-'],
1575 }],
[email protected]2ae6e022010-05-07 13:19:151576 ],
[email protected]ef5c5f1b2011-12-17 02:16:241577 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561578 },
1579 'VCLinkerTool': {
1580 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331581 # ASLR makes debugging with windbg difficult because Chrome.exe and
1582 # Chrome.dll share the same base name. As result, windbg will
1583 # name the Chrome.dll module like chrome_<base address>, where
1584 # <base address> typically changes with each launch. This in turn
1585 # means that breakpoints in Chrome.dll don't stick from one launch
1586 # to the next. For this reason, we turn ASLR off in debug builds.
1587 # Note that this is a three-way bool, where 0 means to pick up
1588 # the default setting, 1 is off and 2 is on.
1589 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561590 },
1591 'VCResourceCompilerTool': {
1592 'PreprocessorDefinitions': ['_DEBUG'],
1593 },
1594 },
[email protected]2f80c312009-02-25 21:26:551595 'conditions': [
[email protected]bb05e452009-10-29 21:24:561596 ['OS=="linux"', {
1597 'cflags': [
1598 '<@(debug_extra_cflags)',
1599 ],
[email protected]2f80c312009-02-25 21:26:551600 }],
[email protected]56cca4e2011-07-01 21:33:351601 ['release_valgrind_build==0', {
1602 'xcode_settings': {
1603 'OTHER_CFLAGS': [
1604 '-fstack-protector-all', # Implies -fstack-protector
1605 ],
1606 },
1607 }],
[email protected]2f80c312009-02-25 21:26:551608 ],
1609 },
[email protected]5153767c2009-12-22 01:52:501610 'Release_Base': {
1611 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551612 'defines': [
1613 'NDEBUG',
1614 ],
[email protected]1c966092009-08-20 21:19:261615 'xcode_settings': {
1616 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1617 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001618 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261619 },
[email protected]bb05e452009-10-29 21:24:561620 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471621 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471622 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151623 'conditions': [
[email protected]2212d272011-12-20 21:37:371624 # In official builds, each target will self-select
1625 # an optimization level.
1626 ['buildtype!="Official"', {
1627 'Optimization': '<(win_release_Optimization)',
1628 },
1629 ],
[email protected]2ae6e022010-05-07 13:19:151630 # According to MSVS, InlineFunctionExpansion=0 means
1631 # "default inlining", not "/Ob0".
1632 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1633 ['win_release_InlineFunctionExpansion==0', {
1634 'AdditionalOptions': ['/Ob0'],
1635 }],
1636 ['win_release_InlineFunctionExpansion!=""', {
1637 'InlineFunctionExpansion':
1638 '<(win_release_InlineFunctionExpansion)',
1639 }],
[email protected]626d2d22011-10-11 15:47:331640
[email protected]ef5c5f1b2011-12-17 02:16:241641 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331642 ['win_release_OmitFramePointers==1', {
1643 'OmitFramePointers': 'true',
1644 }],
1645 ['win_release_OmitFramePointers==0', {
1646 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241647 # The above is not sufficient (http://crbug.com/106711): it
1648 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1649 # perform FPO regardless, so we must explicitly disable.
1650 # We still want the false setting above to avoid having
1651 # "/Oy /Oy-" and warnings about overriding.
1652 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331653 }],
[email protected]2ae6e022010-05-07 13:19:151654 ],
[email protected]ef5c5f1b2011-12-17 02:16:241655 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471656 },
[email protected]bb05e452009-10-29 21:24:561657 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341658 # LinkIncremental is a tri-state boolean, where 0 means default
1659 # (i.e., inherit from parent solution), 1 means false, and
1660 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561661 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341662 # This corresponds to the /PROFILE flag which ensures the PDB
1663 # file contains FIXUP information (growing the PDB file by about
1664 # 5%) but does not otherwise alter the output binary. This
1665 # information is used by the Syzygy optimization tool when
1666 # decomposing the release image.
1667 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561668 },
1669 },
[email protected]2f80c312009-02-25 21:26:551670 'conditions': [
[email protected]92822e82009-09-18 14:26:561671 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581672 'defines': [
1673 'NVALGRIND',
1674 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1675 ],
[email protected]ee857512010-05-14 08:24:421676 }, {
[email protected]14339762011-04-05 07:36:581677 'defines': [
1678 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1679 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1680 ],
[email protected]92822e82009-09-18 14:26:561681 }],
[email protected]7e0d664a2009-12-03 21:07:471682 ['win_use_allocator_shim==0', {
1683 'defines': ['NO_TCMALLOC'],
1684 }],
[email protected]bb05e452009-10-29 21:24:561685 ['OS=="linux"', {
1686 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001687 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561688 ],
1689 }],
[email protected]2f80c312009-02-25 21:26:551690 ],
1691 },
[email protected]5153767c2009-12-22 01:52:501692 #
1693 # Concrete configurations
1694 #
1695 'Debug': {
1696 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1697 },
1698 'Release': {
1699 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1700 'conditions': [
1701 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161702 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501703 }],
1704 ]
1705 },
[email protected]f926fa0a2009-08-04 22:50:131706 'conditions': [
1707 [ 'OS=="win"', {
1708 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501709 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501710 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301711 },
1712 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501713 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301714 },
[email protected]f926fa0a2009-08-04 22:50:131715 }],
1716 ],
[email protected]2f80c312009-02-25 21:26:551717 },
1718 },
1719 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341720 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261721 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271722 # Enable -Werror by default, but put it in a variable so it can
1723 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1724 'variables': {
[email protected]cbbb3472012-01-25 18:32:311725 'werror%': '-Werror',
[email protected]5315f2842009-04-28 00:43:271726 },
[email protected]6863896f2012-01-25 17:51:361727 'defines': [
1728 '_FILE_OFFSET_BITS=64',
1729 ],
[email protected]9d384032009-03-20 23:13:261730 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161731 '<(werror)', # See note above about the werror variable.
1732 '-pthread',
1733 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291734 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161735 '-Wall',
[email protected]0fa17082010-03-26 00:48:051736 # TODO(evan): turn this back on once all the builds work.
1737 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201738 # Don't warn about unused function params. We use those everywhere.
1739 '-Wno-unused-parameter',
1740 # Don't warn about the "struct foo f = {0};" initialization pattern.
1741 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121742 # Don't export any symbols (for example, to plugins we dlopen()).
1743 # Note: this is *required* to make some plugins work.
1744 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351745 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241746 ],
1747 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221748 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241749 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361750 # Make inline functions have hidden visiblity by default.
1751 # Surprisingly, not covered by -fvisibility=hidden.
1752 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171753 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1754 # so we specify it explicitly.
1755 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181756 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171757 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261758 ],
[email protected]a6cf87e2009-04-03 04:07:381759 'ldflags': [
[email protected]138241f2010-03-30 23:53:101760 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261761 ],
[email protected]3aacaf952009-04-02 15:34:091762 'configurations': {
[email protected]5153767c2009-12-22 01:52:501763 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311764 'variables': {
1765 'debug_optimize%': '0',
1766 },
[email protected]3aacaf952009-04-02 15:34:091767 'defines': [
1768 '_DEBUG',
1769 ],
1770 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041771 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091772 '-g',
1773 ],
[email protected]da1c8d692011-09-20 20:35:011774 'conditions' : [
1775 ['OS=="android"', {
1776 'cflags': [
1777 '-fno-omit-frame-pointer',
1778 ],
1779 }],
1780 ],
1781 'target_conditions' : [
1782 ['_toolset=="target"', {
1783 'conditions': [
1784 ['OS=="android" and debug_optimize==0', {
1785 'cflags': [
1786 '-mlong-calls', # Needed when compiling with -O0
1787 ],
1788 }],
1789 ['arm_thumb==1', {
1790 'cflags': [
1791 '-marm',
1792 ],
1793 }],
1794 ],
1795 }],
1796 ],
[email protected]5315f2842009-04-28 00:43:271797 },
[email protected]5153767c2009-12-22 01:52:501798 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011799 'variables': {
1800 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511801 # Binaries become big and gold is unable to perform GC
1802 # and remove unused sections for some of test targets
1803 # on 32 bit platform.
1804 # (This is currently observed only in chromeos valgrind bots)
1805 # The following flag is to disable --gc-sections linker
1806 # option for these bots.
1807 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121808
1809 # TODO(bradnelson): reexamine how this is done if we change the
1810 # expansion of configurations
1811 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011812 },
[email protected]3aacaf952009-04-02 15:34:091813 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041814 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531815 # Don't emit the GCC version ident directives, they just end up
1816 # in the .comment section taking up binary size.
1817 '-fno-ident',
1818 # Put data and code in their own sections, so that unused symbols
1819 # can be removed at link time with --gc-sections.
1820 '-fdata-sections',
1821 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091822 ],
[email protected]c902f2cba2010-08-06 20:04:181823 'ldflags': [
1824 # Specifically tell the linker to perform optimizations.
1825 # See http://lwn.net/Articles/192624/ .
1826 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221827 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181828 ],
[email protected]1dd529642010-05-15 01:02:511829 'conditions' : [
1830 ['no_gc_sections==0', {
1831 'ldflags': [
1832 '-Wl,--gc-sections',
1833 ],
1834 }],
[email protected]da1c8d692011-09-20 20:35:011835 ['OS=="android"', {
1836 'cflags': [
1837 '-fomit-frame-pointer',
1838 ],
1839 }],
[email protected]ecf7b6482010-10-13 09:15:201840 ['clang==1', {
1841 'cflags!': [
1842 '-fno-ident',
1843 ],
1844 }],
[email protected]7664ab32011-02-01 23:35:251845 ['profiling==1', {
1846 'cflags': [
1847 '-fno-omit-frame-pointer',
1848 '-g',
1849 ],
1850 }],
[email protected]8d726a42012-02-09 03:49:001851 ],
[email protected]3aacaf952009-04-02 15:34:091852 },
1853 },
[email protected]601b540222009-04-03 21:32:041854 'variants': {
1855 'coverage': {
1856 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1857 'ldflags': ['-fprofile-arcs'],
1858 },
1859 'profile': {
1860 'cflags': ['-pg', '-g'],
1861 'ldflags': ['-pg'],
1862 },
1863 'symbols': {
1864 'cflags': ['-g'],
1865 },
1866 },
[email protected]606116d22009-05-06 22:38:231867 'conditions': [
[email protected]04b482602011-09-14 02:36:211868 ['target_arch=="ia32"', {
1869 'target_conditions': [
1870 ['_toolset=="target"', {
1871 'asflags': [
1872 # Needed so that libs with .s files (e.g. libicudata.a)
1873 # are compatible with the general 32-bit-ness.
1874 '-32',
1875 ],
1876 # All floating-point computations on x87 happens in 80-bit
1877 # precision. Because the C and C++ language standards allow
1878 # the compiler to keep the floating-point values in higher
1879 # precision than what's specified in the source and doing so
1880 # is more efficient than constantly rounding up to 64-bit or
1881 # 32-bit precision as specified in the source, the compiler,
1882 # especially in the optimized mode, tries very hard to keep
1883 # values in x87 floating-point stack (in 80-bit precision)
1884 # as long as possible. This has important side effects, that
1885 # the real value used in computation may change depending on
1886 # how the compiler did the optimization - that is, the value
1887 # kept in 80-bit is different than the value rounded down to
1888 # 64-bit or 32-bit. There are possible compiler options to
1889 # make this behavior consistent (e.g. -ffloat-store would keep
1890 # all floating-values in the memory, thus force them to be
1891 # rounded to its original precision) but they have significant
1892 # runtime performance penalty.
1893 #
1894 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1895 # which keep floating-point values in SSE registers in its
1896 # native precision (32-bit for single precision, and 64-bit
1897 # for double precision values). This means the floating-point
1898 # value used during computation does not change depending on
1899 # how the compiler optimized the code, since the value is
1900 # always kept in its specified precision.
1901 'conditions': [
1902 ['branding=="Chromium" and disable_sse2==0', {
1903 'cflags': [
1904 '-march=pentium4',
1905 '-msse2',
1906 '-mfpmath=sse',
1907 ],
1908 }],
1909 # ChromeOS targets Pinetrail, which is sse3, but most of the
1910 # benefit comes from sse2 so this setting allows ChromeOS
1911 # to build on other CPUs. In the future -march=atom would
1912 # help but requires a newer compiler.
1913 ['chromeos==1 and disable_sse2==0', {
1914 'cflags': [
1915 '-msse2',
1916 ],
1917 }],
1918 # Install packages have started cropping up with
1919 # different headers between the 32-bit and 64-bit
1920 # versions, so we have to shadow those differences off
1921 # and make sure a 32-bit-on-64-bit build picks up the
1922 # right files.
1923 ['host_arch!="ia32"', {
1924 'include_dirs+': [
1925 '/usr/include32',
1926 ],
1927 }],
1928 ],
1929 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1930 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061931 'cflags': [
[email protected]04b482602011-09-14 02:36:211932 '-m32',
1933 '-mmmx',
1934 ],
1935 'ldflags': [
1936 '-m32',
[email protected]ffde7932009-05-29 00:39:061937 ],
1938 }],
[email protected]606116d22009-05-06 22:38:231939 ],
1940 }],
[email protected]3dda8a962009-08-10 18:58:071941 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291942 'target_conditions': [
1943 ['_toolset=="target"', {
1944 'cflags_cc': [
1945 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1946 # has changed whenever it encounters a varargs function. This
1947 # silences those warnings, as they are not helpful and
1948 # clutter legitimate warnings.
1949 '-Wno-abi',
1950 ],
1951 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011952 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291953 'cflags': [
1954 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291955 ]
1956 }],
1957 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251958 'cflags': [
1959 '-march=armv7-a',
1960 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251961 '-mfloat-abi=softfp',
1962 ],
[email protected]eafc0b452010-02-26 21:53:431963 'conditions': [
1964 ['arm_neon==1', {
1965 'cflags': [ '-mfpu=neon', ],
1966 }, {
[email protected]53e0f642010-03-05 01:41:561967 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431968 }]
1969 ],
[email protected]dc9711f2009-11-13 19:30:251970 }],
[email protected]da1c8d692011-09-20 20:35:011971 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:531972 # Most of the following flags are derived from what Android
1973 # uses by default when building for arm, reference for which
1974 # can be found in the following file in the Android NDK:
1975 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
1976 'cflags': [
1977 # The tree-sra optimization (scalar replacement for
1978 # aggregates enabling subsequent optimizations) leads to
1979 # invalid code generation when using the Android NDK's
1980 # compiler (r5-r7). This can be verified using
1981 # TestWebKitAPI's WTF.Checked_int8_t test.
1982 '-fno-tree-sra',
1983 '-Wno-psabi',
1984 ],
[email protected]da1c8d692011-09-20 20:35:011985 'conditions': [
1986 ['arm_thumb == 1', {
1987 # Android toolchain doesn't support -mimplicit-it=thumb
1988 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1989 'cflags': [ '-mthumb-interwork', ],
1990 }],
1991 ['armv7==0', {
1992 # Flags suitable for Android emulator
1993 'cflags': [
1994 '-march=armv5te',
1995 '-mtune=xscale',
1996 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:361997 ],
1998 'defines': [
1999 '__ARM_ARCH_5__',
2000 '__ARM_ARCH_5T__',
2001 '__ARM_ARCH_5E__',
2002 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012003 ],
2004 }],
2005 ],
2006 }],
[email protected]3dda8a962009-08-10 18:58:072007 ],
2008 }],
2009 ],
2010 }],
[email protected]2fb843b2010-08-12 02:11:082011 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582012 'cflags': [
2013 '-fPIC',
2014 ],
[email protected]d3f692b32011-12-14 19:04:352015 'ldflags': [
2016 '-fPIC',
2017 ],
[email protected]c76723a2010-01-25 23:10:582018 }],
[email protected]ee28c9f2009-09-04 01:53:012019 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572020 'target_conditions': [
2021 ['_toolset=="target"', {
2022 'cflags': [
2023 '--sysroot=<(sysroot)',
2024 ],
2025 'ldflags': [
2026 '--sysroot=<(sysroot)',
2027 ],
2028 }]]
[email protected]ee28c9f2009-09-04 01:53:012029 }],
[email protected]58680ce2010-09-18 00:09:152030 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122031 'cflags': [
2032 '-Wheader-hygiene',
2033 # Clang spots more unused functions.
2034 '-Wno-unused-function',
2035 # Don't die on dtoa code that uses a char as an array index.
2036 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332037 # Especially needed for gtest macros using enum values from Mac
2038 # system headers.
2039 # TODO(pkasting): In C++11 this is legal, so this should be
2040 # removed when we change to that. (This is also why we don't
2041 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122042 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302043 # WebKit uses nullptr in a legit way, other that that this warning
2044 # doesn't fire.
2045 '-Wno-c++11-compat',
2046 # This (rightyfully) complains about 'override', which we use
2047 # heavily.
2048 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102049
2050 # Warns on switches on enums that cover all enum values but
2051 # also contain a default: branch. Chrome is full of that.
2052 '-Wno-covered-switch-default',
2053
2054 # TODO(thakis): Reenable once this no longer complains about
2055 # Invalid() in gmocks's gmock-internal-utils.h
2056 # http://crbug.com/111806
2057 '-Wno-null-dereference',
[email protected]18ca15a2011-08-10 03:07:122058 ],
2059 'cflags!': [
2060 # Clang doesn't seem to know know this flag.
2061 '-mfpmath=sse',
2062 ],
[email protected]58680ce2010-09-18 00:09:152063 }],
[email protected]5d451ad2011-02-11 16:43:462064 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262065 'cflags': [
2066 '<(clang_chrome_plugins_flags)',
2067 ],
[email protected]5d451ad2011-02-11 16:43:462068 }],
[email protected]4a9ac22e2011-12-02 03:41:532069 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262070 'cflags': [
2071 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532072 ],
2073 }],
2074 ['clang==1 and clang_add_plugin!=""', {
2075 'cflags': [
[email protected]d23720682011-08-11 00:16:262076 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2077 ],
[email protected]5e781232011-01-28 02:57:592078 }],
[email protected]2616d45d2012-01-19 03:15:482079 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2080 'cflags': [
2081 # See http://crbug.com/110262
2082 '-fcolor-diagnostics',
2083 ],
2084 }],
[email protected]92799b632011-08-15 14:33:062085 ['asan==1', {
[email protected]92799b632011-08-15 14:33:062086 'cflags': [
[email protected]6a4cad02011-11-25 07:26:562087 '-faddress-sanitizer',
[email protected]0ac773032011-12-21 17:37:082088 '-fno-omit-frame-pointer',
[email protected]74a26d72011-09-29 17:29:032089 '-w',
[email protected]3cfa96a62012-02-28 07:27:582090 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]92799b632011-08-15 14:33:062091 ],
2092 'ldflags': [
[email protected]6a4cad02011-11-25 07:26:562093 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:062094 ],
[email protected]921c7b52011-11-25 10:34:352095 'defines': [
2096 'ADDRESS_SANITIZER',
2097 ],
[email protected]92799b632011-08-15 14:33:062098 }],
[email protected]cbd5fd52009-08-26 00:14:272099 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172100 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272101 'defines': ['USE_LINUX_BREAKPAD'],
2102 }],
[email protected]d8b60602010-03-26 09:41:222103 ['linux_use_heapchecker==1', {
2104 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402105 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222106 }],
[email protected]61a9b2d82010-02-26 00:31:082107 ['linux_use_tcmalloc==0', {
2108 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242109 }],
[email protected]64e2d4a42010-08-27 10:13:212110 ['linux_keep_shadow_stacks==1', {
2111 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a74202012-02-23 19:10:512112 'cflags': [
2113 '-finstrument-functions',
2114 # Allow mmx intrinsics to inline, so that the compiler can expand
2115 # the intrinsics.
2116 '-finstrument-functions-exclude-file-list=mmintrin.h',
2117 ],
[email protected]64e2d4a42010-08-27 10:13:212118 }],
[email protected]8d726a42012-02-09 03:49:002119 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172120 'ldflags': [
2121 # Experimentation found that using four linking threads
2122 # saved ~20% of link time.
2123 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2124 '-Wl,--threads',
2125 '-Wl,--thread-count=4',
2126 ],
[email protected]8d726a42012-02-09 03:49:002127 'conditions': [
2128 ['release_valgrind_build==0', {
2129 'target_conditions': [
2130 ['_toolset=="target"', {
2131 'ldflags': [
2132 # There seems to be a conflict of --icf and -pie
2133 # in gold which can generate crashy binaries. As
2134 # a security measure, -pie takes precendence for
2135 # now.
2136 #'-Wl,--icf=safe',
2137 '-Wl,--icf=none',
2138 ],
2139 }],
2140 ],
2141 }],
2142 ],
2143 }],
[email protected]b07806c12012-02-03 22:44:592144 ['linux_use_gold_binary==1', {
2145 'variables': {
[email protected]516312d2012-02-28 05:17:262146 'conditions': [
2147 ['inside_chromium_build==1', {
2148 # We pass the path to gold to the compiler. gyp leaves
2149 # unspecified what the cwd is when running the compiler,
2150 # so the normal gyp path-munging fails us. This hack
2151 # gets the right path.
2152 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2153 }, {
2154 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2155 }]
2156 ]
[email protected]b07806c12012-02-03 22:44:592157 },
2158 'ldflags': [
2159 # Put our gold binary in the search path for the linker.
2160 '-B<(gold_path)',
2161 ],
2162 }],
[email protected]606116d22009-05-06 22:38:232163 ],
[email protected]9d384032009-03-20 23:13:262164 },
2165 }],
[email protected]c51e8d52009-12-11 20:04:062166 # FreeBSD-specific options; note that most FreeBSD options are set above,
2167 # with Linux.
2168 ['OS=="freebsd"', {
2169 'target_defaults': {
2170 'ldflags': [
2171 '-Wl,--no-keep-memory',
2172 ],
2173 },
2174 }],
[email protected]da1c8d692011-09-20 20:35:012175 # Android-specific options; note that most are set above with Linux.
2176 ['OS=="android"', {
2177 'variables': {
2178 'android_target_arch%': 'arm', # target_arch in android terms.
2179 'conditions': [
2180 # Android uses x86 instead of ia32 for their target_arch designation.
2181 ['target_arch=="ia32"', {
2182 'android_target_arch%': 'x86',
2183 }],
2184 # Use shared stlport library when system one used.
2185 # Figure this out early since it needs symbols from libgcc.a, so it
2186 # has to be before that in the set of libraries.
2187 ['use_system_stlport==1', {
2188 'android_stlport_library': 'stlport',
2189 }, {
2190 'android_stlport_library': 'stlport_static',
2191 }],
2192 ],
2193
2194 # Placing this variable here prevents from forking libvpx, used
2195 # by remoting. Remoting is off, so it needn't built,
2196 # so forking it's deps seems like overkill.
2197 # But this variable need defined to properly run gyp.
2198 # A proper solution is to have an OS==android conditional
2199 # in third_party/libvpx/libvpx.gyp to define it.
2200 'libvpx_path': 'lib/linux/arm',
2201 },
2202 'target_defaults': {
2203 # Build a Release build by default to match Android build behavior.
2204 # This is typical with Android because Debug builds tend to be much
2205 # larger and run very slowly on constrained devices. It is still
2206 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2207 # 'make' command line.
2208 'default_configuration': 'Release',
2209
2210 'variables': {
2211 'release_extra_cflags%': '',
2212 },
2213
2214 'target_conditions': [
2215 # Settings for building device targets using Android's toolchain.
2216 # These are based on the setup.mk file from the Android NDK.
2217 #
2218 # The NDK Android executable link step looks as follows:
2219 # $LDFLAGS
2220 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2221 # $(PRIVATE_OBJECTS) <-- The .o that we built
2222 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2223 # $(TARGET_LIBGCC) <-- libgcc.a
2224 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2225 # $(PRIVATE_LDLIBS) <-- System .so
2226 # $(TARGET_CRTEND_O) <-- crtend.o
2227 #
2228 # For now the above are approximated for executables by adding
2229 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2230 # of 'libraries'.
2231 #
2232 # The NDK Android shared library link step looks as follows:
2233 # $LDFLAGS
2234 # $(PRIVATE_OBJECTS) <-- The .o that we built
2235 # -l,--whole-archive
2236 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2237 # -l,--no-whole-archive
2238 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2239 # $(TARGET_LIBGCC) <-- libgcc.a
2240 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2241 # $(PRIVATE_LDLIBS) <-- System .so
2242 #
2243 # For now, assume not need any whole static libs.
2244 #
2245 # For both executables and shared libraries, add the proper
2246 # libgcc.a to the start of libraries which puts it in the
2247 # proper spot after .o and .a files get linked in.
2248 #
2249 # TODO: The proper thing to do longer-tem would be proper gyp
2250 # support for a custom link command line.
2251 ['_toolset=="target"', {
2252 'cflags!': [
2253 '-pthread', # Not supported by Android toolchain.
2254 ],
2255 'cflags': [
2256 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2257 '-ffunction-sections',
2258 '-funwind-tables',
2259 '-g',
2260 '-fstack-protector',
2261 '-fno-short-enums',
2262 '-finline-limit=64',
2263 '-Wa,--noexecstack',
2264 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2265 '<@(release_extra_cflags)',
2266 # Note: This include is in cflags to ensure that it comes after
2267 # all of the includes.
2268 '-I<(android_ndk_include)',
2269 ],
2270 'defines': [
2271 'ANDROID',
2272 '__GNU_SOURCE=1', # Necessary for clone()
2273 'USE_STLPORT=1',
2274 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2275 'HAVE_OFF64_T',
2276 'HAVE_SYS_UIO_H',
2277 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2278 ],
2279 'ldflags!': [
2280 '-pthread', # Not supported by Android toolchain.
2281 ],
2282 'ldflags': [
2283 '-nostdlib',
2284 '-Wl,--no-undefined',
2285 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2286 # Don't export symbols from statically linked libraries.
2287 '-Wl,--exclude-libs=ALL',
2288 ],
[email protected]a0e48b02011-11-22 07:53:012289 'libraries': [
2290 '-l<(android_stlport_library)',
2291 # Manually link the libgcc.a that the cross compiler uses.
2292 '<!($CROSS_CC -print-libgcc-file-name)',
2293 '-lc',
2294 '-ldl',
2295 '-lstdc++',
2296 '-lm',
[email protected]da1c8d692011-09-20 20:35:012297 ],
2298 'conditions': [
2299 ['android_build_type==0', {
2300 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522301 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012302 ],
2303 }],
2304 # NOTE: The stlport header include paths below are specified in
2305 # cflags rather than include_dirs because they need to come
2306 # after include_dirs. Think of them like system headers, but
2307 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2308 # toolchain (circa Gingerbread) will exhibit strange errors.
2309 # The include ordering here is important; change with caution.
2310 ['use_system_stlport==0', {
2311 'cflags': [
2312 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2313 ],
2314 'conditions': [
2315 ['target_arch=="arm" and armv7==1', {
2316 'ldflags': [
2317 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2318 ],
2319 }],
2320 ['target_arch=="arm" and armv7==0', {
2321 'ldflags': [
2322 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2323 ],
2324 }],
2325 ['target_arch=="ia32"', {
2326 'ldflags': [
2327 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2328 ],
2329 }],
2330 ],
2331 }],
2332 ['target_arch=="ia32"', {
2333 # The x86 toolchain currently has problems with stack-protector.
2334 'cflags!': [
2335 '-fstack-protector',
2336 ],
2337 'cflags': [
2338 '-fno-stack-protector',
2339 ],
2340 }],
2341 ],
2342 'target_conditions': [
2343 ['_type=="executable"', {
2344 'ldflags': [
2345 '-Bdynamic',
2346 '-Wl,-dynamic-linker,/system/bin/linker',
2347 '-Wl,--gc-sections',
2348 '-Wl,-z,nocopyreloc',
2349 # crtbegin_dynamic.o should be the last item in ldflags.
2350 '<(android_ndk_lib)/crtbegin_dynamic.o',
2351 ],
2352 'libraries': [
2353 # crtend_android.o needs to be the last item in libraries.
2354 # Do not add any libraries after this!
2355 '<(android_ndk_lib)/crtend_android.o',
2356 ],
2357 }],
2358 ['_type=="shared_library"', {
2359 'ldflags': [
2360 '-Wl,-shared,-Bsymbolic',
2361 ],
2362 }],
2363 ],
2364 }],
2365 # Settings for building host targets using the system toolchain.
2366 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122367 'cflags!': [
2368 # Due to issues in Clang build system, using ASan on 32-bit
2369 # binaries on x86_64 host is problematic.
2370 # TODO(eugenis): re-enable.
2371 '-faddress-sanitizer',
2372 ],
[email protected]da1c8d692011-09-20 20:35:012373 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122374 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012375 '-Wl,-z,noexecstack',
2376 '-Wl,--gc-sections',
2377 '-Wl,-O1',
2378 '-Wl,--as-needed',
2379 ],
[email protected]965b6b22011-09-29 16:07:282380 'sources/': [
2381 ['exclude', '_android(_unittest)?\\.cc$'],
2382 ['exclude', '(^|/)android/']
2383 ],
[email protected]da1c8d692011-09-20 20:35:012384 }],
2385 ],
2386 },
2387 }],
[email protected]93f21e42010-04-01 00:35:152388 ['OS=="solaris"', {
2389 'cflags!': ['-fvisibility=hidden'],
2390 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2391 }],
[email protected]2f80c312009-02-25 21:26:552392 ['OS=="mac"', {
2393 'target_defaults': {
[email protected]24700642009-06-01 16:01:202394 'variables': {
[email protected]162407f2011-09-08 15:33:172395 # These should end with %, but there seems to be a bug with % in
2396 # variables that are intended to be set to different values in
2397 # different targets, like these.
2398 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202399 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382400 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202401 },
[email protected]d92c7c012009-03-19 19:26:422402 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552403 'xcode_settings': {
2404 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042405 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2406 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2407 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2408 # (Equivalent to -fPIC)
2409 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2410 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2411 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252412 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2413 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042414 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2415 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2416 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2417 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552418 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042419 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252420 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2421 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112422 # Keep pch files below xcodebuild/.
2423 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552424 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192425 'OTHER_CFLAGS': [
2426 '-fno-strict-aliasing', # See http://crbug.com/32204
2427 ],
[email protected]080e86f2010-06-21 15:19:042428 'WARNING_CFLAGS': [
2429 '-Wall',
2430 '-Wendif-labels',
2431 '-Wextra',
2432 # Don't warn about unused function parameters.
2433 '-Wno-unused-parameter',
2434 # Don't warn about the "struct foo f = {0};" initialization
2435 # pattern.
2436 '-Wno-missing-field-initializers',
2437 ],
[email protected]b3fb8092009-03-12 19:09:242438 'conditions': [
2439 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592440 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2441 ],
[email protected]66733172010-09-22 00:09:282442 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302443 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2444 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382445
[email protected]6c648f12011-12-24 07:50:432446 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2447 # when buliding with clang. This warning is triggered when the
2448 # override keyword is used via the OVERRIDE macro from
2449 # base/compiler_specific.h.
2450 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382451
[email protected]34f40892011-09-06 21:53:302452 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282453 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072454 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282455 # Don't die on dtoa code that uses a char as an array index.
2456 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2457 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452458 # Clang spots more unused functions.
2459 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332460 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052461 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302462 # WebKit uses nullptr in a legit way, other that that this
2463 # warning doesn't fire.
2464 '-Wno-c++0x-compat',
2465 # This (rightyfully) complains about 'override', which we use
2466 # heavily.
2467 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102468
2469 # Warns on switches on enums that cover all enum values but
2470 # also contain a default: branch. Chrome is full of that.
2471 '-Wno-covered-switch-default',
2472
2473 # TODO(thakis): Reenable once this no longer complains about
2474 # Invalid() in gmock's gmock-internal-utils.h
2475 # http://crbug.com/111806
2476 '-Wno-null-dereference',
[email protected]66733172010-09-22 00:09:282477 ],
2478 }],
[email protected]5d451ad2011-02-11 16:43:462479 ['clang==1 and clang_use_chrome_plugins==1', {
2480 'OTHER_CFLAGS': [
2481 '<(clang_chrome_plugins_flags)',
2482 ],
2483 }],
[email protected]4a9ac22e2011-12-02 03:41:532484 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592485 'OTHER_CFLAGS': [
2486 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532487 ],
2488 }],
2489 ['clang==1 and clang_add_plugin!=""', {
2490 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592491 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2492 ],
2493 }],
[email protected]2616d45d2012-01-19 03:15:482494 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2495 'OTHER_CFLAGS': [
2496 # See http://crbug.com/110262
2497 '-fcolor-diagnostics',
2498 ],
2499 }],
[email protected]b3fb8092009-03-12 19:09:242500 ],
[email protected]2f80c312009-02-25 21:26:552501 },
[email protected]34f40892011-09-06 21:53:302502 'conditions': [
2503 ['clang==1', {
2504 'variables': {
2505 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2506 },
2507 }],
[email protected]921c7b52011-11-25 10:34:352508 ['asan==1', {
2509 'xcode_settings': {
2510 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352511 '-faddress-sanitizer',
2512 '-w',
[email protected]3cfa96a62012-02-28 07:27:582513 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]921c7b52011-11-25 10:34:352514 ],
2515 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352516 '-faddress-sanitizer',
2517 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372518 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352519 # on the prior OS X versions. Because Chromium is currently
2520 # targeting 10.5.0, we need to explicitly mark these
2521 # symbols as dynamic_lookup.
2522 '-Wl,-U,_malloc_default_purgeable_zone',
2523 '-Wl,-U,_malloc_zone_memalign',
2524 '-Wl,-U,_dispatch_sync_f',
2525 '-Wl,-U,_dispatch_async_f',
2526 '-Wl,-U,_dispatch_barrier_async_f',
2527 '-Wl,-U,_dispatch_group_async_f',
2528 '-Wl,-U,_dispatch_after_f',
2529 ],
2530 },
2531 'defines': [
2532 'ADDRESS_SANITIZER',
2533 ],
2534 }],
[email protected]34f40892011-09-06 21:53:302535 ],
[email protected]2f80c312009-02-25 21:26:552536 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552537 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462538 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2539 }],
2540 ['_mac_bundle', {
2541 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082542 }],
[email protected]6303fed2011-08-11 01:12:102543 ['_type=="executable"', {
2544 'postbuilds': [
2545 {
2546 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362547 # code execution when running on Mac OS X 10.7 ("Lion"), and
2548 # ensures that the position-independent executable (PIE) bit
2549 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102550 'variables': {
[email protected]8c40f322011-08-24 03:33:362551 # Define change_mach_o_flags in a variable ending in _path
2552 # so that GYP understands it's a path and performs proper
2553 # relativization during dict merging.
2554 'change_mach_o_flags_path':
2555 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172556 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132557 ],
2558 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172559 ['mac_pie==0 or release_valgrind_build==1', {
2560 # Don't enable PIE if it's unwanted. It's unwanted if
2561 # the target specifies mac_pie=0 or if building for
2562 # Valgrind, because Valgrind doesn't understand slide.
2563 # See the similar mac_pie/release_valgrind_build check
2564 # below.
[email protected]081c0342011-08-24 14:59:132565 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132566 '--no-pie',
2567 ],
2568 }],
2569 ],
[email protected]6303fed2011-08-11 01:12:102570 },
[email protected]8c40f322011-08-24 03:33:362571 'postbuild_name': 'Change Mach-O Flags',
2572 'action': [
2573 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132574 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362575 ],
[email protected]6303fed2011-08-11 01:12:102576 },
2577 ],
[email protected]5a5d97aa2011-09-02 15:34:002578 'conditions': [
2579 ['asan==1', {
2580 'variables': {
2581 'asan_saves_file': 'asan.saves',
2582 },
2583 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562584 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002585 },
2586 }],
2587 ],
[email protected]162407f2011-09-08 15:33:172588 'target_conditions': [
2589 ['mac_pie==1 and release_valgrind_build==0', {
2590 # Turn on position-independence (ASLR) for executables. When
2591 # PIE is on for the Chrome executables, the framework will
2592 # also be subject to ASLR.
2593 # Don't do this when building for Valgrind, because Valgrind
2594 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2595 # understand slide, and get rid of the Valgrind check.
2596 'xcode_settings': {
2597 'OTHER_LDFLAGS': [
2598 '-Wl,-pie', # Position-independent executable (MH_PIE)
2599 ],
2600 },
2601 }],
2602 ],
[email protected]6a0242bc2011-07-01 00:34:462603 }],
[email protected]9a5e72862010-09-02 16:16:582604 ['(_type=="executable" or _type=="shared_library" or \
2605 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202606 'target_conditions': [
2607 ['mac_real_dsym == 1', {
2608 # To get a real .dSYM bundle produced by dsymutil, set the
2609 # debug information format to dwarf-with-dsym. Since
2610 # strip_from_xcode will not be used, set Xcode to do the
2611 # stripping as well.
2612 'configurations': {
[email protected]5153767c2009-12-22 01:52:502613 'Release_Base': {
[email protected]24700642009-06-01 16:01:202614 'xcode_settings': {
2615 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2616 'DEPLOYMENT_POSTPROCESSING': 'YES',
2617 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072618 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252619 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072620 # The Xcode default is to strip debugging symbols
2621 # only (-S). Local symbols should be stripped as
2622 # well, which will be handled by -x. Xcode will
2623 # continue to insert -S when stripping even when
2624 # additional flags are added with STRIPFLAGS.
2625 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252626 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072627 ], # target_conditions
2628 }, # xcode_settings
2629 }, # configuration "Release"
2630 }, # configurations
[email protected]24700642009-06-01 16:01:202631 }, { # mac_real_dsym != 1
2632 # To get a fast fake .dSYM bundle, use a post-build step to
2633 # produce the .dSYM and strip the executable. strip_from_xcode
2634 # only operates in the Release configuration.
2635 'postbuilds': [
2636 {
2637 'variables': {
2638 # Define strip_from_xcode in a variable ending in _path
2639 # so that gyp understands it's a path and performs proper
2640 # relativization during dict merging.
2641 'strip_from_xcode_path': 'mac/strip_from_xcode',
2642 },
2643 'postbuild_name': 'Strip If Needed',
2644 'action': ['<(strip_from_xcode_path)'],
2645 },
[email protected]e14a9f92009-08-05 19:26:072646 ], # postbuilds
2647 }], # mac_real_dsym
2648 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582649 }], # (_type=="executable" or _type=="shared_library" or
2650 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072651 ], # target_conditions
2652 }, # target_defaults
2653 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552654 ['OS=="win"', {
2655 'target_defaults': {
2656 'defines': [
[email protected]a89e0942011-09-26 16:06:472657 '_WIN32_WINNT=0x0601',
2658 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552659 'WIN32',
2660 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552661 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282662 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552663 '_CRT_RAND_S',
2664 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2665 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272666 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452667 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552668 ],
[email protected]8974e042010-06-21 18:06:522669 'conditions': [
[email protected]2212d272011-12-20 21:37:372670 ['buildtype=="Official"', {
2671 # In official builds, targets can self-select an optimization
2672 # level by defining a variable named 'optimize', and setting it
2673 # to one of
2674 # - "size", optimizes for minimal code size - the default.
2675 # - "speed", optimizes for speed over code size.
2676 # - "max", whole program optimization and link-time code
2677 # generation. This is very expensive and should be used
2678 # sparingly.
2679 'variables': {
2680 'optimize%': 'size',
2681 },
2682 'target_conditions': [
2683 ['optimize=="size"', {
2684 'msvs_settings': {
2685 'VCCLCompilerTool': {
2686 # 1, optimizeMinSpace, Minimize Size (/O1)
2687 'Optimization': '1',
2688 # 2, favorSize - Favor small code (/Os)
2689 'FavorSizeOrSpeed': '2',
2690 },
2691 },
2692 },
2693 ],
2694 ['optimize=="speed"', {
2695 'msvs_settings': {
2696 'VCCLCompilerTool': {
2697 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2698 'Optimization': '2',
2699 # 1, favorSpeed - Favor fast code (/Ot)
2700 'FavorSizeOrSpeed': '1',
2701 },
2702 },
2703 },
2704 ],
2705 ['optimize=="max"', {
2706 'msvs_settings': {
2707 'VCCLCompilerTool': {
2708 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2709 'Optimization': '2',
2710 # 1, favorSpeed - Favor fast code (/Ot)
2711 'FavorSizeOrSpeed': '1',
2712 # This implies link time code generation.
2713 'WholeProgramOptimization': 'true',
2714 },
2715 },
2716 },
2717 ],
2718 ],
2719 },
2720 ],
[email protected]8974e042010-06-21 18:06:522721 ['component=="static_library"', {
2722 'defines': [
2723 '_HAS_EXCEPTIONS=0',
2724 ],
2725 }],
[email protected]3e2648a2011-03-21 20:58:502726 ['secure_atl', {
2727 'defines': [
2728 '_SECURE_ATL',
2729 ],
2730 }],
[email protected]8974e042010-06-21 18:06:522731 ],
[email protected]5b5ca7cb2009-07-20 23:00:202732 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372733 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542734 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552735 '$(VSInstallDir)/VC/atlmfc/include',
2736 ],
[email protected]a8d99cef2009-08-26 20:47:492737 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112738 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2739 # TODO(maruel): These warnings are level 4. They will be slowly
2740 # removed as code is fixed.
2741 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2742 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2743 4702, 4706,
2744 ],
[email protected]2f80c312009-02-25 21:26:552745 'msvs_settings': {
2746 'VCCLCompilerTool': {
2747 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552748 'BufferSecurityCheck': 'true',
2749 'EnableFunctionLevelLinking': 'true',
2750 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112751 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552752 'WarnAsError': 'true',
2753 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582754 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502755 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162756 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552757 }],
[email protected]3e2648a2011-03-21 20:58:502758 ['MSVS_VERSION=="2005e"', {
2759 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2760 }],
[email protected]8974e042010-06-21 18:06:522761 ['component=="shared_library"', {
2762 'ExceptionHandling': '1', # /EHsc
2763 }, {
2764 'ExceptionHandling': '0',
2765 }],
[email protected]3fef6e62009-07-31 19:58:582766 ],
[email protected]2f80c312009-02-25 21:26:552767 },
2768 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162769 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372770 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372771 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542772 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372773 ],
[email protected]2f80c312009-02-25 21:26:552774 },
2775 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552776 'AdditionalDependencies': [
2777 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502778 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552779 'version.lib',
2780 'msimg32.lib',
2781 'ws2_32.lib',
2782 'usp10.lib',
2783 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082784 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482785 'winmm.lib',
2786 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552787 ],
[email protected]4de39f82011-03-28 12:01:292788 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502789 ['msvs_express', {
2790 # Explicitly required when using the ATL with express
2791 'AdditionalDependencies': [
2792 'atlthunk.lib',
2793 ],
2794 }],
2795 ['MSVS_VERSION=="2005e"', {
2796 # Non-express versions link automatically to these
2797 'AdditionalDependencies': [
2798 'advapi32.lib',
2799 'comdlg32.lib',
2800 'ole32.lib',
2801 'shell32.lib',
2802 'user32.lib',
2803 'winspool.lib',
2804 ],
2805 }],
2806 ],
[email protected]a78da50e2010-06-09 21:31:372807 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372808 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542809 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372810 ],
[email protected]2f80c312009-02-25 21:26:552811 'GenerateDebugInformation': 'true',
2812 'MapFileName': '$(OutDir)\\$(TargetName).map',
2813 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552814 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482815 # SubSystem values:
2816 # 0 == not set
2817 # 1 == /SUBSYSTEM:CONSOLE
2818 # 2 == /SUBSYSTEM:WINDOWS
2819 # Most of the executables we'll ever create are tests
2820 # and utilities with console output.
2821 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552822 },
2823 'VCMIDLTool': {
2824 'GenerateStublessProxies': 'true',
2825 'TypeLibraryName': '$(InputName).tlb',
2826 'OutputDirectory': '$(IntDir)',
2827 'HeaderFileName': '$(InputName).h',
2828 'DLLDataFileName': 'dlldata.c',
2829 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2830 'ProxyFileName': '$(InputName)_p.c',
2831 },
2832 'VCResourceCompilerTool': {
2833 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382834 'AdditionalIncludeDirectories': [
2835 '<(DEPTH)',
2836 '<(SHARED_INTERMEDIATE_DIR)',
2837 ],
[email protected]2f80c312009-02-25 21:26:552838 },
2839 },
2840 },
2841 }],
[email protected]79e2336c2011-05-12 18:18:342842 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312843 'target_defaults': {
2844 'defines': [
2845 'DISABLE_NACL',
2846 ],
2847 },
2848 }],
[email protected]cfbf9bc2009-12-07 22:07:562849 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192850 'target_defaults': {
2851 'msvs_settings': {
2852 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192853 'DelayLoadDLLs': [
2854 'dbghelp.dll',
2855 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:012856 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:192857 'uxtheme.dll',
2858 ],
2859 },
2860 },
[email protected]ef4fa4072009-12-04 22:46:502861 'configurations': {
[email protected]5153767c2009-12-22 01:52:502862 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502863 'msvs_settings': {
2864 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162865 'AdditionalOptions': [
2866 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:332867 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162868 '/ignore:4199',
2869 '/ignore:4221',
2870 '/nxcompat',
2871 ],
[email protected]ef4fa4072009-12-04 22:46:502872 },
2873 },
2874 },
[email protected]5153767c2009-12-22 01:52:502875 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502876 'msvs_settings': {
2877 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162878 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502879 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:332880 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162881 '/ignore:4199',
2882 '/ignore:4221',
2883 '/nxcompat',
2884 ],
[email protected]ef4fa4072009-12-04 22:46:502885 },
2886 },
2887 },
2888 },
[email protected]48c7af72009-07-03 22:00:192889 },
2890 }],
[email protected]9821d0d2010-04-16 22:40:372891 ['enable_new_npdevice_api==1', {
2892 'target_defaults': {
2893 'defines': [
2894 'ENABLE_NEW_NPDEVICE_API',
2895 ],
2896 },
2897 }],
[email protected]34f40892011-09-06 21:53:302898 ['clang==1', {
2899 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242900 ['CC', '<(make_clang_dir)/bin/clang'],
2901 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072902 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302903 ['CC.host', '$(CC)'],
2904 ['CXX.host', '$(CXX)'],
2905 ['LINK.host', '$(LINK)'],
2906 ],
2907 }],
[email protected]2f80c312009-02-25 21:26:552908 ],
2909 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502910 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2911 # This block adds *project-wide* configuration settings to each project
2912 # file. It's almost always wrong to put things here. Specify your
2913 # custom xcode_settings in target_defaults to add them to targets instead.
2914
2915 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2916 # setting sets the SDK on a project-wide basis. In order to get the
2917 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2918 # here at the project level.
2919 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2920
[email protected]2f80c312009-02-25 21:26:552921 # The Xcode generator will look for an xcode_settings section at the root
2922 # of each dict and use it to apply settings on a file-wide basis. Most
2923 # settings should not be here, they should be in target-specific
2924 # xcode_settings sections, or better yet, should use non-Xcode-specific
2925 # settings in target dicts. SYMROOT is a special case, because many other
2926 # Xcode variables depend on it, including variables such as
2927 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2928 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2929 # files to appear (when present) in the UI as actual files and not red
2930 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2931 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162932 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552933 },
[email protected]ee28c9f2009-09-04 01:53:012934}