blob: 6e435f47e5d696fda6a5154094cae495fea6a51d [file] [log] [blame]
[email protected]ed329be2012-01-03 22:02:161# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]21642ab2009-09-15 23:52:145# IMPORTANT:
6# Please don't directly include this file if you are building via gyp_chromium,
7# since gyp_chromium is automatically forcing its inclusion.
[email protected]2f80c312009-02-25 21:26:558{
[email protected]e72e55b2011-01-06 22:19:309 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
[email protected]2f80c312009-02-25 21:26:5511 'variables': {
[email protected]e14a9f92009-08-05 19:26:0712 # Putting a variables dict inside another variables dict looks kind of
[email protected]e72e55b2011-01-06 22:19:3013 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
[email protected]e14a9f92009-08-05 19:26:0714 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
[email protected]9a8175892012-03-20 02:11:5816 # dict that operate on these variables.
[email protected]e14a9f92009-08-05 19:26:0717 'variables': {
[email protected]e72e55b2011-01-06 22:19:3018 'variables': {
[email protected]bb6aba32011-01-07 19:04:4319 'variables': {
[email protected]8796d922012-08-07 01:23:1120 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
23
24 # Whether or not we are using the Aura windowing framework.
25 'use_aura%': 0,
26
27 # Whether or not we are building the Ash shell.
28 'use_ash%': 0,
29 },
30 # Copy conditionally-set variables out one scope.
31 'chromeos%': '<(chromeos)',
32 'use_aura%': '<(use_aura)',
33 'use_ash%': '<(use_ash)',
[email protected]e72e55b2011-01-06 22:19:3034
[email protected]3fa441d2011-09-18 17:28:5035 # Whether we are using Views Toolkit
36 'toolkit_views%': 0,
37
[email protected]e0b85a52011-10-06 03:30:4238 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
39 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2740
[email protected]da5f1952012-05-22 05:55:1541 'use_ibus%': 0,
[email protected]774e0612011-11-28 18:53:4842
[email protected]7ddea9802012-02-22 23:08:0543 # Disable viewport meta tag by default.
44 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2445
46 # Enable HiDPI support.
47 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4048
[email protected]6155e702012-05-02 17:56:0649 # Enable touch optimized art assets and metrics.
50 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1851
[email protected]e0825562012-05-10 01:50:4752 # Is this change part of the android upstream bringup?
53 # Allows us to *temporarily* disable certain things for
54 # staging. Only set to 1 in a GYP_DEFINES.
55 'android_upstream_bringup%': 0,
[email protected]f1f362b42012-05-15 17:46:5856
57 # Override buildtype to select the desired build flavor.
58 # Dev - everyday build for development/testing
59 # Official - release build (generally implies additional processing)
60 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
61 # conversion is done), some of the things which are now controlled by
62 # 'branding', such as symbol generation, will need to be refactored
63 # based on 'buildtype' (i.e. we don't care about saving symbols for
64 # non-Official # builds).
65 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1166
67 'conditions': [
68 # ChromeOS implies ash.
69 ['chromeos==1', {
70 'use_ash%': 1,
71 'use_aura%': 1,
72 }],
73
74 # For now, Windows builds that |use_aura| should also imply using
75 # ash. This rule should be removed for the future when Windows is
76 # using the aura windows without the ash interface.
77 ['use_aura==1 and OS=="win"', {
78 'use_ash%': 1,
79 }],
80 ['use_ash==1', {
81 'use_aura%': 1,
82 }],
83 ],
[email protected]bb6aba32011-01-07 19:04:4384 },
85 # Copy conditionally-set variables out one scope.
86 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5887 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1688 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4289 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:1590 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:0591 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2492 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:0693 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]e0825562012-05-10 01:50:4794 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]f1f362b42012-05-15 17:46:5895 'buildtype%': '<(buildtype)',
96
[email protected]0115f042012-07-27 20:36:5397 # Sets whether we're building with the Android SDK/NDK (and hence with
98 # Ant, value 0), or as part of the Android system (and hence with the
99 # Android build system, value 1).
100 'android_build_type%': 0,
101
[email protected]e72e55b2011-01-06 22:19:30102 # Compute the architecture that we're building on.
103 'conditions': [
[email protected]1e013672012-06-29 22:12:20104 ['OS=="win" or OS=="mac" or OS=="ios"', {
[email protected]c49ab0c2011-05-18 17:25:37105 'host_arch%': 'ia32',
106 }, {
[email protected]79e2336c2011-05-12 18:18:34107 # This handles the Unix platforms for which there is some support.
108 # Anything else gets passed through, which probably won't work very
109 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:30110 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:34111 '<!(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:30112 }],
[email protected]1353a092012-01-13 03:34:28113
[email protected]ab2017e2012-02-07 01:54:50114 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35115 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43116 'toolkit_views%': 1,
117 }, {
118 'toolkit_views%': 0,
119 }],
[email protected]1efbaaa2012-04-24 02:43:24120
[email protected]8796d922012-08-07 01:23:11121 # Set toolkit_uses_gtk for the Chromium browser on Linux.
122 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
123 'toolkit_uses_gtk%': 1,
124 }, {
125 'toolkit_uses_gtk%': 0,
126 }],
127
[email protected]3aa8a682012-08-11 00:04:29128 # Enable HiDPI on Mac OS and Chrome OS.
129 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24130 'enable_hidpi%': 1,
131 }],
[email protected]219c7312012-05-10 20:32:40132
[email protected]c71fe6402012-08-15 15:22:55133 # Enable touch UI on Metro.
134 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06135 'enable_touch_ui%': 1,
136 }],
[email protected]e72e55b2011-01-06 22:19:30137 ],
138 },
139
140 # Copy conditionally-set variables out one scope.
141 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30142 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43143 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11144 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58145 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16146 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42147 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15148 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:05149 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24150 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06151 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]08d910e22012-05-11 05:42:35152 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]0115f042012-07-27 20:36:53153 'android_build_type%': '<(android_build_type)',
[email protected]023d8242011-11-22 01:25:27154
[email protected]8fb0ef02011-05-20 00:53:50155 # We used to provide a variable for changing how libraries were built.
156 # This variable remains until we can clean up all the users.
157 # This needs to be one nested variables dict in so that dependent
158 # gyp files can make use of it in their outer variables. (Yikes!)
159 # http://code.google.com/p/chromium/issues/detail?id=83308
160 'library%': 'static_library',
161
[email protected]e14a9f92009-08-05 19:26:07162 # Override branding to select the desired branding flavor.
163 'branding%': 'Chromium',
164
[email protected]f1f362b42012-05-15 17:46:58165 'buildtype%': '<(buildtype)',
[email protected]cbd5fd52009-08-26 00:14:27166
[email protected]e72e55b2011-01-06 22:19:30167 # Default architecture we're building for is the architecture we're
168 # building on.
169 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17170
[email protected]e72e55b2011-01-06 22:19:30171 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
172 # are built under a chromium full build (1) or a webkit.org chromium
173 # build (0).
174 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52175
[email protected]e72e55b2011-01-06 22:19:30176 # Set to 1 to enable fast builds. It disables debug info for fastest
177 # compilation.
178 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49179
[email protected]20960e072011-09-20 20:59:01180 # Set to 1 to enable dcheck in release without having to use the flag.
181 'dcheck_always_on%': 0,
182
[email protected]464750f2011-10-24 23:16:18183 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51184 'file_manager_extension%': 0,
185
[email protected]e72e55b2011-01-06 22:19:30186 # Python version.
[email protected]a43c5a02011-05-27 06:54:51187 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17188
[email protected]e72e55b2011-01-06 22:19:30189 # Set ARM-v7 compilation flags
190 'armv7%': 0,
191
192 # Set Neon compilation flags (only meaningful if armv7==1).
193 'arm_neon%': 1,
194
195 # The system root for cross-compiles. Default: none.
196 'sysroot%': '',
197
[email protected]945361a2011-09-30 04:38:43198 # The system libdir used for this ABI.
199 'system_libdir%': 'lib',
200
[email protected]e72e55b2011-01-06 22:19:30201 # On Linux, we build with sse2 for Chromium builds.
202 'disable_sse2%': 0,
203
204 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03205 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30206
[email protected]d9113542012-07-18 17:11:28207 # Use system libjpeg. Note that the system's libjepg will be used even if
208 # use_libjpeg_turbo is set.
209 'use_system_libjpeg%': 0,
210
[email protected]e72e55b2011-01-06 22:19:30211 # Variable 'component' is for cases where we would like to build some
212 # components as dynamic shared libraries but still need variable
213 # 'library' for static libraries.
214 # By default, component is set to whatever library is set to and
215 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53216 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30217
[email protected]bb6aba32011-01-07 19:04:43218 # Set to select the Title Case versions of strings in GRD files.
219 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21220
[email protected]98da0042011-02-02 00:10:27221 # Use translations provided by volunteers at launchpad.net. This
222 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19223 'use_third_party_translations%': 0,
224
[email protected]9a425422011-01-11 00:53:18225 # Remoting compilation is enabled by default. Set to 0 to disable.
226 'remoting%': 1,
227
[email protected]1ec68c42011-06-01 13:56:25228 # Configuration policy is enabled by default. Set to 0 to disable.
229 'configuration_policy%': 1,
230
[email protected]4b58e7d2011-07-11 10:22:56231 # Safe browsing is compiled in by default. Set to 0 to disable.
232 'safe_browsing%': 1,
233
[email protected]9eb100e2011-10-14 05:08:22234 # Speech input is compiled in by default. Set to 0 to disable.
235 'input_speech%': 1,
236
[email protected]7cce3232011-10-28 10:41:57237 # Notifications are compiled in by default. Set to 0 to disable.
238 'notifications%' : 1,
239
[email protected]5d451ad2011-02-11 16:43:46240 # If this is set, the clang plugins used on the buildbot will be used.
241 # Run tools/clang/scripts/update.sh to make sure they are compiled.
242 # This causes 'clang_chrome_plugins_flags' to be set.
243 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08244 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46245
[email protected]f36f3742011-11-21 13:12:14246 # Enable building with ASAN (Clang's -faddress-sanitizer option).
247 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06248 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
249 'asan%': 0,
250
[email protected]c9a829272012-07-04 07:51:12251 # Enable building with TSAN (Clang's -fthread-sanitizer option).
252 # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1
253 # See http://clang.llvm.org/docs/ThreadSanitizer.html
254 'tsan%': 0,
255
[email protected]7ce58b22012-09-26 05:17:25256 # Use a modified version of Clang to intercept allocated types and sizes
257 # for allocated objects. clang_type_profiler=1 implies clang=1.
258 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
259 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
260 'clang_type_profiler%': 0,
261
[email protected]8a6abd12012-05-16 10:04:44262 # Set to true to instrument the code with function call logger.
263 # See src/third_party/cygprofile/cyg-profile.cc for details.
264 'order_profiling%': 0,
265
[email protected]00b0a7f2012-01-25 15:30:46266 # Use the provided profiled order file to link Chrome image with it.
267 # This makes Chrome faster by better using CPU cache when executing code.
268 # This is known as PGO (profile guided optimization).
269 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
270 'order_text_section%' : "",
271
[email protected]1ad5a7b2011-06-24 03:15:13272 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
273 # libraries on linux x86-64 and arm, plus ASLR.
274 'linux_fpic%': 1,
275
[email protected]bd7b6fe2012-03-05 21:02:40276 # Whether one-click signin is enabled or not.
277 'enable_one_click_signin%': 0,
278
[email protected]bbf766d2012-05-18 16:30:21279 # Enable Web Intents support in WebKit.
[email protected]5ffb0a42012-01-27 09:36:11280 'enable_web_intents%': 1,
281
[email protected]6a3cd37e2012-04-17 17:13:34282 # Enable Chrome browser extensions
283 'enable_extensions%': 1,
284
[email protected]658677f2012-06-09 06:04:02285 # Enable browser automation.
286 'enable_automation%': 1,
287
288 # Enable printing support and UI.
289 'enable_printing%': 1,
290
[email protected]5ffb0a42012-01-27 09:36:11291 # Enable Web Intents web content registration via HTML element
292 # and WebUI managing such registrations.
293 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01294
[email protected]dda90ae2011-07-19 22:07:48295 # Webrtc compilation is enabled by default. Set to 0 to disable.
296 'enable_webrtc%': 1,
297
[email protected]67c125d2011-10-11 18:58:22298 # PPAPI by default does not support plugins making calls off the main
299 # thread. Set to 1 to turn on experimental support for out-of-process
300 # plugins to make call of the main thread.
301 'enable_pepper_threading%': 0,
302
[email protected]cdb756ef2012-04-05 18:34:53303 # Enables use of the session service, which is enabled by default.
304 # Support for disabling depends on the platform.
305 'enable_session_service%': 1,
306
[email protected]6b40bb582012-03-15 20:50:38307 # Enables theme support, which is enabled by default. Support for
308 # disabling depends on the platform.
309 'enable_themes%': 1,
310
[email protected]4ffe78a2012-10-04 20:55:15311 # Uses OEM-specific wallpaper resources on Chrome OS.
312 'use_oem_wallpaper%': 0,
313
[email protected]0acdd772012-04-05 22:53:00314 # Enables support for background apps.
315 'enable_background%': 1,
316
[email protected]44879ed2012-04-06 01:11:02317 # Enable the task manager by default.
318 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45319
[email protected]9bfe0ab2012-08-30 13:18:11320 # Enable FTP support by default.
321 'disable_ftp_support%': 0,
322
[email protected]22d6dd72012-05-15 07:29:55323 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
324 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
325 # the input value also defines the required XI2 minor minimum version.
326 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
327 'use_xi2_mt%': 0,
328
[email protected]9061bee82012-01-16 11:45:17329 # Use of precompiled headers on Windows.
330 #
331 # This is on by default in VS 2010, but off by default for VS
332 # 2008 because of complications that it can cause with our
333 # trybots etc.
334 #
335 # This variable may be explicitly set to 1 (enabled) or 0
336 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
337 # This setting will override the default.
338 #
339 # Note that a setting of 1 is probably suitable for most or all
340 # Windows developers using VS 2008, since precompiled headers
341 # provide a build speedup of 20-25%. There are a couple of
342 # small workarounds you may need to use when using VS 2008 (but
343 # not 2010), see
344 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
345 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16346 'chromium_win_pch%': 0,
347
[email protected]3bb37e62012-04-19 03:40:08348 # Set this to true when building with Clang.
349 # See http://code.google.com/p/chromium/wiki/Clang for details.
350 'clang%': 0,
351
[email protected]18e0f39b2012-01-17 16:47:34352 # Enable plug-in installation by default.
353 'enable_plugin_installation%': 1,
354
[email protected]ddcaa412012-03-30 19:57:29355 # Enable protector service by default.
356 'enable_protector_service%': 1,
357
[email protected]62424a52012-03-18 03:09:50358 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42359 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35360 # Chrome UI.
361 # TODO(asvitkine): Enable this on all platforms and delete this flag.
362 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50363 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35364
[email protected]a9318c72012-03-01 01:29:47365 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
366 # with one of those tools.
367 'build_for_tool%': '',
368
[email protected]01971642012-03-07 14:39:56369 # Whether tests targets should be run, archived or just have the
370 # dependencies verified. All the tests targets have the '_run' suffix,
371 # e.g. base_unittests_run runs the target base_unittests. The test target
[email protected]5dcce7f82012-10-04 00:08:07372 # always calls tools/swarm_client/isolate.py. See the script's --help for
373 # more information and the valid --mode values. Meant to be overriden with
[email protected]01971642012-03-07 14:39:56374 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13375 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
376 # be done while the builders are being reconfigured to check out test data
377 # files.
[email protected]0ef3a522012-05-15 14:56:33378 'test_isolation_mode%': 'noop',
379 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise
380 # gyp will remove duplicate flags, causing isolate.py to be confused.
[email protected]2fb94e92012-05-18 18:49:39381 'test_isolation_outdir%': '<(PRODUCT_DIR)/isolate',
[email protected]01971642012-03-07 14:39:56382
[email protected]81d9b72d2012-03-26 22:29:17383 # Force rlz to use chrome's networking stack.
384 'force_rlz_use_chrome_net%': 1,
385
[email protected]740ebed2012-06-27 19:14:06386 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12387 'wix_path%': '<(DEPTH)/third_party/wix',
388
[email protected]bb6aba32011-01-07 19:04:43389 'conditions': [
[email protected]33423fa2011-09-23 18:18:14390 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
391 # the 'conditions' clause. Initial attempts resulted in chromium and
392 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22393 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21394 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22395 }, {
396 'use_skia%': 1,
397 }],
398
[email protected]79e2336c2011-05-12 18:18:34399 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37400 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34401 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37402 }, {
403 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34404 }],
405
[email protected]df9167b2011-11-14 19:15:25406 # A flag for BSD platforms
407 ['OS=="freebsd" or OS=="openbsd"', {
408 'os_bsd%': 1,
409 }, {
410 'os_bsd%': 0,
411 }],
412
[email protected]c329adf82011-10-05 14:34:57413 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42414 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57415 'use_nss%': 1,
416 }, {
417 'use_nss%': 0,
418 }],
[email protected]e0b85a52011-10-06 03:30:42419
[email protected]258dca42011-09-21 00:17:19420 # Flags to use X11 on non-Mac POSIX platforms
[email protected]1e013672012-06-29 22:12:20421 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19422 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34423 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37424 }, {
[email protected]258dca42011-09-21 00:17:19425 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37426 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34427 }],
[email protected]9a8175892012-03-20 02:11:58428
[email protected]efadeacf2011-10-27 19:01:00429 # We always use skia text rendering in Aura on Windows, since GDI
430 # doesn't agree with our BackingStore.
431 # TODO(beng): remove once skia text rendering is on by default.
432 ['use_aura==1 and OS=="win"', {
433 'enable_skia_text%': 1,
434 }],
[email protected]9edeb712011-09-20 21:20:33435
[email protected]63692212010-09-16 00:22:21436 # A flag to enable or disable our compile-time dependency
437 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
438 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49439 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50440 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21441 'use_gnome_keyring%': 0,
442 }, {
443 'use_gnome_keyring%': 1,
444 }],
[email protected]0afe5212010-10-01 18:56:11445
[email protected]8796d922012-08-07 01:23:11446 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20447 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43448 'use_titlecase_in_grd_files%': 1,
449 }],
450
[email protected]5f887612012-03-01 21:34:06451 # Enable file manager extension on Chrome OS.
452 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50453 'file_manager_extension%': 1,
454 }, {
[email protected]3d38d8e2011-04-16 20:48:51455 'file_manager_extension%': 0,
456 }],
[email protected]7de46352011-09-12 15:39:19457
[email protected]f032fe92012-06-12 19:20:01458 ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', {
459 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51460 }],
461
[email protected]da1c8d692011-09-20 20:35:01462 ['OS=="android"', {
[email protected]55e02302012-08-21 00:50:46463 'enable_extensions%': 0,
464 'enable_printing%': 0,
465 'enable_themes%': 0,
[email protected]da1c8d692011-09-20 20:35:01466 'enable_webrtc%': 0,
[email protected]55e02302012-08-21 00:50:46467 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58468 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01469 }],
[email protected]839d5172011-10-13 17:18:11470
[email protected]0d16f292012-07-02 22:10:48471 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24472 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11473 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24474 'enable_automation%': 0,
475 'enable_extensions%': 0,
476 'enable_printing%': 0,
477 'enable_themes%': 0,
478 'enable_webrtc%': 0,
479 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48480 'remoting%': 0,
481 }],
482
[email protected]839d5172011-10-13 17:18:11483 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27484 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01485 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33486 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11487 }, {
[email protected]1ee7c56c2011-10-19 14:51:33488 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11489 }],
[email protected]9061bee82012-01-16 11:45:17490
[email protected]75de7212012-05-12 01:14:46491 # Turn precompiled headers on by default for VS 2010.
[email protected]f1f362b42012-05-15 17:46:58492 ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17493 'chromium_win_pch%': 1
494 }],
[email protected]18e0f39b2012-01-17 16:47:34495
[email protected]3d5173ec2012-03-27 04:08:23496 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34497 'enable_plugin_installation%': 0,
498 }, {
499 'enable_plugin_installation%': 1,
500 }],
[email protected]b07806c12012-02-03 22:44:59501
[email protected]1e013672012-06-29 22:12:20502 ['OS=="android" or OS=="ios"', {
[email protected]ddcaa412012-03-30 19:57:29503 'enable_protector_service%': 0,
504 }, {
505 'enable_protector_service%': 1,
506 }],
507
[email protected]8d726a42012-02-09 03:49:00508 # linux_use_gold_binary: whether to use the binary checked into
509 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40510 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51511 'linux_use_gold_binary%': 1,
512 }, {
513 'linux_use_gold_binary%': 0,
514 }],
515
[email protected]be239492012-02-09 19:00:17516 # linux_use_gold_flags: whether to use build flags that rely on gold.
517 # On by default for x64 Linux. Temporarily off for ChromeOS as
518 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40519 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17520 'linux_use_gold_flags%': 1,
521 }, {
[email protected]8d726a42012-02-09 03:49:00522 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59523 }],
[email protected]2e22e2f2012-03-15 21:53:10524
[email protected]e6026962012-06-14 21:28:32525 ['OS=="android"', {
526 'enable_captive_portal_detection%': 0,
527 }, {
528 'enable_captive_portal_detection%': 1,
529 }],
530
[email protected]3bd47e022012-03-22 04:19:12531 # Enable Skia UI text drawing incrementally on different platforms.
532 # http://crbug.com/105550
533 #
534 # On Aura, this allows per-tile painting to be used in the browser
535 # compositor.
[email protected]9197a9282012-05-30 14:12:32536 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12537 'use_canvas_skia%': 1,
538 }],
[email protected]adb44342012-07-23 13:36:12539
[email protected]0753ea42012-08-30 20:15:44540 ['chromeos==1', {
541 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
542 'use_libjpeg_turbo%': 0,
543 }],
544
[email protected]adb44342012-07-23 13:36:12545 ['OS=="android"', {
546 # When building as part of the Android system, use system libraries
547 # where possible to reduce ROM size.
548 'use_system_libjpeg%': '<(android_build_type)',
549 }],
[email protected]b3f23ba2010-04-26 22:58:17550 ],
[email protected]2b113652012-09-17 17:01:39551
552 # Set this to 1 to use the Google-internal file containing
553 # official API keys for Google Chrome even in a developer build.
554 # Setting this variable explicitly to 1 will cause your build to
555 # fail if the internal file is missing.
556 #
557 # Set this to 0 to not use the internal file, even when it
558 # exists in your checkout.
559 #
560 # Leave set to 2 to have this variable implicitly set to 1 if
561 # you have src/google_apis/internal/google_chrome_api_keys.h in
562 # your checkout, and implicitly set to 0 if not.
563 #
564 # Note that official builds always behave as if this variable
565 # was explicitly set to 1, i.e. they always use official keys,
566 # and will fail to build if the internal file is missing.
567 'use_official_google_api_keys%': 2,
568
569 # Set these to bake the specified API keys and OAuth client
570 # IDs/secrets into your build.
571 #
572 # If you create a build without values baked in, you can instead
573 # set environment variables to provide the keys at runtime (see
574 # src/google_apis/google_api_keys.h for details). Features that
575 # require server-side APIs may fail to work if no keys are
576 # provided.
577 #
578 # Note that if you are building an official build or if
579 # use_official_google_api_keys has been set to 1 (explicitly or
580 # implicitly), these values will be ignored and the official
581 # keys will be used instead.
582 'google_api_key%': '',
583 'google_default_client_id%': '',
584 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07585 },
586
[email protected]e72e55b2011-01-06 22:19:30587 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07588 'branding%': '<(branding)',
589 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27590 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59591 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50592 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44593 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33594 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58595 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16596 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42597 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15598 'use_ibus%': '<(use_ibus)',
[email protected]c329adf82011-10-05 14:34:57599 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25600 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34601 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19602 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34603 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22604 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34605 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21606 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11607 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22608 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44609 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05610 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24611 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06612 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35613 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20614 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21615 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54616 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01617 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36618 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43619 'armv7%': '<(armv7)',
620 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23621 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43622 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52623 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43624 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17625 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18626 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40627 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48628 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16629 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25630 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56631 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22632 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57633 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46634 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06635 'asan%': '<(asan)',
[email protected]c9a829272012-07-04 07:51:12636 'tsan%': '<(tsan)',
[email protected]7ce58b22012-09-26 05:17:25637 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44638 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46639 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34640 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07641 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11642 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34643 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]ddcaa412012-03-30 19:57:29644 'enable_protector_service%': '<(enable_protector_service)',
[email protected]cdb756ef2012-04-05 18:34:53645 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38646 'enable_themes%': '<(enable_themes)',
[email protected]4ffe78a2012-10-04 20:55:15647 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00648 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59649 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00650 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50651 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33652 'test_isolation_mode%': '<(test_isolation_mode)',
653 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10654 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02655 'enable_printing%': '<(enable_printing)',
[email protected]e6026962012-06-14 21:28:32656 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11657 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]81d9b72d2012-03-26 22:29:17658 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)',
[email protected]44879ed2012-04-06 01:11:02659 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06660 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12661 'wix_path%': '<(wix_path)',
[email protected]08d910e22012-05-11 05:42:35662 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]e190d272012-08-30 17:36:44663 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12664 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]0115f042012-07-27 20:36:53665 'android_build_type%': '<(android_build_type)',
[email protected]2b113652012-09-17 17:01:39666 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
667 'google_api_key%': '<(google_api_key)',
668 'google_default_client_id%': '<(google_default_client_id)',
669 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]01971642012-03-07 14:39:56670
[email protected]371e1092011-10-12 20:37:36671 # Use system yasm instead of bundled one.
672 'use_system_yasm%': 0,
673
[email protected]c54e0e92012-09-12 00:52:25674 # Use compositor implementation in cc/ instead of in WebKit.
675 'use_libcc_for_compositor%': 1,
676
[email protected]cd00bd862012-02-29 00:40:36677 # Default to enabled PIE; this is important for ASLR but we may need to be
678 # able to turn it off for various reasons.
679 'linux_disable_pie%': 0,
680
[email protected]caa95c82009-11-23 22:39:32681 # The release channel that this build targets. This is used to restrict
682 # channel-specific build options, like which installer packages to create.
683 # The default is 'all', which does no channel-specific filtering.
684 'channel%': 'all',
685
[email protected]b3fb8092009-03-12 19:09:24686 # Override chromium_mac_pch and set it to 0 to suppress the use of
687 # precompiled headers on the Mac. Prefix header injection may still be
688 # used, but prefix headers will not be precompiled. This is useful when
689 # using distcc to distribute a build to compile slaves that don't
690 # share the same compiler executable as the system driving the compilation,
691 # because precompiled headers rely on pointers into a specific compiler
692 # executable's image. Setting this to 0 is needed to use an experimental
693 # Linux-Mac cross compiler distcc farm.
694 'chromium_mac_pch%': 1,
695
[email protected]27b687ec42012-03-26 22:22:15696 # The default value for mac_strip in target_defaults. This cannot be
697 # set there, per the comment about variable% in a target_defaults.
698 'mac_strip_release%': 1,
699
[email protected]f5ecbba12009-04-03 04:35:18700 # Set to 1 to enable code coverage. In addition to build changes
701 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
702 # project file called "coverage".
703 # Currently ignored on Windows.
704 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49705
[email protected]9619e65d2012-05-23 19:06:52706 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
707 # This is useful for parallel compilation tools which can't support /Zi.
708 # Only used on Windows.
709 'win_z7%' : 0,
710
[email protected]7477ea6f2009-12-22 23:28:15711 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47712 # environment variable, the libcmt shim it uses sometimes gets in
713 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
714 # 'win_use_allocator_shim': 0,
715 # 'win_release_RuntimeLibrary': 2
716 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52717 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11718
[email protected]95ff8082009-11-13 22:21:01719 # Whether usage of OpenMAX is enabled.
720 'enable_openmax%': 0,
721
[email protected]d01120e62010-05-10 17:04:48722 # Whether proprietary audio/video codecs are assumed to be included with
723 # this build (only meaningful if branding!=Chrome).
724 'proprietary_codecs%': 0,
725
[email protected]e5b2eaa2009-04-14 01:39:12726 # TODO(bradnelson): eliminate this when possible.
727 # To allow local gyp files to prevent release.vsprops from being included.
728 # Yes(1) means include release.vsprops.
729 # Once all vsprops settings are migrated into gyp, this can go away.
730 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23731
[email protected]cbd5fd52009-08-26 00:14:27732 # TODO(bradnelson): eliminate this when possible.
733 # To allow local gyp files to override additional linker options for msvs.
734 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19735 'msvs_use_common_linker_extras%': 1,
736
[email protected]1ffb6502009-06-02 07:46:24737 # TODO(sgk): eliminate this if possible.
738 # It would be nicer to support this via a setting in 'target_defaults'
739 # in chrome/app/locales/locales.gypi overriding the setting in the
740 # 'Debug' configuration in the 'target_defaults' dict below,
741 # but that doesn't work as we'd like.
742 'msvs_debug_link_incremental%': '2',
743
[email protected]1f790ef2011-01-11 20:45:36744 # Needed for some of the largest modules.
745 'msvs_debug_link_nonincremental%': '1',
746
[email protected]6f390be2012-08-16 18:57:10747 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06748 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26749 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06750
[email protected]c54b41cb2012-08-24 20:58:24751 # The default settings for third party code for treating
752 # warnings-as-errors. Ideally, this would not be required, however there
753 # is some third party code that takes a long time to fix/roll. So, this
754 # flag allows us to have warnings as errors in general to prevent
755 # regressions in most modules, while working on the bits that are
756 # remaining.
757 'win_third_party_warn_as_error%': 'true',
758
[email protected]573136142009-07-15 22:48:37759 # This is the location of the sandbox binary. Chrome looks for this before
760 # running the zygote process. If found, and SUID, it will be used to
761 # sandbox the zygote process and, thus, all renderer processes.
762 'linux_sandbox_path%': '',
763
[email protected]ad6d2c42009-09-15 20:13:38764 # Set this to true to enable SELinux support.
765 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57766
[email protected]3bb37e62012-04-19 03:40:08767 # Clang stuff.
768 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24769 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15770
[email protected]5e781232011-01-28 02:57:59771 # These two variables can be set in GYP_DEFINES while running
772 # |gclient runhooks| to let clang run a plugin in every compilation.
773 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
774 # Example:
[email protected]93120fe2011-02-03 20:46:42775 # 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:59776
777 'clang_load%': '',
778 'clang_add_plugin%': '',
779
[email protected]da1c8d692011-09-20 20:35:01780 # The default type of gtest.
781 'gtest_target_type%': 'executable',
782
[email protected]7664ab32011-02-01 23:35:25783 # Enable sampling based profiler.
784 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
785 'profiling%': '0',
786
[email protected]93b373502011-08-16 19:06:22787 # Enable strict glibc debug mode.
788 'glibcxx_debug%': 0,
789
[email protected]36532f332010-08-25 00:22:01790 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
791 'linux_breakpad%': 0,
792 # And if we want to dump symbols for Breakpad-enabled builds.
793 'linux_dump_symbols%': 0,
794 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03795 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49796 # Strip the test binaries needed for Linux reliability tests.
797 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03798
[email protected]46ce5b562010-06-16 18:39:53799 # Enable TCMalloc.
800 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24801
[email protected]39ca7de2010-04-16 08:04:03802 # Disable TCMalloc's debugallocation.
803 'linux_use_debugallocation%': 0,
804
[email protected]d8b60602010-03-26 09:41:22805 # Disable TCMalloc's heapchecker.
806 'linux_use_heapchecker%': 0,
807
[email protected]64e2d4a42010-08-27 10:13:21808 # Disable shadow stack keeping used by heapcheck to unwind the stacks
809 # better.
810 'linux_keep_shadow_stacks%': 0,
811
[email protected]556c5d72010-06-10 05:45:01812 # Set to 1 to link against libgnome-keyring instead of using dlopen().
813 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35814 # Set to 1 to link against gsettings APIs instead of using dlopen().
815 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01816
[email protected]77c1b29392009-12-04 06:21:29817 # Set Thumb compilation flags.
818 'arm_thumb%': 0,
819
[email protected]53e0f642010-03-05 01:41:56820 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
821 # arm_neon==0).
822 'arm_fpu%': 'vfpv3',
823
[email protected]5252af72012-05-04 19:26:40824 # Set ARM float abi compilation flag.
825 'arm_float_abi%': 'softfp',
826
[email protected]9821d0d2010-04-16 22:40:37827 # Enable new NPDevice API.
828 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50829
830 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14831 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50832
[email protected]6f51b27e2010-06-22 20:43:53833 # Enable a variable used elsewhere throughout the GYP files to determine
834 # whether to compile in the sources for the GPU plugin / process.
835 'enable_gpu%': 1,
836
[email protected]e72e55b2011-01-06 22:19:30837 # .gyp files or targets should set chromium_code to 1 if they build
838 # Chromium-specific code, as opposed to external code. This variable is
839 # used to control such things as the set of warnings to enable, and
840 # whether warnings are treated as errors.
841 'chromium_code%': 0,
842
[email protected]8d726a42012-02-09 03:49:00843 'release_valgrind_build%': 0,
844
[email protected]b1eb341c2011-11-09 18:46:07845 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
846 'enable_wexit_time_destructors%': 0,
847
[email protected]e72e55b2011-01-06 22:19:30848 # Set to 1 to compile with the built in pdf viewer.
849 'internal_pdf%': 0,
850
[email protected]9e1149d72012-07-24 01:27:17851 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
852 'internal_gles2_conform_tests%': 0,
853
[email protected]e72e55b2011-01-06 22:19:30854 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
855 # so Cocoa is happy (http://crbug.com/20441).
856 'locales': [
857 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
858 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
859 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19860 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30861 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
862 'vi', 'zh-CN', 'zh-TW',
863 ],
864
[email protected]cc0322d2011-07-24 09:29:19865 # Pseudo locales are special locales which are used for testing and
866 # debugging. They don't get copied to the final app. For more info,
867 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
868 'pseudo_locales': [
869 'fake-bidi',
870 ],
871
[email protected]bb6aba32011-01-07 19:04:43872 'grit_defines': [],
873
[email protected]bd3bd442011-03-28 07:58:51874 # If debug_devtools is set to 1, JavaScript files for DevTools are
875 # stored as is and loaded from disk. Otherwise, a concatenated file
876 # is stored in resources.pak. It is still possible to load JS files
877 # from disk by passing --debug-devtools cmdline switch.
878 'debug_devtools%': 0,
879
[email protected]464750f2011-10-24 23:16:18880 # The Java Bridge is not compiled in by default.
881 'java_bridge%': 0,
882
[email protected]1e013672012-06-29 22:12:20883 # Code signing for iOS binaries. The bots need to be able to disable this.
884 'chromium_ios_signing%': 1,
885
[email protected]33e1c372011-12-14 16:32:07886 # This flag is only used when disable_nacl==0 and disables all those
887 # subcomponents which would require the installation of a native_client
888 # untrusted toolchain.
889 'disable_nacl_untrusted%': 0,
890
[email protected]407dfa632011-12-23 11:59:35891 # Disable Dart by default.
892 'enable_dart%': 0,
893
[email protected]ff10b132012-02-29 22:53:30894 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
895 'msbuild_toolset%': '',
896
[email protected]836285f22012-04-03 16:19:26897 # Native Client is enabled by default.
898 'disable_nacl%': 0,
899
[email protected]fa9d4e262012-08-21 04:39:00900 # Whether to build full debug version for Debug configuration on Android.
901 # Compared to full debug version, the default Debug configuration on Android
902 # has no full v8 debug, has size optimization and linker gc section, so that
903 # we can build a debug version with acceptable size and performance.
904 'android_full_debug%': 0,
905
[email protected]65885272012-10-05 23:55:50906 # Sets the default version name and code for Android app, by default we
907 # do a developer build.
908 'android_app_version_name%': 'Developer Build',
909 'android_app_version_code%': 0,
910
[email protected]740ebed2012-06-27 19:14:06911 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:12912 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
913
[email protected]1f8d9402012-07-06 22:47:56914 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
915 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:05916
[email protected]912c55c2009-07-31 23:33:55917 'conditions': [
[email protected]1f8d9402012-07-06 22:47:56918 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
919 'windows_sdk_path%': '<(windows_sdk_default_path)',
920 }, {
921 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
922 }],
923 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
924 'directx_sdk_path%': '<(directx_sdk_default_path)',
925 }, {
926 'directx_sdk_path%': '$(DXSDK_DIR)',
927 }],
[email protected]2b113652012-09-17 17:01:39928 # If use_official_google_api_keys is already set (to 0 or 1), we
929 # do none of the implicit checking. If it is set to 1 and the
930 # internal keys file is missing, the build will fail at compile
931 # time. If it is set to 0 and keys are not provided by other
932 # means, a warning will be printed at compile time.
933 ['use_official_google_api_keys==2', {
934 'use_official_google_api_keys%':
935 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
936 }],
[email protected]1e013672012-06-29 22:12:20937 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:23938 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43939 '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:27940 'conditions': [
[email protected]07c27ab02012-07-17 17:00:20941 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
942 # that it takes effect here.
943 ['clang==0 and asan==0 and tsan==0', {
944 # This will set gcc_version to XY if you are running gcc X.Y.*.
945 # This is used to tweak build flags for gcc 4.5.
946 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
947 }, {
948 'gcc_version%': 0,
949 }],
[email protected]2a77a9d2010-08-26 19:58:10950 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27951 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27952 }],
[email protected]4c9cc6c2009-10-01 18:54:57953 # All Chrome builds have breakpad symbols, but only process the
954 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08955 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57956 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57957 }],
[email protected]cbd5fd52009-08-26 00:14:27958 ],
[email protected]1e013672012-06-29 22:12:20959 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:48960 ['OS=="ios"', {
961 'disable_nacl%': 1,
[email protected]aeaaaf02012-09-10 17:46:15962 'enable_gpu%': 0,
[email protected]abde6732012-08-16 16:10:35963 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:15964 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:13965 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:47966 'use_system_sqlite%': 1,
[email protected]57871bc2012-08-20 16:28:12967
968 # The Mac SDK is set for iOS builds and passed through to Mac
969 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
970 # overridden from the command line the same way it is for a Mac build.
971 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:29972
973 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
974 # what is required, but the value is left blank so when it is set in
975 # the project files it will be the "current" iOS SDK. Forcing 5.0
976 # even though it is "current" causes Xcode to spit out a warning for
977 # every single project file for not using the "current" SDK.
978 'ios_sdk%': '',
979 'ios_sdk_path%': '',
980 'ios_deployment_target%': '4.3',
[email protected]0d16f292012-07-02 22:10:48981 }],
[email protected]da1c8d692011-09-20 20:35:01982 ['OS=="android"', {
983 # Location of Android NDK.
984 'variables': {
985 'variables': {
[email protected]8157ea92c2012-09-21 02:27:51986 'variables': {
987 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
988 },
989 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febd3572012-05-03 09:17:45990 'conditions': [
991 ['target_arch == "ia32"', {
[email protected]de5b7a42012-05-16 06:18:41992 'android_app_abi%': 'x86',
[email protected]8157ea92c2012-09-21 02:27:51993 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86',
[email protected]de5b7a42012-05-16 06:18:41994 }],
[email protected]8157ea92c2012-09-21 02:27:51995 ['target_arch=="arm"', {
996 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm',
997 'conditions': [
998 ['armv7==0', {
999 'android_app_abi%': 'armeabi',
1000 }, {
1001 'android_app_abi%': 'armeabi-v7a',
1002 }],
1003 ],
[email protected]febd3572012-05-03 09:17:451004 }],
1005 ],
[email protected]da1c8d692011-09-20 20:35:011006 },
1007 'android_ndk_root%': '<(android_ndk_root)',
[email protected]de5b7a42012-05-16 06:18:411008 'android_app_abi%': '<(android_app_abi)',
[email protected]8157ea92c2012-09-21 02:27:511009 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:011010 },
1011 'android_ndk_root%': '<(android_ndk_root)',
1012 'android_ndk_sysroot': '<(android_ndk_sysroot)',
1013 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1014 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]de5b7a42012-05-16 06:18:411015 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:011016
[email protected]c0f76312012-08-16 13:52:041017 # Location of the "strip" binary, used by both gyp and scripts.
1018 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1019
[email protected]ef7ed7a2012-05-29 23:19:131020 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1021 # to specify the output directory for Ant in the Android build.
1022 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1023
[email protected]da1c8d692011-09-20 20:35:011024 # Uses Android's crash report system
1025 'linux_breakpad%': 0,
1026
1027 # Always uses openssl.
1028 'use_openssl%': 1,
1029
1030 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021031 'enable_task_manager%': 0,
[email protected]da1c8d692011-09-20 20:35:011032 'safe_browsing%': 0,
1033 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221034 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:561035 'enable_web_intents%': 0,
[email protected]658677f2012-06-09 06:04:021036 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181037 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581038 'build_ffmpegsumo%': 0,
1039 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021040
[email protected]ad17e342012-07-17 20:45:481041 # Disable Native Client.
1042 'disable_nacl%': 1,
1043
[email protected]58242012012-04-12 16:14:311044 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001045 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111046
[email protected]cdb756ef2012-04-05 18:34:531047 # Sessions are store separately in the Java side.
1048 'enable_session_service%': 0,
1049
[email protected]5fd2e842012-03-01 00:29:111050 # Set to 1 once we have a notification system for Android.
1051 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571052 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011053
[email protected]ad17e342012-07-17 20:45:481054 'p2p_apis%' : 0,
1055
[email protected]7b56f1872012-05-23 00:48:501056 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:091057 # OS==android, make all gtest_targets depend on
1058 # testing/android/native_test.gyp:native_test_apk.
[email protected]48de0fc2012-08-02 11:03:581059 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011060
1061 # Uses system APIs for decoding audio and video.
1062 'use_libffmpeg%': '0',
1063
1064 # Always use the chromium skia. The use_system_harfbuzz needs to
1065 # match use_system_skia.
1066 'use_system_skia%': '0',
1067 'use_system_harfbuzz%': '0',
1068
[email protected]f5c7758a2012-07-25 16:17:571069 # Configure crash reporting and build options based on release type.
[email protected]ad17e342012-07-17 20:45:481070 'conditions': [
[email protected]ad17e342012-07-17 20:45:481071 ['buildtype=="Official"', {
[email protected]f5c7758a2012-07-25 16:17:571072 # Only report crash dumps for Official builds.
[email protected]ad17e342012-07-17 20:45:481073 'linux_breakpad%': 1,
1074 }, {
1075 'linux_breakpad%': 0,
1076 }],
1077 ],
1078
[email protected]adb44342012-07-23 13:36:121079 # When building as part of the Android system, use system libraries
1080 # where possible to reduce ROM size.
1081 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]3a820d12012-06-27 12:56:321082 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]03bdcc122012-07-10 09:02:251083 'use_system_expat%': '<(android_build_type)',
[email protected]ad17e342012-07-17 20:45:481084 'use_system_icu%': '<(android_build_type)',
[email protected]f91ba812012-07-11 00:00:511085 'use_system_stlport%': '<(android_build_type)',
[email protected]adb44342012-07-23 13:36:121086
[email protected]da1c8d692011-09-20 20:35:011087 # Copy it out one scope.
1088 'android_build_type%': '<(android_build_type)',
1089 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071090 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291091 'variables': {
1092 # Mac OS X SDK and deployment target support. The SDK identifies
1093 # the version of the system headers that will be used, and
1094 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1095 # macro. "Maximum allowed" refers to the operating system version
1096 # whose APIs are available in the headers. The deployment target
1097 # identifies the minimum system version that the built products are
1098 # expected to function on. It corresponds to the
1099 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1100 # macros are available, #include <AvailabilityMacros.h>. Additional
1101 # documentation on these macros is available at
1102 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1103 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1104 # deployment target to 10.6. Other projects, such as O3D, may
1105 # override these defaults.
1106
1107 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1108 # about that is at least the specified version. In official builds,
1109 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1110 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1111 # path to the SDK; when set to a non-empty string, SDK detection
1112 # based on mac_sdk_min will be bypassed entirely.
1113 'mac_sdk_min%': '10.6',
1114 'mac_sdk_path%': '',
1115
1116 'mac_deployment_target%': '10.6',
1117 },
1118
1119 'mac_sdk_min': '<(mac_sdk_min)',
1120 'mac_sdk_path': '<(mac_sdk_path)',
1121 'mac_deployment_target': '<(mac_deployment_target)',
1122
[email protected]e1ece302011-09-15 03:58:111123 # Enable clang on mac by default!
1124 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291125
[email protected]794fb4782011-12-14 19:10:561126 # Compile in Breakpad support by default so that it can be
1127 # tested, even if it is not enabled by default at runtime.
1128 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071129 'conditions': [
1130 # mac_product_name is set to the name of the .app bundle as it should
1131 # appear on disk. This duplicates data from
1132 # chrome/app/theme/chromium/BRANDING and
1133 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1134 # these names into the build system.
1135 ['branding=="Chrome"', {
1136 'mac_product_name%': 'Google Chrome',
1137 }, { # else: branding!="Chrome"
1138 'mac_product_name%': 'Chromium',
1139 }],
1140
[email protected]e14a9f92009-08-05 19:26:071141 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291142 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
[email protected]794fb4782011-12-14 19:10:561143 # Enable uploading crash dumps.
1144 'mac_breakpad_uploads%': 1,
1145 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071146 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561147 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071148 'mac_keystone%': 1,
1149 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291150 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561151 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071152 'mac_breakpad%': 0,
1153 'mac_keystone%': 0,
1154 }],
1155 ],
1156 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:431157
[email protected]912c55c2009-07-31 23:33:551158 ['OS=="win"', {
1159 'conditions': [
[email protected]8974e042010-06-21 18:06:521160 ['component=="shared_library"', {
1161 'win_use_allocator_shim%': 0,
1162 }],
[email protected]fa0f16e2012-08-20 22:30:041163 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101164 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041165 # Not enabled for component=static_library because some targets
1166 # are too large and the toolchain fails due to the size of the
1167 # .obj files.
[email protected]6f390be2012-08-16 18:57:101168 'incremental_chrome_dll%': 1,
1169 }],
[email protected]10bb8c92009-08-07 21:16:031170 # Don't do incremental linking for large modules on 32-bit.
1171 ['MSVS_OS_BITS==32', {
1172 'msvs_large_module_debug_link_mode%': '1', # No
1173 },{
1174 'msvs_large_module_debug_link_mode%': '2', # Yes
1175 }],
[email protected]3e2648a2011-03-21 20:58:501176 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
1177 'msvs_express%': 1,
1178 'secure_atl%': 0,
1179 },{
1180 'msvs_express%': 0,
1181 'secure_atl%': 1,
1182 }],
[email protected]912c55c2009-07-31 23:33:551183 ],
[email protected]ef4fa4072009-12-04 22:46:501184 'nacl_win64_defines': [
1185 # This flag is used to minimize dependencies when building
1186 # Native Client loader for 64-bit Windows.
1187 'NACL_WIN64',
1188 ],
[email protected]912c55c2009-07-31 23:33:551189 }],
[email protected]bb6aba32011-01-07 19:04:431190
[email protected]febd3572012-05-03 09:17:451191 ['os_posix==1 and chromeos==0 and OS!="android"', {
[email protected]8e553f42010-10-25 20:05:441192 'use_cups%': 1,
1193 }, {
1194 'use_cups%': 0,
1195 }],
[email protected]bb6aba32011-01-07 19:04:431196
[email protected]2f7da672012-06-21 08:38:321197 # Native Client glibc toolchain is enabled by default except on arm.
1198 ['target_arch=="arm"', {
1199 'disable_glibc%': 1,
1200 }, {
1201 'disable_glibc%': 0,
1202 }],
1203
[email protected]712c3da2012-09-24 21:31:241204 # Disable SSE2 when building for ARM or MIPS.
1205 ['target_arch=="arm" or target_arch=="mipsel"', {
1206 'disable_sse2%': 1,
1207 }, {
1208 'disable_sse2%': '<(disable_sse2)',
1209 }],
1210
[email protected]19fe8f0b2010-12-07 07:27:271211 # Set the relative path from this file to the GYP file of the JPEG
1212 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281213 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1214 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271215 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281216 }, {
1217 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1218 }],
[email protected]bb6aba32011-01-07 19:04:431219
[email protected]abcc9ac2011-05-16 20:04:351220 # Options controlling the use of GConf (the classic GNOME configuration
1221 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311222 ['chromeos==1', {
1223 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351224 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311225 }, {
1226 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351227 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311228 }],
1229
[email protected]4de39f82011-03-28 12:01:291230 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291231 ['branding=="Chrome"', {
1232 # TODO(mmoss) The .grd files look for _google_chrome, but for
1233 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291234 'grit_defines': ['-D', '_google_chrome',
1235 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291236 }, {
[email protected]4de39f82011-03-28 12:01:291237 'grit_defines': ['-D', '_chromium',
1238 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291239 }],
[email protected]bb6aba32011-01-07 19:04:431240 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131241 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431242 }],
1243 ['toolkit_views==1', {
1244 'grit_defines': ['-D', 'toolkit_views'],
1245 }],
[email protected]8dd791d2011-09-16 16:37:301246 ['use_aura==1', {
1247 'grit_defines': ['-D', 'use_aura'],
1248 }],
[email protected]ed329be2012-01-03 22:02:161249 ['use_ash==1', {
1250 'grit_defines': ['-D', 'use_ash'],
1251 }],
[email protected]c329adf82011-10-05 14:34:571252 ['use_nss==1', {
1253 'grit_defines': ['-D', 'use_nss'],
1254 }],
[email protected]e47c32032011-03-01 19:26:201255 ['file_manager_extension==1', {
1256 'grit_defines': ['-D', 'file_manager_extension'],
1257 }],
[email protected]9a425422011-01-11 00:53:181258 ['remoting==1', {
1259 'grit_defines': ['-D', 'remoting'],
1260 }],
[email protected]bb6aba32011-01-07 19:04:431261 ['use_titlecase_in_grd_files==1', {
1262 'grit_defines': ['-D', 'use_titlecase'],
1263 }],
[email protected]00dc155832011-02-01 18:51:191264 ['use_third_party_translations==1', {
1265 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121266 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161267 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1268 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121269 ],
[email protected]00dc155832011-02-01 18:51:191270 }],
[email protected]da1c8d692011-09-20 20:35:011271 ['OS=="android"', {
1272 'grit_defines': ['-D', 'android'],
1273 }],
[email protected]d39e3862012-06-26 22:38:231274 ['OS=="mac"', {
1275 'grit_defines': ['-D', 'scale_factors=2x'],
1276 }],
[email protected]ad563d02012-10-03 10:37:031277 ['OS == "ios"', {
1278 'grit_defines': [
1279 # define for iOS specific resources.
1280 '-D', 'ios',
1281 # iOS uses a whitelist to filter resources.
1282 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1283 ],
1284 }],
[email protected]6a3cd37e2012-04-17 17:13:341285 ['enable_extensions==1', {
1286 'grit_defines': ['-D', 'enable_extensions'],
1287 }],
[email protected]658677f2012-06-09 06:04:021288 ['enable_printing==1', {
1289 'grit_defines': ['-D', 'enable_printing'],
1290 }],
[email protected]c2aad542012-07-31 20:40:331291 ['enable_themes==1', {
1292 'grit_defines': ['-D', 'enable_themes'],
1293 }],
[email protected]4ffe78a2012-10-04 20:55:151294 ['use_oem_wallpaper==1', {
1295 'grit_defines': ['-D', 'use_oem_wallpaper'],
1296 }],
[email protected]3bb37e62012-04-19 03:40:081297 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201298 'clang_chrome_plugins_flags': [
1299 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311300 ],
[email protected]5d451ad2011-02-11 16:43:461301 }],
[email protected]cfa2e1102011-04-27 22:30:231302
[email protected]5ffb0a42012-01-27 09:36:111303 ['enable_web_intents_tag==1', {
1304 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071305 }],
1306
[email protected]92799b632011-08-15 14:33:061307 ['asan==1', {
1308 'clang%': 1,
1309 }],
[email protected]f5d8c222012-08-29 17:47:021310 ['asan==1 and OS=="mac"', {
1311 # See http://crbug.com/145503.
1312 'component': "static_library",
1313 }],
[email protected]c9a829272012-07-04 07:51:121314 ['tsan==1', {
1315 'clang%': 1,
1316 }],
1317
[email protected]7ce58b22012-09-26 05:17:251318 ['OS=="linux" and clang_type_profiler==1', {
1319 'clang%': 1,
1320 'clang_use_chrome_plugins%': 0,
1321 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1322 }],
1323
[email protected]a9318c72012-03-01 01:29:471324 # On valgrind bots, override the optimizer settings so we don't inline too
1325 # much and make the stacks harder to figure out.
1326 #
1327 # TODO(rnk): Kill off variables that no one else uses and just implement
1328 # them under a build_for_tool== condition.
1329 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1330 # gcc flags
1331 'mac_debug_optimization': '1',
1332 'mac_release_optimization': '1',
1333 'release_optimize': '1',
1334 'no_gc_sections': 1,
1335 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1336 '-fno-builtin -fno-optimize-sibling-calls',
1337 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1338 '-fno-builtin -fno-optimize-sibling-calls',
1339
1340 # MSVS flags for TSan on Pin and Windows.
1341 'win_debug_RuntimeChecks': '0',
1342 'win_debug_disable_iterator_debugging': '1',
1343 'win_debug_Optimization': '1',
1344 'win_debug_InlineFunctionExpansion': '0',
1345 'win_release_InlineFunctionExpansion': '0',
1346 'win_release_OmitFramePointers': '0',
1347
1348 'linux_use_tcmalloc': 1,
1349 'release_valgrind_build': 1,
1350 'werror': '',
1351 'component': 'static_library',
1352 'use_system_zlib': 0,
1353 }],
1354
1355 # Build tweaks for DrMemory.
1356 # TODO(rnk): Combine with tsan config to share the builder.
1357 # http://crbug.com/108155
1358 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471359 # These runtime checks force initialization of stack vars which blocks
1360 # DrMemory's uninit detection.
1361 'win_debug_RuntimeChecks': '0',
1362 # Iterator debugging is slow.
1363 'win_debug_disable_iterator_debugging': '1',
1364 # Try to disable optimizations that mess up stacks in a release build.
1365 'win_release_InlineFunctionExpansion': '0',
1366 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501367 # Ditto for debug, to support bumping win_debug_Optimization.
1368 'win_debug_InlineFunctionExpansion': 0,
1369 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471370 # Keep the code under #ifndef NVALGRIND.
1371 'release_valgrind_build': 1,
1372 }],
[email protected]912c55c2009-07-31 23:33:551373 ],
[email protected]a9318c72012-03-01 01:29:471374
[email protected]35958422011-09-28 02:03:591375 # List of default apps to install in new profiles. The first list contains
1376 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061377 # contains the destination location for each of the files. When a crx
1378 # is added or removed from the list, the chrome/browser/resources/
1379 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591380 'default_apps_list': [
1381 'browser/resources/default_apps/external_extensions.json',
1382 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061383 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591384 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001385 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231386 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591387 ],
1388 'default_apps_list_linux_dest': [
1389 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1390 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061391 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591392 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001393 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231394 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591395 ],
[email protected]2f80c312009-02-25 21:26:551396 },
1397 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261398 'variables': {
[email protected]a6e22132010-02-10 20:43:181399 # The condition that operates on chromium_code is in a target_conditions
1400 # section, and will not have access to the default fallback value of
1401 # chromium_code at the top of this file, or to the chromium_code
1402 # variable placed at the root variables scope of .gyp files, because
1403 # those variables are not set at target scope. As a workaround,
1404 # if chromium_code is not set at target scope, define it in target scope
1405 # to contain whatever value it has during early variable expansion.
1406 # That's enough to make it available during target conditional
1407 # processing.
1408 'chromium_code%': '<(chromium_code)',
1409
[email protected]7e0d664a2009-12-03 21:07:471410 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1411 'win_release_Optimization%': '2', # 2 = /Os
1412 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331413
1414 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241415 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111416 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241417 # Tri-state: blank is default, 1 on, 0 off
1418 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331419
[email protected]6b0507b2010-05-07 07:41:211420 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1421 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331422
[email protected]6b0507b2010-05-07 07:41:211423 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151424 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1425 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331426
[email protected]fac10d12010-11-08 16:00:311427 # VS inserts quite a lot of extra checks to algorithms like
1428 # std::partial_sort in Debug build which make them O(N^2)
1429 # instead of O(N*logN). This is particularly slow under memory
1430 # tools like ThreadSanitizer so we want it to be disablable.
1431 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1432 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471433
[email protected]ffd984b12009-09-11 19:37:001434 'release_extra_cflags%': '',
1435 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001436
1437 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521438
[email protected]ef5c5f1b2011-12-17 02:16:241439 # the non-qualified versions are widely assumed to be *nix-only
1440 'win_release_extra_cflags%': '',
1441 'win_debug_extra_cflags%': '',
1442
[email protected]b1eb341c2011-11-09 18:46:071443 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1444 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1445
[email protected]ef3326702011-10-06 18:06:441446 # Only used by Windows build for now. Can be used to build into a
1447 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1448 # output files in src/build/VS2010_{Debug,Release}.
1449 'build_dir_prefix%': '',
1450
[email protected]9ac2db692012-06-08 01:01:571451 # Targets are by default not nacl untrusted code.
1452 'nacl_untrusted_build%': 0,
1453
[email protected]8974e042010-06-21 18:06:521454 'conditions': [
1455 ['OS=="win" and component=="shared_library"', {
1456 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161457 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1458 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521459 }, {
1460 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1461 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1462 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1463 }],
[email protected]1e013672012-06-29 22:12:201464 ['OS=="ios"', {
1465 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1466 'mac_release_optimization%': 's', # Use -Os unless overridden
1467 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1468 }, {
1469 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1470 'mac_release_optimization%': '3', # Use -O3 unless overridden
1471 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1472 }],
[email protected]8974e042010-06-21 18:06:521473 ],
[email protected]1c966092009-08-20 21:19:261474 },
[email protected]32aa8cc2009-03-04 21:36:391475 'conditions': [
[email protected]7ce58b22012-09-26 05:17:251476 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1477 'cflags_cc!': ['-fno-rtti'],
1478 'cflags_cc+': [
1479 '-frtti',
1480 '-gline-tables-only',
1481 '-fintercept-allocation-functions',
1482 ],
1483 'defines': ['TYPE_PROFILING'],
1484 'dependencies': [
1485 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1486 ],
1487 }],
[email protected]ff10b132012-02-29 22:53:301488 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1489 'msbuild_toolset': '<(msbuild_toolset)',
1490 }],
[email protected]32aa8cc2009-03-04 21:36:391491 ['branding=="Chrome"', {
1492 'defines': ['GOOGLE_CHROME_BUILD'],
1493 }, { # else: branding!="Chrome"
1494 'defines': ['CHROMIUM_BUILD'],
1495 }],
[email protected]286d9a12012-05-30 16:20:381496 ['OS=="mac" and component=="shared_library"', {
1497 'xcode_settings': {
1498 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1499 'LD_RUNPATH_SEARCH_PATHS': [
1500 # For unbundled binaries.
1501 '@loader_path/.',
1502 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1503 '@loader_path/../../..',
1504 ],
1505 },
1506 }],
[email protected]81d9b72d2012-03-26 22:29:171507 ['branding=="Chrome" and (OS=="win" or OS=="mac")', {
1508 'defines': ['ENABLE_RLZ'],
1509 }],
[email protected]63e39a282011-07-13 20:41:281510 ['component=="shared_library"', {
1511 'defines': ['COMPONENT_BUILD'],
1512 }],
[email protected]06c756182010-04-27 18:31:311513 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171514 'defines': ['TOOLKIT_VIEWS=1'],
1515 }],
[email protected]1ee7c56c2011-10-19 14:51:331516 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111517 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1518 }],
[email protected]41423092011-08-25 15:39:581519 ['use_aura==1', {
1520 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351521 }],
[email protected]ed329be2012-01-03 22:02:161522 ['use_ash==1', {
1523 'defines': ['USE_ASH=1'],
1524 }],
[email protected]e190d272012-08-30 17:36:441525 ['use_libjpeg_turbo==1', {
1526 'defines': ['USE_LIBJPEG_TURBO=1'],
1527 }],
[email protected]c329adf82011-10-05 14:34:571528 ['use_nss==1', {
1529 'defines': ['USE_NSS=1'],
1530 }],
[email protected]bd7b6fe2012-03-05 21:02:401531 ['enable_one_click_signin==1', {
1532 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1533 }],
[email protected]a47aa892011-11-22 03:12:311534 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1535 # TODO(erg): We are progressively sealing up use of deprecated features
1536 # in gtk in preparation for an eventual porting to gtk3.
1537 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1538 }],
[email protected]fdc5bed2010-01-09 01:16:571539 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291540 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501541 }],
[email protected]f56797b2011-09-25 00:04:351542 ['use_xi2_mt!=0', {
1543 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1544 }],
[email protected]e47c32032011-03-01 19:26:201545 ['file_manager_extension==1', {
1546 'defines': ['FILE_MANAGER_EXTENSION=1'],
1547 }],
[email protected]7664ab32011-02-01 23:35:251548 ['profiling==1', {
1549 'defines': ['ENABLE_PROFILING=1'],
1550 }],
[email protected]93b373502011-08-16 19:06:221551 ['OS=="linux" and glibcxx_debug==1', {
1552 'defines': ['_GLIBCXX_DEBUG=1',],
1553 'cflags_cc!': ['-fno-rtti'],
1554 'cflags_cc+': ['-frtti', '-g'],
1555 }],
[email protected]542bf24a2010-06-11 23:08:171556 ['remoting==1', {
1557 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001558 }],
[email protected]5b87e782012-02-09 18:19:321559 ['enable_webrtc==1', {
1560 'defines': ['ENABLE_WEBRTC=1'],
1561 }],
[email protected]d01120e62010-05-10 17:04:481562 ['proprietary_codecs==1', {
1563 'defines': ['USE_PROPRIETARY_CODECS'],
1564 }],
[email protected]67c125d2011-10-11 18:58:221565 ['enable_pepper_threading==1', {
1566 'defines': ['ENABLE_PEPPER_THREADING'],
1567 }],
[email protected]7ddea9802012-02-22 23:08:051568 ['enable_viewport==1', {
1569 'defines': ['ENABLE_VIEWPORT'],
1570 }],
[email protected]f31e2e52011-07-14 16:01:191571 ['configuration_policy==1', {
1572 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1573 }],
[email protected]9eb100e2011-10-14 05:08:221574 ['input_speech==1', {
1575 'defines': ['ENABLE_INPUT_SPEECH'],
1576 }],
[email protected]7cce3232011-10-28 10:41:571577 ['notifications==1', {
1578 'defines': ['ENABLE_NOTIFICATIONS'],
1579 }],
[email protected]1efbaaa2012-04-24 02:43:241580 ['enable_hidpi==1', {
1581 'defines': ['ENABLE_HIDPI=1'],
1582 }],
[email protected]9c1949e2009-10-02 19:59:541583 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171584
[email protected]9c1949e2009-10-02 19:59:541585 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141586 # For Windows and Mac, we don't genererate debug information.
1587 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541588 'msvs_settings': {
1589 'VCLinkerTool': {
1590 'GenerateDebugInformation': 'false',
1591 },
1592 'VCCLCompilerTool': {
1593 'DebugInformationFormat': '0',
1594 }
[email protected]da4d4ea2011-09-22 20:23:141595 },
1596 'xcode_settings': {
1597 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1598 },
[email protected]1cc2fa72010-07-03 08:49:241599 }, { # else: OS != "win", generate less debug information.
1600 'variables': {
1601 'debug_extra_cflags': '-g1',
1602 },
[email protected]37c84192010-04-14 21:37:401603 }],
[email protected]aecc4d12011-01-19 05:32:331604 # Clang creates chubby debug information, which makes linking very
1605 # slow. For now, don't create debug information with clang. See
1606 # http://crbug.com/70000
1607 ['OS=="linux" and clang==1', {
1608 'variables': {
1609 'debug_extra_cflags': '-g0',
1610 },
1611 }],
[email protected]9c1949e2009-10-02 19:59:541612 ], # conditions for fastbuild.
1613 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011614 ['dcheck_always_on!=0', {
1615 'defines': ['DCHECK_ALWAYS_ON=1'],
1616 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381617 ['selinux==1', {
1618 'defines': ['CHROMIUM_SELINUX=1'],
1619 }],
[email protected]7e0d664a2009-12-03 21:07:471620 ['win_use_allocator_shim==0', {
1621 'conditions': [
1622 ['OS=="win"', {
1623 'defines': ['NO_TCMALLOC'],
1624 }],
1625 ],
1626 }],
[email protected]43f28f832010-02-03 02:28:481627 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151628 'defines': [
1629 'ENABLE_GPU=1',
1630 ],
1631 }],
[email protected]b1c2a5542010-10-08 12:44:401632 ['use_openssl==1', {
1633 'defines': [
1634 'USE_OPENSSL=1',
1635 ],
1636 }],
[email protected]ed154592010-04-29 00:18:501637 ['enable_eglimage==1', {
1638 'defines': [
1639 'ENABLE_EGLIMAGE=1',
1640 ],
1641 }],
[email protected]7d7564a12011-06-21 19:20:221642 ['use_skia==1', {
1643 'defines': [
1644 'USE_SKIA=1',
1645 ],
1646 }],
[email protected]f5ecbba12009-04-03 04:35:181647 ['coverage!=0', {
1648 'conditions': [
1649 ['OS=="mac"', {
1650 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041651 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1652 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471653 },
[email protected]e4fb84c2009-12-28 20:45:431654 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101655 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431656 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181657 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431658 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181659 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471660 }],
1661 ],
1662 }],
[email protected]da1c8d692011-09-20 20:35:011663 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181664 'cflags': [ '-ftest-coverage',
1665 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001666 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181667 }],
[email protected]e8f6ff42009-07-07 18:20:531668 # Finally, for Windows, we simply turn on profiling.
1669 ['OS=="win"', {
1670 'msvs_settings': {
1671 'VCLinkerTool': {
1672 'Profile': 'true',
1673 },
[email protected]10bb8c92009-08-07 21:16:031674 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531675 # /Z7, not /Zi, so coverage is happyb
1676 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161677 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531678 }
1679 }
1680 }], # OS==win
1681 ], # conditions for coverage
1682 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381683 ['OS=="win"', {
1684 'defines': [
1685 '__STD_C',
1686 '_CRT_SECURE_NO_DEPRECATE',
1687 '_SCL_SECURE_NO_DEPRECATE',
1688 ],
1689 'include_dirs': [
1690 '<(DEPTH)/third_party/wtl/include',
1691 ],
[email protected]9619e65d2012-05-23 19:06:521692 'conditions': [
1693 ['win_z7!=0', {
1694 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:091695 # Generates debug info when win_z7=1
1696 # even if fastbuild=1 (that makes GenerateDebugInformation false).
1697 'VCLinkerTool': {
1698 'GenerateDebugInformation': 'true',
1699 },
[email protected]9619e65d2012-05-23 19:06:521700 'VCCLCompilerTool': {
1701 'DebugInformationFormat': '1',
1702 }
1703 }
1704 }],
1705 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381706 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021707 ['enable_task_manager==1', {
1708 'defines': [
1709 'ENABLE_TASK_MANAGER=1',
1710 ],
1711 }],
[email protected]41ed4e82011-08-25 23:02:071712 ['enable_web_intents==1', {
1713 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471714 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071715 ],
1716 }],
[email protected]6a3cd37e2012-04-17 17:13:341717 ['enable_extensions==1', {
1718 'defines': [
1719 'ENABLE_EXTENSIONS=1',
1720 ],
1721 }],
[email protected]13eb97d2012-01-05 01:07:121722 ['OS=="win" and branding=="Chrome"', {
1723 'defines': ['ENABLE_SWIFTSHADER'],
1724 }],
[email protected]407dfa632011-12-23 11:59:351725 ['enable_dart==1', {
1726 'defines': ['WEBKIT_USING_DART=1'],
1727 }],
[email protected]18e0f39b2012-01-17 16:47:341728 ['enable_plugin_installation==1', {
1729 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1730 }],
[email protected]ddcaa412012-03-30 19:57:291731 ['enable_protector_service==1', {
1732 'defines': ['ENABLE_PROTECTOR_SERVICE=1'],
1733 }],
[email protected]cdb756ef2012-04-05 18:34:531734 ['enable_session_service==1', {
1735 'defines': ['ENABLE_SESSION_SERVICE=1'],
1736 }],
[email protected]6b40bb582012-03-15 20:50:381737 ['enable_themes==1', {
1738 'defines': ['ENABLE_THEMES=1'],
1739 }],
[email protected]0acdd772012-04-05 22:53:001740 ['enable_background==1', {
1741 'defines': ['ENABLE_BACKGROUND=1'],
1742 }],
[email protected]2e22e2f2012-03-15 21:53:101743 ['enable_automation==1', {
1744 'defines': ['ENABLE_AUTOMATION=1'],
1745 }],
[email protected]658677f2012-06-09 06:04:021746 ['enable_printing==1', {
1747 'defines': ['ENABLE_PRINTING=1'],
1748 }],
[email protected]e6026962012-06-14 21:28:321749 ['enable_captive_portal_detection==1', {
1750 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1751 }],
[email protected]9bfe0ab2012-08-30 13:18:111752 ['disable_ftp_support==1', {
1753 'defines': ['DISABLE_FTP_SUPPORT=1'],
1754 }],
[email protected]a6e22132010-02-10 20:43:181755 ], # conditions for 'target_defaults'
1756 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071757 ['enable_wexit_time_destructors==1', {
1758 'conditions': [
1759 [ 'clang==1', {
1760 'cflags': [
1761 '-Wexit-time-destructors',
1762 ],
1763 'xcode_settings': {
1764 'WARNING_CFLAGS': [
1765 '-Wexit-time-destructors',
1766 ],
1767 },
1768 }],
1769 ],
1770 }],
[email protected]c14d8e772010-02-09 22:06:151771 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281772 'conditions': [
[email protected]1e013672012-06-29 22:12:201773 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:331774 # We don't want to get warnings from third-party code,
1775 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281776 'cflags!': [
1777 '-Wall',
1778 '-Wextra',
[email protected]d8543312010-02-10 17:43:281779 ],
[email protected]167ec822011-10-24 22:05:271780 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001781 # Don't warn about hash_map in third-party code.
1782 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271783 ],
1784 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331785 # Don't warn about printf format problems.
1786 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221787 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001788 ],
[email protected]d16bd642011-07-25 23:59:181789 'cflags_cc!': [
1790 # TODO(fischman): remove this.
1791 # http://code.google.com/p/chromium/issues/detail?id=90453
1792 '-Wsign-compare',
1793 ]
[email protected]d8543312010-02-10 17:43:281794 }],
[email protected]82dd5eb32012-08-18 04:24:321795 # TODO: Fix all warnings on chromeos too.
1796 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
1797 'cflags!': [
1798 '-Werror',
1799 ],
1800 }],
[email protected]bc073c062012-01-13 06:28:031801 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111802 'cflags': [
1803 # Don't warn about ignoring the return value from e.g. close().
1804 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031805 # BSD systems do not support this option, since they are usually
1806 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111807 '-Wno-unused-result',
1808 ],
1809 }],
[email protected]d8543312010-02-10 17:43:281810 [ 'OS=="win"', {
1811 'defines': [
1812 '_CRT_SECURE_NO_DEPRECATE',
1813 '_CRT_NONSTDC_NO_WARNINGS',
1814 '_CRT_NONSTDC_NO_DEPRECATE',
1815 '_SCL_SECURE_NO_DEPRECATE',
1816 ],
1817 'msvs_disabled_warnings': [4800],
1818 'msvs_settings': {
1819 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111820 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:241821 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:281822 'Detect64BitPortabilityProblems': 'false',
1823 },
1824 },
[email protected]c54b41cb2012-08-24 20:58:241825 'conditions': [
1826 ['buildtype=="Official"', {
1827 'msvs_settings': {
1828 'VCCLCompilerTool': { 'WarnAsError': 'false' },
1829 }
1830 }],
1831 ],
[email protected]d8543312010-02-10 17:43:281832 }],
[email protected]ea47b6a2011-07-17 19:39:421833 # TODO(darin): Unfortunately, some third_party code depends on base/
1834 [ 'OS=="win" and component=="shared_library"', {
1835 'msvs_disabled_warnings': [
1836 4251, # class 'std::xx' needs to have dll-interface.
1837 ],
1838 }],
[email protected]1e013672012-06-29 22:12:201839 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:281840 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:061841 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281842 },
[email protected]3a352c362012-05-08 19:45:491843 'conditions': [
1844 ['buildtype=="Official"', {
1845 'xcode_settings': {
1846 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
1847 },
1848 }],
1849 ],
[email protected]d8543312010-02-10 17:43:281850 }],
[email protected]1e013672012-06-29 22:12:201851 [ 'OS=="ios"', {
1852 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:221853 # TODO(ios): Fix remaining warnings in third-party code, then
1854 # remove this; the Mac cleanup didn't get everything that's
1855 # flagged in an iOS build.
1856 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:201857 'RUN_CLANG_STATIC_ANALYZER': 'NO',
1858 },
1859 }],
[email protected]c14d8e772010-02-09 22:06:151860 ],
1861 }, {
[email protected]a5c598152012-01-27 04:55:131862 'includes': [
1863 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1864 'filename_rules.gypi',
1865 ],
[email protected]c14d8e772010-02-09 22:06:151866 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1867 # C99 macros on Mac and Linux.
1868 'defines': [
1869 '__STDC_FORMAT_MACROS',
1870 ],
1871 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151872 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071873 # turn on warnings for signed/unsigned mismatch on chromium code.
1874 'msvs_settings': {
1875 'VCCLCompilerTool': {
1876 'AdditionalOptions': ['/we4389'],
1877 },
1878 },
[email protected]c14d8e772010-02-09 22:06:151879 }],
[email protected]63e39a282011-07-13 20:41:281880 ['OS=="win" and component=="shared_library"', {
1881 'msvs_disabled_warnings': [
1882 4251, # class 'std::xx' needs to have dll-interface.
1883 ],
1884 }],
[email protected]c14d8e772010-02-09 22:06:151885 ],
1886 }],
[email protected]a6e22132010-02-10 20:43:181887 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551888 'default_configuration': 'Debug',
1889 'configurations': {
[email protected]5153767c2009-12-22 01:52:501890 # VCLinkerTool LinkIncremental values below:
1891 # 0 == default
1892 # 1 == /INCREMENTAL:NO
1893 # 2 == /INCREMENTAL
1894 # Debug links incremental, Release does not.
1895 #
[email protected]7b99801e2010-11-03 17:26:231896 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501897 #
1898 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561899 'abstract': 1,
1900 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511901 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561902 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1903 'CharacterSet': '1',
1904 },
[email protected]5153767c2009-12-22 01:52:501905 },
1906 'x86_Base': {
1907 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501908 'msvs_settings': {
1909 'VCLinkerTool': {
1910 'TargetMachine': '1',
1911 },
1912 },
[email protected]2fa40782009-11-01 21:17:341913 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561914 },
[email protected]5153767c2009-12-22 01:52:501915 'x64_Base': {
1916 'abstract': 1,
1917 'msvs_configuration_platform': 'x64',
1918 'msvs_settings': {
1919 'VCLinkerTool': {
1920 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501921 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:051922 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:501923 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:051924 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:501925 },
[email protected]d26b4418ab2010-03-24 22:06:351926 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501927 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:051928 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:501929 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:051930 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:501931 },
1932 },
1933 'defines': [
1934 # Not sure if tcmalloc works on 64-bit Windows.
1935 'NO_TCMALLOC',
1936 ],
1937 },
1938 'Debug_Base': {
1939 'abstract': 1,
[email protected]14339762011-04-05 07:36:581940 'defines': [
1941 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1942 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1943 ],
[email protected]1c966092009-08-20 21:19:261944 'xcode_settings': {
1945 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291946 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491947 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491948 '<@(debug_extra_cflags)',
1949 ],
[email protected]1c966092009-08-20 21:19:261950 },
[email protected]bb05e452009-10-29 21:24:561951 'msvs_settings': {
1952 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471953 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561954 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211955 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471956 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151957 'conditions': [
1958 # According to MSVS, InlineFunctionExpansion=0 means
1959 # "default inlining", not "/Ob0".
1960 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1961 ['win_debug_InlineFunctionExpansion==0', {
1962 'AdditionalOptions': ['/Ob0'],
1963 }],
1964 ['win_debug_InlineFunctionExpansion!=""', {
1965 'InlineFunctionExpansion':
1966 '<(win_debug_InlineFunctionExpansion)',
1967 }],
[email protected]fac10d12010-11-08 16:00:311968 ['win_debug_disable_iterator_debugging==1', {
1969 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1970 }],
[email protected]ef5c5f1b2011-12-17 02:16:241971
1972 # if win_debug_OmitFramePointers is blank, leave as default
1973 ['win_debug_OmitFramePointers==1', {
1974 'OmitFramePointers': 'true',
1975 }],
1976 ['win_debug_OmitFramePointers==0', {
1977 'OmitFramePointers': 'false',
1978 # The above is not sufficient (http://crbug.com/106711): it
1979 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1980 # perform FPO regardless, so we must explicitly disable.
1981 # We still want the false setting above to avoid having
1982 # "/Oy /Oy-" and warnings about overriding.
1983 'AdditionalOptions': ['/Oy-'],
1984 }],
[email protected]2ae6e022010-05-07 13:19:151985 ],
[email protected]ef5c5f1b2011-12-17 02:16:241986 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561987 },
1988 'VCLinkerTool': {
1989 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331990 # ASLR makes debugging with windbg difficult because Chrome.exe and
1991 # Chrome.dll share the same base name. As result, windbg will
1992 # name the Chrome.dll module like chrome_<base address>, where
1993 # <base address> typically changes with each launch. This in turn
1994 # means that breakpoints in Chrome.dll don't stick from one launch
1995 # to the next. For this reason, we turn ASLR off in debug builds.
1996 # Note that this is a three-way bool, where 0 means to pick up
1997 # the default setting, 1 is off and 2 is on.
1998 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561999 },
2000 'VCResourceCompilerTool': {
2001 'PreprocessorDefinitions': ['_DEBUG'],
2002 },
2003 },
[email protected]2f80c312009-02-25 21:26:552004 'conditions': [
[email protected]78204c92012-09-14 04:42:552005 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542006 'target_conditions': [
2007 ['_toolset=="target"', {
2008 'cflags': [
2009 '<@(debug_extra_cflags)',
2010 ],
2011 }],
[email protected]bb05e452009-10-29 21:24:562012 ],
[email protected]2f80c312009-02-25 21:26:552013 }],
[email protected]1e013672012-06-29 22:12:202014 # Disabled on iOS because it was causing a crash on startup.
2015 # TODO(michelea): investigate, create a reduced test and possibly
2016 # submit a radar.
2017 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352018 'xcode_settings': {
2019 'OTHER_CFLAGS': [
2020 '-fstack-protector-all', # Implies -fstack-protector
2021 ],
2022 },
2023 }],
[email protected]2f80c312009-02-25 21:26:552024 ],
2025 },
[email protected]5153767c2009-12-22 01:52:502026 'Release_Base': {
2027 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552028 'defines': [
2029 'NDEBUG',
2030 ],
[email protected]1c966092009-08-20 21:19:262031 'xcode_settings': {
2032 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2033 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002034 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262035 },
[email protected]bb05e452009-10-29 21:24:562036 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472037 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472038 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152039 'conditions': [
[email protected]2212d272011-12-20 21:37:372040 # In official builds, each target will self-select
2041 # an optimization level.
2042 ['buildtype!="Official"', {
2043 'Optimization': '<(win_release_Optimization)',
2044 },
2045 ],
[email protected]2ae6e022010-05-07 13:19:152046 # According to MSVS, InlineFunctionExpansion=0 means
2047 # "default inlining", not "/Ob0".
2048 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2049 ['win_release_InlineFunctionExpansion==0', {
2050 'AdditionalOptions': ['/Ob0'],
2051 }],
2052 ['win_release_InlineFunctionExpansion!=""', {
2053 'InlineFunctionExpansion':
2054 '<(win_release_InlineFunctionExpansion)',
2055 }],
[email protected]626d2d22011-10-11 15:47:332056
[email protected]ef5c5f1b2011-12-17 02:16:242057 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332058 ['win_release_OmitFramePointers==1', {
2059 'OmitFramePointers': 'true',
2060 }],
2061 ['win_release_OmitFramePointers==0', {
2062 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242063 # The above is not sufficient (http://crbug.com/106711): it
2064 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2065 # perform FPO regardless, so we must explicitly disable.
2066 # We still want the false setting above to avoid having
2067 # "/Oy /Oy-" and warnings about overriding.
2068 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332069 }],
[email protected]2ae6e022010-05-07 13:19:152070 ],
[email protected]ef5c5f1b2011-12-17 02:16:242071 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472072 },
[email protected]bb05e452009-10-29 21:24:562073 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342074 # LinkIncremental is a tri-state boolean, where 0 means default
2075 # (i.e., inherit from parent solution), 1 means false, and
2076 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562077 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342078 # This corresponds to the /PROFILE flag which ensures the PDB
2079 # file contains FIXUP information (growing the PDB file by about
2080 # 5%) but does not otherwise alter the output binary. This
2081 # information is used by the Syzygy optimization tool when
2082 # decomposing the release image.
2083 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562084 },
2085 },
[email protected]2f80c312009-02-25 21:26:552086 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162087 ['msvs_use_common_release', {
2088 'includes': ['release.gypi'],
2089 }],
[email protected]92822e82009-09-18 14:26:562090 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:582091 'defines': [
2092 'NVALGRIND',
2093 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2094 ],
[email protected]ee857512010-05-14 08:24:422095 }, {
[email protected]14339762011-04-05 07:36:582096 'defines': [
2097 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2098 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2099 ],
[email protected]92822e82009-09-18 14:26:562100 }],
[email protected]7e0d664a2009-12-03 21:07:472101 ['win_use_allocator_shim==0', {
2102 'defines': ['NO_TCMALLOC'],
2103 }],
[email protected]bb05e452009-10-29 21:24:562104 ['OS=="linux"', {
[email protected]d8e3b122012-05-31 23:07:542105 'target_conditions': [
2106 ['_toolset=="target"', {
2107 'cflags': [
2108 '<@(release_extra_cflags)',
2109 ],
2110 }],
[email protected]bb05e452009-10-29 21:24:562111 ],
2112 }],
[email protected]2f80c312009-02-25 21:26:552113 ],
2114 },
[email protected]5153767c2009-12-22 01:52:502115 #
2116 # Concrete configurations
2117 #
2118 'Debug': {
2119 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2120 },
2121 'Release': {
2122 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502123 },
[email protected]f926fa0a2009-08-04 22:50:132124 'conditions': [
2125 [ 'OS=="win"', {
2126 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502127 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502128 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302129 },
2130 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502131 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302132 },
[email protected]f926fa0a2009-08-04 22:50:132133 }],
2134 ],
[email protected]2f80c312009-02-25 21:26:552135 },
2136 },
2137 'conditions': [
[email protected]1e013672012-06-29 22:12:202138 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262139 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272140 # Enable -Werror by default, but put it in a variable so it can
2141 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2142 'variables': {
[email protected]cbbb3472012-01-25 18:32:312143 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202144 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272145 },
[email protected]6863896f2012-01-25 17:51:362146 'defines': [
2147 '_FILE_OFFSET_BITS=64',
2148 ],
[email protected]9d384032009-03-20 23:13:262149 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162150 '<(werror)', # See note above about the werror variable.
2151 '-pthread',
2152 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292153 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162154 '-Wall',
[email protected]0fa17082010-03-26 00:48:052155 # TODO(evan): turn this back on once all the builds work.
2156 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202157 # Don't warn about unused function params. We use those everywhere.
2158 '-Wno-unused-parameter',
2159 # Don't warn about the "struct foo f = {0};" initialization pattern.
2160 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122161 # Don't export any symbols (for example, to plugins we dlopen()).
2162 # Note: this is *required* to make some plugins work.
2163 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352164 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242165 ],
2166 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222167 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242168 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362169 # Make inline functions have hidden visiblity by default.
2170 # Surprisingly, not covered by -fvisibility=hidden.
2171 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172172 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2173 # so we specify it explicitly.
2174 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182175 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172176 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262177 ],
[email protected]a6cf87e2009-04-03 04:07:382178 'ldflags': [
[email protected]138241f2010-03-30 23:53:102179 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262180 ],
[email protected]1e013672012-06-29 22:12:202181 'libraries' : [
2182 '<(libraries_for_target)',
2183 ],
[email protected]3aacaf952009-04-02 15:34:092184 'configurations': {
[email protected]5153767c2009-12-22 01:52:502185 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312186 'variables': {
2187 'debug_optimize%': '0',
2188 },
[email protected]3aacaf952009-04-02 15:34:092189 'defines': [
2190 '_DEBUG',
2191 ],
2192 'cflags': [
[email protected]95ad2032012-08-24 00:49:252193 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092194 '-g',
2195 ],
[email protected]da1c8d692011-09-20 20:35:012196 'conditions' : [
[email protected]fa9d4e262012-08-21 04:39:002197 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552198 # Some configurations are copied from Release_Base to reduce
2199 # the binary size.
2200 'variables': {
2201 'debug_optimize%': 's',
2202 },
[email protected]da1c8d692011-09-20 20:35:012203 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552204 '-fomit-frame-pointer',
2205 '-fdata-sections',
2206 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012207 ],
[email protected]8a37e4502012-08-14 22:42:552208 'ldflags': [
2209 '-Wl,-O1',
2210 '-Wl,--as-needed',
2211 '-Wl,--gc-sections',
2212 ],
[email protected]da1c8d692011-09-20 20:35:012213 }],
2214 ],
[email protected]5315f2842009-04-28 00:43:272215 },
[email protected]5153767c2009-12-22 01:52:502216 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012217 'variables': {
2218 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512219 # Binaries become big and gold is unable to perform GC
2220 # and remove unused sections for some of test targets
2221 # on 32 bit platform.
2222 # (This is currently observed only in chromeos valgrind bots)
2223 # The following flag is to disable --gc-sections linker
2224 # option for these bots.
2225 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122226
2227 # TODO(bradnelson): reexamine how this is done if we change the
2228 # expansion of configurations
2229 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012230 },
[email protected]3aacaf952009-04-02 15:34:092231 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182232 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532233 # Don't emit the GCC version ident directives, they just end up
2234 # in the .comment section taking up binary size.
2235 '-fno-ident',
2236 # Put data and code in their own sections, so that unused symbols
2237 # can be removed at link time with --gc-sections.
2238 '-fdata-sections',
2239 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092240 ],
[email protected]c902f2c2010-08-06 20:04:182241 'ldflags': [
2242 # Specifically tell the linker to perform optimizations.
2243 # See http://lwn.net/Articles/192624/ .
2244 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222245 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182246 ],
[email protected]1dd529642010-05-15 01:02:512247 'conditions' : [
2248 ['no_gc_sections==0', {
2249 'ldflags': [
2250 '-Wl,--gc-sections',
2251 ],
2252 }],
[email protected]da1c8d692011-09-20 20:35:012253 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582254 'variables': {
2255 'release_optimize%': 's',
2256 },
[email protected]da1c8d692011-09-20 20:35:012257 'cflags': [
2258 '-fomit-frame-pointer',
2259 ],
2260 }],
[email protected]ecf7b6482010-10-13 09:15:202261 ['clang==1', {
2262 'cflags!': [
2263 '-fno-ident',
2264 ],
2265 }],
[email protected]7664ab32011-02-01 23:35:252266 ['profiling==1', {
2267 'cflags': [
2268 '-fno-omit-frame-pointer',
2269 '-g',
2270 ],
2271 }],
[email protected]8d726a42012-02-09 03:49:002272 ],
[email protected]3aacaf952009-04-02 15:34:092273 },
2274 },
[email protected]601b540222009-04-03 21:32:042275 'variants': {
2276 'coverage': {
2277 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2278 'ldflags': ['-fprofile-arcs'],
2279 },
2280 'profile': {
2281 'cflags': ['-pg', '-g'],
2282 'ldflags': ['-pg'],
2283 },
2284 'symbols': {
2285 'cflags': ['-g'],
2286 },
2287 },
[email protected]606116d22009-05-06 22:38:232288 'conditions': [
[email protected]04b482602011-09-14 02:36:212289 ['target_arch=="ia32"', {
2290 'target_conditions': [
2291 ['_toolset=="target"', {
2292 'asflags': [
2293 # Needed so that libs with .s files (e.g. libicudata.a)
2294 # are compatible with the general 32-bit-ness.
2295 '-32',
2296 ],
2297 # All floating-point computations on x87 happens in 80-bit
2298 # precision. Because the C and C++ language standards allow
2299 # the compiler to keep the floating-point values in higher
2300 # precision than what's specified in the source and doing so
2301 # is more efficient than constantly rounding up to 64-bit or
2302 # 32-bit precision as specified in the source, the compiler,
2303 # especially in the optimized mode, tries very hard to keep
2304 # values in x87 floating-point stack (in 80-bit precision)
2305 # as long as possible. This has important side effects, that
2306 # the real value used in computation may change depending on
2307 # how the compiler did the optimization - that is, the value
2308 # kept in 80-bit is different than the value rounded down to
2309 # 64-bit or 32-bit. There are possible compiler options to
2310 # make this behavior consistent (e.g. -ffloat-store would keep
2311 # all floating-values in the memory, thus force them to be
2312 # rounded to its original precision) but they have significant
2313 # runtime performance penalty.
2314 #
2315 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2316 # which keep floating-point values in SSE registers in its
2317 # native precision (32-bit for single precision, and 64-bit
2318 # for double precision values). This means the floating-point
2319 # value used during computation does not change depending on
2320 # how the compiler optimized the code, since the value is
2321 # always kept in its specified precision.
2322 'conditions': [
2323 ['branding=="Chromium" and disable_sse2==0', {
2324 'cflags': [
2325 '-march=pentium4',
2326 '-msse2',
2327 '-mfpmath=sse',
2328 ],
2329 }],
2330 # ChromeOS targets Pinetrail, which is sse3, but most of the
2331 # benefit comes from sse2 so this setting allows ChromeOS
2332 # to build on other CPUs. In the future -march=atom would
2333 # help but requires a newer compiler.
2334 ['chromeos==1 and disable_sse2==0', {
2335 'cflags': [
2336 '-msse2',
2337 ],
2338 }],
2339 # Install packages have started cropping up with
2340 # different headers between the 32-bit and 64-bit
2341 # versions, so we have to shadow those differences off
2342 # and make sure a 32-bit-on-64-bit build picks up the
2343 # right files.
[email protected]32594022012-05-10 03:22:282344 # For android build, use NDK headers instead of host headers
2345 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212346 'include_dirs+': [
2347 '/usr/include32',
2348 ],
2349 }],
2350 ],
2351 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2352 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062353 'cflags': [
[email protected]04b482602011-09-14 02:36:212354 '-m32',
2355 '-mmmx',
2356 ],
2357 'ldflags': [
2358 '-m32',
[email protected]ffde7932009-05-29 00:39:062359 ],
2360 }],
[email protected]606116d22009-05-06 22:38:232361 ],
2362 }],
[email protected]3dda8a962009-08-10 18:58:072363 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292364 'target_conditions': [
2365 ['_toolset=="target"', {
2366 'cflags_cc': [
2367 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2368 # has changed whenever it encounters a varargs function. This
2369 # silences those warnings, as they are not helpful and
2370 # clutter legitimate warnings.
2371 '-Wno-abi',
2372 ],
2373 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012374 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292375 'cflags': [
2376 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292377 ]
2378 }],
2379 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252380 'cflags': [
2381 '-march=armv7-a',
2382 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112383 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252384 ],
[email protected]eafc0b452010-02-26 21:53:432385 'conditions': [
2386 ['arm_neon==1', {
2387 'cflags': [ '-mfpu=neon', ],
2388 }, {
[email protected]53e0f642010-03-05 01:41:562389 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072390 }],
[email protected]eafc0b452010-02-26 21:53:432391 ],
[email protected]dc9711f2009-11-13 19:30:252392 }],
[email protected]da1c8d692011-09-20 20:35:012393 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532394 # Most of the following flags are derived from what Android
2395 # uses by default when building for arm, reference for which
2396 # can be found in the following file in the Android NDK:
2397 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2398 'cflags': [
2399 # The tree-sra optimization (scalar replacement for
2400 # aggregates enabling subsequent optimizations) leads to
2401 # invalid code generation when using the Android NDK's
2402 # compiler (r5-r7). This can be verified using
2403 # TestWebKitAPI's WTF.Checked_int8_t test.
2404 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482405 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532406 '-Wno-psabi',
2407 ],
[email protected]ad17e342012-07-17 20:45:482408 # Android now supports .relro sections properly.
2409 # NOTE: While these flags enable the generation of .relro
2410 # sections, the generated libraries can still be loaded on
2411 # older Android platform versions.
2412 'ldflags': [
2413 '-Wl,-z,relro',
2414 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482415 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482416 ],
[email protected]da1c8d692011-09-20 20:35:012417 'conditions': [
2418 ['arm_thumb == 1', {
2419 # Android toolchain doesn't support -mimplicit-it=thumb
2420 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
2421 'cflags': [ '-mthumb-interwork', ],
2422 }],
2423 ['armv7==0', {
2424 # Flags suitable for Android emulator
2425 'cflags': [
2426 '-march=armv5te',
2427 '-mtune=xscale',
2428 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362429 ],
2430 'defines': [
2431 '__ARM_ARCH_5__',
2432 '__ARM_ARCH_5T__',
2433 '__ARM_ARCH_5E__',
2434 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012435 ],
2436 }],
[email protected]220ea5932012-08-09 10:44:072437 ['clang==1', {
2438 'cflags!': [
2439 # Clang does not support the following options.
2440 '-mthumb-interwork',
2441 '-finline-limit=64',
2442 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482443 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072444 '-Wno-psabi',
2445 ],
2446 }],
[email protected]da1c8d692011-09-20 20:35:012447 ],
2448 }],
[email protected]3dda8a962009-08-10 18:58:072449 ],
2450 }],
2451 ],
2452 }],
[email protected]2fb843b2010-08-12 02:11:082453 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582454 'cflags': [
2455 '-fPIC',
2456 ],
[email protected]d3f692b32011-12-14 19:04:352457 'ldflags': [
2458 '-fPIC',
2459 ],
[email protected]c76723a2010-01-25 23:10:582460 }],
[email protected]ee28c9f2009-09-04 01:53:012461 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572462 'target_conditions': [
2463 ['_toolset=="target"', {
2464 'cflags': [
2465 '--sysroot=<(sysroot)',
2466 ],
2467 'ldflags': [
2468 '--sysroot=<(sysroot)',
2469 ],
2470 }]]
[email protected]ee28c9f2009-09-04 01:53:012471 }],
[email protected]58680ce2010-09-18 00:09:152472 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122473 'cflags': [
2474 '-Wheader-hygiene',
2475 # Clang spots more unused functions.
2476 '-Wno-unused-function',
2477 # Don't die on dtoa code that uses a char as an array index.
2478 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332479 # Especially needed for gtest macros using enum values from Mac
2480 # system headers.
2481 # TODO(pkasting): In C++11 this is legal, so this should be
2482 # removed when we change to that. (This is also why we don't
2483 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122484 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302485 # This (rightyfully) complains about 'override', which we use
2486 # heavily.
2487 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102488
2489 # Warns on switches on enums that cover all enum values but
2490 # also contain a default: branch. Chrome is full of that.
2491 '-Wno-covered-switch-default',
[email protected]d0860332012-09-11 05:53:022492
2493 # TODO(thakis): Remove this.
2494 '-Wno-implicit-conversion-floating-point-to-bool',
[email protected]18ca15a2011-08-10 03:07:122495 ],
2496 'cflags!': [
2497 # Clang doesn't seem to know know this flag.
2498 '-mfpmath=sse',
2499 ],
[email protected]58680ce2010-09-18 00:09:152500 }],
[email protected]5d451ad2011-02-11 16:43:462501 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262502 'cflags': [
[email protected]c872dc52012-05-19 06:36:312503 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262504 ],
[email protected]5d451ad2011-02-11 16:43:462505 }],
[email protected]4a9ac22e2011-12-02 03:41:532506 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262507 'cflags': [
2508 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532509 ],
2510 }],
2511 ['clang==1 and clang_add_plugin!=""', {
2512 'cflags': [
[email protected]d23720682011-08-11 00:16:262513 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2514 ],
[email protected]5e781232011-01-28 02:57:592515 }],
[email protected]2616d45d2012-01-19 03:15:482516 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2517 'cflags': [
2518 # See http://crbug.com/110262
2519 '-fcolor-diagnostics',
2520 ],
2521 }],
[email protected]92799b632011-08-15 14:33:062522 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422523 'target_conditions': [
2524 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452525 'cflags': [
2526 '-faddress-sanitizer',
2527 '-fno-omit-frame-pointer',
2528 ],
2529 'ldflags': [
2530 '-faddress-sanitizer',
2531 ],
2532 'defines': [
2533 'ADDRESS_SANITIZER',
2534 ],
[email protected]1ffc3b3962012-05-16 14:08:422535 }],
[email protected]921c7b52011-11-25 10:34:352536 ],
[email protected]92799b632011-08-15 14:33:062537 }],
[email protected]c9a829272012-07-04 07:51:122538 ['tsan==1', {
2539 'target_conditions': [
2540 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452541 'cflags': [
2542 '-fthread-sanitizer',
2543 '-fno-omit-frame-pointer',
2544 '-fPIE',
2545 ],
2546 'ldflags': [
2547 '-fthread-sanitizer',
2548 ],
2549 'defines': [
2550 'THREAD_SANITIZER',
2551 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
2552 ],
2553 'target_conditions': [
2554 ['_type=="executable"', {
2555 'ldflags': [
[email protected]c9a829272012-07-04 07:51:122556 '-pie',
[email protected]cb770a4c2012-07-25 20:06:452557 ],
2558 }],
2559 ],
[email protected]c9a829272012-07-04 07:51:122560 }],
2561 ],
2562 }],
[email protected]8a6abd12012-05-16 10:04:442563 ['order_profiling!=0 and (chromeos==1 or OS=="linux")', {
2564 'target_conditions' : [
2565 ['_toolset=="target"', {
2566 'cflags': [
2567 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:452568 # Allow mmx intrinsics to inline, so that the
2569 # compiler can expand the intrinsics.
2570 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:442571 ],
2572 }],
2573 ],
2574 }],
[email protected]cbd5fd52009-08-26 00:14:272575 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172576 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272577 'defines': ['USE_LINUX_BREAKPAD'],
2578 }],
[email protected]d8b60602010-03-26 09:41:222579 ['linux_use_heapchecker==1', {
2580 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402581 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222582 }],
[email protected]61a9b2d82010-02-26 00:31:082583 ['linux_use_tcmalloc==0', {
2584 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242585 }],
[email protected]64e2d4a42010-08-27 10:13:212586 ['linux_keep_shadow_stacks==1', {
2587 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512588 'cflags': [
2589 '-finstrument-functions',
2590 # Allow mmx intrinsics to inline, so that the compiler can expand
2591 # the intrinsics.
2592 '-finstrument-functions-exclude-file-list=mmintrin.h',
2593 ],
[email protected]64e2d4a42010-08-27 10:13:212594 }],
[email protected]8d726a42012-02-09 03:49:002595 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172596 'ldflags': [
2597 # Experimentation found that using four linking threads
2598 # saved ~20% of link time.
2599 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2600 '-Wl,--threads',
2601 '-Wl,--thread-count=4',
2602 ],
[email protected]8d726a42012-02-09 03:49:002603 'conditions': [
2604 ['release_valgrind_build==0', {
2605 'target_conditions': [
2606 ['_toolset=="target"', {
2607 'ldflags': [
2608 # There seems to be a conflict of --icf and -pie
2609 # in gold which can generate crashy binaries. As
2610 # a security measure, -pie takes precendence for
2611 # now.
2612 #'-Wl,--icf=safe',
2613 '-Wl,--icf=none',
2614 ],
2615 }],
2616 ],
2617 }],
2618 ],
2619 }],
[email protected]b07806c12012-02-03 22:44:592620 ['linux_use_gold_binary==1', {
2621 'variables': {
[email protected]516312d2012-02-28 05:17:262622 'conditions': [
2623 ['inside_chromium_build==1', {
2624 # We pass the path to gold to the compiler. gyp leaves
2625 # unspecified what the cwd is when running the compiler,
2626 # so the normal gyp path-munging fails us. This hack
2627 # gets the right path.
2628 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2629 }, {
2630 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2631 }]
2632 ]
[email protected]b07806c12012-02-03 22:44:592633 },
2634 'ldflags': [
2635 # Put our gold binary in the search path for the linker.
2636 '-B<(gold_path)',
2637 ],
2638 }],
[email protected]606116d22009-05-06 22:38:232639 ],
[email protected]9d384032009-03-20 23:13:262640 },
2641 }],
[email protected]c51e8d52009-12-11 20:04:062642 # FreeBSD-specific options; note that most FreeBSD options are set above,
2643 # with Linux.
2644 ['OS=="freebsd"', {
2645 'target_defaults': {
2646 'ldflags': [
2647 '-Wl,--no-keep-memory',
2648 ],
2649 },
2650 }],
[email protected]da1c8d692011-09-20 20:35:012651 # Android-specific options; note that most are set above with Linux.
2652 ['OS=="android"', {
2653 'variables': {
[email protected]c75726b2012-09-11 18:18:582654 # This is the id for the archived chrome symbols. Each build that
2655 # archives symbols is assigned an id which is then added to GYP_DEFINES.
2656 # This is written to the device log on crashes just prior to dropping a
2657 # tombstone. Tools can determine the location of the archived symbols
2658 # from the id.
2659 'chrome_symbols_id%': '',
[email protected]da1c8d692011-09-20 20:35:012660 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012661 # Use shared stlport library when system one used.
2662 # Figure this out early since it needs symbols from libgcc.a, so it
2663 # has to be before that in the set of libraries.
2664 ['use_system_stlport==1', {
2665 'android_stlport_library': 'stlport',
2666 }, {
2667 'android_stlport_library': 'stlport_static',
2668 }],
2669 ],
2670
2671 # Placing this variable here prevents from forking libvpx, used
2672 # by remoting. Remoting is off, so it needn't built,
2673 # so forking it's deps seems like overkill.
2674 # But this variable need defined to properly run gyp.
2675 # A proper solution is to have an OS==android conditional
2676 # in third_party/libvpx/libvpx.gyp to define it.
2677 'libvpx_path': 'lib/linux/arm',
2678 },
2679 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:012680 'variables': {
2681 'release_extra_cflags%': '',
[email protected]8a37e4502012-08-14 22:42:552682 },
[email protected]da1c8d692011-09-20 20:35:012683
2684 'target_conditions': [
2685 # Settings for building device targets using Android's toolchain.
2686 # These are based on the setup.mk file from the Android NDK.
2687 #
2688 # The NDK Android executable link step looks as follows:
2689 # $LDFLAGS
2690 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2691 # $(PRIVATE_OBJECTS) <-- The .o that we built
2692 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2693 # $(TARGET_LIBGCC) <-- libgcc.a
2694 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2695 # $(PRIVATE_LDLIBS) <-- System .so
2696 # $(TARGET_CRTEND_O) <-- crtend.o
2697 #
2698 # For now the above are approximated for executables by adding
2699 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2700 # of 'libraries'.
2701 #
2702 # The NDK Android shared library link step looks as follows:
2703 # $LDFLAGS
2704 # $(PRIVATE_OBJECTS) <-- The .o that we built
2705 # -l,--whole-archive
2706 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2707 # -l,--no-whole-archive
2708 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2709 # $(TARGET_LIBGCC) <-- libgcc.a
2710 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2711 # $(PRIVATE_LDLIBS) <-- System .so
2712 #
[email protected]ad17e342012-07-17 20:45:482713 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:012714 #
2715 # For both executables and shared libraries, add the proper
2716 # libgcc.a to the start of libraries which puts it in the
2717 # proper spot after .o and .a files get linked in.
2718 #
2719 # TODO: The proper thing to do longer-tem would be proper gyp
2720 # support for a custom link command line.
2721 ['_toolset=="target"', {
2722 'cflags!': [
2723 '-pthread', # Not supported by Android toolchain.
2724 ],
2725 'cflags': [
[email protected]da1c8d692011-09-20 20:35:012726 '-ffunction-sections',
2727 '-funwind-tables',
2728 '-g',
2729 '-fstack-protector',
2730 '-fno-short-enums',
2731 '-finline-limit=64',
2732 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:012733 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:012734 ],
2735 'defines': [
2736 'ANDROID',
2737 '__GNU_SOURCE=1', # Necessary for clone()
2738 'USE_STLPORT=1',
2739 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]c75726b2012-09-11 18:18:582740 'CHROME_SYMBOLS_ID="<(chrome_symbols_id)"',
[email protected]da1c8d692011-09-20 20:35:012741 ],
2742 'ldflags!': [
2743 '-pthread', # Not supported by Android toolchain.
2744 ],
2745 'ldflags': [
2746 '-nostdlib',
2747 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012748 # Don't export symbols from statically linked libraries.
2749 '-Wl,--exclude-libs=ALL',
2750 ],
[email protected]a0e48b02011-11-22 07:53:012751 'libraries': [
2752 '-l<(android_stlport_library)',
2753 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:042754 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012755 '-lc',
2756 '-ldl',
2757 '-lstdc++',
2758 '-lm',
[email protected]da1c8d692011-09-20 20:35:012759 ],
2760 'conditions': [
[email protected]e0825562012-05-10 01:50:472761 ['android_upstream_bringup==1', {
2762 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2763 }],
[email protected]220ea5932012-08-09 10:44:072764 ['clang==1', {
2765 'cflags': [
2766 # Work around incompatibilities between bionic and clang
2767 # headers.
2768 '-D__compiler_offsetof=__builtin_offsetof',
2769 '-Dnan=__builtin_nan',
2770 ],
2771 'conditions': [
2772 ['target_arch=="arm"', {
2773 'cflags': [
2774 '-target arm-linux-androideabi',
2775 '-mllvm -arm-enable-ehabi',
2776 ],
2777 'ldflags': [
2778 '-target arm-linux-androideabi',
2779 ],
2780 }],
2781 ['target_arch=="ia32"', {
2782 'cflags': [
2783 '-target x86-linux-androideabi',
2784 ],
2785 'ldflags': [
2786 '-target x86-linux-androideabi',
2787 ],
2788 }],
2789 ],
2790 }],
[email protected]da1c8d692011-09-20 20:35:012791 ['android_build_type==0', {
[email protected]34baed112012-06-27 16:10:462792 'defines': [
[email protected]f5c7758a2012-07-25 16:17:572793 # The NDK has these things, but doesn't define the constants
2794 # to say that it does. Define them here instead.
2795 'HAVE_SYS_UIO_H',
2796 ],
2797 'cflags': [
2798 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:462799 ],
[email protected]da1c8d692011-09-20 20:35:012800 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522801 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012802 ],
2803 }],
[email protected]0d7291e2012-10-04 19:16:082804 ['android_build_type==1', {
2805 'include_dirs': [
2806 # OpenAL headers from the Android tree.
2807 '<(android_src)/frameworks/wilhelm/include',
2808 ],
2809 'cflags': [
2810 # Chromium builds its own (non-third-party) code with
2811 # -Werror to make all warnings into errors. However, Android
2812 # enables warnings that Chromium doesn't, so some of these
2813 # extra warnings trip and break things.
2814 # For now, we leave these warnings enabled but prevent them
2815 # from being treated as errors.
2816 #
2817 # Things that are part of -Wextra:
2818 '-Wno-error=extra', # Enabled by -Wextra, but no specific flag
2819 '-Wno-error=ignored-qualifiers',
2820 '-Wno-error=type-limits',
2821 # Other things unrelated to -Wextra:
2822 '-Wno-error=non-virtual-dtor',
2823 '-Wno-error=sign-promo',
2824 ],
2825 'cflags_cc': [
2826 # Disabling c++0x-compat should be handled in WebKit, but
2827 # this currently doesn't work because gcc_version is not set
2828 # correctly when building with the Android build system.
2829 # TODO(torne): Fix this in WebKit.
2830 '-Wno-error=c++0x-compat',
2831 ],
2832 }],
2833 ['android_build_type==1 and chromium_code==0', {
2834 'cflags': [
2835 # There is a class of warning which:
2836 # 1) Android always enables and also treats as errors
2837 # 2) Chromium ignores in third party code
2838 # For now, I am leaving these warnings enabled but preventing
2839 # them from being treated as errors here.
2840 '-Wno-error=address',
2841 '-Wno-error=format-security',
2842 '-Wno-error=non-virtual-dtor',
2843 '-Wno-error=return-type',
2844 '-Wno-error=sequence-point',
2845 ],
2846 }],
[email protected]febd3572012-05-03 09:17:452847 ['target_arch == "arm"', {
2848 'ldflags': [
2849 # Enable identical code folding to reduce size.
2850 '-Wl,--icf=safe',
2851 ],
2852 }],
[email protected]da1c8d692011-09-20 20:35:012853 # NOTE: The stlport header include paths below are specified in
2854 # cflags rather than include_dirs because they need to come
2855 # after include_dirs. Think of them like system headers, but
2856 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2857 # toolchain (circa Gingerbread) will exhibit strange errors.
2858 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:512859 ['use_system_stlport==1', {
2860 'cflags': [
2861 # For libstdc++/include, which is used by stlport.
2862 '-I<(android_src)/bionic',
2863 '-I<(android_src)/external/stlport/stlport',
2864 ],
2865 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:012866 'cflags': [
2867 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2868 ],
2869 'conditions': [
2870 ['target_arch=="arm" and armv7==1', {
2871 'ldflags': [
2872 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2873 ],
2874 }],
2875 ['target_arch=="arm" and armv7==0', {
2876 'ldflags': [
2877 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2878 ],
2879 }],
2880 ['target_arch=="ia32"', {
2881 'ldflags': [
2882 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2883 ],
2884 }],
2885 ],
2886 }],
2887 ['target_arch=="ia32"', {
2888 # The x86 toolchain currently has problems with stack-protector.
2889 'cflags!': [
2890 '-fstack-protector',
2891 ],
2892 'cflags': [
2893 '-fno-stack-protector',
2894 ],
2895 }],
2896 ],
2897 'target_conditions': [
2898 ['_type=="executable"', {
2899 'ldflags': [
2900 '-Bdynamic',
2901 '-Wl,-dynamic-linker,/system/bin/linker',
2902 '-Wl,--gc-sections',
2903 '-Wl,-z,nocopyreloc',
2904 # crtbegin_dynamic.o should be the last item in ldflags.
2905 '<(android_ndk_lib)/crtbegin_dynamic.o',
2906 ],
2907 'libraries': [
2908 # crtend_android.o needs to be the last item in libraries.
2909 # Do not add any libraries after this!
2910 '<(android_ndk_lib)/crtend_android.o',
2911 ],
2912 }],
[email protected]f5c7758a2012-07-25 16:17:572913 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:012914 'ldflags': [
2915 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:462916 # crtbegin_so.o should be the last item in ldflags.
2917 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:012918 ],
[email protected]a08029b42012-04-25 03:18:462919 'libraries': [
2920 # crtend_so.o needs to be the last item in libraries.
2921 # Do not add any libraries after this!
2922 '<(android_ndk_lib)/crtend_so.o',
2923 ],
[email protected]da1c8d692011-09-20 20:35:012924 }],
2925 ],
2926 }],
2927 # Settings for building host targets using the system toolchain.
2928 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122929 'cflags!': [
2930 # Due to issues in Clang build system, using ASan on 32-bit
2931 # binaries on x86_64 host is problematic.
2932 # TODO(eugenis): re-enable.
2933 '-faddress-sanitizer',
2934 ],
[email protected]da1c8d692011-09-20 20:35:012935 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122936 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012937 '-Wl,-z,noexecstack',
2938 '-Wl,--gc-sections',
2939 '-Wl,-O1',
2940 '-Wl,--as-needed',
2941 ],
[email protected]965b6b22011-09-29 16:07:282942 'sources/': [
2943 ['exclude', '_android(_unittest)?\\.cc$'],
2944 ['exclude', '(^|/)android/']
2945 ],
[email protected]da1c8d692011-09-20 20:35:012946 }],
2947 ],
2948 },
2949 }],
[email protected]93f21e42010-04-01 00:35:152950 ['OS=="solaris"', {
2951 'cflags!': ['-fvisibility=hidden'],
2952 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2953 }],
[email protected]1e013672012-06-29 22:12:202954 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:552955 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:422956 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552957 'xcode_settings': {
2958 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042959 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2960 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:042961 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2962 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2963 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252964 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2965 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042966 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2967 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2968 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2969 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552970 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042971 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:552972 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:042973 'WARNING_CFLAGS': [
2974 '-Wall',
2975 '-Wendif-labels',
2976 '-Wextra',
2977 # Don't warn about unused function parameters.
2978 '-Wno-unused-parameter',
2979 # Don't warn about the "struct foo f = {0};" initialization
2980 # pattern.
2981 '-Wno-missing-field-initializers',
2982 ],
[email protected]b3fb8092009-03-12 19:09:242983 'conditions': [
2984 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592985 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2986 ],
[email protected]1e013672012-06-29 22:12:202987 ],
2988 },
2989 'target_conditions': [
2990 ['_type!="static_library"', {
2991 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2992 }],
2993 ['_mac_bundle', {
2994 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
2995 }],
2996 ], # target_conditions
2997 }, # target_defaults
2998 }], # OS=="mac" or OS=="ios"
2999 ['OS=="mac"', {
3000 'target_defaults': {
3001 'variables': {
3002 # These should end with %, but there seems to be a bug with % in
3003 # variables that are intended to be set to different values in
3004 # different targets, like these.
3005 'mac_pie': 1, # Most executables can be position-independent.
3006 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3007 # Strip debugging symbols from the target.
3008 'mac_strip': '<(mac_strip_release)',
3009 },
3010 'xcode_settings': {
3011 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3012 # (Equivalent to -fPIC)
3013 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3014 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3015 # Keep pch files below xcodebuild/.
3016 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3017 'OTHER_CFLAGS': [
3018 '-fno-strict-aliasing', # See http://crbug.com/32204
3019 ],
3020 'conditions': [
[email protected]66733172010-09-22 00:09:283021 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303022 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3023 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383024
[email protected]6c648f12011-12-24 07:50:433025 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
3026 # when buliding with clang. This warning is triggered when the
3027 # override keyword is used via the OVERRIDE macro from
3028 # base/compiler_specific.h.
3029 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:383030
[email protected]34f40892011-09-06 21:53:303031 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283032 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073033 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:283034 # Don't die on dtoa code that uses a char as an array index.
3035 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3036 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453037 # Clang spots more unused functions.
3038 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:333039 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:053040 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:303041 # This (rightyfully) complains about 'override', which we use
3042 # heavily.
3043 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:103044
3045 # Warns on switches on enums that cover all enum values but
3046 # also contain a default: branch. Chrome is full of that.
3047 '-Wno-covered-switch-default',
[email protected]d0860332012-09-11 05:53:023048
3049 # TODO(thakis): Remove this.
3050 '-Wno-implicit-conversion-floating-point-to-bool',
[email protected]66733172010-09-22 00:09:283051 ],
3052 }],
[email protected]5d451ad2011-02-11 16:43:463053 ['clang==1 and clang_use_chrome_plugins==1', {
3054 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313055 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463056 ],
3057 }],
[email protected]4a9ac22e2011-12-02 03:41:533058 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593059 'OTHER_CFLAGS': [
3060 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533061 ],
3062 }],
3063 ['clang==1 and clang_add_plugin!=""', {
3064 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593065 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3066 ],
3067 }],
[email protected]2616d45d2012-01-19 03:15:483068 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3069 'OTHER_CFLAGS': [
3070 # See http://crbug.com/110262
3071 '-fcolor-diagnostics',
3072 ],
3073 }],
[email protected]b3fb8092009-03-12 19:09:243074 ],
[email protected]2f80c312009-02-25 21:26:553075 },
[email protected]34f40892011-09-06 21:53:303076 'conditions': [
3077 ['clang==1', {
3078 'variables': {
3079 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3080 },
3081 }],
[email protected]921c7b52011-11-25 10:34:353082 ['asan==1', {
3083 'xcode_settings': {
3084 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:353085 '-faddress-sanitizer',
[email protected]921c7b52011-11-25 10:34:353086 ],
[email protected]921c7b52011-11-25 10:34:353087 },
3088 'defines': [
3089 'ADDRESS_SANITIZER',
3090 ],
3091 }],
[email protected]34f40892011-09-06 21:53:303092 ],
[email protected]2f80c312009-02-25 21:26:553093 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553094 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463095 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083096 'conditions': [
3097 ['asan==1', {
3098 'xcode_settings': {
3099 'OTHER_LDFLAGS': [
3100 '-faddress-sanitizer',
[email protected]4281a4e2012-08-24 19:05:083101 ],
3102 },
3103 }],
3104 ],
[email protected]5d7dc972009-04-16 15:30:463105 }],
3106 ['_mac_bundle', {
3107 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:083108 }],
[email protected]6303fed2011-08-11 01:12:103109 ['_type=="executable"', {
3110 'postbuilds': [
3111 {
3112 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363113 # code execution when running on Mac OS X 10.7 ("Lion"), and
3114 # ensures that the position-independent executable (PIE) bit
3115 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103116 'variables': {
[email protected]8c40f322011-08-24 03:33:363117 # Define change_mach_o_flags in a variable ending in _path
3118 # so that GYP understands it's a path and performs proper
3119 # relativization during dict merging.
3120 'change_mach_o_flags_path':
3121 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173122 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133123 ],
3124 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173125 ['mac_pie==0 or release_valgrind_build==1', {
3126 # Don't enable PIE if it's unwanted. It's unwanted if
3127 # the target specifies mac_pie=0 or if building for
3128 # Valgrind, because Valgrind doesn't understand slide.
3129 # See the similar mac_pie/release_valgrind_build check
3130 # below.
[email protected]081c0342011-08-24 14:59:133131 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133132 '--no-pie',
3133 ],
3134 }],
3135 ],
[email protected]6303fed2011-08-11 01:12:103136 },
[email protected]8c40f322011-08-24 03:33:363137 'postbuild_name': 'Change Mach-O Flags',
3138 'action': [
3139 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133140 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363141 ],
[email protected]6303fed2011-08-11 01:12:103142 },
3143 ],
[email protected]5a5d97aa2011-09-02 15:34:003144 'conditions': [
3145 ['asan==1', {
3146 'variables': {
3147 'asan_saves_file': 'asan.saves',
3148 },
3149 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563150 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003151 },
3152 }],
3153 ],
[email protected]162407f2011-09-08 15:33:173154 'target_conditions': [
3155 ['mac_pie==1 and release_valgrind_build==0', {
3156 # Turn on position-independence (ASLR) for executables. When
3157 # PIE is on for the Chrome executables, the framework will
3158 # also be subject to ASLR.
3159 # Don't do this when building for Valgrind, because Valgrind
3160 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3161 # understand slide, and get rid of the Valgrind check.
3162 'xcode_settings': {
3163 'OTHER_LDFLAGS': [
3164 '-Wl,-pie', # Position-independent executable (MH_PIE)
3165 ],
3166 },
3167 }],
3168 ],
[email protected]6a0242bc2011-07-01 00:34:463169 }],
[email protected]9a5e72862010-09-02 16:16:583170 ['(_type=="executable" or _type=="shared_library" or \
3171 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203172 'target_conditions': [
3173 ['mac_real_dsym == 1', {
3174 # To get a real .dSYM bundle produced by dsymutil, set the
3175 # debug information format to dwarf-with-dsym. Since
3176 # strip_from_xcode will not be used, set Xcode to do the
3177 # stripping as well.
3178 'configurations': {
[email protected]5153767c2009-12-22 01:52:503179 'Release_Base': {
[email protected]24700642009-06-01 16:01:203180 'xcode_settings': {
3181 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3182 'DEPLOYMENT_POSTPROCESSING': 'YES',
3183 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073184 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253185 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073186 # The Xcode default is to strip debugging symbols
3187 # only (-S). Local symbols should be stripped as
3188 # well, which will be handled by -x. Xcode will
3189 # continue to insert -S when stripping even when
3190 # additional flags are added with STRIPFLAGS.
3191 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:253192 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:073193 ], # target_conditions
3194 }, # xcode_settings
3195 }, # configuration "Release"
3196 }, # configurations
[email protected]24700642009-06-01 16:01:203197 }, { # mac_real_dsym != 1
3198 # To get a fast fake .dSYM bundle, use a post-build step to
3199 # produce the .dSYM and strip the executable. strip_from_xcode
3200 # only operates in the Release configuration.
3201 'postbuilds': [
3202 {
3203 'variables': {
3204 # Define strip_from_xcode in a variable ending in _path
3205 # so that gyp understands it's a path and performs proper
3206 # relativization during dict merging.
3207 'strip_from_xcode_path': 'mac/strip_from_xcode',
3208 },
3209 'postbuild_name': 'Strip If Needed',
3210 'action': ['<(strip_from_xcode_path)'],
3211 },
[email protected]e14a9f92009-08-05 19:26:073212 ], # postbuilds
3213 }], # mac_real_dsym
3214 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583215 }], # (_type=="executable" or _type=="shared_library" or
3216 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073217 ], # target_conditions
3218 }, # target_defaults
3219 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203220 ['OS=="ios"', {
3221 'target_defaults': {
3222 'xcode_settings' : {
3223 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3224
3225 # This next block is mostly common with the 'mac' section above,
3226 # but keying off (or setting) 'clang' isn't valid for iOS as it
3227 # also seems to mean using the custom build of clang.
3228
3229 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
3230 # when buliding with clang. This warning is triggered when the
3231 # override keyword is used via the OVERRIDE macro from
3232 # base/compiler_specific.h.
3233 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
3234 'WARNING_CFLAGS': [
3235 '-Wheader-hygiene',
3236 # Don't die on dtoa code that uses a char as an array index.
3237 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3238 '-Wno-char-subscripts',
3239 # Clang spots more unused functions.
3240 '-Wno-unused-function',
3241 # See comments on this flag higher up in this file.
3242 '-Wno-unnamed-type-template-args',
3243 # This (rightyfully) complains about 'override', which we use
3244 # heavily.
3245 '-Wno-c++11-extensions',
3246 ],
3247 },
3248 'target_conditions': [
3249 ['_type=="executable"', {
3250 'configurations': {
3251 'Release_Base': {
3252 'xcode_settings': {
3253 'DEPLOYMENT_POSTPROCESSING': 'YES',
3254 'STRIP_INSTALLED_PRODUCT': 'YES',
3255 },
3256 },
3257 },
3258 'xcode_settings': {
3259 'conditions': [
3260 ['chromium_ios_signing', {
3261 # iOS SDK wants everything for device signed.
3262 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3263 }, {
3264 'CODE_SIGNING_REQUIRED': 'NO',
3265 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3266 }],
3267 ],
3268 },
3269 }],
3270 ], # target_conditions
3271 }, # target_defaults
3272 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553273 ['OS=="win"', {
3274 'target_defaults': {
3275 'defines': [
[email protected]8e345da2012-07-01 22:10:303276 '_WIN32_WINNT=0x0602',
3277 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553278 'WIN32',
3279 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553280 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283281 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553282 '_CRT_RAND_S',
3283 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3284 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273285 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553286 ],
[email protected]8974e042010-06-21 18:06:523287 'conditions': [
[email protected]2212d272011-12-20 21:37:373288 ['buildtype=="Official"', {
3289 # In official builds, targets can self-select an optimization
3290 # level by defining a variable named 'optimize', and setting it
3291 # to one of
3292 # - "size", optimizes for minimal code size - the default.
3293 # - "speed", optimizes for speed over code size.
3294 # - "max", whole program optimization and link-time code
3295 # generation. This is very expensive and should be used
3296 # sparingly.
3297 'variables': {
3298 'optimize%': 'size',
3299 },
3300 'target_conditions': [
3301 ['optimize=="size"', {
3302 'msvs_settings': {
3303 'VCCLCompilerTool': {
3304 # 1, optimizeMinSpace, Minimize Size (/O1)
3305 'Optimization': '1',
3306 # 2, favorSize - Favor small code (/Os)
3307 'FavorSizeOrSpeed': '2',
3308 },
3309 },
3310 },
3311 ],
3312 ['optimize=="speed"', {
3313 'msvs_settings': {
3314 'VCCLCompilerTool': {
3315 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3316 'Optimization': '2',
3317 # 1, favorSpeed - Favor fast code (/Ot)
3318 'FavorSizeOrSpeed': '1',
3319 },
3320 },
3321 },
3322 ],
3323 ['optimize=="max"', {
3324 'msvs_settings': {
3325 'VCCLCompilerTool': {
3326 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3327 'Optimization': '2',
3328 # 1, favorSpeed - Favor fast code (/Ot)
3329 'FavorSizeOrSpeed': '1',
3330 # This implies link time code generation.
3331 'WholeProgramOptimization': 'true',
3332 },
3333 },
3334 },
3335 ],
3336 ],
3337 },
3338 ],
[email protected]8974e042010-06-21 18:06:523339 ['component=="static_library"', {
3340 'defines': [
3341 '_HAS_EXCEPTIONS=0',
3342 ],
3343 }],
[email protected]c7b95392012-03-28 00:25:203344 ['MSVS_VERSION=="2008"', {
3345 'defines': [
3346 '_HAS_TR1=0',
3347 ],
3348 }],
[email protected]3e2648a2011-03-21 20:58:503349 ['secure_atl', {
3350 'defines': [
3351 '_SECURE_ATL',
3352 ],
3353 }],
[email protected]8974e042010-06-21 18:06:523354 ],
[email protected]5b5ca7cb2009-07-20 23:00:203355 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:053356 '<(windows_sdk_path)/Include/shared',
3357 '<(windows_sdk_path)/Include/um',
3358 '<(windows_sdk_path)/Include/winrt',
[email protected]1f8d9402012-07-06 22:47:563359 '<(directx_sdk_path)/Include',
[email protected]2f80c312009-02-25 21:26:553360 '$(VSInstallDir)/VC/atlmfc/include',
3361 ],
[email protected]a8d99cef2009-08-26 20:47:493362 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:113363 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3364 # TODO(maruel): These warnings are level 4. They will be slowly
3365 # removed as code is fixed.
3366 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3367 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3368 4702, 4706,
3369 ],
[email protected]2f80c312009-02-25 21:26:553370 'msvs_settings': {
3371 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:443372 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:553373 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:553374 'BufferSecurityCheck': 'true',
3375 'EnableFunctionLevelLinking': 'true',
3376 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:113377 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:553378 'WarnAsError': 'true',
3379 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:583380 'conditions': [
[email protected]8974e042010-06-21 18:06:523381 ['component=="shared_library"', {
3382 'ExceptionHandling': '1', # /EHsc
3383 }, {
3384 'ExceptionHandling': '0',
3385 }],
[email protected]3fef6e62009-07-31 19:58:583386 ],
[email protected]2f80c312009-02-25 21:26:553387 },
3388 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:163389 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:373390 'AdditionalLibraryDirectories': [
[email protected]1f8d9402012-07-06 22:47:563391 '<(directx_sdk_path)/Lib/x86',
[email protected]1ab48032012-07-02 21:48:053392 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373393 ],
[email protected]2f80c312009-02-25 21:26:553394 },
3395 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:553396 'AdditionalDependencies': [
3397 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:503398 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:553399 'version.lib',
3400 'msimg32.lib',
3401 'ws2_32.lib',
3402 'usp10.lib',
3403 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:083404 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:483405 'winmm.lib',
3406 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:553407 ],
[email protected]60c219832012-03-21 22:59:323408
[email protected]4de39f82011-03-28 12:01:293409 'conditions': [
[email protected]3e2648a2011-03-21 20:58:503410 ['msvs_express', {
3411 # Explicitly required when using the ATL with express
3412 'AdditionalDependencies': [
3413 'atlthunk.lib',
3414 ],
[email protected]60c219832012-03-21 22:59:323415
3416 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3417 # almost eight hundred LNK4254 and LNK4078 warnings:
3418 # - warning LNK4254: section 'ATL' (50000040) merged into
3419 # '.rdata' (40000040) with different attributes
3420 # - warning LNK4078: multiple 'ATL' sections found with
3421 # different attributes
3422 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
[email protected]3e2648a2011-03-21 20:58:503423 }],
3424 ['MSVS_VERSION=="2005e"', {
3425 # Non-express versions link automatically to these
3426 'AdditionalDependencies': [
3427 'advapi32.lib',
3428 'comdlg32.lib',
3429 'ole32.lib',
3430 'shell32.lib',
3431 'user32.lib',
3432 'winspool.lib',
3433 ],
3434 }],
3435 ],
[email protected]a78da50e2010-06-09 21:31:373436 'AdditionalLibraryDirectories': [
[email protected]1f8d9402012-07-06 22:47:563437 '<(directx_sdk_path)/Lib/x86',
[email protected]1ab48032012-07-02 21:48:053438 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373439 ],
[email protected]2f80c312009-02-25 21:26:553440 'GenerateDebugInformation': 'true',
3441 'MapFileName': '$(OutDir)\\$(TargetName).map',
3442 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:553443 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483444 # SubSystem values:
3445 # 0 == not set
3446 # 1 == /SUBSYSTEM:CONSOLE
3447 # 2 == /SUBSYSTEM:WINDOWS
3448 # Most of the executables we'll ever create are tests
3449 # and utilities with console output.
3450 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553451 },
3452 'VCMIDLTool': {
3453 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093454 'TypeLibraryName': '$(InputName).tlb',
3455 'OutputDirectory': '$(IntDir)',
3456 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333457 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093458 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3459 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553460 },
3461 'VCResourceCompilerTool': {
3462 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383463 'AdditionalIncludeDirectories': [
3464 '<(DEPTH)',
3465 '<(SHARED_INTERMEDIATE_DIR)',
3466 ],
[email protected]2f80c312009-02-25 21:26:553467 },
3468 },
3469 },
3470 }],
[email protected]79e2336c2011-05-12 18:18:343471 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313472 'target_defaults': {
3473 'defines': [
3474 'DISABLE_NACL',
3475 ],
3476 },
3477 }],
[email protected]cfbf9bc2009-12-07 22:07:563478 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193479 'target_defaults': {
3480 'msvs_settings': {
3481 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193482 'DelayLoadDLLs': [
3483 'dbghelp.dll',
3484 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013485 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193486 'uxtheme.dll',
3487 ],
3488 },
3489 },
[email protected]ef4fa4072009-12-04 22:46:503490 'configurations': {
[email protected]5153767c2009-12-22 01:52:503491 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503492 'msvs_settings': {
3493 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163494 'AdditionalOptions': [
3495 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333496 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163497 '/ignore:4199',
3498 '/ignore:4221',
3499 '/nxcompat',
3500 ],
[email protected]ef4fa4072009-12-04 22:46:503501 },
3502 },
3503 },
[email protected]5153767c2009-12-22 01:52:503504 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503505 'msvs_settings': {
3506 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163507 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503508 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333509 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163510 '/ignore:4199',
3511 '/ignore:4221',
3512 '/nxcompat',
3513 ],
[email protected]ef4fa4072009-12-04 22:46:503514 },
3515 },
3516 },
3517 },
[email protected]48c7af72009-07-03 22:00:193518 },
3519 }],
[email protected]9821d0d2010-04-16 22:40:373520 ['enable_new_npdevice_api==1', {
3521 'target_defaults': {
3522 'defines': [
3523 'ENABLE_NEW_NPDEVICE_API',
3524 ],
3525 },
3526 }],
[email protected]220ea5932012-08-09 10:44:073527 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:233528 'conditions': [
3529 ['OS=="android"', {
3530 # Android could use the goma with clang.
3531 'make_global_settings': [
3532 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
3533 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3534 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3535 ['CC.host', '$(CC)'],
3536 ['CXX.host', '$(CXX)'],
3537 ['LINK.host', '$(LINK)'],
3538 ],
3539 }, {
3540 'make_global_settings': [
3541 ['CC', '<(make_clang_dir)/bin/clang'],
3542 ['CXX', '<(make_clang_dir)/bin/clang++'],
3543 ['LINK', '$(CXX)'],
3544 ['CC.host', '$(CC)'],
3545 ['CXX.host', '$(CXX)'],
3546 ['LINK.host', '$(LINK)'],
3547 ],
3548 }],
[email protected]34f40892011-09-06 21:53:303549 ],
3550 }],
[email protected]615fa6642012-08-14 19:17:073551 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:273552 # Hardcode the compiler names in the Makefile so that
3553 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:113554 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:043555 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
3556 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
3557 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:073558 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
3559 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3560 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:273561 ],
3562 }],
[email protected]2f80c312009-02-25 21:26:553563 ],
3564 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503565 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3566 # This block adds *project-wide* configuration settings to each project
3567 # file. It's almost always wrong to put things here. Specify your
3568 # custom xcode_settings in target_defaults to add them to targets instead.
3569
[email protected]1e013672012-06-29 22:12:203570 'conditions': [
[email protected]fca3d812012-07-27 00:55:363571 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3572 # setting sets the SDK on a project-wide basis. In order to get the
3573 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3574 # here at the project level.
[email protected]2c261532012-10-06 00:46:293575 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:363576 'conditions': [
[email protected]2c261532012-10-06 00:46:293577 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:363578 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:293579 }, {
3580 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:363581 }],
3582 ],
[email protected]2c261532012-10-06 00:46:293583 }],
3584 ['OS=="ios"', {
3585 'conditions': [
3586 ['ios_sdk_path==""', {
3587 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
3588 }, {
3589 'SDKROOT': '<(ios_sdk_path)', # -isysroot
3590 }],
3591 ],
[email protected]1e013672012-06-29 22:12:203592 }],
3593 ['OS=="ios"', {
3594 # Just build armv7 since iOS 4.3+ only supports armv7.
3595 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
3596 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:203597 # Target both iPhone and iPad.
3598 'TARGETED_DEVICE_FAMILY': '1,2',
3599 }],
3600 ],
[email protected]0c8ab452009-11-06 21:57:503601
[email protected]2f80c312009-02-25 21:26:553602 # The Xcode generator will look for an xcode_settings section at the root
3603 # of each dict and use it to apply settings on a file-wide basis. Most
3604 # settings should not be here, they should be in target-specific
3605 # xcode_settings sections, or better yet, should use non-Xcode-specific
3606 # settings in target dicts. SYMROOT is a special case, because many other
3607 # Xcode variables depend on it, including variables such as
3608 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3609 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3610 # files to appear (when present) in the UI as actual files and not red
3611 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3612 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163613 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553614 },
[email protected]ee28c9f2009-09-04 01:53:013615}