blob: 26507787f157b2f088472723e7f54e24583655ac [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]774e0612011-11-28 18:53:4820 'includes': [
21 'use_skia_on_mac.gypi',
22 ],
[email protected]bb6aba32011-01-07 19:04:4323 'variables': {
24 # Whether we're building a ChromeOS build.
25 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3026
[email protected]de3c97272012-02-07 16:36:0627 # Whether we're building pre-Aura ChromeOS (using GTK).
28 'chromeos_gtk%': 0,
29
[email protected]3fa441d2011-09-18 17:28:5030 # Whether we are using Views Toolkit
31 'toolkit_views%': 0,
32
[email protected]ed329be2012-01-03 22:02:1633 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5834 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2835
[email protected]ed329be2012-01-03 22:02:1636 # Whether or not we are building the Ash shell.
37 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4238
39 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
40 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2741
42 # Disable Virtual keyboard support by default.
43 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4844
[email protected]7ddea9802012-02-22 23:08:0545 # Disable viewport meta tag by default.
46 'enable_viewport%': 0,
47
[email protected]774e0612011-11-28 18:53:4848 # Default setting for use_skia on mac platform.
49 # This is typically overridden in use_skia_on_mac.gypi.
50 'use_skia_on_mac%': 0,
[email protected]bb6aba32011-01-07 19:04:4351 },
52 # Copy conditionally-set variables out one scope.
53 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:0654 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]41423092011-08-25 15:39:5855 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1656 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4257 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2758 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0559 'enable_viewport%': '<(enable_viewport)',
[email protected]774e0612011-11-28 18:53:4860 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]e72e55b2011-01-06 22:19:3061
[email protected]e72e55b2011-01-06 22:19:3062 # Compute the architecture that we're building on.
63 'conditions': [
[email protected]177cd082011-10-04 18:36:3864 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3765 'host_arch%': 'ia32',
66 }, {
[email protected]79e2336c2011-05-12 18:18:3467 # This handles the Unix platforms for which there is some support.
68 # Anything else gets passed through, which probably won't work very
69 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3070 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3471 '<!(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:3072 }],
[email protected]1353a092012-01-13 03:34:2873
[email protected]5f887612012-03-01 21:34:0674 # Non-GTK Chromeos implies ash.
75 ['chromeos==1', {
76 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1677 'use_aura%': 1,
78 }],
[email protected]bb6aba32011-01-07 19:04:4379
[email protected]5f887612012-03-01 21:34:0680 # For now, Windows *AND* Linux builds that |use_aura| should also
81 # imply using ash. This rule should be removed for the future when
82 # both Linux and Windows are using the aura windows without the ash
83 # interface.
84 ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', {
85 'use_ash%': 1,
86 }],
87
[email protected]ab2017e2012-02-07 01:54:5088 # Set default value of toolkit_views based on OS.
[email protected]de3c97272012-02-07 16:36:0689 ['OS=="win" or chromeos==1 or chromeos_gtk==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4390 'toolkit_views%': 1,
91 }, {
92 'toolkit_views%': 0,
93 }],
[email protected]de3c97272012-02-07 16:36:0694
95 # ChromeOS GTK implies ChromeOS.
96 ['chromeos_gtk==1', {
97 'chromeos%': 1,
98 }],
[email protected]e72e55b2011-01-06 22:19:3099 ],
100 },
101
102 # Copy conditionally-set variables out one scope.
103 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:06104 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]e72e55b2011-01-06 22:19:30105 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43106 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:58107 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16108 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42109 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:27110 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05111 'enable_viewport%': '<(enable_viewport)',
[email protected]774e0612011-11-28 18:53:48112 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]023d8242011-11-22 01:25:27113
[email protected]8fb0ef02011-05-20 00:53:50114 # We used to provide a variable for changing how libraries were built.
115 # This variable remains until we can clean up all the users.
116 # This needs to be one nested variables dict in so that dependent
117 # gyp files can make use of it in their outer variables. (Yikes!)
118 # http://code.google.com/p/chromium/issues/detail?id=83308
119 'library%': 'static_library',
120
[email protected]e14a9f92009-08-05 19:26:07121 # Override branding to select the desired branding flavor.
122 'branding%': 'Chromium',
123
124 # Override buildtype to select the desired build flavor.
125 # Dev - everyday build for development/testing
126 # Official - release build (generally implies additional processing)
127 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
128 # conversion is done), some of the things which are now controlled by
129 # 'branding', such as symbol generation, will need to be refactored based
130 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
131 # builds).
132 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27133
[email protected]e72e55b2011-01-06 22:19:30134 # Default architecture we're building for is the architecture we're
135 # building on.
136 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17137
[email protected]e72e55b2011-01-06 22:19:30138 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
139 # are built under a chromium full build (1) or a webkit.org chromium
140 # build (0).
141 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52142
[email protected]e72e55b2011-01-06 22:19:30143 # Set to 1 to enable fast builds. It disables debug info for fastest
144 # compilation.
145 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49146
[email protected]20960e072011-09-20 20:59:01147 # Set to 1 to enable dcheck in release without having to use the flag.
148 'dcheck_always_on%': 0,
149
[email protected]464750f2011-10-24 23:16:18150 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51151 'file_manager_extension%': 0,
152
[email protected]e1229602012-02-21 09:53:16153 # Enable WebUI TaskManager by default.
154 'webui_task_manager%': 1,
[email protected]8b2e9f392011-08-05 04:00:47155
[email protected]e72e55b2011-01-06 22:19:30156 # Python version.
[email protected]a43c5a02011-05-27 06:54:51157 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17158
[email protected]e72e55b2011-01-06 22:19:30159 # Set ARM-v7 compilation flags
160 'armv7%': 0,
161
162 # Set Neon compilation flags (only meaningful if armv7==1).
163 'arm_neon%': 1,
164
165 # The system root for cross-compiles. Default: none.
166 'sysroot%': '',
167
[email protected]945361a2011-09-30 04:38:43168 # The system libdir used for this ABI.
169 'system_libdir%': 'lib',
170
[email protected]e72e55b2011-01-06 22:19:30171 # On Linux, we build with sse2 for Chromium builds.
172 'disable_sse2%': 0,
173
174 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03175 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30176
177 # Variable 'component' is for cases where we would like to build some
178 # components as dynamic shared libraries but still need variable
179 # 'library' for static libraries.
180 # By default, component is set to whatever library is set to and
181 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53182 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30183
[email protected]bb6aba32011-01-07 19:04:43184 # Set to select the Title Case versions of strings in GRD files.
185 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21186
[email protected]98da0042011-02-02 00:10:27187 # Use translations provided by volunteers at launchpad.net. This
188 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19189 'use_third_party_translations%': 0,
190
[email protected]9a425422011-01-11 00:53:18191 # Remoting compilation is enabled by default. Set to 0 to disable.
192 'remoting%': 1,
193
[email protected]a026daa2011-04-20 15:49:51194 # P2P APIs are compiled in by default. Set to 0 to disable.
195 # Also note that this should be enabled for remoting to compile.
196 'p2p_apis%': 1,
197
[email protected]1ec68c42011-06-01 13:56:25198 # Configuration policy is enabled by default. Set to 0 to disable.
199 'configuration_policy%': 1,
200
[email protected]4b58e7d2011-07-11 10:22:56201 # Safe browsing is compiled in by default. Set to 0 to disable.
202 'safe_browsing%': 1,
203
[email protected]9eb100e2011-10-14 05:08:22204 # Speech input is compiled in by default. Set to 0 to disable.
205 'input_speech%': 1,
206
[email protected]7cce3232011-10-28 10:41:57207 # Notifications are compiled in by default. Set to 0 to disable.
208 'notifications%' : 1,
209
[email protected]5d451ad2011-02-11 16:43:46210 # If this is set, the clang plugins used on the buildbot will be used.
211 # Run tools/clang/scripts/update.sh to make sure they are compiled.
212 # This causes 'clang_chrome_plugins_flags' to be set.
213 # Has no effect if 'clang' is not set as well.
214 'clang_use_chrome_plugins%': 0,
215
[email protected]f36f3742011-11-21 13:12:14216 # Enable building with ASAN (Clang's -faddress-sanitizer option).
217 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06218 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
219 'asan%': 0,
[email protected]3cfa96a62012-02-28 07:27:58220 'asan_blacklist%': '<(PRODUCT_DIR)/../../third_party/asan/ignore.txt',
[email protected]92799b632011-08-15 14:33:06221
[email protected]00b0a7f2012-01-25 15:30:46222 # Use the provided profiled order file to link Chrome image with it.
223 # This makes Chrome faster by better using CPU cache when executing code.
224 # This is known as PGO (profile guided optimization).
225 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
226 'order_text_section%' : "",
227
[email protected]1ad5a7b2011-06-24 03:15:13228 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
229 # libraries on linux x86-64 and arm, plus ASLR.
230 'linux_fpic%': 1,
231
[email protected]bd7b6fe2012-03-05 21:02:40232 # Whether one-click signin is enabled or not.
233 'enable_one_click_signin%': 0,
234
[email protected]c6a1f94172011-07-05 02:35:00235 # Enable navigator.registerProtocolHandler and supporting UI.
236 'enable_register_protocol_handler%': 1,
237
[email protected]5ffb0a42012-01-27 09:36:11238 # Enable Web Intents support in WebKit, dispatching of intents,
239 # and extensions Web Intents support.
240 'enable_web_intents%': 1,
241
242 # Enable Web Intents web content registration via HTML element
243 # and WebUI managing such registrations.
244 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01245
[email protected]dda90ae2011-07-19 22:07:48246 # Webrtc compilation is enabled by default. Set to 0 to disable.
247 'enable_webrtc%': 1,
248
[email protected]67c125d2011-10-11 18:58:22249 # PPAPI by default does not support plugins making calls off the main
250 # thread. Set to 1 to turn on experimental support for out-of-process
251 # plugins to make call of the main thread.
252 'enable_pepper_threading%': 0,
253
[email protected]f56797b2011-09-25 00:04:35254 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
255 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
256 # the input value also defines the required XI2 minor minimum version.
257 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
258 'use_xi2_mt%': 0,
259
[email protected]9061bee82012-01-16 11:45:17260 # Use of precompiled headers on Windows.
261 #
262 # This is on by default in VS 2010, but off by default for VS
263 # 2008 because of complications that it can cause with our
264 # trybots etc.
265 #
266 # This variable may be explicitly set to 1 (enabled) or 0
267 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
268 # This setting will override the default.
269 #
270 # Note that a setting of 1 is probably suitable for most or all
271 # Windows developers using VS 2008, since precompiled headers
272 # provide a build speedup of 20-25%. There are a couple of
273 # small workarounds you may need to use when using VS 2008 (but
274 # not 2010), see
275 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
276 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16277 'chromium_win_pch%': 0,
278
[email protected]18e0f39b2012-01-17 16:47:34279 # Enable plug-in installation by default.
280 'enable_plugin_installation%': 1,
281
[email protected]d18e50312012-01-25 17:49:35282 # Specifies whether to use canvas_skia_skia.cc in place of platform
283 # specific implementations of CanvasSkia. Affects text drawing in the
284 # Chrome UI.
285 # TODO(asvitkine): Enable this on all platforms and delete this flag.
286 # http://crbug.com/105550
287 'use_canvas_skia_skia%': 0,
288
[email protected]a9318c72012-03-01 01:29:47289 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
290 # with one of those tools.
291 'build_for_tool%': '',
292
[email protected]01971642012-03-07 14:39:56293 # Whether tests targets should be run, archived or just have the
294 # dependencies verified. All the tests targets have the '_run' suffix,
295 # e.g. base_unittests_run runs the target base_unittests. The test target
296 # always calls tools/isolate/isolate.py. See the script's --help for more
297 # information and the valid --mode values. Meant to be overriden with
298 # GYP_DEFINES.
299 'tests_run%': 'check',
300
[email protected]bb6aba32011-01-07 19:04:43301 'conditions': [
[email protected]33423fa2011-09-23 18:18:14302 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
303 # the 'conditions' clause. Initial attempts resulted in chromium and
304 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22305 ['OS=="mac"', {
[email protected]774e0612011-11-28 18:53:48306 'use_skia%': '<(use_skia_on_mac)',
[email protected]e4dbede82011-09-16 16:11:07307 # Mac uses clang by default, so turn on the plugin as well.
308 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22309 }, {
310 'use_skia%': 1,
311 }],
312
[email protected]79e2336c2011-05-12 18:18:34313 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37314 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34315 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37316 }, {
317 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34318 }],
319
[email protected]df9167b2011-11-14 19:15:25320 # A flag for BSD platforms
321 ['OS=="freebsd" or OS=="openbsd"', {
322 'os_bsd%': 1,
323 }, {
324 'os_bsd%': 0,
325 }],
326
[email protected]c329adf82011-10-05 14:34:57327 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42328 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57329 'use_nss%': 1,
330 }, {
331 'use_nss%': 0,
332 }],
[email protected]e0b85a52011-10-06 03:30:42333
[email protected]258dca42011-09-21 00:17:19334 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01335 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19336 'use_glib%': 0,
[email protected]ab2017e2012-02-07 01:54:50337 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34338 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37339 }, {
[email protected]ab2017e2012-02-07 01:54:50340 # TODO(dnicoara) Wayland build should have these disabled, but
341 # currently GTK and X is too spread and it's hard to completely
342 # remove every dependency.
[email protected]258dca42011-09-21 00:17:19343 'use_glib%': 1,
[email protected]ab2017e2012-02-07 01:54:50344 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37345 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34346 }],
[email protected]efadeacf2011-10-27 19:01:00347 # We always use skia text rendering in Aura on Windows, since GDI
348 # doesn't agree with our BackingStore.
349 # TODO(beng): remove once skia text rendering is on by default.
350 ['use_aura==1 and OS=="win"', {
351 'enable_skia_text%': 1,
352 }],
[email protected]ab2017e2012-02-07 01:54:50353 ['use_aura==1 and OS!="win"', {
354 'toolkit_uses_gtk%': 0,
355 }],
[email protected]9edeb712011-09-20 21:20:33356
[email protected]63692212010-09-16 00:22:21357 # A flag to enable or disable our compile-time dependency
358 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
359 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49360 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50361 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21362 'use_gnome_keyring%': 0,
363 }, {
364 'use_gnome_keyring%': 1,
365 }],
[email protected]0afe5212010-10-01 18:56:11366
[email protected]bb6aba32011-01-07 19:04:43367 ['toolkit_views==0 or OS=="mac"', {
368 # GTK+ and Mac wants Title Case strings
369 'use_titlecase_in_grd_files%': 1,
370 }],
371
[email protected]1b4209f2011-01-07 00:25:40372 # Enable some hacks to support Flapper only on Chrome OS.
373 ['chromeos==1', {
374 'enable_flapper_hacks%': 1,
[email protected]3d38d8e2011-04-16 20:48:51375 }, {
[email protected]c5582412012-02-05 20:16:21376 'enable_flapper_hacks%': 0,
[email protected]ab2017e2012-02-07 01:54:50377 }],
378
[email protected]5f887612012-03-01 21:34:06379 # Enable file manager extension on Chrome OS.
380 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50381 'file_manager_extension%': 1,
382 }, {
[email protected]3d38d8e2011-04-16 20:48:51383 'file_manager_extension%': 0,
384 }],
[email protected]7de46352011-09-12 15:39:19385
[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]b3f23ba2010-04-26 22:58:17432 ],
[email protected]e14a9f92009-08-05 19:26:07433 },
434
[email protected]e72e55b2011-01-06 22:19:30435 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07436 'branding%': '<(branding)',
437 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27438 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59439 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50440 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44441 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33442 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58443 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16444 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42445 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57446 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25447 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34448 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19449 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34450 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22451 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34452 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21453 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11454 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40455 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22456 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44457 'chromeos%': '<(chromeos)',
[email protected]de3c97272012-02-07 16:36:06458 'chromeos_gtk%': '<(chromeos_gtk)',
[email protected]2cc81d32011-10-04 17:03:18459 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05460 'enable_viewport%': '<(enable_viewport)',
[email protected]774e0612011-11-28 18:53:48461 'use_skia_on_mac%': '<(use_skia_on_mac)',
[email protected]f56797b2011-09-25 00:04:35462 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20463 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47464 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21465 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54466 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01467 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36468 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43469 'armv7%': '<(armv7)',
470 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23471 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43472 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22473 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52474 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43475 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17476 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18477 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40478 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48479 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16480 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51481 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25482 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56483 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22484 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57485 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46486 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06487 'asan%': '<(asan)',
[email protected]3cfa96a62012-02-28 07:27:58488 'asan_blacklist%': '<(asan_blacklist)',
[email protected]00b0a7f2012-01-25 15:30:46489 'order_text_section%': '<(order_text_section)',
[email protected]365dd5b92011-05-26 01:30:56490 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07491 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11492 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34493 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]b07806c12012-02-03 22:44:59494 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00495 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]d18e50312012-01-25 17:49:35496 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)',
[email protected]01971642012-03-07 14:39:56497 'tests_run%': '<(tests_run)',
498
[email protected]4076d2f2011-08-11 18:20:22499 # Whether to build for Wayland display server
500 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39501
[email protected]371e1092011-10-12 20:37:36502 # Use system yasm instead of bundled one.
503 'use_system_yasm%': 0,
504
[email protected]cd00bd862012-02-29 00:40:36505 # Default to enabled PIE; this is important for ASLR but we may need to be
506 # able to turn it off for various reasons.
507 'linux_disable_pie%': 0,
508
[email protected]caa95c82009-11-23 22:39:32509 # The release channel that this build targets. This is used to restrict
510 # channel-specific build options, like which installer packages to create.
511 # The default is 'all', which does no channel-specific filtering.
512 'channel%': 'all',
513
[email protected]b3fb8092009-03-12 19:09:24514 # Override chromium_mac_pch and set it to 0 to suppress the use of
515 # precompiled headers on the Mac. Prefix header injection may still be
516 # used, but prefix headers will not be precompiled. This is useful when
517 # using distcc to distribute a build to compile slaves that don't
518 # share the same compiler executable as the system driving the compilation,
519 # because precompiled headers rely on pointers into a specific compiler
520 # executable's image. Setting this to 0 is needed to use an experimental
521 # Linux-Mac cross compiler distcc farm.
522 'chromium_mac_pch%': 1,
523
[email protected]3224dcd2009-09-16 17:31:25524 # Mac OS X SDK and deployment target support.
525 # The SDK identifies the version of the system headers that will be used,
526 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
527 # "Maximum allowed" refers to the operating system version whose APIs are
528 # available in the headers.
529 # The deployment target identifies the minimum system version that the
530 # built products are expected to function on. It corresponds to the
531 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
532 # To ensure these macros are available, #include <AvailabilityMacros.h>.
533 # Additional documentation on these macros is available at
534 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
535 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
536 # deployment target to 10.5. Other projects, such as O3D, may override
537 # these defaults.
538 'mac_sdk%': '10.5',
539 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59540
[email protected]f5ecbba12009-04-03 04:35:18541 # Set to 1 to enable code coverage. In addition to build changes
542 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
543 # project file called "coverage".
544 # Currently ignored on Windows.
545 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49546
[email protected]7477ea6f2009-12-22 23:28:15547 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47548 # environment variable, the libcmt shim it uses sometimes gets in
549 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
550 # 'win_use_allocator_shim': 0,
551 # 'win_release_RuntimeLibrary': 2
552 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52553 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11554
[email protected]95ff8082009-11-13 22:21:01555 # Whether usage of OpenMAX is enabled.
556 'enable_openmax%': 0,
557
[email protected]d01120e62010-05-10 17:04:48558 # Whether proprietary audio/video codecs are assumed to be included with
559 # this build (only meaningful if branding!=Chrome).
560 'proprietary_codecs%': 0,
561
[email protected]e5b2eaa2009-04-14 01:39:12562 # TODO(bradnelson): eliminate this when possible.
563 # To allow local gyp files to prevent release.vsprops from being included.
564 # Yes(1) means include release.vsprops.
565 # Once all vsprops settings are migrated into gyp, this can go away.
566 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23567
[email protected]cbd5fd52009-08-26 00:14:27568 # TODO(bradnelson): eliminate this when possible.
569 # To allow local gyp files to override additional linker options for msvs.
570 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19571 'msvs_use_common_linker_extras%': 1,
572
[email protected]1ffb6502009-06-02 07:46:24573 # TODO(sgk): eliminate this if possible.
574 # It would be nicer to support this via a setting in 'target_defaults'
575 # in chrome/app/locales/locales.gypi overriding the setting in the
576 # 'Debug' configuration in the 'target_defaults' dict below,
577 # but that doesn't work as we'd like.
578 'msvs_debug_link_incremental%': '2',
579
[email protected]1f790ef2011-01-11 20:45:36580 # Needed for some of the largest modules.
581 'msvs_debug_link_nonincremental%': '1',
582
[email protected]5ab8f482011-08-18 18:30:06583 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
584 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51585 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06586
[email protected]573136142009-07-15 22:48:37587 # This is the location of the sandbox binary. Chrome looks for this before
588 # running the zygote process. If found, and SUID, it will be used to
589 # sandbox the zygote process and, thus, all renderer processes.
590 'linux_sandbox_path%': '',
591
[email protected]ad6d2c42009-09-15 20:13:38592 # Set this to true to enable SELinux support.
593 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57594
[email protected]58680ce2010-09-18 00:09:15595 # Set this to true when building with Clang.
596 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15597 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24598 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15599
[email protected]5e781232011-01-28 02:57:59600 # These two variables can be set in GYP_DEFINES while running
601 # |gclient runhooks| to let clang run a plugin in every compilation.
602 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
603 # Example:
[email protected]93120fe2011-02-03 20:46:42604 # 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:59605
606 'clang_load%': '',
607 'clang_add_plugin%': '',
608
[email protected]da1c8d692011-09-20 20:35:01609 # The default type of gtest.
610 'gtest_target_type%': 'executable',
611
[email protected]7664ab32011-02-01 23:35:25612 # Enable sampling based profiler.
613 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
614 'profiling%': '0',
615
[email protected]93b373502011-08-16 19:06:22616 # Enable strict glibc debug mode.
617 'glibcxx_debug%': 0,
618
[email protected]36532f332010-08-25 00:22:01619 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
620 'linux_breakpad%': 0,
621 # And if we want to dump symbols for Breakpad-enabled builds.
622 'linux_dump_symbols%': 0,
623 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03624 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49625 # Strip the test binaries needed for Linux reliability tests.
626 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03627
[email protected]46ce5b562010-06-16 18:39:53628 # Enable TCMalloc.
629 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24630
[email protected]39ca7de2010-04-16 08:04:03631 # Disable TCMalloc's debugallocation.
632 'linux_use_debugallocation%': 0,
633
[email protected]d8b60602010-03-26 09:41:22634 # Disable TCMalloc's heapchecker.
635 'linux_use_heapchecker%': 0,
636
[email protected]64e2d4a42010-08-27 10:13:21637 # Disable shadow stack keeping used by heapcheck to unwind the stacks
638 # better.
639 'linux_keep_shadow_stacks%': 0,
640
[email protected]556c5d72010-06-10 05:45:01641 # Set to 1 to link against libgnome-keyring instead of using dlopen().
642 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35643 # Set to 1 to link against gsettings APIs instead of using dlopen().
644 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01645
[email protected]77c1b29392009-12-04 06:21:29646 # Set Thumb compilation flags.
647 'arm_thumb%': 0,
648
[email protected]53e0f642010-03-05 01:41:56649 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
650 # arm_neon==0).
651 'arm_fpu%': 'vfpv3',
652
[email protected]9821d0d2010-04-16 22:40:37653 # Enable new NPDevice API.
654 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50655
656 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14657 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50658
[email protected]6f51b27e2010-06-22 20:43:53659 # Enable a variable used elsewhere throughout the GYP files to determine
660 # whether to compile in the sources for the GPU plugin / process.
661 'enable_gpu%': 1,
662
[email protected]e72e55b2011-01-06 22:19:30663 # .gyp files or targets should set chromium_code to 1 if they build
664 # Chromium-specific code, as opposed to external code. This variable is
665 # used to control such things as the set of warnings to enable, and
666 # whether warnings are treated as errors.
667 'chromium_code%': 0,
668
[email protected]8d726a42012-02-09 03:49:00669 'release_valgrind_build%': 0,
670
[email protected]b1eb341c2011-11-09 18:46:07671 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
672 'enable_wexit_time_destructors%': 0,
673
[email protected]e72e55b2011-01-06 22:19:30674 # Set to 1 to compile with the built in pdf viewer.
675 'internal_pdf%': 0,
676
677 # This allows to use libcros from the current system, ie. /usr/lib/
678 # The cros_api will be pulled in as a static library, and all headers
679 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43680 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30681
[email protected]e72e55b2011-01-06 22:19:30682 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
683 # so Cocoa is happy (http://crbug.com/20441).
684 'locales': [
685 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
686 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
687 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19688 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30689 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
690 'vi', 'zh-CN', 'zh-TW',
691 ],
692
[email protected]cc0322d2011-07-24 09:29:19693 # Pseudo locales are special locales which are used for testing and
694 # debugging. They don't get copied to the final app. For more info,
695 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
696 'pseudo_locales': [
697 'fake-bidi',
698 ],
699
[email protected]bb6aba32011-01-07 19:04:43700 'grit_defines': [],
701
[email protected]bd3bd442011-03-28 07:58:51702 # If debug_devtools is set to 1, JavaScript files for DevTools are
703 # stored as is and loaded from disk. Otherwise, a concatenated file
704 # is stored in resources.pak. It is still possible to load JS files
705 # from disk by passing --debug-devtools cmdline switch.
706 'debug_devtools%': 0,
707
[email protected]464750f2011-10-24 23:16:18708 # The Java Bridge is not compiled in by default.
709 'java_bridge%': 0,
710
[email protected]33e1c372011-12-14 16:32:07711 # This flag is only used when disable_nacl==0 and disables all those
712 # subcomponents which would require the installation of a native_client
713 # untrusted toolchain.
714 'disable_nacl_untrusted%': 0,
715
[email protected]407dfa632011-12-23 11:59:35716 # Disable Dart by default.
717 'enable_dart%': 0,
718
[email protected]ff10b132012-02-29 22:53:30719 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
720 'msbuild_toolset%': '',
721
[email protected]912c55c2009-07-31 23:33:55722 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11723 # Used to disable Native Client at compile time, for platforms where it
724 # isn't supported (ARM)
[email protected]33e1c372011-12-14 16:32:07725 ['target_arch=="arm" and chromeos == 1', {
[email protected]f0c4fce2011-10-20 18:16:11726 'disable_nacl%': 1,
727 }, {
728 'disable_nacl%': 0,
729 }],
[email protected]da1c8d692011-09-20 20:35:01730 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10731 # This will set gcc_version to XY if you are running gcc X.Y.*.
732 # This is used to tweak build flags for gcc 4.4.
733 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23734 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43735 '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:27736 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10737 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27738 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27739 }],
[email protected]4c9cc6c2009-10-01 18:54:57740 # All Chrome builds have breakpad symbols, but only process the
741 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08742 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57743 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57744 }],
[email protected]cbd5fd52009-08-26 00:14:27745 ],
[email protected]da1c8d692011-09-20 20:35:01746 }], # os_posix==1 and OS!="mac" and OS!="android"
747 ['OS=="android"', {
748 # Location of Android NDK.
749 'variables': {
750 'variables': {
751 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
752 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43753
[email protected]da1c8d692011-09-20 20:35:01754 # Switch between different build types, currently only '0' is
755 # supported.
756 'android_build_type%': 0,
757 },
758 'android_ndk_root%': '<(android_ndk_root)',
759 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
760 'android_build_type%': '<(android_build_type)',
761 },
762 'android_ndk_root%': '<(android_ndk_root)',
763 'android_ndk_sysroot': '<(android_ndk_sysroot)',
764 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
765 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
766
767 # Uses Android's crash report system
768 'linux_breakpad%': 0,
769
770 # Always uses openssl.
771 'use_openssl%': 1,
772
773 'proprietary_codecs%': '<(proprietary_codecs)',
774 'safe_browsing%': 0,
775 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22776 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56777 'enable_web_intents%': 0,
[email protected]464750f2011-10-24 23:16:18778 'java_bridge%': 1,
[email protected]5fd2e842012-03-01 00:29:11779
780 # Set to 1 once we have a notification system for Android.
781 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57782 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01783
784 # Builds the gtest targets as a shared_library.
785 # TODO(michaelbai): Use the fixed value 'shared_library' once it
786 # is fully supported.
787 'gtest_target_type%': '<(gtest_target_type)',
788
789 # Uses system APIs for decoding audio and video.
790 'use_libffmpeg%': '0',
791
792 # Always use the chromium skia. The use_system_harfbuzz needs to
793 # match use_system_skia.
794 'use_system_skia%': '0',
795 'use_system_harfbuzz%': '0',
796
797 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28798 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01799
800 # Choose static link by build type.
801 'conditions': [
802 ['android_build_type==0', {
803 'static_link_system_icu%': 1,
804 }, {
805 'static_link_system_icu%': 0,
806 }],
807 ],
808 # Enable to use system sqlite.
809 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16810 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01811 'use_system_libjpeg%': '<(android_build_type)',
812 # Enable to use the system libexpat.
813 'use_system_libexpat%': '<(android_build_type)',
814 # Enable to use the system stlport, otherwise statically
815 # link the NDK one?
816 'use_system_stlport%': '<(android_build_type)',
817 # Copy it out one scope.
818 'android_build_type%': '<(android_build_type)',
819 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07820 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11821 # Enable clang on mac by default!
822 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56823 # Compile in Breakpad support by default so that it can be
824 # tested, even if it is not enabled by default at runtime.
825 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07826 'conditions': [
827 # mac_product_name is set to the name of the .app bundle as it should
828 # appear on disk. This duplicates data from
829 # chrome/app/theme/chromium/BRANDING and
830 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
831 # these names into the build system.
832 ['branding=="Chrome"', {
833 'mac_product_name%': 'Google Chrome',
834 }, { # else: branding!="Chrome"
835 'mac_product_name%': 'Chromium',
836 }],
837
[email protected]e14a9f92009-08-05 19:26:07838 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56839 # Enable uploading crash dumps.
840 'mac_breakpad_uploads%': 1,
841 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07842 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56843 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07844 'mac_keystone%': 1,
845 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56846 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07847 'mac_breakpad%': 0,
848 'mac_keystone%': 0,
849 }],
850 ],
851 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43852
[email protected]912c55c2009-07-31 23:33:55853 ['OS=="win"', {
854 'conditions': [
[email protected]8974e042010-06-21 18:06:52855 ['component=="shared_library"', {
856 'win_use_allocator_shim%': 0,
857 }],
[email protected]2212d272011-12-20 21:37:37858 # Whether to use multiple cores to compile with visual studio. This is
859 # optional because it sometimes causes corruption on VS 2005.
860 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55861 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13862 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55863 },{
864 'msvs_multi_core_compile%': 1,
865 }],
[email protected]10bb8c92009-08-07 21:16:03866 # Don't do incremental linking for large modules on 32-bit.
867 ['MSVS_OS_BITS==32', {
868 'msvs_large_module_debug_link_mode%': '1', # No
869 },{
870 'msvs_large_module_debug_link_mode%': '2', # Yes
871 }],
[email protected]3e2648a2011-03-21 20:58:50872 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
873 'msvs_express%': 1,
874 'secure_atl%': 0,
875 },{
876 'msvs_express%': 0,
877 'secure_atl%': 1,
878 }],
[email protected]912c55c2009-07-31 23:33:55879 ],
[email protected]ef4fa4072009-12-04 22:46:50880 'nacl_win64_defines': [
881 # This flag is used to minimize dependencies when building
882 # Native Client loader for 64-bit Windows.
883 'NACL_WIN64',
884 ],
[email protected]912c55c2009-07-31 23:33:55885 }],
[email protected]bb6aba32011-01-07 19:04:43886
[email protected]79e2336c2011-05-12 18:18:34887 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44888 'use_cups%': 1,
889 }, {
890 'use_cups%': 0,
891 }],
[email protected]bb6aba32011-01-07 19:04:43892
[email protected]19fe8f0b2010-12-07 07:27:27893 # Set the relative path from this file to the GYP file of the JPEG
894 # library used by Chromium.
895 ['use_libjpeg_turbo==1', {
896 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
897 }, {
898 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
899 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43900
[email protected]abcc9ac2011-05-16 20:04:35901 # Options controlling the use of GConf (the classic GNOME configuration
902 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31903 ['chromeos==1', {
904 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35905 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31906 }, {
907 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35908 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31909 }],
910
[email protected]4de39f82011-03-28 12:01:29911 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29912 ['branding=="Chrome"', {
913 # TODO(mmoss) The .grd files look for _google_chrome, but for
914 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29915 'grit_defines': ['-D', '_google_chrome',
916 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29917 }, {
[email protected]4de39f82011-03-28 12:01:29918 'grit_defines': ['-D', '_chromium',
919 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29920 }],
[email protected]bb6aba32011-01-07 19:04:43921 ['chromeos==1', {
922 'grit_defines': ['-D', 'chromeos'],
923 }],
924 ['toolkit_views==1', {
925 'grit_defines': ['-D', 'toolkit_views'],
926 }],
[email protected]8dd791d2011-09-16 16:37:30927 ['use_aura==1', {
928 'grit_defines': ['-D', 'use_aura'],
929 }],
[email protected]ed329be2012-01-03 22:02:16930 ['use_ash==1', {
931 'grit_defines': ['-D', 'use_ash'],
932 }],
[email protected]c329adf82011-10-05 14:34:57933 ['use_nss==1', {
934 'grit_defines': ['-D', 'use_nss'],
935 }],
[email protected]2cc81d32011-10-04 17:03:18936 ['use_virtual_keyboard==1', {
937 'grit_defines': ['-D', 'use_virtual_keyboard'],
938 }],
[email protected]e47c32032011-03-01 19:26:20939 ['file_manager_extension==1', {
940 'grit_defines': ['-D', 'file_manager_extension'],
941 }],
[email protected]8b2e9f392011-08-05 04:00:47942 ['webui_task_manager==1', {
943 'grit_defines': ['-D', 'webui_task_manager'],
944 }],
[email protected]9a425422011-01-11 00:53:18945 ['remoting==1', {
946 'grit_defines': ['-D', 'remoting'],
947 }],
[email protected]bb6aba32011-01-07 19:04:43948 ['use_titlecase_in_grd_files==1', {
949 'grit_defines': ['-D', 'use_titlecase'],
950 }],
[email protected]00dc155832011-02-01 18:51:19951 ['use_third_party_translations==1', {
952 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12953 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16954 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
955 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12956 ],
[email protected]00dc155832011-02-01 18:51:19957 }],
[email protected]da1c8d692011-09-20 20:35:01958 ['OS=="android"', {
959 'grit_defines': ['-D', 'android'],
960 }],
[email protected]5d451ad2011-02-11 16:43:46961 ['clang_use_chrome_plugins==1', {
962 'clang_chrome_plugins_flags':
963 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
964 }],
[email protected]cfa2e1102011-04-27 22:30:23965
[email protected]452da69e2011-05-24 02:36:05966 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27967 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23968 'use_ibus%': 1,
969 }, {
970 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56971 }],
972
973 ['enable_register_protocol_handler==1', {
974 'grit_defines': ['-D', 'enable_register_protocol_handler'],
975 }],
[email protected]92799b632011-08-15 14:33:06976
[email protected]5ffb0a42012-01-27 09:36:11977 ['enable_web_intents_tag==1', {
978 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:07979 }],
980
[email protected]92799b632011-08-15 14:33:06981 ['asan==1', {
982 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20983 # Do not use Chrome plugins for Clang. The Clang version in
984 # third_party/asan may be different from the default one.
985 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06986 }],
[email protected]a9318c72012-03-01 01:29:47987
988 # On valgrind bots, override the optimizer settings so we don't inline too
989 # much and make the stacks harder to figure out.
990 #
991 # TODO(rnk): Kill off variables that no one else uses and just implement
992 # them under a build_for_tool== condition.
993 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
994 # gcc flags
995 'mac_debug_optimization': '1',
996 'mac_release_optimization': '1',
997 'release_optimize': '1',
998 'no_gc_sections': 1,
999 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1000 '-fno-builtin -fno-optimize-sibling-calls',
1001 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1002 '-fno-builtin -fno-optimize-sibling-calls',
1003
1004 # MSVS flags for TSan on Pin and Windows.
1005 'win_debug_RuntimeChecks': '0',
1006 'win_debug_disable_iterator_debugging': '1',
1007 'win_debug_Optimization': '1',
1008 'win_debug_InlineFunctionExpansion': '0',
1009 'win_release_InlineFunctionExpansion': '0',
1010 'win_release_OmitFramePointers': '0',
1011
1012 'linux_use_tcmalloc': 1,
1013 'release_valgrind_build': 1,
1014 'werror': '',
1015 'component': 'static_library',
1016 'use_system_zlib': 0,
1017 }],
1018
1019 # Build tweaks for DrMemory.
1020 # TODO(rnk): Combine with tsan config to share the builder.
1021 # http://crbug.com/108155
1022 ['build_for_tool=="drmemory"', {
1023 # DrMemory can't handle the debug CRT dll, so build static.
1024 'component': 'static_library',
1025 # These runtime checks force initialization of stack vars which blocks
1026 # DrMemory's uninit detection.
1027 'win_debug_RuntimeChecks': '0',
1028 # Iterator debugging is slow.
1029 'win_debug_disable_iterator_debugging': '1',
1030 # Try to disable optimizations that mess up stacks in a release build.
1031 'win_release_InlineFunctionExpansion': '0',
1032 'win_release_OmitFramePointers': '0',
1033 # Keep the code under #ifndef NVALGRIND.
1034 'release_valgrind_build': 1,
1035 }],
[email protected]912c55c2009-07-31 23:33:551036 ],
[email protected]a9318c72012-03-01 01:29:471037
[email protected]35958422011-09-28 02:03:591038 # List of default apps to install in new profiles. The first list contains
1039 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061040 # contains the destination location for each of the files. When a crx
1041 # is added or removed from the list, the chrome/browser/resources/
1042 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591043 'default_apps_list': [
1044 'browser/resources/default_apps/external_extensions.json',
1045 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061046 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591047 'browser/resources/default_apps/youtube.crx',
1048 ],
1049 'default_apps_list_linux_dest': [
1050 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1051 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061052 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591053 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1054 ],
[email protected]2f80c312009-02-25 21:26:551055 },
1056 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261057 'variables': {
[email protected]a6e22132010-02-10 20:43:181058 # The condition that operates on chromium_code is in a target_conditions
1059 # section, and will not have access to the default fallback value of
1060 # chromium_code at the top of this file, or to the chromium_code
1061 # variable placed at the root variables scope of .gyp files, because
1062 # those variables are not set at target scope. As a workaround,
1063 # if chromium_code is not set at target scope, define it in target scope
1064 # to contain whatever value it has during early variable expansion.
1065 # That's enough to make it available during target conditional
1066 # processing.
1067 'chromium_code%': '<(chromium_code)',
1068
[email protected]7e0d664a2009-12-03 21:07:471069 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291070 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001071 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331072
[email protected]7e0d664a2009-12-03 21:07:471073 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1074 'win_release_Optimization%': '2', # 2 = /Os
1075 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331076
1077 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241078 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:331079 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:241080 # Tri-state: blank is default, 1 on, 0 off
1081 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331082
[email protected]6b0507b2010-05-07 07:41:211083 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1084 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331085
[email protected]6b0507b2010-05-07 07:41:211086 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151087 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1088 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331089
[email protected]fac10d12010-11-08 16:00:311090 # VS inserts quite a lot of extra checks to algorithms like
1091 # std::partial_sort in Debug build which make them O(N^2)
1092 # instead of O(N*logN). This is particularly slow under memory
1093 # tools like ThreadSanitizer so we want it to be disablable.
1094 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1095 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471096
[email protected]ffd984b12009-09-11 19:37:001097 'release_extra_cflags%': '',
1098 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001099
1100 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521101
[email protected]ef5c5f1b2011-12-17 02:16:241102 # the non-qualified versions are widely assumed to be *nix-only
1103 'win_release_extra_cflags%': '',
1104 'win_debug_extra_cflags%': '',
1105
[email protected]b1eb341c2011-11-09 18:46:071106 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1107 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1108
[email protected]ef3326702011-10-06 18:06:441109 # Only used by Windows build for now. Can be used to build into a
1110 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1111 # output files in src/build/VS2010_{Debug,Release}.
1112 'build_dir_prefix%': '',
1113
[email protected]8974e042010-06-21 18:06:521114 'conditions': [
1115 ['OS=="win" and component=="shared_library"', {
1116 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1117 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
1118 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
1119 }, {
1120 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1121 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1122 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1123 }],
1124 ],
[email protected]1c966092009-08-20 21:19:261125 },
[email protected]32aa8cc2009-03-04 21:36:391126 'conditions': [
[email protected]ff10b132012-02-29 22:53:301127 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1128 'msbuild_toolset': '<(msbuild_toolset)',
1129 }],
[email protected]32aa8cc2009-03-04 21:36:391130 ['branding=="Chrome"', {
1131 'defines': ['GOOGLE_CHROME_BUILD'],
1132 }, { # else: branding!="Chrome"
1133 'defines': ['CHROMIUM_BUILD'],
1134 }],
[email protected]63e39a282011-07-13 20:41:281135 ['component=="shared_library"', {
1136 'defines': ['COMPONENT_BUILD'],
1137 }],
[email protected]5cba9ff72011-11-16 21:55:181138 ['component=="shared_library" and incremental_chrome_dll==1', {
1139 # TODO(dpranke): We can't incrementally link chrome when
1140 # content is being built as a DLL because chrome links in
1141 # webkit_glue and webkit_glue depends on symbols defined in
1142 # content. We can remove this when we fix glue.
1143 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
1144 'defines': ['COMPILE_CONTENT_STATICALLY'],
1145 }],
[email protected]06c756182010-04-27 18:31:311146 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171147 'defines': ['TOOLKIT_VIEWS=1'],
1148 }],
[email protected]1ee7c56c2011-10-19 14:51:331149 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111150 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1151 }],
[email protected]41423092011-08-25 15:39:581152 ['use_aura==1', {
1153 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351154 }],
[email protected]ed329be2012-01-03 22:02:161155 ['use_ash==1', {
1156 'defines': ['USE_ASH=1'],
1157 }],
[email protected]c329adf82011-10-05 14:34:571158 ['use_nss==1', {
1159 'defines': ['USE_NSS=1'],
1160 }],
[email protected]bd7b6fe2012-03-05 21:02:401161 ['enable_one_click_signin==1', {
1162 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1163 }],
[email protected]9d43e372011-09-22 19:39:521164 ['toolkit_uses_gtk==1', {
1165 'defines': ['TOOLKIT_USES_GTK=1'],
1166 }],
[email protected]a47aa892011-11-22 03:12:311167 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1168 # TODO(erg): We are progressively sealing up use of deprecated features
1169 # in gtk in preparation for an eventual porting to gtk3.
1170 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1171 }],
[email protected]fdc5bed2010-01-09 01:16:571172 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291173 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501174 }],
[email protected]2cc81d32011-10-04 17:03:181175 ['use_virtual_keyboard==1', {
1176 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1177 }],
[email protected]f56797b2011-09-25 00:04:351178 ['use_xi2_mt!=0', {
1179 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1180 }],
[email protected]236754a2011-07-28 17:38:231181 ['use_wayland==1', {
1182 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1183 }],
[email protected]e47c32032011-03-01 19:26:201184 ['file_manager_extension==1', {
1185 'defines': ['FILE_MANAGER_EXTENSION=1'],
1186 }],
[email protected]8b2e9f392011-08-05 04:00:471187 ['webui_task_manager==1', {
1188 'defines': ['WEBUI_TASK_MANAGER=1'],
1189 }],
[email protected]7664ab32011-02-01 23:35:251190 ['profiling==1', {
1191 'defines': ['ENABLE_PROFILING=1'],
1192 }],
[email protected]93b373502011-08-16 19:06:221193 ['OS=="linux" and glibcxx_debug==1', {
1194 'defines': ['_GLIBCXX_DEBUG=1',],
1195 'cflags_cc!': ['-fno-rtti'],
1196 'cflags_cc+': ['-frtti', '-g'],
1197 }],
[email protected]542bf24a2010-06-11 23:08:171198 ['remoting==1', {
1199 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001200 }],
[email protected]5b87e782012-02-09 18:19:321201 ['enable_webrtc==1', {
1202 'defines': ['ENABLE_WEBRTC=1'],
1203 }],
[email protected]a026daa2011-04-20 15:49:511204 ['p2p_apis==1', {
1205 'defines': ['ENABLE_P2P_APIS=1'],
1206 }],
[email protected]d01120e62010-05-10 17:04:481207 ['proprietary_codecs==1', {
1208 'defines': ['USE_PROPRIETARY_CODECS'],
1209 }],
[email protected]1b4209f2011-01-07 00:25:401210 ['enable_flapper_hacks==1', {
1211 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1212 }],
[email protected]67c125d2011-10-11 18:58:221213 ['enable_pepper_threading==1', {
1214 'defines': ['ENABLE_PEPPER_THREADING'],
1215 }],
[email protected]7ddea9802012-02-22 23:08:051216 ['enable_viewport==1', {
1217 'defines': ['ENABLE_VIEWPORT'],
1218 }],
[email protected]f31e2e52011-07-14 16:01:191219 ['configuration_policy==1', {
1220 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1221 }],
[email protected]9eb100e2011-10-14 05:08:221222 ['input_speech==1', {
1223 'defines': ['ENABLE_INPUT_SPEECH'],
1224 }],
[email protected]7cce3232011-10-28 10:41:571225 ['notifications==1', {
1226 'defines': ['ENABLE_NOTIFICATIONS'],
1227 }],
[email protected]9c1949e2009-10-02 19:59:541228 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171229
[email protected]9c1949e2009-10-02 19:59:541230 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141231 # For Windows and Mac, we don't genererate debug information.
1232 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541233 'msvs_settings': {
1234 'VCLinkerTool': {
1235 'GenerateDebugInformation': 'false',
1236 },
1237 'VCCLCompilerTool': {
1238 'DebugInformationFormat': '0',
1239 }
[email protected]da4d4ea2011-09-22 20:23:141240 },
1241 'xcode_settings': {
1242 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1243 },
[email protected]1cc2fa72010-07-03 08:49:241244 }, { # else: OS != "win", generate less debug information.
1245 'variables': {
1246 'debug_extra_cflags': '-g1',
1247 },
[email protected]37c84192010-04-14 21:37:401248 }],
[email protected]aecc4d12011-01-19 05:32:331249 # Clang creates chubby debug information, which makes linking very
1250 # slow. For now, don't create debug information with clang. See
1251 # http://crbug.com/70000
1252 ['OS=="linux" and clang==1', {
1253 'variables': {
1254 'debug_extra_cflags': '-g0',
1255 },
1256 }],
[email protected]9c1949e2009-10-02 19:59:541257 ], # conditions for fastbuild.
1258 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011259 ['dcheck_always_on!=0', {
1260 'defines': ['DCHECK_ALWAYS_ON=1'],
1261 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381262 ['selinux==1', {
1263 'defines': ['CHROMIUM_SELINUX=1'],
1264 }],
[email protected]7e0d664a2009-12-03 21:07:471265 ['win_use_allocator_shim==0', {
1266 'conditions': [
1267 ['OS=="win"', {
1268 'defines': ['NO_TCMALLOC'],
1269 }],
1270 ],
1271 }],
[email protected]43f28f832010-02-03 02:28:481272 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151273 'defines': [
1274 'ENABLE_GPU=1',
1275 ],
1276 }],
[email protected]b1c2a5542010-10-08 12:44:401277 ['use_openssl==1', {
1278 'defines': [
1279 'USE_OPENSSL=1',
1280 ],
1281 }],
[email protected]ed154592010-04-29 00:18:501282 ['enable_eglimage==1', {
1283 'defines': [
1284 'ENABLE_EGLIMAGE=1',
1285 ],
1286 }],
[email protected]7d7564a12011-06-21 19:20:221287 ['use_skia==1', {
1288 'defines': [
1289 'USE_SKIA=1',
1290 ],
1291 }],
[email protected]f5ecbba12009-04-03 04:35:181292 ['coverage!=0', {
1293 'conditions': [
1294 ['OS=="mac"', {
1295 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041296 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1297 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471298 },
[email protected]e4fb84c2009-12-28 20:45:431299 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101300 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431301 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181302 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431303 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181304 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471305 }],
1306 ],
1307 }],
[email protected]da1c8d692011-09-20 20:35:011308 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181309 'cflags': [ '-ftest-coverage',
1310 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001311 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181312 }],
[email protected]e8f6ff42009-07-07 18:20:531313 # Finally, for Windows, we simply turn on profiling.
1314 ['OS=="win"', {
1315 'msvs_settings': {
1316 'VCLinkerTool': {
1317 'Profile': 'true',
1318 },
[email protected]10bb8c92009-08-07 21:16:031319 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531320 # /Z7, not /Zi, so coverage is happyb
1321 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161322 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531323 }
1324 }
1325 }], # OS==win
1326 ], # conditions for coverage
1327 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381328 ['OS=="win"', {
1329 'defines': [
1330 '__STD_C',
1331 '_CRT_SECURE_NO_DEPRECATE',
1332 '_SCL_SECURE_NO_DEPRECATE',
1333 ],
1334 'include_dirs': [
1335 '<(DEPTH)/third_party/wtl/include',
1336 ],
1337 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561338 ['enable_register_protocol_handler==1', {
1339 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191340 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561341 ],
1342 }],
[email protected]41ed4e82011-08-25 23:02:071343 ['enable_web_intents==1', {
1344 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471345 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071346 ],
1347 }],
[email protected]13eb97d2012-01-05 01:07:121348 ['OS=="win" and branding=="Chrome"', {
1349 'defines': ['ENABLE_SWIFTSHADER'],
1350 }],
[email protected]407dfa632011-12-23 11:59:351351 ['enable_dart==1', {
1352 'defines': ['WEBKIT_USING_DART=1'],
1353 }],
[email protected]18e0f39b2012-01-17 16:47:341354 ['enable_plugin_installation==1', {
1355 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1356 }],
[email protected]a6e22132010-02-10 20:43:181357 ], # conditions for 'target_defaults'
1358 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071359 ['enable_wexit_time_destructors==1', {
1360 'conditions': [
1361 [ 'clang==1', {
1362 'cflags': [
1363 '-Wexit-time-destructors',
1364 ],
1365 'xcode_settings': {
1366 'WARNING_CFLAGS': [
1367 '-Wexit-time-destructors',
1368 ],
1369 },
1370 }],
1371 ],
1372 }],
[email protected]c14d8e772010-02-09 22:06:151373 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281374 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341375 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331376 # We don't want to get warnings from third-party code,
1377 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281378 'cflags!': [
1379 '-Wall',
1380 '-Wextra',
1381 '-Werror',
1382 ],
[email protected]167ec822011-10-24 22:05:271383 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001384 # Don't warn about hash_map in third-party code.
1385 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271386 ],
1387 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331388 # Don't warn about printf format problems.
1389 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221390 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001391 ],
[email protected]d16bd642011-07-25 23:59:181392 'cflags_cc!': [
1393 # TODO(fischman): remove this.
1394 # http://code.google.com/p/chromium/issues/detail?id=90453
1395 '-Wsign-compare',
1396 ]
[email protected]d8543312010-02-10 17:43:281397 }],
[email protected]bc073c062012-01-13 06:28:031398 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111399 'cflags': [
1400 # Don't warn about ignoring the return value from e.g. close().
1401 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031402 # BSD systems do not support this option, since they are usually
1403 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111404 '-Wno-unused-result',
1405 ],
1406 }],
[email protected]d8543312010-02-10 17:43:281407 [ 'OS=="win"', {
1408 'defines': [
1409 '_CRT_SECURE_NO_DEPRECATE',
1410 '_CRT_NONSTDC_NO_WARNINGS',
1411 '_CRT_NONSTDC_NO_DEPRECATE',
1412 '_SCL_SECURE_NO_DEPRECATE',
1413 ],
1414 'msvs_disabled_warnings': [4800],
1415 'msvs_settings': {
1416 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111417 'WarningLevel': '3',
1418 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281419 'Detect64BitPortabilityProblems': 'false',
1420 },
1421 },
1422 }],
[email protected]ea47b6a2011-07-17 19:39:421423 # TODO(darin): Unfortunately, some third_party code depends on base/
1424 [ 'OS=="win" and component=="shared_library"', {
1425 'msvs_disabled_warnings': [
1426 4251, # class 'std::xx' needs to have dll-interface.
1427 ],
1428 }],
[email protected]d8543312010-02-10 17:43:281429 [ 'OS=="mac"', {
1430 'xcode_settings': {
1431 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061432 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281433 },
1434 }],
[email protected]c14d8e772010-02-09 22:06:151435 ],
1436 }, {
[email protected]a5c598152012-01-27 04:55:131437 'includes': [
1438 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1439 'filename_rules.gypi',
1440 ],
[email protected]c14d8e772010-02-09 22:06:151441 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1442 # C99 macros on Mac and Linux.
1443 'defines': [
1444 '__STDC_FORMAT_MACROS',
1445 ],
1446 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151447 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071448 # turn on warnings for signed/unsigned mismatch on chromium code.
1449 'msvs_settings': {
1450 'VCCLCompilerTool': {
1451 'AdditionalOptions': ['/we4389'],
1452 },
1453 },
[email protected]c14d8e772010-02-09 22:06:151454 }],
[email protected]63e39a282011-07-13 20:41:281455 ['OS=="win" and component=="shared_library"', {
1456 'msvs_disabled_warnings': [
1457 4251, # class 'std::xx' needs to have dll-interface.
1458 ],
1459 }],
[email protected]c14d8e772010-02-09 22:06:151460 ],
1461 }],
[email protected]a6e22132010-02-10 20:43:181462 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551463 'default_configuration': 'Debug',
1464 'configurations': {
[email protected]5153767c2009-12-22 01:52:501465 # VCLinkerTool LinkIncremental values below:
1466 # 0 == default
1467 # 1 == /INCREMENTAL:NO
1468 # 2 == /INCREMENTAL
1469 # Debug links incremental, Release does not.
1470 #
[email protected]7b99801e2010-11-03 17:26:231471 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501472 #
1473 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561474 'abstract': 1,
1475 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511476 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561477 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1478 'CharacterSet': '1',
1479 },
[email protected]5153767c2009-12-22 01:52:501480 },
1481 'x86_Base': {
1482 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501483 'msvs_settings': {
1484 'VCLinkerTool': {
1485 'TargetMachine': '1',
1486 },
1487 },
[email protected]2fa40782009-11-01 21:17:341488 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561489 },
[email protected]5153767c2009-12-22 01:52:501490 'x64_Base': {
1491 'abstract': 1,
1492 'msvs_configuration_platform': 'x64',
1493 'msvs_settings': {
1494 'VCLinkerTool': {
1495 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501496 'AdditionalLibraryDirectories!':
1497 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1498 'AdditionalLibraryDirectories':
1499 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1500 },
[email protected]d26b4418ab2010-03-24 22:06:351501 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501502 'AdditionalLibraryDirectories!':
1503 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1504 'AdditionalLibraryDirectories':
1505 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1506 },
1507 },
1508 'defines': [
1509 # Not sure if tcmalloc works on 64-bit Windows.
1510 'NO_TCMALLOC',
1511 ],
1512 },
1513 'Debug_Base': {
1514 'abstract': 1,
[email protected]14339762011-04-05 07:36:581515 'defines': [
1516 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1517 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1518 ],
[email protected]1c966092009-08-20 21:19:261519 'xcode_settings': {
1520 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291521 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491522 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491523 '<@(debug_extra_cflags)',
1524 ],
[email protected]1c966092009-08-20 21:19:261525 },
[email protected]bb05e452009-10-29 21:24:561526 'msvs_settings': {
1527 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471528 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561529 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211530 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471531 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151532 'conditions': [
1533 # According to MSVS, InlineFunctionExpansion=0 means
1534 # "default inlining", not "/Ob0".
1535 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1536 ['win_debug_InlineFunctionExpansion==0', {
1537 'AdditionalOptions': ['/Ob0'],
1538 }],
1539 ['win_debug_InlineFunctionExpansion!=""', {
1540 'InlineFunctionExpansion':
1541 '<(win_debug_InlineFunctionExpansion)',
1542 }],
[email protected]fac10d12010-11-08 16:00:311543 ['win_debug_disable_iterator_debugging==1', {
1544 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1545 }],
[email protected]ef5c5f1b2011-12-17 02:16:241546
1547 # if win_debug_OmitFramePointers is blank, leave as default
1548 ['win_debug_OmitFramePointers==1', {
1549 'OmitFramePointers': 'true',
1550 }],
1551 ['win_debug_OmitFramePointers==0', {
1552 'OmitFramePointers': 'false',
1553 # The above is not sufficient (http://crbug.com/106711): it
1554 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1555 # perform FPO regardless, so we must explicitly disable.
1556 # We still want the false setting above to avoid having
1557 # "/Oy /Oy-" and warnings about overriding.
1558 'AdditionalOptions': ['/Oy-'],
1559 }],
[email protected]2ae6e022010-05-07 13:19:151560 ],
[email protected]ef5c5f1b2011-12-17 02:16:241561 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561562 },
1563 'VCLinkerTool': {
1564 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331565 # ASLR makes debugging with windbg difficult because Chrome.exe and
1566 # Chrome.dll share the same base name. As result, windbg will
1567 # name the Chrome.dll module like chrome_<base address>, where
1568 # <base address> typically changes with each launch. This in turn
1569 # means that breakpoints in Chrome.dll don't stick from one launch
1570 # to the next. For this reason, we turn ASLR off in debug builds.
1571 # Note that this is a three-way bool, where 0 means to pick up
1572 # the default setting, 1 is off and 2 is on.
1573 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561574 },
1575 'VCResourceCompilerTool': {
1576 'PreprocessorDefinitions': ['_DEBUG'],
1577 },
1578 },
[email protected]2f80c312009-02-25 21:26:551579 'conditions': [
[email protected]bb05e452009-10-29 21:24:561580 ['OS=="linux"', {
1581 'cflags': [
1582 '<@(debug_extra_cflags)',
1583 ],
[email protected]2f80c312009-02-25 21:26:551584 }],
[email protected]56cca4e2011-07-01 21:33:351585 ['release_valgrind_build==0', {
1586 'xcode_settings': {
1587 'OTHER_CFLAGS': [
1588 '-fstack-protector-all', # Implies -fstack-protector
1589 ],
1590 },
1591 }],
[email protected]2f80c312009-02-25 21:26:551592 ],
1593 },
[email protected]5153767c2009-12-22 01:52:501594 'Release_Base': {
1595 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551596 'defines': [
1597 'NDEBUG',
1598 ],
[email protected]1c966092009-08-20 21:19:261599 'xcode_settings': {
1600 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1601 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001602 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261603 },
[email protected]bb05e452009-10-29 21:24:561604 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471605 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471606 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151607 'conditions': [
[email protected]2212d272011-12-20 21:37:371608 # In official builds, each target will self-select
1609 # an optimization level.
1610 ['buildtype!="Official"', {
1611 'Optimization': '<(win_release_Optimization)',
1612 },
1613 ],
[email protected]2ae6e022010-05-07 13:19:151614 # According to MSVS, InlineFunctionExpansion=0 means
1615 # "default inlining", not "/Ob0".
1616 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1617 ['win_release_InlineFunctionExpansion==0', {
1618 'AdditionalOptions': ['/Ob0'],
1619 }],
1620 ['win_release_InlineFunctionExpansion!=""', {
1621 'InlineFunctionExpansion':
1622 '<(win_release_InlineFunctionExpansion)',
1623 }],
[email protected]626d2d22011-10-11 15:47:331624
[email protected]ef5c5f1b2011-12-17 02:16:241625 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331626 ['win_release_OmitFramePointers==1', {
1627 'OmitFramePointers': 'true',
1628 }],
1629 ['win_release_OmitFramePointers==0', {
1630 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241631 # The above is not sufficient (http://crbug.com/106711): it
1632 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1633 # perform FPO regardless, so we must explicitly disable.
1634 # We still want the false setting above to avoid having
1635 # "/Oy /Oy-" and warnings about overriding.
1636 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331637 }],
[email protected]2ae6e022010-05-07 13:19:151638 ],
[email protected]ef5c5f1b2011-12-17 02:16:241639 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471640 },
[email protected]bb05e452009-10-29 21:24:561641 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341642 # LinkIncremental is a tri-state boolean, where 0 means default
1643 # (i.e., inherit from parent solution), 1 means false, and
1644 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561645 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341646 # This corresponds to the /PROFILE flag which ensures the PDB
1647 # file contains FIXUP information (growing the PDB file by about
1648 # 5%) but does not otherwise alter the output binary. This
1649 # information is used by the Syzygy optimization tool when
1650 # decomposing the release image.
1651 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561652 },
1653 },
[email protected]2f80c312009-02-25 21:26:551654 'conditions': [
[email protected]92822e82009-09-18 14:26:561655 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581656 'defines': [
1657 'NVALGRIND',
1658 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1659 ],
[email protected]ee857512010-05-14 08:24:421660 }, {
[email protected]14339762011-04-05 07:36:581661 'defines': [
1662 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1663 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1664 ],
[email protected]92822e82009-09-18 14:26:561665 }],
[email protected]7e0d664a2009-12-03 21:07:471666 ['win_use_allocator_shim==0', {
1667 'defines': ['NO_TCMALLOC'],
1668 }],
[email protected]bb05e452009-10-29 21:24:561669 ['OS=="linux"', {
1670 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001671 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561672 ],
1673 }],
[email protected]2f80c312009-02-25 21:26:551674 ],
1675 },
[email protected]5153767c2009-12-22 01:52:501676 #
1677 # Concrete configurations
1678 #
1679 'Debug': {
1680 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1681 },
1682 'Release': {
1683 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1684 'conditions': [
1685 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161686 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501687 }],
1688 ]
1689 },
[email protected]f926fa0a2009-08-04 22:50:131690 'conditions': [
1691 [ 'OS=="win"', {
1692 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501693 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501694 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301695 },
1696 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501697 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301698 },
[email protected]f926fa0a2009-08-04 22:50:131699 }],
1700 ],
[email protected]2f80c312009-02-25 21:26:551701 },
1702 },
1703 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341704 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261705 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271706 # Enable -Werror by default, but put it in a variable so it can
1707 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1708 'variables': {
[email protected]cbbb3472012-01-25 18:32:311709 'werror%': '-Werror',
[email protected]5315f2842009-04-28 00:43:271710 },
[email protected]6863896f2012-01-25 17:51:361711 'defines': [
1712 '_FILE_OFFSET_BITS=64',
1713 ],
[email protected]9d384032009-03-20 23:13:261714 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161715 '<(werror)', # See note above about the werror variable.
1716 '-pthread',
1717 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291718 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161719 '-Wall',
[email protected]0fa17082010-03-26 00:48:051720 # TODO(evan): turn this back on once all the builds work.
1721 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201722 # Don't warn about unused function params. We use those everywhere.
1723 '-Wno-unused-parameter',
1724 # Don't warn about the "struct foo f = {0};" initialization pattern.
1725 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121726 # Don't export any symbols (for example, to plugins we dlopen()).
1727 # Note: this is *required* to make some plugins work.
1728 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351729 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241730 ],
1731 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221732 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241733 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361734 # Make inline functions have hidden visiblity by default.
1735 # Surprisingly, not covered by -fvisibility=hidden.
1736 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171737 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1738 # so we specify it explicitly.
1739 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181740 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171741 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261742 ],
[email protected]a6cf87e2009-04-03 04:07:381743 'ldflags': [
[email protected]138241f2010-03-30 23:53:101744 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261745 ],
[email protected]3aacaf952009-04-02 15:34:091746 'configurations': {
[email protected]5153767c2009-12-22 01:52:501747 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311748 'variables': {
1749 'debug_optimize%': '0',
1750 },
[email protected]3aacaf952009-04-02 15:34:091751 'defines': [
1752 '_DEBUG',
1753 ],
1754 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041755 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091756 '-g',
1757 ],
[email protected]da1c8d692011-09-20 20:35:011758 'conditions' : [
1759 ['OS=="android"', {
1760 'cflags': [
1761 '-fno-omit-frame-pointer',
1762 ],
1763 }],
1764 ],
1765 'target_conditions' : [
1766 ['_toolset=="target"', {
1767 'conditions': [
1768 ['OS=="android" and debug_optimize==0', {
1769 'cflags': [
1770 '-mlong-calls', # Needed when compiling with -O0
1771 ],
1772 }],
1773 ['arm_thumb==1', {
1774 'cflags': [
1775 '-marm',
1776 ],
1777 }],
1778 ],
1779 }],
1780 ],
[email protected]5315f2842009-04-28 00:43:271781 },
[email protected]5153767c2009-12-22 01:52:501782 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011783 'variables': {
1784 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511785 # Binaries become big and gold is unable to perform GC
1786 # and remove unused sections for some of test targets
1787 # on 32 bit platform.
1788 # (This is currently observed only in chromeos valgrind bots)
1789 # The following flag is to disable --gc-sections linker
1790 # option for these bots.
1791 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121792
1793 # TODO(bradnelson): reexamine how this is done if we change the
1794 # expansion of configurations
1795 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011796 },
[email protected]3aacaf952009-04-02 15:34:091797 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041798 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531799 # Don't emit the GCC version ident directives, they just end up
1800 # in the .comment section taking up binary size.
1801 '-fno-ident',
1802 # Put data and code in their own sections, so that unused symbols
1803 # can be removed at link time with --gc-sections.
1804 '-fdata-sections',
1805 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091806 ],
[email protected]c902f2cba2010-08-06 20:04:181807 'ldflags': [
1808 # Specifically tell the linker to perform optimizations.
1809 # See http://lwn.net/Articles/192624/ .
1810 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221811 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181812 ],
[email protected]1dd529642010-05-15 01:02:511813 'conditions' : [
1814 ['no_gc_sections==0', {
1815 'ldflags': [
1816 '-Wl,--gc-sections',
1817 ],
1818 }],
[email protected]da1c8d692011-09-20 20:35:011819 ['OS=="android"', {
1820 'cflags': [
1821 '-fomit-frame-pointer',
1822 ],
1823 }],
[email protected]ecf7b6482010-10-13 09:15:201824 ['clang==1', {
1825 'cflags!': [
1826 '-fno-ident',
1827 ],
1828 }],
[email protected]7664ab32011-02-01 23:35:251829 ['profiling==1', {
1830 'cflags': [
1831 '-fno-omit-frame-pointer',
1832 '-g',
1833 ],
1834 }],
[email protected]8d726a42012-02-09 03:49:001835 ],
[email protected]3aacaf952009-04-02 15:34:091836 },
1837 },
[email protected]601b540222009-04-03 21:32:041838 'variants': {
1839 'coverage': {
1840 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1841 'ldflags': ['-fprofile-arcs'],
1842 },
1843 'profile': {
1844 'cflags': ['-pg', '-g'],
1845 'ldflags': ['-pg'],
1846 },
1847 'symbols': {
1848 'cflags': ['-g'],
1849 },
1850 },
[email protected]606116d22009-05-06 22:38:231851 'conditions': [
[email protected]04b482602011-09-14 02:36:211852 ['target_arch=="ia32"', {
1853 'target_conditions': [
1854 ['_toolset=="target"', {
1855 'asflags': [
1856 # Needed so that libs with .s files (e.g. libicudata.a)
1857 # are compatible with the general 32-bit-ness.
1858 '-32',
1859 ],
1860 # All floating-point computations on x87 happens in 80-bit
1861 # precision. Because the C and C++ language standards allow
1862 # the compiler to keep the floating-point values in higher
1863 # precision than what's specified in the source and doing so
1864 # is more efficient than constantly rounding up to 64-bit or
1865 # 32-bit precision as specified in the source, the compiler,
1866 # especially in the optimized mode, tries very hard to keep
1867 # values in x87 floating-point stack (in 80-bit precision)
1868 # as long as possible. This has important side effects, that
1869 # the real value used in computation may change depending on
1870 # how the compiler did the optimization - that is, the value
1871 # kept in 80-bit is different than the value rounded down to
1872 # 64-bit or 32-bit. There are possible compiler options to
1873 # make this behavior consistent (e.g. -ffloat-store would keep
1874 # all floating-values in the memory, thus force them to be
1875 # rounded to its original precision) but they have significant
1876 # runtime performance penalty.
1877 #
1878 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1879 # which keep floating-point values in SSE registers in its
1880 # native precision (32-bit for single precision, and 64-bit
1881 # for double precision values). This means the floating-point
1882 # value used during computation does not change depending on
1883 # how the compiler optimized the code, since the value is
1884 # always kept in its specified precision.
1885 'conditions': [
1886 ['branding=="Chromium" and disable_sse2==0', {
1887 'cflags': [
1888 '-march=pentium4',
1889 '-msse2',
1890 '-mfpmath=sse',
1891 ],
1892 }],
1893 # ChromeOS targets Pinetrail, which is sse3, but most of the
1894 # benefit comes from sse2 so this setting allows ChromeOS
1895 # to build on other CPUs. In the future -march=atom would
1896 # help but requires a newer compiler.
1897 ['chromeos==1 and disable_sse2==0', {
1898 'cflags': [
1899 '-msse2',
1900 ],
1901 }],
1902 # Install packages have started cropping up with
1903 # different headers between the 32-bit and 64-bit
1904 # versions, so we have to shadow those differences off
1905 # and make sure a 32-bit-on-64-bit build picks up the
1906 # right files.
1907 ['host_arch!="ia32"', {
1908 'include_dirs+': [
1909 '/usr/include32',
1910 ],
1911 }],
1912 ],
1913 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1914 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061915 'cflags': [
[email protected]04b482602011-09-14 02:36:211916 '-m32',
1917 '-mmmx',
1918 ],
1919 'ldflags': [
1920 '-m32',
[email protected]ffde7932009-05-29 00:39:061921 ],
1922 }],
[email protected]606116d22009-05-06 22:38:231923 ],
1924 }],
[email protected]3dda8a962009-08-10 18:58:071925 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291926 'target_conditions': [
1927 ['_toolset=="target"', {
1928 'cflags_cc': [
1929 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1930 # has changed whenever it encounters a varargs function. This
1931 # silences those warnings, as they are not helpful and
1932 # clutter legitimate warnings.
1933 '-Wno-abi',
1934 ],
1935 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011936 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291937 'cflags': [
1938 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291939 ]
1940 }],
1941 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251942 'cflags': [
1943 '-march=armv7-a',
1944 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251945 '-mfloat-abi=softfp',
1946 ],
[email protected]eafc0b452010-02-26 21:53:431947 'conditions': [
1948 ['arm_neon==1', {
1949 'cflags': [ '-mfpu=neon', ],
1950 }, {
[email protected]53e0f642010-03-05 01:41:561951 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431952 }]
1953 ],
[email protected]dc9711f2009-11-13 19:30:251954 }],
[email protected]da1c8d692011-09-20 20:35:011955 ['OS=="android"', {
1956 # The following flags are derived from what Android uses
1957 # by default when building for arm.
1958 'cflags': [ '-Wno-psabi', ],
1959 'conditions': [
1960 ['arm_thumb == 1', {
1961 # Android toolchain doesn't support -mimplicit-it=thumb
1962 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1963 'cflags': [ '-mthumb-interwork', ],
1964 }],
1965 ['armv7==0', {
1966 # Flags suitable for Android emulator
1967 'cflags': [
1968 '-march=armv5te',
1969 '-mtune=xscale',
1970 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:361971 ],
1972 'defines': [
1973 '__ARM_ARCH_5__',
1974 '__ARM_ARCH_5T__',
1975 '__ARM_ARCH_5E__',
1976 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:011977 ],
1978 }],
1979 ],
1980 }],
[email protected]3dda8a962009-08-10 18:58:071981 ],
1982 }],
1983 ],
1984 }],
[email protected]2fb843b2010-08-12 02:11:081985 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581986 'cflags': [
1987 '-fPIC',
1988 ],
[email protected]d3f692b32011-12-14 19:04:351989 'ldflags': [
1990 '-fPIC',
1991 ],
[email protected]c76723a2010-01-25 23:10:581992 }],
[email protected]ee28c9f2009-09-04 01:53:011993 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571994 'target_conditions': [
1995 ['_toolset=="target"', {
1996 'cflags': [
1997 '--sysroot=<(sysroot)',
1998 ],
1999 'ldflags': [
2000 '--sysroot=<(sysroot)',
2001 ],
2002 }]]
[email protected]ee28c9f2009-09-04 01:53:012003 }],
[email protected]58680ce2010-09-18 00:09:152004 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122005 'cflags': [
2006 '-Wheader-hygiene',
2007 # Clang spots more unused functions.
2008 '-Wno-unused-function',
2009 # Don't die on dtoa code that uses a char as an array index.
2010 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332011 # Especially needed for gtest macros using enum values from Mac
2012 # system headers.
2013 # TODO(pkasting): In C++11 this is legal, so this should be
2014 # removed when we change to that. (This is also why we don't
2015 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122016 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302017 # WebKit uses nullptr in a legit way, other that that this warning
2018 # doesn't fire.
2019 '-Wno-c++11-compat',
2020 # This (rightyfully) complains about 'override', which we use
2021 # heavily.
2022 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102023
2024 # Warns on switches on enums that cover all enum values but
2025 # also contain a default: branch. Chrome is full of that.
2026 '-Wno-covered-switch-default',
2027
2028 # TODO(thakis): Reenable once this no longer complains about
2029 # Invalid() in gmocks's gmock-internal-utils.h
2030 # http://crbug.com/111806
2031 '-Wno-null-dereference',
[email protected]18ca15a2011-08-10 03:07:122032 ],
2033 'cflags!': [
2034 # Clang doesn't seem to know know this flag.
2035 '-mfpmath=sse',
2036 ],
[email protected]58680ce2010-09-18 00:09:152037 }],
[email protected]5d451ad2011-02-11 16:43:462038 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262039 'cflags': [
2040 '<(clang_chrome_plugins_flags)',
2041 ],
[email protected]5d451ad2011-02-11 16:43:462042 }],
[email protected]4a9ac22e2011-12-02 03:41:532043 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262044 'cflags': [
2045 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532046 ],
2047 }],
2048 ['clang==1 and clang_add_plugin!=""', {
2049 'cflags': [
[email protected]d23720682011-08-11 00:16:262050 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2051 ],
[email protected]5e781232011-01-28 02:57:592052 }],
[email protected]2616d45d2012-01-19 03:15:482053 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2054 'cflags': [
2055 # See http://crbug.com/110262
2056 '-fcolor-diagnostics',
2057 ],
2058 }],
[email protected]92799b632011-08-15 14:33:062059 ['asan==1', {
[email protected]92799b632011-08-15 14:33:062060 'cflags': [
[email protected]6a4cad02011-11-25 07:26:562061 '-faddress-sanitizer',
[email protected]0ac773032011-12-21 17:37:082062 '-fno-omit-frame-pointer',
[email protected]74a26d72011-09-29 17:29:032063 '-w',
[email protected]3cfa96a62012-02-28 07:27:582064 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]92799b632011-08-15 14:33:062065 ],
2066 'ldflags': [
[email protected]6a4cad02011-11-25 07:26:562067 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:062068 ],
[email protected]921c7b52011-11-25 10:34:352069 'defines': [
2070 'ADDRESS_SANITIZER',
2071 ],
[email protected]92799b632011-08-15 14:33:062072 }],
[email protected]cbd5fd52009-08-26 00:14:272073 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172074 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272075 'defines': ['USE_LINUX_BREAKPAD'],
2076 }],
[email protected]d8b60602010-03-26 09:41:222077 ['linux_use_heapchecker==1', {
2078 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402079 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222080 }],
[email protected]61a9b2d82010-02-26 00:31:082081 ['linux_use_tcmalloc==0', {
2082 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242083 }],
[email protected]64e2d4a42010-08-27 10:13:212084 ['linux_keep_shadow_stacks==1', {
2085 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a74202012-02-23 19:10:512086 'cflags': [
2087 '-finstrument-functions',
2088 # Allow mmx intrinsics to inline, so that the compiler can expand
2089 # the intrinsics.
2090 '-finstrument-functions-exclude-file-list=mmintrin.h',
2091 ],
[email protected]64e2d4a42010-08-27 10:13:212092 }],
[email protected]8d726a42012-02-09 03:49:002093 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172094 'ldflags': [
2095 # Experimentation found that using four linking threads
2096 # saved ~20% of link time.
2097 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2098 '-Wl,--threads',
2099 '-Wl,--thread-count=4',
2100 ],
[email protected]8d726a42012-02-09 03:49:002101 'conditions': [
2102 ['release_valgrind_build==0', {
2103 'target_conditions': [
2104 ['_toolset=="target"', {
2105 'ldflags': [
2106 # There seems to be a conflict of --icf and -pie
2107 # in gold which can generate crashy binaries. As
2108 # a security measure, -pie takes precendence for
2109 # now.
2110 #'-Wl,--icf=safe',
2111 '-Wl,--icf=none',
2112 ],
2113 }],
2114 ],
2115 }],
2116 ],
2117 }],
[email protected]b07806c12012-02-03 22:44:592118 ['linux_use_gold_binary==1', {
2119 'variables': {
[email protected]516312d2012-02-28 05:17:262120 'conditions': [
2121 ['inside_chromium_build==1', {
2122 # We pass the path to gold to the compiler. gyp leaves
2123 # unspecified what the cwd is when running the compiler,
2124 # so the normal gyp path-munging fails us. This hack
2125 # gets the right path.
2126 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2127 }, {
2128 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2129 }]
2130 ]
[email protected]b07806c12012-02-03 22:44:592131 },
2132 'ldflags': [
2133 # Put our gold binary in the search path for the linker.
2134 '-B<(gold_path)',
2135 ],
2136 }],
[email protected]606116d22009-05-06 22:38:232137 ],
[email protected]9d384032009-03-20 23:13:262138 },
2139 }],
[email protected]c51e8d52009-12-11 20:04:062140 # FreeBSD-specific options; note that most FreeBSD options are set above,
2141 # with Linux.
2142 ['OS=="freebsd"', {
2143 'target_defaults': {
2144 'ldflags': [
2145 '-Wl,--no-keep-memory',
2146 ],
2147 },
2148 }],
[email protected]da1c8d692011-09-20 20:35:012149 # Android-specific options; note that most are set above with Linux.
2150 ['OS=="android"', {
2151 'variables': {
2152 'android_target_arch%': 'arm', # target_arch in android terms.
2153 'conditions': [
2154 # Android uses x86 instead of ia32 for their target_arch designation.
2155 ['target_arch=="ia32"', {
2156 'android_target_arch%': 'x86',
2157 }],
2158 # Use shared stlport library when system one used.
2159 # Figure this out early since it needs symbols from libgcc.a, so it
2160 # has to be before that in the set of libraries.
2161 ['use_system_stlport==1', {
2162 'android_stlport_library': 'stlport',
2163 }, {
2164 'android_stlport_library': 'stlport_static',
2165 }],
2166 ],
2167
2168 # Placing this variable here prevents from forking libvpx, used
2169 # by remoting. Remoting is off, so it needn't built,
2170 # so forking it's deps seems like overkill.
2171 # But this variable need defined to properly run gyp.
2172 # A proper solution is to have an OS==android conditional
2173 # in third_party/libvpx/libvpx.gyp to define it.
2174 'libvpx_path': 'lib/linux/arm',
2175 },
2176 'target_defaults': {
2177 # Build a Release build by default to match Android build behavior.
2178 # This is typical with Android because Debug builds tend to be much
2179 # larger and run very slowly on constrained devices. It is still
2180 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2181 # 'make' command line.
2182 'default_configuration': 'Release',
2183
2184 'variables': {
2185 'release_extra_cflags%': '',
2186 },
2187
2188 'target_conditions': [
2189 # Settings for building device targets using Android's toolchain.
2190 # These are based on the setup.mk file from the Android NDK.
2191 #
2192 # The NDK Android executable link step looks as follows:
2193 # $LDFLAGS
2194 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2195 # $(PRIVATE_OBJECTS) <-- The .o that we built
2196 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2197 # $(TARGET_LIBGCC) <-- libgcc.a
2198 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2199 # $(PRIVATE_LDLIBS) <-- System .so
2200 # $(TARGET_CRTEND_O) <-- crtend.o
2201 #
2202 # For now the above are approximated for executables by adding
2203 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2204 # of 'libraries'.
2205 #
2206 # The NDK Android shared library link step looks as follows:
2207 # $LDFLAGS
2208 # $(PRIVATE_OBJECTS) <-- The .o that we built
2209 # -l,--whole-archive
2210 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2211 # -l,--no-whole-archive
2212 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2213 # $(TARGET_LIBGCC) <-- libgcc.a
2214 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2215 # $(PRIVATE_LDLIBS) <-- System .so
2216 #
2217 # For now, assume not need any whole static libs.
2218 #
2219 # For both executables and shared libraries, add the proper
2220 # libgcc.a to the start of libraries which puts it in the
2221 # proper spot after .o and .a files get linked in.
2222 #
2223 # TODO: The proper thing to do longer-tem would be proper gyp
2224 # support for a custom link command line.
2225 ['_toolset=="target"', {
2226 'cflags!': [
2227 '-pthread', # Not supported by Android toolchain.
2228 ],
2229 'cflags': [
2230 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2231 '-ffunction-sections',
2232 '-funwind-tables',
2233 '-g',
2234 '-fstack-protector',
2235 '-fno-short-enums',
2236 '-finline-limit=64',
2237 '-Wa,--noexecstack',
2238 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2239 '<@(release_extra_cflags)',
2240 # Note: This include is in cflags to ensure that it comes after
2241 # all of the includes.
2242 '-I<(android_ndk_include)',
2243 ],
2244 'defines': [
2245 'ANDROID',
2246 '__GNU_SOURCE=1', # Necessary for clone()
2247 'USE_STLPORT=1',
2248 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2249 'HAVE_OFF64_T',
2250 'HAVE_SYS_UIO_H',
2251 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2252 ],
2253 'ldflags!': [
2254 '-pthread', # Not supported by Android toolchain.
2255 ],
2256 'ldflags': [
2257 '-nostdlib',
2258 '-Wl,--no-undefined',
2259 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2260 # Don't export symbols from statically linked libraries.
2261 '-Wl,--exclude-libs=ALL',
2262 ],
[email protected]a0e48b02011-11-22 07:53:012263 'libraries': [
2264 '-l<(android_stlport_library)',
2265 # Manually link the libgcc.a that the cross compiler uses.
2266 '<!($CROSS_CC -print-libgcc-file-name)',
2267 '-lc',
2268 '-ldl',
2269 '-lstdc++',
2270 '-lm',
[email protected]da1c8d692011-09-20 20:35:012271 ],
2272 'conditions': [
2273 ['android_build_type==0', {
2274 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522275 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012276 ],
2277 }],
2278 # NOTE: The stlport header include paths below are specified in
2279 # cflags rather than include_dirs because they need to come
2280 # after include_dirs. Think of them like system headers, but
2281 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2282 # toolchain (circa Gingerbread) will exhibit strange errors.
2283 # The include ordering here is important; change with caution.
2284 ['use_system_stlport==0', {
2285 'cflags': [
2286 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2287 ],
2288 'conditions': [
2289 ['target_arch=="arm" and armv7==1', {
2290 'ldflags': [
2291 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2292 ],
2293 }],
2294 ['target_arch=="arm" and armv7==0', {
2295 'ldflags': [
2296 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2297 ],
2298 }],
2299 ['target_arch=="ia32"', {
2300 'ldflags': [
2301 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2302 ],
2303 }],
2304 ],
2305 }],
2306 ['target_arch=="ia32"', {
2307 # The x86 toolchain currently has problems with stack-protector.
2308 'cflags!': [
2309 '-fstack-protector',
2310 ],
2311 'cflags': [
2312 '-fno-stack-protector',
2313 ],
2314 }],
2315 ],
2316 'target_conditions': [
2317 ['_type=="executable"', {
2318 'ldflags': [
2319 '-Bdynamic',
2320 '-Wl,-dynamic-linker,/system/bin/linker',
2321 '-Wl,--gc-sections',
2322 '-Wl,-z,nocopyreloc',
2323 # crtbegin_dynamic.o should be the last item in ldflags.
2324 '<(android_ndk_lib)/crtbegin_dynamic.o',
2325 ],
2326 'libraries': [
2327 # crtend_android.o needs to be the last item in libraries.
2328 # Do not add any libraries after this!
2329 '<(android_ndk_lib)/crtend_android.o',
2330 ],
2331 }],
2332 ['_type=="shared_library"', {
2333 'ldflags': [
2334 '-Wl,-shared,-Bsymbolic',
2335 ],
2336 }],
2337 ],
2338 }],
2339 # Settings for building host targets using the system toolchain.
2340 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122341 'cflags!': [
2342 # Due to issues in Clang build system, using ASan on 32-bit
2343 # binaries on x86_64 host is problematic.
2344 # TODO(eugenis): re-enable.
2345 '-faddress-sanitizer',
2346 ],
[email protected]da1c8d692011-09-20 20:35:012347 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122348 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012349 '-Wl,-z,noexecstack',
2350 '-Wl,--gc-sections',
2351 '-Wl,-O1',
2352 '-Wl,--as-needed',
2353 ],
[email protected]965b6b22011-09-29 16:07:282354 'sources/': [
2355 ['exclude', '_android(_unittest)?\\.cc$'],
2356 ['exclude', '(^|/)android/']
2357 ],
[email protected]da1c8d692011-09-20 20:35:012358 }],
2359 ],
2360 },
2361 }],
[email protected]93f21e42010-04-01 00:35:152362 ['OS=="solaris"', {
2363 'cflags!': ['-fvisibility=hidden'],
2364 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2365 }],
[email protected]2f80c312009-02-25 21:26:552366 ['OS=="mac"', {
2367 'target_defaults': {
[email protected]24700642009-06-01 16:01:202368 'variables': {
[email protected]162407f2011-09-08 15:33:172369 # These should end with %, but there seems to be a bug with % in
2370 # variables that are intended to be set to different values in
2371 # different targets, like these.
2372 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202373 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382374 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202375 },
[email protected]d92c7c012009-03-19 19:26:422376 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552377 'xcode_settings': {
2378 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042379 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2380 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2381 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2382 # (Equivalent to -fPIC)
2383 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2384 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2385 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252386 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2387 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042388 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2389 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2390 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2391 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552392 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042393 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252394 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2395 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112396 # Keep pch files below xcodebuild/.
2397 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552398 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192399 'OTHER_CFLAGS': [
2400 '-fno-strict-aliasing', # See http://crbug.com/32204
2401 ],
[email protected]080e86f2010-06-21 15:19:042402 'WARNING_CFLAGS': [
2403 '-Wall',
2404 '-Wendif-labels',
2405 '-Wextra',
2406 # Don't warn about unused function parameters.
2407 '-Wno-unused-parameter',
2408 # Don't warn about the "struct foo f = {0};" initialization
2409 # pattern.
2410 '-Wno-missing-field-initializers',
2411 ],
[email protected]b3fb8092009-03-12 19:09:242412 'conditions': [
2413 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592414 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2415 ],
[email protected]66733172010-09-22 00:09:282416 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302417 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2418 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382419
[email protected]6c648f12011-12-24 07:50:432420 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2421 # when buliding with clang. This warning is triggered when the
2422 # override keyword is used via the OVERRIDE macro from
2423 # base/compiler_specific.h.
2424 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382425
[email protected]34f40892011-09-06 21:53:302426 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282427 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072428 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282429 # Don't die on dtoa code that uses a char as an array index.
2430 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2431 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452432 # Clang spots more unused functions.
2433 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332434 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052435 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302436 # WebKit uses nullptr in a legit way, other that that this
2437 # warning doesn't fire.
2438 '-Wno-c++0x-compat',
2439 # This (rightyfully) complains about 'override', which we use
2440 # heavily.
2441 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102442
2443 # Warns on switches on enums that cover all enum values but
2444 # also contain a default: branch. Chrome is full of that.
2445 '-Wno-covered-switch-default',
2446
2447 # TODO(thakis): Reenable once this no longer complains about
2448 # Invalid() in gmock's gmock-internal-utils.h
2449 # http://crbug.com/111806
2450 '-Wno-null-dereference',
[email protected]66733172010-09-22 00:09:282451 ],
2452 }],
[email protected]5d451ad2011-02-11 16:43:462453 ['clang==1 and clang_use_chrome_plugins==1', {
2454 'OTHER_CFLAGS': [
2455 '<(clang_chrome_plugins_flags)',
2456 ],
2457 }],
[email protected]4a9ac22e2011-12-02 03:41:532458 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592459 'OTHER_CFLAGS': [
2460 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532461 ],
2462 }],
2463 ['clang==1 and clang_add_plugin!=""', {
2464 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592465 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2466 ],
2467 }],
[email protected]2616d45d2012-01-19 03:15:482468 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2469 'OTHER_CFLAGS': [
2470 # See http://crbug.com/110262
2471 '-fcolor-diagnostics',
2472 ],
2473 }],
[email protected]b3fb8092009-03-12 19:09:242474 ],
[email protected]2f80c312009-02-25 21:26:552475 },
[email protected]34f40892011-09-06 21:53:302476 'conditions': [
2477 ['clang==1', {
2478 'variables': {
2479 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2480 },
2481 }],
[email protected]921c7b52011-11-25 10:34:352482 ['asan==1', {
2483 'xcode_settings': {
2484 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352485 '-faddress-sanitizer',
2486 '-w',
[email protected]3cfa96a62012-02-28 07:27:582487 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]921c7b52011-11-25 10:34:352488 ],
2489 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352490 '-faddress-sanitizer',
2491 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372492 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352493 # on the prior OS X versions. Because Chromium is currently
2494 # targeting 10.5.0, we need to explicitly mark these
2495 # symbols as dynamic_lookup.
2496 '-Wl,-U,_malloc_default_purgeable_zone',
2497 '-Wl,-U,_malloc_zone_memalign',
2498 '-Wl,-U,_dispatch_sync_f',
2499 '-Wl,-U,_dispatch_async_f',
2500 '-Wl,-U,_dispatch_barrier_async_f',
2501 '-Wl,-U,_dispatch_group_async_f',
2502 '-Wl,-U,_dispatch_after_f',
2503 ],
2504 },
2505 'defines': [
2506 'ADDRESS_SANITIZER',
2507 ],
2508 }],
[email protected]34f40892011-09-06 21:53:302509 ],
[email protected]2f80c312009-02-25 21:26:552510 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552511 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462512 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2513 }],
2514 ['_mac_bundle', {
2515 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082516 }],
[email protected]6303fed2011-08-11 01:12:102517 ['_type=="executable"', {
2518 'postbuilds': [
2519 {
2520 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362521 # code execution when running on Mac OS X 10.7 ("Lion"), and
2522 # ensures that the position-independent executable (PIE) bit
2523 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102524 'variables': {
[email protected]8c40f322011-08-24 03:33:362525 # Define change_mach_o_flags in a variable ending in _path
2526 # so that GYP understands it's a path and performs proper
2527 # relativization during dict merging.
2528 'change_mach_o_flags_path':
2529 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172530 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132531 ],
2532 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172533 ['mac_pie==0 or release_valgrind_build==1', {
2534 # Don't enable PIE if it's unwanted. It's unwanted if
2535 # the target specifies mac_pie=0 or if building for
2536 # Valgrind, because Valgrind doesn't understand slide.
2537 # See the similar mac_pie/release_valgrind_build check
2538 # below.
[email protected]081c0342011-08-24 14:59:132539 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132540 '--no-pie',
2541 ],
2542 }],
2543 ],
[email protected]6303fed2011-08-11 01:12:102544 },
[email protected]8c40f322011-08-24 03:33:362545 'postbuild_name': 'Change Mach-O Flags',
2546 'action': [
2547 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132548 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362549 ],
[email protected]6303fed2011-08-11 01:12:102550 },
2551 ],
[email protected]5a5d97aa2011-09-02 15:34:002552 'conditions': [
2553 ['asan==1', {
2554 'variables': {
2555 'asan_saves_file': 'asan.saves',
2556 },
2557 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562558 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002559 },
2560 }],
2561 ],
[email protected]162407f2011-09-08 15:33:172562 'target_conditions': [
2563 ['mac_pie==1 and release_valgrind_build==0', {
2564 # Turn on position-independence (ASLR) for executables. When
2565 # PIE is on for the Chrome executables, the framework will
2566 # also be subject to ASLR.
2567 # Don't do this when building for Valgrind, because Valgrind
2568 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2569 # understand slide, and get rid of the Valgrind check.
2570 'xcode_settings': {
2571 'OTHER_LDFLAGS': [
2572 '-Wl,-pie', # Position-independent executable (MH_PIE)
2573 ],
2574 },
2575 }],
2576 ],
[email protected]6a0242bc2011-07-01 00:34:462577 }],
[email protected]9a5e72862010-09-02 16:16:582578 ['(_type=="executable" or _type=="shared_library" or \
2579 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202580 'target_conditions': [
2581 ['mac_real_dsym == 1', {
2582 # To get a real .dSYM bundle produced by dsymutil, set the
2583 # debug information format to dwarf-with-dsym. Since
2584 # strip_from_xcode will not be used, set Xcode to do the
2585 # stripping as well.
2586 'configurations': {
[email protected]5153767c2009-12-22 01:52:502587 'Release_Base': {
[email protected]24700642009-06-01 16:01:202588 'xcode_settings': {
2589 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2590 'DEPLOYMENT_POSTPROCESSING': 'YES',
2591 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072592 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252593 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072594 # The Xcode default is to strip debugging symbols
2595 # only (-S). Local symbols should be stripped as
2596 # well, which will be handled by -x. Xcode will
2597 # continue to insert -S when stripping even when
2598 # additional flags are added with STRIPFLAGS.
2599 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252600 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072601 ], # target_conditions
2602 }, # xcode_settings
2603 }, # configuration "Release"
2604 }, # configurations
[email protected]24700642009-06-01 16:01:202605 }, { # mac_real_dsym != 1
2606 # To get a fast fake .dSYM bundle, use a post-build step to
2607 # produce the .dSYM and strip the executable. strip_from_xcode
2608 # only operates in the Release configuration.
2609 'postbuilds': [
2610 {
2611 'variables': {
2612 # Define strip_from_xcode in a variable ending in _path
2613 # so that gyp understands it's a path and performs proper
2614 # relativization during dict merging.
2615 'strip_from_xcode_path': 'mac/strip_from_xcode',
2616 },
2617 'postbuild_name': 'Strip If Needed',
2618 'action': ['<(strip_from_xcode_path)'],
2619 },
[email protected]e14a9f92009-08-05 19:26:072620 ], # postbuilds
2621 }], # mac_real_dsym
2622 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582623 }], # (_type=="executable" or _type=="shared_library" or
2624 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072625 ], # target_conditions
2626 }, # target_defaults
2627 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552628 ['OS=="win"', {
2629 'target_defaults': {
2630 'defines': [
[email protected]a89e0942011-09-26 16:06:472631 '_WIN32_WINNT=0x0601',
2632 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552633 'WIN32',
2634 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552635 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282636 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552637 '_CRT_RAND_S',
2638 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2639 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272640 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452641 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552642 ],
[email protected]8974e042010-06-21 18:06:522643 'conditions': [
[email protected]2212d272011-12-20 21:37:372644 ['buildtype=="Official"', {
2645 # In official builds, targets can self-select an optimization
2646 # level by defining a variable named 'optimize', and setting it
2647 # to one of
2648 # - "size", optimizes for minimal code size - the default.
2649 # - "speed", optimizes for speed over code size.
2650 # - "max", whole program optimization and link-time code
2651 # generation. This is very expensive and should be used
2652 # sparingly.
2653 'variables': {
2654 'optimize%': 'size',
2655 },
2656 'target_conditions': [
2657 ['optimize=="size"', {
2658 'msvs_settings': {
2659 'VCCLCompilerTool': {
2660 # 1, optimizeMinSpace, Minimize Size (/O1)
2661 'Optimization': '1',
2662 # 2, favorSize - Favor small code (/Os)
2663 'FavorSizeOrSpeed': '2',
2664 },
2665 },
2666 },
2667 ],
2668 ['optimize=="speed"', {
2669 'msvs_settings': {
2670 'VCCLCompilerTool': {
2671 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2672 'Optimization': '2',
2673 # 1, favorSpeed - Favor fast code (/Ot)
2674 'FavorSizeOrSpeed': '1',
2675 },
2676 },
2677 },
2678 ],
2679 ['optimize=="max"', {
2680 'msvs_settings': {
2681 'VCCLCompilerTool': {
2682 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2683 'Optimization': '2',
2684 # 1, favorSpeed - Favor fast code (/Ot)
2685 'FavorSizeOrSpeed': '1',
2686 # This implies link time code generation.
2687 'WholeProgramOptimization': 'true',
2688 },
2689 },
2690 },
2691 ],
2692 ],
2693 },
2694 ],
[email protected]8974e042010-06-21 18:06:522695 ['component=="static_library"', {
2696 'defines': [
2697 '_HAS_EXCEPTIONS=0',
2698 ],
2699 }],
[email protected]3e2648a2011-03-21 20:58:502700 ['secure_atl', {
2701 'defines': [
2702 '_SECURE_ATL',
2703 ],
2704 }],
[email protected]8974e042010-06-21 18:06:522705 ],
[email protected]5b5ca7cb2009-07-20 23:00:202706 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372707 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542708 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552709 '$(VSInstallDir)/VC/atlmfc/include',
2710 ],
[email protected]a8d99cef2009-08-26 20:47:492711 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112712 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2713 # TODO(maruel): These warnings are level 4. They will be slowly
2714 # removed as code is fixed.
2715 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2716 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2717 4702, 4706,
2718 ],
[email protected]2f80c312009-02-25 21:26:552719 'msvs_settings': {
2720 'VCCLCompilerTool': {
2721 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552722 'BufferSecurityCheck': 'true',
2723 'EnableFunctionLevelLinking': 'true',
2724 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112725 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552726 'WarnAsError': 'true',
2727 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582728 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502729 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162730 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552731 }],
[email protected]3e2648a2011-03-21 20:58:502732 ['MSVS_VERSION=="2005e"', {
2733 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2734 }],
[email protected]8974e042010-06-21 18:06:522735 ['component=="shared_library"', {
2736 'ExceptionHandling': '1', # /EHsc
2737 }, {
2738 'ExceptionHandling': '0',
2739 }],
[email protected]3fef6e62009-07-31 19:58:582740 ],
[email protected]2f80c312009-02-25 21:26:552741 },
2742 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162743 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372744 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372745 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542746 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372747 ],
[email protected]2f80c312009-02-25 21:26:552748 },
2749 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552750 'AdditionalDependencies': [
2751 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502752 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552753 'version.lib',
2754 'msimg32.lib',
2755 'ws2_32.lib',
2756 'usp10.lib',
2757 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082758 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482759 'winmm.lib',
2760 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552761 ],
[email protected]4de39f82011-03-28 12:01:292762 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502763 ['msvs_express', {
2764 # Explicitly required when using the ATL with express
2765 'AdditionalDependencies': [
2766 'atlthunk.lib',
2767 ],
2768 }],
2769 ['MSVS_VERSION=="2005e"', {
2770 # Non-express versions link automatically to these
2771 'AdditionalDependencies': [
2772 'advapi32.lib',
2773 'comdlg32.lib',
2774 'ole32.lib',
2775 'shell32.lib',
2776 'user32.lib',
2777 'winspool.lib',
2778 ],
2779 }],
2780 ],
[email protected]a78da50e2010-06-09 21:31:372781 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372782 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542783 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372784 ],
[email protected]2f80c312009-02-25 21:26:552785 'GenerateDebugInformation': 'true',
2786 'MapFileName': '$(OutDir)\\$(TargetName).map',
2787 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552788 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482789 # SubSystem values:
2790 # 0 == not set
2791 # 1 == /SUBSYSTEM:CONSOLE
2792 # 2 == /SUBSYSTEM:WINDOWS
2793 # Most of the executables we'll ever create are tests
2794 # and utilities with console output.
2795 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552796 },
2797 'VCMIDLTool': {
2798 'GenerateStublessProxies': 'true',
2799 'TypeLibraryName': '$(InputName).tlb',
2800 'OutputDirectory': '$(IntDir)',
2801 'HeaderFileName': '$(InputName).h',
2802 'DLLDataFileName': 'dlldata.c',
2803 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2804 'ProxyFileName': '$(InputName)_p.c',
2805 },
2806 'VCResourceCompilerTool': {
2807 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382808 'AdditionalIncludeDirectories': [
2809 '<(DEPTH)',
2810 '<(SHARED_INTERMEDIATE_DIR)',
2811 ],
[email protected]2f80c312009-02-25 21:26:552812 },
2813 },
2814 },
2815 }],
[email protected]79e2336c2011-05-12 18:18:342816 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312817 'target_defaults': {
2818 'defines': [
2819 'DISABLE_NACL',
2820 ],
2821 },
2822 }],
[email protected]cfbf9bc2009-12-07 22:07:562823 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192824 'target_defaults': {
2825 'msvs_settings': {
2826 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192827 'DelayLoadDLLs': [
2828 'dbghelp.dll',
2829 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:012830 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:192831 'uxtheme.dll',
2832 ],
2833 },
2834 },
[email protected]ef4fa4072009-12-04 22:46:502835 'configurations': {
[email protected]5153767c2009-12-22 01:52:502836 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502837 'msvs_settings': {
2838 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162839 'AdditionalOptions': [
2840 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:332841 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162842 '/ignore:4199',
2843 '/ignore:4221',
2844 '/nxcompat',
2845 ],
[email protected]ef4fa4072009-12-04 22:46:502846 },
2847 },
2848 },
[email protected]5153767c2009-12-22 01:52:502849 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502850 'msvs_settings': {
2851 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162852 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502853 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:332854 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162855 '/ignore:4199',
2856 '/ignore:4221',
2857 '/nxcompat',
2858 ],
[email protected]ef4fa4072009-12-04 22:46:502859 },
2860 },
2861 },
2862 },
[email protected]48c7af72009-07-03 22:00:192863 },
2864 }],
[email protected]9821d0d2010-04-16 22:40:372865 ['enable_new_npdevice_api==1', {
2866 'target_defaults': {
2867 'defines': [
2868 'ENABLE_NEW_NPDEVICE_API',
2869 ],
2870 },
2871 }],
[email protected]34f40892011-09-06 21:53:302872 ['clang==1', {
2873 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242874 ['CC', '<(make_clang_dir)/bin/clang'],
2875 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072876 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302877 ['CC.host', '$(CC)'],
2878 ['CXX.host', '$(CXX)'],
2879 ['LINK.host', '$(LINK)'],
2880 ],
2881 }],
[email protected]2f80c312009-02-25 21:26:552882 ],
2883 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502884 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2885 # This block adds *project-wide* configuration settings to each project
2886 # file. It's almost always wrong to put things here. Specify your
2887 # custom xcode_settings in target_defaults to add them to targets instead.
2888
2889 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2890 # setting sets the SDK on a project-wide basis. In order to get the
2891 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2892 # here at the project level.
2893 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2894
[email protected]2f80c312009-02-25 21:26:552895 # The Xcode generator will look for an xcode_settings section at the root
2896 # of each dict and use it to apply settings on a file-wide basis. Most
2897 # settings should not be here, they should be in target-specific
2898 # xcode_settings sections, or better yet, should use non-Xcode-specific
2899 # settings in target dicts. SYMROOT is a special case, because many other
2900 # Xcode variables depend on it, including variables such as
2901 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2902 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2903 # files to appear (when present) in the UI as actual files and not red
2904 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2905 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162906 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552907 },
[email protected]ee28c9f2009-09-04 01:53:012908}