blob: dbfbf9f01284b3eba80c2ac8a359948a708595b3 [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]6155e702012-05-02 17:56:06133 # Enable touch UI on Metro and Chrome OS.
[email protected]46971922012-05-26 04:34:16134 ['OS=="win" or chromeos==1', {
[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]8a6abd12012-05-16 10:04:44256 # Set to true to instrument the code with function call logger.
257 # See src/third_party/cygprofile/cyg-profile.cc for details.
258 'order_profiling%': 0,
259
[email protected]00b0a7f2012-01-25 15:30:46260 # Use the provided profiled order file to link Chrome image with it.
261 # This makes Chrome faster by better using CPU cache when executing code.
262 # This is known as PGO (profile guided optimization).
263 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
264 'order_text_section%' : "",
265
[email protected]1ad5a7b2011-06-24 03:15:13266 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
267 # libraries on linux x86-64 and arm, plus ASLR.
268 'linux_fpic%': 1,
269
[email protected]bd7b6fe2012-03-05 21:02:40270 # Whether one-click signin is enabled or not.
271 'enable_one_click_signin%': 0,
272
[email protected]bbf766d2012-05-18 16:30:21273 # Enable Web Intents support in WebKit.
[email protected]5ffb0a42012-01-27 09:36:11274 'enable_web_intents%': 1,
275
[email protected]6a3cd37e2012-04-17 17:13:34276 # Enable Chrome browser extensions
277 'enable_extensions%': 1,
278
[email protected]658677f2012-06-09 06:04:02279 # Enable browser automation.
280 'enable_automation%': 1,
281
282 # Enable printing support and UI.
283 'enable_printing%': 1,
284
[email protected]5ffb0a42012-01-27 09:36:11285 # Enable Web Intents web content registration via HTML element
286 # and WebUI managing such registrations.
287 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01288
[email protected]dda90ae2011-07-19 22:07:48289 # Webrtc compilation is enabled by default. Set to 0 to disable.
290 'enable_webrtc%': 1,
291
[email protected]67c125d2011-10-11 18:58:22292 # PPAPI by default does not support plugins making calls off the main
293 # thread. Set to 1 to turn on experimental support for out-of-process
294 # plugins to make call of the main thread.
295 'enable_pepper_threading%': 0,
296
[email protected]f8ac9202012-08-14 22:29:02297 # Include the PPAPI IPC proxy for NaCl. This is a work-in-progress; this
298 # allows us to build this feature locally without it affecting others
299 # working in affected subsystems like base and ipc.
300 'build_ppapi_ipc_proxy_untrusted%': 0,
301
[email protected]cdb756ef2012-04-05 18:34:53302 # Enables use of the session service, which is enabled by default.
303 # Support for disabling depends on the platform.
304 'enable_session_service%': 1,
305
[email protected]6b40bb582012-03-15 20:50:38306 # Enables theme support, which is enabled by default. Support for
307 # disabling depends on the platform.
308 'enable_themes%': 1,
309
[email protected]0acdd772012-04-05 22:53:00310 # Enables support for background apps.
311 'enable_background%': 1,
312
[email protected]44879ed2012-04-06 01:11:02313 # Enable the task manager by default.
314 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45315
[email protected]22d6dd72012-05-15 07:29:55316 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
317 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
318 # the input value also defines the required XI2 minor minimum version.
319 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
320 'use_xi2_mt%': 0,
321
[email protected]9061bee82012-01-16 11:45:17322 # Use of precompiled headers on Windows.
323 #
324 # This is on by default in VS 2010, but off by default for VS
325 # 2008 because of complications that it can cause with our
326 # trybots etc.
327 #
328 # This variable may be explicitly set to 1 (enabled) or 0
329 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
330 # This setting will override the default.
331 #
332 # Note that a setting of 1 is probably suitable for most or all
333 # Windows developers using VS 2008, since precompiled headers
334 # provide a build speedup of 20-25%. There are a couple of
335 # small workarounds you may need to use when using VS 2008 (but
336 # not 2010), see
337 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
338 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16339 'chromium_win_pch%': 0,
340
[email protected]1e013672012-06-29 22:12:20341 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
342 # what is required, but the value is left blank so when it is set in
343 # the project files it will be the "current" iOS SDK. Forcing 5.0
344 # even though it is "current" causes Xcode to spit out a warning for
345 # every single project file for not using the "current" SDK.
346 'ios_sdk%': '',
347 'ios_deployment_target%': '4.3',
348
[email protected]3bb37e62012-04-19 03:40:08349 # Set this to true when building with Clang.
350 # See http://code.google.com/p/chromium/wiki/Clang for details.
351 'clang%': 0,
352
[email protected]18e0f39b2012-01-17 16:47:34353 # Enable plug-in installation by default.
354 'enable_plugin_installation%': 1,
355
[email protected]ddcaa412012-03-30 19:57:29356 # Enable protector service by default.
357 'enable_protector_service%': 1,
358
[email protected]62424a52012-03-18 03:09:50359 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42360 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35361 # Chrome UI.
362 # TODO(asvitkine): Enable this on all platforms and delete this flag.
363 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50364 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35365
[email protected]a9318c72012-03-01 01:29:47366 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
367 # with one of those tools.
368 'build_for_tool%': '',
369
[email protected]01971642012-03-07 14:39:56370 # Whether tests targets should be run, archived or just have the
371 # dependencies verified. All the tests targets have the '_run' suffix,
372 # e.g. base_unittests_run runs the target base_unittests. The test target
373 # always calls tools/isolate/isolate.py. See the script's --help for more
374 # information and the valid --mode values. Meant to be overriden with
375 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13376 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
377 # be done while the builders are being reconfigured to check out test data
378 # files.
[email protected]0ef3a522012-05-15 14:56:33379 'test_isolation_mode%': 'noop',
380 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise
381 # gyp will remove duplicate flags, causing isolate.py to be confused.
[email protected]2fb94e92012-05-18 18:49:39382 'test_isolation_outdir%': '<(PRODUCT_DIR)/isolate',
[email protected]01971642012-03-07 14:39:56383
[email protected]81d9b72d2012-03-26 22:29:17384 # Force rlz to use chrome's networking stack.
385 'force_rlz_use_chrome_net%': 1,
386
[email protected]740ebed2012-06-27 19:14:06387 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12388 'wix_path%': '<(DEPTH)/third_party/wix',
389
[email protected]bb6aba32011-01-07 19:04:43390 'conditions': [
[email protected]33423fa2011-09-23 18:18:14391 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
392 # the 'conditions' clause. Initial attempts resulted in chromium and
393 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22394 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21395 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22396 }, {
397 'use_skia%': 1,
398 }],
399
[email protected]79e2336c2011-05-12 18:18:34400 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37401 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34402 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37403 }, {
404 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34405 }],
406
[email protected]df9167b2011-11-14 19:15:25407 # A flag for BSD platforms
408 ['OS=="freebsd" or OS=="openbsd"', {
409 'os_bsd%': 1,
410 }, {
411 'os_bsd%': 0,
412 }],
413
[email protected]c329adf82011-10-05 14:34:57414 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42415 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57416 'use_nss%': 1,
417 }, {
418 'use_nss%': 0,
419 }],
[email protected]e0b85a52011-10-06 03:30:42420
[email protected]258dca42011-09-21 00:17:19421 # Flags to use X11 on non-Mac POSIX platforms
[email protected]1e013672012-06-29 22:12:20422 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19423 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34424 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37425 }, {
[email protected]258dca42011-09-21 00:17:19426 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37427 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34428 }],
[email protected]9a8175892012-03-20 02:11:58429
[email protected]efadeacf2011-10-27 19:01:00430 # We always use skia text rendering in Aura on Windows, since GDI
431 # doesn't agree with our BackingStore.
432 # TODO(beng): remove once skia text rendering is on by default.
433 ['use_aura==1 and OS=="win"', {
434 'enable_skia_text%': 1,
435 }],
[email protected]9edeb712011-09-20 21:20:33436
[email protected]63692212010-09-16 00:22:21437 # A flag to enable or disable our compile-time dependency
438 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
439 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49440 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50441 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21442 'use_gnome_keyring%': 0,
443 }, {
444 'use_gnome_keyring%': 1,
445 }],
[email protected]0afe5212010-10-01 18:56:11446
[email protected]8796d922012-08-07 01:23:11447 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20448 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43449 'use_titlecase_in_grd_files%': 1,
450 }],
451
[email protected]5f887612012-03-01 21:34:06452 # Enable file manager extension on Chrome OS.
453 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50454 'file_manager_extension%': 1,
455 }, {
[email protected]3d38d8e2011-04-16 20:48:51456 'file_manager_extension%': 0,
457 }],
[email protected]7de46352011-09-12 15:39:19458
[email protected]f032fe92012-06-12 19:20:01459 ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', {
460 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51461 }],
462
[email protected]da1c8d692011-09-20 20:35:01463 ['OS=="android"', {
464 'proprietary_codecs%': 1,
465 'enable_webrtc%': 0,
[email protected]48de0fc2012-08-02 11:03:58466 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01467 }],
[email protected]839d5172011-10-13 17:18:11468
[email protected]0d16f292012-07-02 22:10:48469 ['OS=="ios"', {
470 'enable_automation%': 0,
471 'remoting%': 0,
472 }],
473
[email protected]839d5172011-10-13 17:18:11474 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27475 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01476 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33477 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11478 }, {
[email protected]1ee7c56c2011-10-19 14:51:33479 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11480 }],
[email protected]9061bee82012-01-16 11:45:17481
[email protected]75de7212012-05-12 01:14:46482 # Turn precompiled headers on by default for VS 2010.
[email protected]f1f362b42012-05-15 17:46:58483 ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17484 'chromium_win_pch%': 1
485 }],
[email protected]18e0f39b2012-01-17 16:47:34486
[email protected]3d5173ec2012-03-27 04:08:23487 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34488 'enable_plugin_installation%': 0,
489 }, {
490 'enable_plugin_installation%': 1,
491 }],
[email protected]b07806c12012-02-03 22:44:59492
[email protected]1e013672012-06-29 22:12:20493 ['OS=="android" or OS=="ios"', {
[email protected]ddcaa412012-03-30 19:57:29494 'enable_protector_service%': 0,
495 }, {
496 'enable_protector_service%': 1,
497 }],
498
[email protected]8d726a42012-02-09 03:49:00499 # linux_use_gold_binary: whether to use the binary checked into
500 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40501 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51502 'linux_use_gold_binary%': 1,
503 }, {
504 'linux_use_gold_binary%': 0,
505 }],
506
[email protected]be239492012-02-09 19:00:17507 # linux_use_gold_flags: whether to use build flags that rely on gold.
508 # On by default for x64 Linux. Temporarily off for ChromeOS as
509 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40510 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17511 'linux_use_gold_flags%': 1,
512 }, {
[email protected]8d726a42012-02-09 03:49:00513 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59514 }],
[email protected]2e22e2f2012-03-15 21:53:10515
[email protected]e6026962012-06-14 21:28:32516 ['OS=="android"', {
517 'enable_captive_portal_detection%': 0,
518 }, {
519 'enable_captive_portal_detection%': 1,
520 }],
521
[email protected]3bd47e022012-03-22 04:19:12522 # Enable Skia UI text drawing incrementally on different platforms.
523 # http://crbug.com/105550
524 #
525 # On Aura, this allows per-tile painting to be used in the browser
526 # compositor.
[email protected]9197a9282012-05-30 14:12:32527 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12528 'use_canvas_skia%': 1,
529 }],
[email protected]adb44342012-07-23 13:36:12530
531 ['OS=="android"', {
532 # When building as part of the Android system, use system libraries
533 # where possible to reduce ROM size.
534 'use_system_libjpeg%': '<(android_build_type)',
535 }],
[email protected]b3f23ba2010-04-26 22:58:17536 ],
[email protected]e14a9f92009-08-05 19:26:07537 },
538
[email protected]e72e55b2011-01-06 22:19:30539 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07540 'branding%': '<(branding)',
541 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27542 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59543 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50544 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44545 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33546 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58547 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16548 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42549 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15550 'use_ibus%': '<(use_ibus)',
[email protected]c329adf82011-10-05 14:34:57551 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25552 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34553 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19554 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34555 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22556 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34557 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21558 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11559 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22560 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]f8ac9202012-08-14 22:29:02561 'build_ppapi_ipc_proxy_untrusted%': '<(build_ppapi_ipc_proxy_untrusted)',
[email protected]c153e5352009-09-22 12:37:44562 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05563 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24564 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06565 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35566 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20567 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21568 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54569 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01570 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36571 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43572 'armv7%': '<(armv7)',
573 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23574 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43575 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22576 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52577 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43578 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17579 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18580 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40581 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48582 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16583 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25584 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56585 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22586 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57587 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46588 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06589 'asan%': '<(asan)',
[email protected]c9a829272012-07-04 07:51:12590 'tsan%': '<(tsan)',
[email protected]8a6abd12012-05-16 10:04:44591 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46592 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34593 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07594 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11595 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]1e013672012-06-29 22:12:20596 'ios_sdk%': '<(ios_sdk)',
597 'ios_deployment_target%': '<(ios_deployment_target)',
[email protected]18e0f39b2012-01-17 16:47:34598 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]ddcaa412012-03-30 19:57:29599 'enable_protector_service%': '<(enable_protector_service)',
[email protected]cdb756ef2012-04-05 18:34:53600 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38601 'enable_themes%': '<(enable_themes)',
[email protected]0acdd772012-04-05 22:53:00602 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59603 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00604 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50605 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33606 'test_isolation_mode%': '<(test_isolation_mode)',
607 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10608 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02609 'enable_printing%': '<(enable_printing)',
[email protected]e6026962012-06-14 21:28:32610 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]81d9b72d2012-03-26 22:29:17611 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)',
[email protected]44879ed2012-04-06 01:11:02612 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06613 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12614 'wix_path%': '<(wix_path)',
[email protected]08d910e22012-05-11 05:42:35615 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]adb44342012-07-23 13:36:12616 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]0115f042012-07-27 20:36:53617 'android_build_type%': '<(android_build_type)',
[email protected]01971642012-03-07 14:39:56618
[email protected]371e1092011-10-12 20:37:36619 # Use system yasm instead of bundled one.
620 'use_system_yasm%': 0,
621
[email protected]cd00bd862012-02-29 00:40:36622 # Default to enabled PIE; this is important for ASLR but we may need to be
623 # able to turn it off for various reasons.
624 'linux_disable_pie%': 0,
625
[email protected]caa95c82009-11-23 22:39:32626 # The release channel that this build targets. This is used to restrict
627 # channel-specific build options, like which installer packages to create.
628 # The default is 'all', which does no channel-specific filtering.
629 'channel%': 'all',
630
[email protected]b3fb8092009-03-12 19:09:24631 # Override chromium_mac_pch and set it to 0 to suppress the use of
632 # precompiled headers on the Mac. Prefix header injection may still be
633 # used, but prefix headers will not be precompiled. This is useful when
634 # using distcc to distribute a build to compile slaves that don't
635 # share the same compiler executable as the system driving the compilation,
636 # because precompiled headers rely on pointers into a specific compiler
637 # executable's image. Setting this to 0 is needed to use an experimental
638 # Linux-Mac cross compiler distcc farm.
639 'chromium_mac_pch%': 1,
640
[email protected]3224dcd2009-09-16 17:31:25641 # Mac OS X SDK and deployment target support.
642 # The SDK identifies the version of the system headers that will be used,
643 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
644 # "Maximum allowed" refers to the operating system version whose APIs are
645 # available in the headers.
646 # The deployment target identifies the minimum system version that the
647 # built products are expected to function on. It corresponds to the
648 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
649 # To ensure these macros are available, #include <AvailabilityMacros.h>.
650 # Additional documentation on these macros is available at
651 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
[email protected]01c14f92012-07-17 17:47:05652 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
[email protected]c8aa511c2012-07-31 16:24:57653 # deployment target to 10.6. Other projects, such as O3D, may override
[email protected]fca3d812012-07-27 00:55:36654 # these defaults. If the SDK is installed someplace that Xcode doesn't
655 # know about, set mac_sdk_path to the path to the SDK. If set to a
656 # non-empty string, mac_sdk_path will be used in preference to mac_sdk.
[email protected]e228b0ee2012-07-27 21:31:03657 # mac_sdk gets its default value elsewhere in this file.
[email protected]fca3d812012-07-27 00:55:36658 'mac_sdk_path%': '',
[email protected]c8aa511c2012-07-31 16:24:57659 'mac_deployment_target%': '10.6',
[email protected]9543af052009-09-15 22:42:59660
[email protected]27b687ec42012-03-26 22:22:15661 # The default value for mac_strip in target_defaults. This cannot be
662 # set there, per the comment about variable% in a target_defaults.
663 'mac_strip_release%': 1,
664
[email protected]f5ecbba12009-04-03 04:35:18665 # Set to 1 to enable code coverage. In addition to build changes
666 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
667 # project file called "coverage".
668 # Currently ignored on Windows.
669 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49670
[email protected]9619e65d2012-05-23 19:06:52671 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
672 # This is useful for parallel compilation tools which can't support /Zi.
673 # Only used on Windows.
674 'win_z7%' : 0,
675
[email protected]7477ea6f2009-12-22 23:28:15676 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47677 # environment variable, the libcmt shim it uses sometimes gets in
678 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
679 # 'win_use_allocator_shim': 0,
680 # 'win_release_RuntimeLibrary': 2
681 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52682 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11683
[email protected]95ff8082009-11-13 22:21:01684 # Whether usage of OpenMAX is enabled.
685 'enable_openmax%': 0,
686
[email protected]d01120e62010-05-10 17:04:48687 # Whether proprietary audio/video codecs are assumed to be included with
688 # this build (only meaningful if branding!=Chrome).
689 'proprietary_codecs%': 0,
690
[email protected]e5b2eaa2009-04-14 01:39:12691 # TODO(bradnelson): eliminate this when possible.
692 # To allow local gyp files to prevent release.vsprops from being included.
693 # Yes(1) means include release.vsprops.
694 # Once all vsprops settings are migrated into gyp, this can go away.
695 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23696
[email protected]cbd5fd52009-08-26 00:14:27697 # TODO(bradnelson): eliminate this when possible.
698 # To allow local gyp files to override additional linker options for msvs.
699 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19700 'msvs_use_common_linker_extras%': 1,
701
[email protected]1ffb6502009-06-02 07:46:24702 # TODO(sgk): eliminate this if possible.
703 # It would be nicer to support this via a setting in 'target_defaults'
704 # in chrome/app/locales/locales.gypi overriding the setting in the
705 # 'Debug' configuration in the 'target_defaults' dict below,
706 # but that doesn't work as we'd like.
707 'msvs_debug_link_incremental%': '2',
708
[email protected]1f790ef2011-01-11 20:45:36709 # Needed for some of the largest modules.
710 'msvs_debug_link_nonincremental%': '1',
711
[email protected]5ab8f482011-08-18 18:30:06712 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
713 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26714 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06715
[email protected]573136142009-07-15 22:48:37716 # This is the location of the sandbox binary. Chrome looks for this before
717 # running the zygote process. If found, and SUID, it will be used to
718 # sandbox the zygote process and, thus, all renderer processes.
719 'linux_sandbox_path%': '',
720
[email protected]ad6d2c42009-09-15 20:13:38721 # Set this to true to enable SELinux support.
722 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57723
[email protected]3bb37e62012-04-19 03:40:08724 # Clang stuff.
725 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24726 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15727
[email protected]5e781232011-01-28 02:57:59728 # These two variables can be set in GYP_DEFINES while running
729 # |gclient runhooks| to let clang run a plugin in every compilation.
730 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
731 # Example:
[email protected]93120fe2011-02-03 20:46:42732 # 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:59733
734 'clang_load%': '',
735 'clang_add_plugin%': '',
736
[email protected]da1c8d692011-09-20 20:35:01737 # The default type of gtest.
738 'gtest_target_type%': 'executable',
739
[email protected]7664ab32011-02-01 23:35:25740 # Enable sampling based profiler.
741 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
742 'profiling%': '0',
743
[email protected]93b373502011-08-16 19:06:22744 # Enable strict glibc debug mode.
745 'glibcxx_debug%': 0,
746
[email protected]36532f332010-08-25 00:22:01747 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
748 'linux_breakpad%': 0,
749 # And if we want to dump symbols for Breakpad-enabled builds.
750 'linux_dump_symbols%': 0,
751 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03752 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49753 # Strip the test binaries needed for Linux reliability tests.
754 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03755
[email protected]46ce5b562010-06-16 18:39:53756 # Enable TCMalloc.
757 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24758
[email protected]39ca7de2010-04-16 08:04:03759 # Disable TCMalloc's debugallocation.
760 'linux_use_debugallocation%': 0,
761
[email protected]d8b60602010-03-26 09:41:22762 # Disable TCMalloc's heapchecker.
763 'linux_use_heapchecker%': 0,
764
[email protected]64e2d4a42010-08-27 10:13:21765 # Disable shadow stack keeping used by heapcheck to unwind the stacks
766 # better.
767 'linux_keep_shadow_stacks%': 0,
768
[email protected]556c5d72010-06-10 05:45:01769 # Set to 1 to link against libgnome-keyring instead of using dlopen().
770 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35771 # Set to 1 to link against gsettings APIs instead of using dlopen().
772 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01773
[email protected]77c1b29392009-12-04 06:21:29774 # Set Thumb compilation flags.
775 'arm_thumb%': 0,
776
[email protected]53e0f642010-03-05 01:41:56777 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
778 # arm_neon==0).
779 'arm_fpu%': 'vfpv3',
780
[email protected]5252af72012-05-04 19:26:40781 # Set ARM float abi compilation flag.
782 'arm_float_abi%': 'softfp',
783
[email protected]9821d0d2010-04-16 22:40:37784 # Enable new NPDevice API.
785 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50786
787 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14788 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50789
[email protected]6f51b27e2010-06-22 20:43:53790 # Enable a variable used elsewhere throughout the GYP files to determine
791 # whether to compile in the sources for the GPU plugin / process.
792 'enable_gpu%': 1,
793
[email protected]e72e55b2011-01-06 22:19:30794 # .gyp files or targets should set chromium_code to 1 if they build
795 # Chromium-specific code, as opposed to external code. This variable is
796 # used to control such things as the set of warnings to enable, and
797 # whether warnings are treated as errors.
798 'chromium_code%': 0,
799
[email protected]8d726a42012-02-09 03:49:00800 'release_valgrind_build%': 0,
801
[email protected]b1eb341c2011-11-09 18:46:07802 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
803 'enable_wexit_time_destructors%': 0,
804
[email protected]e72e55b2011-01-06 22:19:30805 # Set to 1 to compile with the built in pdf viewer.
806 'internal_pdf%': 0,
807
[email protected]9e1149d72012-07-24 01:27:17808 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
809 'internal_gles2_conform_tests%': 0,
810
[email protected]e72e55b2011-01-06 22:19:30811 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
812 # so Cocoa is happy (http://crbug.com/20441).
813 'locales': [
814 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
815 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
816 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19817 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30818 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
819 'vi', 'zh-CN', 'zh-TW',
820 ],
821
[email protected]cc0322d2011-07-24 09:29:19822 # Pseudo locales are special locales which are used for testing and
823 # debugging. They don't get copied to the final app. For more info,
824 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
825 'pseudo_locales': [
826 'fake-bidi',
827 ],
828
[email protected]bb6aba32011-01-07 19:04:43829 'grit_defines': [],
830
[email protected]bd3bd442011-03-28 07:58:51831 # If debug_devtools is set to 1, JavaScript files for DevTools are
832 # stored as is and loaded from disk. Otherwise, a concatenated file
833 # is stored in resources.pak. It is still possible to load JS files
834 # from disk by passing --debug-devtools cmdline switch.
835 'debug_devtools%': 0,
836
[email protected]464750f2011-10-24 23:16:18837 # The Java Bridge is not compiled in by default.
838 'java_bridge%': 0,
839
[email protected]1e013672012-06-29 22:12:20840 # Code signing for iOS binaries. The bots need to be able to disable this.
841 'chromium_ios_signing%': 1,
842
[email protected]33e1c372011-12-14 16:32:07843 # This flag is only used when disable_nacl==0 and disables all those
844 # subcomponents which would require the installation of a native_client
845 # untrusted toolchain.
846 'disable_nacl_untrusted%': 0,
847
[email protected]407dfa632011-12-23 11:59:35848 # Disable Dart by default.
849 'enable_dart%': 0,
850
[email protected]ff10b132012-02-29 22:53:30851 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
852 'msbuild_toolset%': '',
853
[email protected]836285f22012-04-03 16:19:26854 # Native Client is enabled by default.
855 'disable_nacl%': 0,
856
[email protected]740ebed2012-06-27 19:14:06857 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:12858 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
859
[email protected]1f8d9402012-07-06 22:47:56860 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
861 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:05862
[email protected]912c55c2009-07-31 23:33:55863 'conditions': [
[email protected]1f8d9402012-07-06 22:47:56864 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
865 'windows_sdk_path%': '<(windows_sdk_default_path)',
866 }, {
867 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
868 }],
869 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
870 'directx_sdk_path%': '<(directx_sdk_default_path)',
871 }, {
872 'directx_sdk_path%': '$(DXSDK_DIR)',
873 }],
[email protected]1e013672012-06-29 22:12:20874 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:23875 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43876 '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:27877 'conditions': [
[email protected]07c27ab02012-07-17 17:00:20878 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
879 # that it takes effect here.
880 ['clang==0 and asan==0 and tsan==0', {
881 # This will set gcc_version to XY if you are running gcc X.Y.*.
882 # This is used to tweak build flags for gcc 4.5.
883 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
884 }, {
885 'gcc_version%': 0,
886 }],
[email protected]2a77a9d2010-08-26 19:58:10887 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27888 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27889 }],
[email protected]4c9cc6c2009-10-01 18:54:57890 # All Chrome builds have breakpad symbols, but only process the
891 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08892 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57893 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57894 }],
[email protected]cbd5fd52009-08-26 00:14:27895 ],
[email protected]1e013672012-06-29 22:12:20896 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:48897 ['OS=="ios"', {
898 'disable_nacl%': 1,
[email protected]861557e2012-07-24 16:27:15899 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:13900 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:47901 'use_system_sqlite%': 1,
[email protected]0d16f292012-07-02 22:10:48902 }],
[email protected]da1c8d692011-09-20 20:35:01903 ['OS=="android"', {
904 # Location of Android NDK.
905 'variables': {
906 'variables': {
907 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
[email protected]219c7312012-05-10 20:32:40908 # Android uses x86 instead of ia32 for their target_arch
[email protected]febd3572012-05-03 09:17:45909 # designation.
[email protected]219c7312012-05-10 20:32:40910 # TODO(wistoch): Adjust the target_arch naming scheme to avoid
[email protected]febd3572012-05-03 09:17:45911 # confusion.
912 # http://crbug.com/125329
913 'conditions': [
914 ['target_arch == "ia32"', {
915 'target_arch': 'x86',
[email protected]de5b7a42012-05-16 06:18:41916 'android_app_abi%': 'x86',
917 }],
918 ['target_arch=="arm" and armv7==0', {
919 'android_app_abi%': 'armeabi',
920 }],
921 ['target_arch=="arm" and armv7==1', {
922 'android_app_abi%': 'armeabi-v7a',
[email protected]febd3572012-05-03 09:17:45923 }],
924 ],
[email protected]da1c8d692011-09-20 20:35:01925 },
926 'android_ndk_root%': '<(android_ndk_root)',
[email protected]f5c7758a2012-07-25 16:17:57927 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)',
[email protected]de5b7a42012-05-16 06:18:41928 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:01929 },
930 'android_ndk_root%': '<(android_ndk_root)',
931 'android_ndk_sysroot': '<(android_ndk_sysroot)',
932 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
933 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]de5b7a42012-05-16 06:18:41934 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:01935
[email protected]ef7ed7a2012-05-29 23:19:13936 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
937 # to specify the output directory for Ant in the Android build.
938 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
939
[email protected]da1c8d692011-09-20 20:35:01940 # Uses Android's crash report system
941 'linux_breakpad%': 0,
942
943 # Always uses openssl.
944 'use_openssl%': 1,
945
946 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:02947 'enable_task_manager%': 0,
[email protected]da1c8d692011-09-20 20:35:01948 'safe_browsing%': 0,
949 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22950 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56951 'enable_web_intents%': 0,
[email protected]6a3cd37e2012-04-17 17:13:34952 'enable_extensions%': 0,
[email protected]658677f2012-06-09 06:04:02953 'enable_automation%': 0,
954 'enable_printing%': 0,
[email protected]464750f2011-10-24 23:16:18955 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:58956 'build_ffmpegsumo%': 0,
957 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:02958
[email protected]ad17e342012-07-17 20:45:48959 # Disable Native Client.
960 'disable_nacl%': 1,
961
[email protected]6b40bb582012-03-15 20:50:38962 # Android does not support themes.
963 'enable_themes%': 0,
[email protected]58242012012-04-12 16:14:31964
965 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:00966 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:11967
[email protected]cdb756ef2012-04-05 18:34:53968 # Sessions are store separately in the Java side.
969 'enable_session_service%': 0,
970
[email protected]5fd2e842012-03-01 00:29:11971 # Set to 1 once we have a notification system for Android.
972 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57973 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01974
[email protected]ad17e342012-07-17 20:45:48975 'p2p_apis%' : 0,
976
[email protected]7b56f1872012-05-23 00:48:50977 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:09978 # OS==android, make all gtest_targets depend on
979 # testing/android/native_test.gyp:native_test_apk.
[email protected]48de0fc2012-08-02 11:03:58980 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:01981
982 # Uses system APIs for decoding audio and video.
983 'use_libffmpeg%': '0',
984
985 # Always use the chromium skia. The use_system_harfbuzz needs to
986 # match use_system_skia.
987 'use_system_skia%': '0',
988 'use_system_harfbuzz%': '0',
989
[email protected]f5c7758a2012-07-25 16:17:57990 # Configure crash reporting and build options based on release type.
[email protected]ad17e342012-07-17 20:45:48991 'conditions': [
[email protected]ad17e342012-07-17 20:45:48992 ['buildtype=="Official"', {
[email protected]f5c7758a2012-07-25 16:17:57993 # Only report crash dumps for Official builds.
[email protected]ad17e342012-07-17 20:45:48994 'linux_breakpad%': 1,
995 }, {
996 'linux_breakpad%': 0,
997 }],
998 ],
999
[email protected]adb44342012-07-23 13:36:121000 # When building as part of the Android system, use system libraries
1001 # where possible to reduce ROM size.
1002 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]3a820d12012-06-27 12:56:321003 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]03bdcc122012-07-10 09:02:251004 'use_system_expat%': '<(android_build_type)',
[email protected]ad17e342012-07-17 20:45:481005 'use_system_icu%': '<(android_build_type)',
[email protected]f91ba812012-07-11 00:00:511006 'use_system_stlport%': '<(android_build_type)',
[email protected]adb44342012-07-23 13:36:121007
[email protected]da1c8d692011-09-20 20:35:011008 # Copy it out one scope.
1009 'android_build_type%': '<(android_build_type)',
1010 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071011 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:111012 # Enable clang on mac by default!
1013 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:561014 # Compile in Breakpad support by default so that it can be
1015 # tested, even if it is not enabled by default at runtime.
1016 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071017 'conditions': [
1018 # mac_product_name is set to the name of the .app bundle as it should
1019 # appear on disk. This duplicates data from
1020 # chrome/app/theme/chromium/BRANDING and
1021 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1022 # these names into the build system.
1023 ['branding=="Chrome"', {
1024 'mac_product_name%': 'Google Chrome',
1025 }, { # else: branding!="Chrome"
1026 'mac_product_name%': 'Chromium',
1027 }],
1028
[email protected]e14a9f92009-08-05 19:26:071029 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]e228b0ee2012-07-27 21:31:031030 'mac_sdk%': '10.6',
[email protected]794fb4782011-12-14 19:10:561031 # Enable uploading crash dumps.
1032 'mac_breakpad_uploads%': 1,
1033 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071034 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561035 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071036 'mac_keystone%': 1,
1037 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]bedaa5f72012-07-31 14:37:591038 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]794fb4782011-12-14 19:10:561039 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071040 'mac_breakpad%': 0,
1041 'mac_keystone%': 0,
1042 }],
1043 ],
1044 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:431045
[email protected]912c55c2009-07-31 23:33:551046 ['OS=="win"', {
1047 'conditions': [
[email protected]8974e042010-06-21 18:06:521048 ['component=="shared_library"', {
1049 'win_use_allocator_shim%': 0,
1050 }],
[email protected]2212d272011-12-20 21:37:371051 # Whether to use multiple cores to compile with visual studio. This is
1052 # optional because it sometimes causes corruption on VS 2005.
1053 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:551054 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:131055 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:551056 },{
1057 'msvs_multi_core_compile%': 1,
1058 }],
[email protected]10bb8c92009-08-07 21:16:031059 # Don't do incremental linking for large modules on 32-bit.
1060 ['MSVS_OS_BITS==32', {
1061 'msvs_large_module_debug_link_mode%': '1', # No
1062 },{
1063 'msvs_large_module_debug_link_mode%': '2', # Yes
1064 }],
[email protected]3e2648a2011-03-21 20:58:501065 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
1066 'msvs_express%': 1,
1067 'secure_atl%': 0,
1068 },{
1069 'msvs_express%': 0,
1070 'secure_atl%': 1,
1071 }],
[email protected]912c55c2009-07-31 23:33:551072 ],
[email protected]ef4fa4072009-12-04 22:46:501073 'nacl_win64_defines': [
1074 # This flag is used to minimize dependencies when building
1075 # Native Client loader for 64-bit Windows.
1076 'NACL_WIN64',
1077 ],
[email protected]912c55c2009-07-31 23:33:551078 }],
[email protected]bb6aba32011-01-07 19:04:431079
[email protected]febd3572012-05-03 09:17:451080 ['os_posix==1 and chromeos==0 and OS!="android"', {
[email protected]8e553f42010-10-25 20:05:441081 'use_cups%': 1,
1082 }, {
1083 'use_cups%': 0,
1084 }],
[email protected]bb6aba32011-01-07 19:04:431085
[email protected]2f7da672012-06-21 08:38:321086 # Native Client glibc toolchain is enabled by default except on arm.
1087 ['target_arch=="arm"', {
1088 'disable_glibc%': 1,
1089 }, {
1090 'disable_glibc%': 0,
1091 }],
1092
[email protected]19fe8f0b2010-12-07 07:27:271093 # Set the relative path from this file to the GYP file of the JPEG
1094 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281095 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1096 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271097 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281098 }, {
1099 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1100 }],
[email protected]bb6aba32011-01-07 19:04:431101
[email protected]abcc9ac2011-05-16 20:04:351102 # Options controlling the use of GConf (the classic GNOME configuration
1103 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311104 ['chromeos==1', {
1105 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351106 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311107 }, {
1108 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351109 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311110 }],
1111
[email protected]4de39f82011-03-28 12:01:291112 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291113 ['branding=="Chrome"', {
1114 # TODO(mmoss) The .grd files look for _google_chrome, but for
1115 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291116 'grit_defines': ['-D', '_google_chrome',
1117 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291118 }, {
[email protected]4de39f82011-03-28 12:01:291119 'grit_defines': ['-D', '_chromium',
1120 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291121 }],
[email protected]bb6aba32011-01-07 19:04:431122 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131123 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431124 }],
1125 ['toolkit_views==1', {
1126 'grit_defines': ['-D', 'toolkit_views'],
1127 }],
[email protected]8dd791d2011-09-16 16:37:301128 ['use_aura==1', {
1129 'grit_defines': ['-D', 'use_aura'],
1130 }],
[email protected]ed329be2012-01-03 22:02:161131 ['use_ash==1', {
1132 'grit_defines': ['-D', 'use_ash'],
1133 }],
[email protected]c329adf82011-10-05 14:34:571134 ['use_nss==1', {
1135 'grit_defines': ['-D', 'use_nss'],
1136 }],
[email protected]e47c32032011-03-01 19:26:201137 ['file_manager_extension==1', {
1138 'grit_defines': ['-D', 'file_manager_extension'],
1139 }],
[email protected]9a425422011-01-11 00:53:181140 ['remoting==1', {
1141 'grit_defines': ['-D', 'remoting'],
1142 }],
[email protected]bb6aba32011-01-07 19:04:431143 ['use_titlecase_in_grd_files==1', {
1144 'grit_defines': ['-D', 'use_titlecase'],
1145 }],
[email protected]00dc155832011-02-01 18:51:191146 ['use_third_party_translations==1', {
1147 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121148 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161149 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1150 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121151 ],
[email protected]00dc155832011-02-01 18:51:191152 }],
[email protected]da1c8d692011-09-20 20:35:011153 ['OS=="android"', {
1154 'grit_defines': ['-D', 'android'],
1155 }],
[email protected]d39e3862012-06-26 22:38:231156 ['OS=="mac"', {
1157 'grit_defines': ['-D', 'scale_factors=2x'],
1158 }],
[email protected]6a3cd37e2012-04-17 17:13:341159 ['enable_extensions==1', {
1160 'grit_defines': ['-D', 'enable_extensions'],
1161 }],
[email protected]658677f2012-06-09 06:04:021162 ['enable_printing==1', {
1163 'grit_defines': ['-D', 'enable_printing'],
1164 }],
[email protected]c2aad542012-07-31 20:40:331165 ['enable_themes==1', {
1166 'grit_defines': ['-D', 'enable_themes'],
1167 }],
[email protected]3bb37e62012-04-19 03:40:081168 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201169 'clang_chrome_plugins_flags': [
1170 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311171 ],
[email protected]5d451ad2011-02-11 16:43:461172 }],
[email protected]cfa2e1102011-04-27 22:30:231173
[email protected]5ffb0a42012-01-27 09:36:111174 ['enable_web_intents_tag==1', {
1175 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071176 }],
1177
[email protected]92799b632011-08-15 14:33:061178 ['asan==1', {
1179 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:201180 # Do not use Chrome plugins for Clang. The Clang version in
1181 # third_party/asan may be different from the default one.
[email protected]c9a829272012-07-04 07:51:121182 # TODO(glider): this isn't true anymore, need to check if we can use the
1183 # plugins now.
[email protected]5dc6aaac2011-10-12 16:55:201184 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:061185 }],
[email protected]a9318c72012-03-01 01:29:471186
[email protected]c9a829272012-07-04 07:51:121187 ['tsan==1', {
1188 'clang%': 1,
1189 }],
1190
[email protected]a9318c72012-03-01 01:29:471191 # On valgrind bots, override the optimizer settings so we don't inline too
1192 # much and make the stacks harder to figure out.
1193 #
1194 # TODO(rnk): Kill off variables that no one else uses and just implement
1195 # them under a build_for_tool== condition.
1196 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1197 # gcc flags
1198 'mac_debug_optimization': '1',
1199 'mac_release_optimization': '1',
1200 'release_optimize': '1',
1201 'no_gc_sections': 1,
1202 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1203 '-fno-builtin -fno-optimize-sibling-calls',
1204 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1205 '-fno-builtin -fno-optimize-sibling-calls',
1206
1207 # MSVS flags for TSan on Pin and Windows.
1208 'win_debug_RuntimeChecks': '0',
1209 'win_debug_disable_iterator_debugging': '1',
1210 'win_debug_Optimization': '1',
1211 'win_debug_InlineFunctionExpansion': '0',
1212 'win_release_InlineFunctionExpansion': '0',
1213 'win_release_OmitFramePointers': '0',
1214
1215 'linux_use_tcmalloc': 1,
1216 'release_valgrind_build': 1,
1217 'werror': '',
1218 'component': 'static_library',
1219 'use_system_zlib': 0,
1220 }],
1221
1222 # Build tweaks for DrMemory.
1223 # TODO(rnk): Combine with tsan config to share the builder.
1224 # http://crbug.com/108155
1225 ['build_for_tool=="drmemory"', {
1226 # DrMemory can't handle the debug CRT dll, so build static.
1227 'component': 'static_library',
1228 # These runtime checks force initialization of stack vars which blocks
1229 # DrMemory's uninit detection.
1230 'win_debug_RuntimeChecks': '0',
1231 # Iterator debugging is slow.
1232 'win_debug_disable_iterator_debugging': '1',
1233 # Try to disable optimizations that mess up stacks in a release build.
1234 'win_release_InlineFunctionExpansion': '0',
1235 'win_release_OmitFramePointers': '0',
1236 # Keep the code under #ifndef NVALGRIND.
1237 'release_valgrind_build': 1,
1238 }],
[email protected]912c55c2009-07-31 23:33:551239 ],
[email protected]a9318c72012-03-01 01:29:471240
[email protected]35958422011-09-28 02:03:591241 # List of default apps to install in new profiles. The first list contains
1242 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061243 # contains the destination location for each of the files. When a crx
1244 # is added or removed from the list, the chrome/browser/resources/
1245 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591246 'default_apps_list': [
1247 'browser/resources/default_apps/external_extensions.json',
1248 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061249 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591250 'browser/resources/default_apps/youtube.crx',
1251 ],
1252 'default_apps_list_linux_dest': [
1253 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1254 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061255 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591256 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1257 ],
[email protected]2f80c312009-02-25 21:26:551258 },
1259 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261260 'variables': {
[email protected]a6e22132010-02-10 20:43:181261 # The condition that operates on chromium_code is in a target_conditions
1262 # section, and will not have access to the default fallback value of
1263 # chromium_code at the top of this file, or to the chromium_code
1264 # variable placed at the root variables scope of .gyp files, because
1265 # those variables are not set at target scope. As a workaround,
1266 # if chromium_code is not set at target scope, define it in target scope
1267 # to contain whatever value it has during early variable expansion.
1268 # That's enough to make it available during target conditional
1269 # processing.
1270 'chromium_code%': '<(chromium_code)',
1271
[email protected]7e0d664a2009-12-03 21:07:471272 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1273 'win_release_Optimization%': '2', # 2 = /Os
1274 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331275
1276 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241277 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111278 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241279 # Tri-state: blank is default, 1 on, 0 off
1280 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331281
[email protected]6b0507b2010-05-07 07:41:211282 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1283 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331284
[email protected]6b0507b2010-05-07 07:41:211285 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151286 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1287 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331288
[email protected]fac10d12010-11-08 16:00:311289 # VS inserts quite a lot of extra checks to algorithms like
1290 # std::partial_sort in Debug build which make them O(N^2)
1291 # instead of O(N*logN). This is particularly slow under memory
1292 # tools like ThreadSanitizer so we want it to be disablable.
1293 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1294 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471295
[email protected]ffd984b12009-09-11 19:37:001296 'release_extra_cflags%': '',
1297 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001298
1299 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521300
[email protected]ef5c5f1b2011-12-17 02:16:241301 # the non-qualified versions are widely assumed to be *nix-only
1302 'win_release_extra_cflags%': '',
1303 'win_debug_extra_cflags%': '',
1304
[email protected]b1eb341c2011-11-09 18:46:071305 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1306 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1307
[email protected]ef3326702011-10-06 18:06:441308 # Only used by Windows build for now. Can be used to build into a
1309 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1310 # output files in src/build/VS2010_{Debug,Release}.
1311 'build_dir_prefix%': '',
1312
[email protected]9ac2db692012-06-08 01:01:571313 # Targets are by default not nacl untrusted code.
1314 'nacl_untrusted_build%': 0,
1315
[email protected]8974e042010-06-21 18:06:521316 'conditions': [
1317 ['OS=="win" and component=="shared_library"', {
1318 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161319 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1320 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521321 }, {
1322 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1323 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1324 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1325 }],
[email protected]1e013672012-06-29 22:12:201326 ['OS=="ios"', {
1327 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1328 'mac_release_optimization%': 's', # Use -Os unless overridden
1329 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1330 }, {
1331 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1332 'mac_release_optimization%': '3', # Use -O3 unless overridden
1333 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1334 }],
[email protected]8974e042010-06-21 18:06:521335 ],
[email protected]1c966092009-08-20 21:19:261336 },
[email protected]32aa8cc2009-03-04 21:36:391337 'conditions': [
[email protected]ff10b132012-02-29 22:53:301338 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1339 'msbuild_toolset': '<(msbuild_toolset)',
1340 }],
[email protected]32aa8cc2009-03-04 21:36:391341 ['branding=="Chrome"', {
1342 'defines': ['GOOGLE_CHROME_BUILD'],
1343 }, { # else: branding!="Chrome"
1344 'defines': ['CHROMIUM_BUILD'],
1345 }],
[email protected]286d9a12012-05-30 16:20:381346 ['OS=="mac" and component=="shared_library"', {
1347 'xcode_settings': {
1348 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1349 'LD_RUNPATH_SEARCH_PATHS': [
1350 # For unbundled binaries.
1351 '@loader_path/.',
1352 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1353 '@loader_path/../../..',
1354 ],
1355 },
1356 }],
[email protected]81d9b72d2012-03-26 22:29:171357 ['branding=="Chrome" and (OS=="win" or OS=="mac")', {
1358 'defines': ['ENABLE_RLZ'],
1359 }],
[email protected]63e39a282011-07-13 20:41:281360 ['component=="shared_library"', {
1361 'defines': ['COMPONENT_BUILD'],
1362 }],
[email protected]06c756182010-04-27 18:31:311363 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171364 'defines': ['TOOLKIT_VIEWS=1'],
1365 }],
[email protected]1ee7c56c2011-10-19 14:51:331366 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111367 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1368 }],
[email protected]41423092011-08-25 15:39:581369 ['use_aura==1', {
1370 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351371 }],
[email protected]ed329be2012-01-03 22:02:161372 ['use_ash==1', {
1373 'defines': ['USE_ASH=1'],
1374 }],
[email protected]c329adf82011-10-05 14:34:571375 ['use_nss==1', {
1376 'defines': ['USE_NSS=1'],
1377 }],
[email protected]bd7b6fe2012-03-05 21:02:401378 ['enable_one_click_signin==1', {
1379 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1380 }],
[email protected]a47aa892011-11-22 03:12:311381 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1382 # TODO(erg): We are progressively sealing up use of deprecated features
1383 # in gtk in preparation for an eventual porting to gtk3.
1384 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1385 }],
[email protected]fdc5bed2010-01-09 01:16:571386 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291387 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501388 }],
[email protected]f56797b2011-09-25 00:04:351389 ['use_xi2_mt!=0', {
1390 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1391 }],
[email protected]e47c32032011-03-01 19:26:201392 ['file_manager_extension==1', {
1393 'defines': ['FILE_MANAGER_EXTENSION=1'],
1394 }],
[email protected]7664ab32011-02-01 23:35:251395 ['profiling==1', {
1396 'defines': ['ENABLE_PROFILING=1'],
1397 }],
[email protected]93b373502011-08-16 19:06:221398 ['OS=="linux" and glibcxx_debug==1', {
1399 'defines': ['_GLIBCXX_DEBUG=1',],
1400 'cflags_cc!': ['-fno-rtti'],
1401 'cflags_cc+': ['-frtti', '-g'],
1402 }],
[email protected]542bf24a2010-06-11 23:08:171403 ['remoting==1', {
1404 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001405 }],
[email protected]5b87e782012-02-09 18:19:321406 ['enable_webrtc==1', {
1407 'defines': ['ENABLE_WEBRTC=1'],
1408 }],
[email protected]d01120e62010-05-10 17:04:481409 ['proprietary_codecs==1', {
1410 'defines': ['USE_PROPRIETARY_CODECS'],
1411 }],
[email protected]67c125d2011-10-11 18:58:221412 ['enable_pepper_threading==1', {
1413 'defines': ['ENABLE_PEPPER_THREADING'],
1414 }],
[email protected]7ddea9802012-02-22 23:08:051415 ['enable_viewport==1', {
1416 'defines': ['ENABLE_VIEWPORT'],
1417 }],
[email protected]f31e2e52011-07-14 16:01:191418 ['configuration_policy==1', {
1419 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1420 }],
[email protected]9eb100e2011-10-14 05:08:221421 ['input_speech==1', {
1422 'defines': ['ENABLE_INPUT_SPEECH'],
1423 }],
[email protected]7cce3232011-10-28 10:41:571424 ['notifications==1', {
1425 'defines': ['ENABLE_NOTIFICATIONS'],
1426 }],
[email protected]1efbaaa2012-04-24 02:43:241427 ['enable_hidpi==1', {
1428 'defines': ['ENABLE_HIDPI=1'],
1429 }],
[email protected]9c1949e2009-10-02 19:59:541430 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171431
[email protected]9c1949e2009-10-02 19:59:541432 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141433 # For Windows and Mac, we don't genererate debug information.
1434 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541435 'msvs_settings': {
1436 'VCLinkerTool': {
1437 'GenerateDebugInformation': 'false',
1438 },
1439 'VCCLCompilerTool': {
1440 'DebugInformationFormat': '0',
1441 }
[email protected]da4d4ea2011-09-22 20:23:141442 },
1443 'xcode_settings': {
1444 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1445 },
[email protected]1cc2fa72010-07-03 08:49:241446 }, { # else: OS != "win", generate less debug information.
1447 'variables': {
1448 'debug_extra_cflags': '-g1',
1449 },
[email protected]37c84192010-04-14 21:37:401450 }],
[email protected]aecc4d12011-01-19 05:32:331451 # Clang creates chubby debug information, which makes linking very
1452 # slow. For now, don't create debug information with clang. See
1453 # http://crbug.com/70000
1454 ['OS=="linux" and clang==1', {
1455 'variables': {
1456 'debug_extra_cflags': '-g0',
1457 },
1458 }],
[email protected]9c1949e2009-10-02 19:59:541459 ], # conditions for fastbuild.
1460 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011461 ['dcheck_always_on!=0', {
1462 'defines': ['DCHECK_ALWAYS_ON=1'],
1463 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381464 ['selinux==1', {
1465 'defines': ['CHROMIUM_SELINUX=1'],
1466 }],
[email protected]7e0d664a2009-12-03 21:07:471467 ['win_use_allocator_shim==0', {
1468 'conditions': [
1469 ['OS=="win"', {
1470 'defines': ['NO_TCMALLOC'],
1471 }],
1472 ],
1473 }],
[email protected]43f28f832010-02-03 02:28:481474 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151475 'defines': [
1476 'ENABLE_GPU=1',
1477 ],
1478 }],
[email protected]b1c2a5542010-10-08 12:44:401479 ['use_openssl==1', {
1480 'defines': [
1481 'USE_OPENSSL=1',
1482 ],
1483 }],
[email protected]ed154592010-04-29 00:18:501484 ['enable_eglimage==1', {
1485 'defines': [
1486 'ENABLE_EGLIMAGE=1',
1487 ],
1488 }],
[email protected]7d7564a12011-06-21 19:20:221489 ['use_skia==1', {
1490 'defines': [
1491 'USE_SKIA=1',
1492 ],
1493 }],
[email protected]f5ecbba12009-04-03 04:35:181494 ['coverage!=0', {
1495 'conditions': [
1496 ['OS=="mac"', {
1497 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041498 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1499 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471500 },
[email protected]e4fb84c2009-12-28 20:45:431501 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101502 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431503 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181504 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431505 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181506 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471507 }],
1508 ],
1509 }],
[email protected]da1c8d692011-09-20 20:35:011510 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181511 'cflags': [ '-ftest-coverage',
1512 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001513 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181514 }],
[email protected]e8f6ff42009-07-07 18:20:531515 # Finally, for Windows, we simply turn on profiling.
1516 ['OS=="win"', {
1517 'msvs_settings': {
1518 'VCLinkerTool': {
1519 'Profile': 'true',
1520 },
[email protected]10bb8c92009-08-07 21:16:031521 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531522 # /Z7, not /Zi, so coverage is happyb
1523 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161524 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531525 }
1526 }
1527 }], # OS==win
1528 ], # conditions for coverage
1529 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381530 ['OS=="win"', {
1531 'defines': [
1532 '__STD_C',
1533 '_CRT_SECURE_NO_DEPRECATE',
1534 '_SCL_SECURE_NO_DEPRECATE',
1535 ],
1536 'include_dirs': [
1537 '<(DEPTH)/third_party/wtl/include',
1538 ],
[email protected]9619e65d2012-05-23 19:06:521539 'conditions': [
1540 ['win_z7!=0', {
1541 'msvs_settings': {
1542 'VCCLCompilerTool': {
1543 'DebugInformationFormat': '1',
1544 }
1545 }
1546 }],
1547 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381548 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021549 ['enable_task_manager==1', {
1550 'defines': [
1551 'ENABLE_TASK_MANAGER=1',
1552 ],
1553 }],
[email protected]41ed4e82011-08-25 23:02:071554 ['enable_web_intents==1', {
1555 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471556 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071557 ],
1558 }],
[email protected]6a3cd37e2012-04-17 17:13:341559 ['enable_extensions==1', {
1560 'defines': [
1561 'ENABLE_EXTENSIONS=1',
1562 ],
1563 }],
[email protected]13eb97d2012-01-05 01:07:121564 ['OS=="win" and branding=="Chrome"', {
1565 'defines': ['ENABLE_SWIFTSHADER'],
1566 }],
[email protected]407dfa632011-12-23 11:59:351567 ['enable_dart==1', {
1568 'defines': ['WEBKIT_USING_DART=1'],
1569 }],
[email protected]18e0f39b2012-01-17 16:47:341570 ['enable_plugin_installation==1', {
1571 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1572 }],
[email protected]ddcaa412012-03-30 19:57:291573 ['enable_protector_service==1', {
1574 'defines': ['ENABLE_PROTECTOR_SERVICE=1'],
1575 }],
[email protected]cdb756ef2012-04-05 18:34:531576 ['enable_session_service==1', {
1577 'defines': ['ENABLE_SESSION_SERVICE=1'],
1578 }],
[email protected]6b40bb582012-03-15 20:50:381579 ['enable_themes==1', {
1580 'defines': ['ENABLE_THEMES=1'],
1581 }],
[email protected]0acdd772012-04-05 22:53:001582 ['enable_background==1', {
1583 'defines': ['ENABLE_BACKGROUND=1'],
1584 }],
[email protected]2e22e2f2012-03-15 21:53:101585 ['enable_automation==1', {
1586 'defines': ['ENABLE_AUTOMATION=1'],
1587 }],
[email protected]658677f2012-06-09 06:04:021588 ['enable_printing==1', {
1589 'defines': ['ENABLE_PRINTING=1'],
1590 }],
[email protected]e6026962012-06-14 21:28:321591 ['enable_captive_portal_detection==1', {
1592 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1593 }],
[email protected]a6e22132010-02-10 20:43:181594 ], # conditions for 'target_defaults'
1595 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071596 ['enable_wexit_time_destructors==1', {
1597 'conditions': [
1598 [ 'clang==1', {
1599 'cflags': [
1600 '-Wexit-time-destructors',
1601 ],
1602 'xcode_settings': {
1603 'WARNING_CFLAGS': [
1604 '-Wexit-time-destructors',
1605 ],
1606 },
1607 }],
1608 ],
1609 }],
[email protected]c14d8e772010-02-09 22:06:151610 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281611 'conditions': [
[email protected]1e013672012-06-29 22:12:201612 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:331613 # We don't want to get warnings from third-party code,
1614 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281615 'cflags!': [
1616 '-Wall',
1617 '-Wextra',
1618 '-Werror',
1619 ],
[email protected]167ec822011-10-24 22:05:271620 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001621 # Don't warn about hash_map in third-party code.
1622 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271623 ],
1624 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331625 # Don't warn about printf format problems.
1626 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221627 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001628 ],
[email protected]d16bd642011-07-25 23:59:181629 'cflags_cc!': [
1630 # TODO(fischman): remove this.
1631 # http://code.google.com/p/chromium/issues/detail?id=90453
1632 '-Wsign-compare',
1633 ]
[email protected]d8543312010-02-10 17:43:281634 }],
[email protected]bc073c062012-01-13 06:28:031635 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111636 'cflags': [
1637 # Don't warn about ignoring the return value from e.g. close().
1638 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031639 # BSD systems do not support this option, since they are usually
1640 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111641 '-Wno-unused-result',
1642 ],
1643 }],
[email protected]d8543312010-02-10 17:43:281644 [ 'OS=="win"', {
1645 'defines': [
1646 '_CRT_SECURE_NO_DEPRECATE',
1647 '_CRT_NONSTDC_NO_WARNINGS',
1648 '_CRT_NONSTDC_NO_DEPRECATE',
1649 '_SCL_SECURE_NO_DEPRECATE',
1650 ],
1651 'msvs_disabled_warnings': [4800],
1652 'msvs_settings': {
1653 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111654 'WarningLevel': '3',
1655 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281656 'Detect64BitPortabilityProblems': 'false',
1657 },
1658 },
1659 }],
[email protected]ea47b6a2011-07-17 19:39:421660 # TODO(darin): Unfortunately, some third_party code depends on base/
1661 [ 'OS=="win" and component=="shared_library"', {
1662 'msvs_disabled_warnings': [
1663 4251, # class 'std::xx' needs to have dll-interface.
1664 ],
1665 }],
[email protected]1e013672012-06-29 22:12:201666 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:281667 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:061668 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281669 },
[email protected]3a352c362012-05-08 19:45:491670 'conditions': [
1671 ['buildtype=="Official"', {
1672 'xcode_settings': {
1673 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
1674 },
1675 }],
1676 ],
[email protected]d8543312010-02-10 17:43:281677 }],
[email protected]1e013672012-06-29 22:12:201678 [ 'OS=="ios"', {
1679 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:221680 # TODO(ios): Fix remaining warnings in third-party code, then
1681 # remove this; the Mac cleanup didn't get everything that's
1682 # flagged in an iOS build.
1683 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:201684 'RUN_CLANG_STATIC_ANALYZER': 'NO',
1685 },
1686 }],
[email protected]c14d8e772010-02-09 22:06:151687 ],
1688 }, {
[email protected]a5c598152012-01-27 04:55:131689 'includes': [
1690 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1691 'filename_rules.gypi',
1692 ],
[email protected]c14d8e772010-02-09 22:06:151693 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1694 # C99 macros on Mac and Linux.
1695 'defines': [
1696 '__STDC_FORMAT_MACROS',
1697 ],
1698 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151699 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071700 # turn on warnings for signed/unsigned mismatch on chromium code.
1701 'msvs_settings': {
1702 'VCCLCompilerTool': {
1703 'AdditionalOptions': ['/we4389'],
1704 },
1705 },
[email protected]c14d8e772010-02-09 22:06:151706 }],
[email protected]63e39a282011-07-13 20:41:281707 ['OS=="win" and component=="shared_library"', {
1708 'msvs_disabled_warnings': [
1709 4251, # class 'std::xx' needs to have dll-interface.
1710 ],
1711 }],
[email protected]c14d8e772010-02-09 22:06:151712 ],
1713 }],
[email protected]a6e22132010-02-10 20:43:181714 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551715 'default_configuration': 'Debug',
1716 'configurations': {
[email protected]5153767c2009-12-22 01:52:501717 # VCLinkerTool LinkIncremental values below:
1718 # 0 == default
1719 # 1 == /INCREMENTAL:NO
1720 # 2 == /INCREMENTAL
1721 # Debug links incremental, Release does not.
1722 #
[email protected]7b99801e2010-11-03 17:26:231723 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501724 #
1725 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561726 'abstract': 1,
1727 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511728 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561729 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1730 'CharacterSet': '1',
1731 },
[email protected]5153767c2009-12-22 01:52:501732 },
1733 'x86_Base': {
1734 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501735 'msvs_settings': {
1736 'VCLinkerTool': {
1737 'TargetMachine': '1',
1738 },
1739 },
[email protected]2fa40782009-11-01 21:17:341740 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561741 },
[email protected]5153767c2009-12-22 01:52:501742 'x64_Base': {
1743 'abstract': 1,
1744 'msvs_configuration_platform': 'x64',
1745 'msvs_settings': {
1746 'VCLinkerTool': {
1747 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501748 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:051749 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:501750 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:051751 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:501752 },
[email protected]d26b4418ab2010-03-24 22:06:351753 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501754 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:051755 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:501756 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:051757 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:501758 },
1759 },
1760 'defines': [
1761 # Not sure if tcmalloc works on 64-bit Windows.
1762 'NO_TCMALLOC',
1763 ],
1764 },
1765 'Debug_Base': {
1766 'abstract': 1,
[email protected]14339762011-04-05 07:36:581767 'defines': [
1768 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1769 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1770 ],
[email protected]1c966092009-08-20 21:19:261771 'xcode_settings': {
1772 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291773 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491774 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491775 '<@(debug_extra_cflags)',
1776 ],
[email protected]1c966092009-08-20 21:19:261777 },
[email protected]bb05e452009-10-29 21:24:561778 'msvs_settings': {
1779 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471780 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561781 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211782 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471783 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151784 'conditions': [
1785 # According to MSVS, InlineFunctionExpansion=0 means
1786 # "default inlining", not "/Ob0".
1787 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1788 ['win_debug_InlineFunctionExpansion==0', {
1789 'AdditionalOptions': ['/Ob0'],
1790 }],
1791 ['win_debug_InlineFunctionExpansion!=""', {
1792 'InlineFunctionExpansion':
1793 '<(win_debug_InlineFunctionExpansion)',
1794 }],
[email protected]fac10d12010-11-08 16:00:311795 ['win_debug_disable_iterator_debugging==1', {
1796 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1797 }],
[email protected]ef5c5f1b2011-12-17 02:16:241798
1799 # if win_debug_OmitFramePointers is blank, leave as default
1800 ['win_debug_OmitFramePointers==1', {
1801 'OmitFramePointers': 'true',
1802 }],
1803 ['win_debug_OmitFramePointers==0', {
1804 'OmitFramePointers': 'false',
1805 # The above is not sufficient (http://crbug.com/106711): it
1806 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1807 # perform FPO regardless, so we must explicitly disable.
1808 # We still want the false setting above to avoid having
1809 # "/Oy /Oy-" and warnings about overriding.
1810 'AdditionalOptions': ['/Oy-'],
1811 }],
[email protected]2ae6e022010-05-07 13:19:151812 ],
[email protected]ef5c5f1b2011-12-17 02:16:241813 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561814 },
1815 'VCLinkerTool': {
1816 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331817 # ASLR makes debugging with windbg difficult because Chrome.exe and
1818 # Chrome.dll share the same base name. As result, windbg will
1819 # name the Chrome.dll module like chrome_<base address>, where
1820 # <base address> typically changes with each launch. This in turn
1821 # means that breakpoints in Chrome.dll don't stick from one launch
1822 # to the next. For this reason, we turn ASLR off in debug builds.
1823 # Note that this is a three-way bool, where 0 means to pick up
1824 # the default setting, 1 is off and 2 is on.
1825 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561826 },
1827 'VCResourceCompilerTool': {
1828 'PreprocessorDefinitions': ['_DEBUG'],
1829 },
1830 },
[email protected]2f80c312009-02-25 21:26:551831 'conditions': [
[email protected]bb05e452009-10-29 21:24:561832 ['OS=="linux"', {
[email protected]d8e3b122012-05-31 23:07:541833 'target_conditions': [
1834 ['_toolset=="target"', {
1835 'cflags': [
1836 '<@(debug_extra_cflags)',
1837 ],
1838 }],
[email protected]bb05e452009-10-29 21:24:561839 ],
[email protected]2f80c312009-02-25 21:26:551840 }],
[email protected]1e013672012-06-29 22:12:201841 # Disabled on iOS because it was causing a crash on startup.
1842 # TODO(michelea): investigate, create a reduced test and possibly
1843 # submit a radar.
1844 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:351845 'xcode_settings': {
1846 'OTHER_CFLAGS': [
1847 '-fstack-protector-all', # Implies -fstack-protector
1848 ],
1849 },
1850 }],
[email protected]2f80c312009-02-25 21:26:551851 ],
1852 },
[email protected]5153767c2009-12-22 01:52:501853 'Release_Base': {
1854 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551855 'defines': [
1856 'NDEBUG',
1857 ],
[email protected]1c966092009-08-20 21:19:261858 'xcode_settings': {
1859 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1860 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001861 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261862 },
[email protected]bb05e452009-10-29 21:24:561863 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471864 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471865 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151866 'conditions': [
[email protected]2212d272011-12-20 21:37:371867 # In official builds, each target will self-select
1868 # an optimization level.
1869 ['buildtype!="Official"', {
1870 'Optimization': '<(win_release_Optimization)',
1871 },
1872 ],
[email protected]2ae6e022010-05-07 13:19:151873 # According to MSVS, InlineFunctionExpansion=0 means
1874 # "default inlining", not "/Ob0".
1875 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1876 ['win_release_InlineFunctionExpansion==0', {
1877 'AdditionalOptions': ['/Ob0'],
1878 }],
1879 ['win_release_InlineFunctionExpansion!=""', {
1880 'InlineFunctionExpansion':
1881 '<(win_release_InlineFunctionExpansion)',
1882 }],
[email protected]626d2d22011-10-11 15:47:331883
[email protected]ef5c5f1b2011-12-17 02:16:241884 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331885 ['win_release_OmitFramePointers==1', {
1886 'OmitFramePointers': 'true',
1887 }],
1888 ['win_release_OmitFramePointers==0', {
1889 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241890 # The above is not sufficient (http://crbug.com/106711): it
1891 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1892 # perform FPO regardless, so we must explicitly disable.
1893 # We still want the false setting above to avoid having
1894 # "/Oy /Oy-" and warnings about overriding.
1895 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331896 }],
[email protected]2ae6e022010-05-07 13:19:151897 ],
[email protected]ef5c5f1b2011-12-17 02:16:241898 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471899 },
[email protected]bb05e452009-10-29 21:24:561900 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341901 # LinkIncremental is a tri-state boolean, where 0 means default
1902 # (i.e., inherit from parent solution), 1 means false, and
1903 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561904 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341905 # This corresponds to the /PROFILE flag which ensures the PDB
1906 # file contains FIXUP information (growing the PDB file by about
1907 # 5%) but does not otherwise alter the output binary. This
1908 # information is used by the Syzygy optimization tool when
1909 # decomposing the release image.
1910 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561911 },
1912 },
[email protected]2f80c312009-02-25 21:26:551913 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:161914 ['msvs_use_common_release', {
1915 'includes': ['release.gypi'],
1916 }],
[email protected]92822e82009-09-18 14:26:561917 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581918 'defines': [
1919 'NVALGRIND',
1920 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1921 ],
[email protected]ee857512010-05-14 08:24:421922 }, {
[email protected]14339762011-04-05 07:36:581923 'defines': [
1924 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1925 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1926 ],
[email protected]92822e82009-09-18 14:26:561927 }],
[email protected]7e0d664a2009-12-03 21:07:471928 ['win_use_allocator_shim==0', {
1929 'defines': ['NO_TCMALLOC'],
1930 }],
[email protected]bb05e452009-10-29 21:24:561931 ['OS=="linux"', {
[email protected]d8e3b122012-05-31 23:07:541932 'target_conditions': [
1933 ['_toolset=="target"', {
1934 'cflags': [
1935 '<@(release_extra_cflags)',
1936 ],
1937 }],
[email protected]bb05e452009-10-29 21:24:561938 ],
1939 }],
[email protected]8a37e4502012-08-14 22:42:551940 # TODO(wangxianzhu): Remove this. This is temporarily kept before
1941 # default build type switched to Debug.
[email protected]efed3dc2012-07-09 23:37:131942 # Android enables DCHECK()s on non-Official release builds.
1943 ['OS=="android" and buildtype!="Official"', {
1944 'defines!': ['NDEBUG'],
1945 }],
[email protected]2f80c312009-02-25 21:26:551946 ],
1947 },
[email protected]5153767c2009-12-22 01:52:501948 #
1949 # Concrete configurations
1950 #
1951 'Debug': {
1952 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1953 },
1954 'Release': {
1955 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:501956 },
[email protected]f926fa0a2009-08-04 22:50:131957 'conditions': [
1958 [ 'OS=="win"', {
1959 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501960 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501961 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301962 },
1963 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501964 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301965 },
[email protected]f926fa0a2009-08-04 22:50:131966 }],
1967 ],
[email protected]2f80c312009-02-25 21:26:551968 },
1969 },
1970 'conditions': [
[email protected]1e013672012-06-29 22:12:201971 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:261972 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271973 # Enable -Werror by default, but put it in a variable so it can
1974 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1975 'variables': {
[email protected]cbbb3472012-01-25 18:32:311976 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:201977 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:271978 },
[email protected]6863896f2012-01-25 17:51:361979 'defines': [
1980 '_FILE_OFFSET_BITS=64',
1981 ],
[email protected]9d384032009-03-20 23:13:261982 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161983 '<(werror)', # See note above about the werror variable.
1984 '-pthread',
1985 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291986 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161987 '-Wall',
[email protected]0fa17082010-03-26 00:48:051988 # TODO(evan): turn this back on once all the builds work.
1989 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201990 # Don't warn about unused function params. We use those everywhere.
1991 '-Wno-unused-parameter',
1992 # Don't warn about the "struct foo f = {0};" initialization pattern.
1993 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121994 # Don't export any symbols (for example, to plugins we dlopen()).
1995 # Note: this is *required* to make some plugins work.
1996 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351997 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241998 ],
1999 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222000 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242001 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362002 # Make inline functions have hidden visiblity by default.
2003 # Surprisingly, not covered by -fvisibility=hidden.
2004 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172005 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2006 # so we specify it explicitly.
2007 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182008 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172009 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262010 ],
[email protected]a6cf87e2009-04-03 04:07:382011 'ldflags': [
[email protected]138241f2010-03-30 23:53:102012 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262013 ],
[email protected]1e013672012-06-29 22:12:202014 'libraries' : [
2015 '<(libraries_for_target)',
2016 ],
[email protected]3aacaf952009-04-02 15:34:092017 'configurations': {
[email protected]5153767c2009-12-22 01:52:502018 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312019 'variables': {
2020 'debug_optimize%': '0',
2021 },
[email protected]3aacaf952009-04-02 15:34:092022 'defines': [
2023 '_DEBUG',
2024 ],
2025 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:042026 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092027 '-g',
2028 ],
[email protected]da1c8d692011-09-20 20:35:012029 'conditions' : [
2030 ['OS=="android"', {
[email protected]8a37e4502012-08-14 22:42:552031 # Some configurations are copied from Release_Base to reduce
2032 # the binary size.
2033 'variables': {
2034 'debug_optimize%': 's',
2035 },
[email protected]da1c8d692011-09-20 20:35:012036 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552037 '-fno-ident',
2038 '-fomit-frame-pointer',
2039 '-fdata-sections',
2040 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012041 ],
[email protected]8a37e4502012-08-14 22:42:552042 'ldflags': [
2043 '-Wl,-O1',
2044 '-Wl,--as-needed',
2045 '-Wl,--gc-sections',
2046 ],
[email protected]da1c8d692011-09-20 20:35:012047 }],
2048 ],
[email protected]5315f2842009-04-28 00:43:272049 },
[email protected]5153767c2009-12-22 01:52:502050 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012051 'variables': {
2052 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512053 # Binaries become big and gold is unable to perform GC
2054 # and remove unused sections for some of test targets
2055 # on 32 bit platform.
2056 # (This is currently observed only in chromeos valgrind bots)
2057 # The following flag is to disable --gc-sections linker
2058 # option for these bots.
2059 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122060
2061 # TODO(bradnelson): reexamine how this is done if we change the
2062 # expansion of configurations
2063 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012064 },
[email protected]3aacaf952009-04-02 15:34:092065 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182066 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532067 # Don't emit the GCC version ident directives, they just end up
2068 # in the .comment section taking up binary size.
2069 '-fno-ident',
2070 # Put data and code in their own sections, so that unused symbols
2071 # can be removed at link time with --gc-sections.
2072 '-fdata-sections',
2073 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092074 ],
[email protected]c902f2c2010-08-06 20:04:182075 'ldflags': [
2076 # Specifically tell the linker to perform optimizations.
2077 # See http://lwn.net/Articles/192624/ .
2078 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222079 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182080 ],
[email protected]1dd529642010-05-15 01:02:512081 'conditions' : [
2082 ['no_gc_sections==0', {
2083 'ldflags': [
2084 '-Wl,--gc-sections',
2085 ],
2086 }],
[email protected]da1c8d692011-09-20 20:35:012087 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582088 'variables': {
2089 'release_optimize%': 's',
2090 },
[email protected]da1c8d692011-09-20 20:35:012091 'cflags': [
2092 '-fomit-frame-pointer',
2093 ],
2094 }],
[email protected]ecf7b6482010-10-13 09:15:202095 ['clang==1', {
2096 'cflags!': [
2097 '-fno-ident',
2098 ],
2099 }],
[email protected]7664ab32011-02-01 23:35:252100 ['profiling==1', {
2101 'cflags': [
2102 '-fno-omit-frame-pointer',
2103 '-g',
2104 ],
2105 }],
[email protected]8d726a42012-02-09 03:49:002106 ],
[email protected]3aacaf952009-04-02 15:34:092107 },
2108 },
[email protected]601b540222009-04-03 21:32:042109 'variants': {
2110 'coverage': {
2111 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2112 'ldflags': ['-fprofile-arcs'],
2113 },
2114 'profile': {
2115 'cflags': ['-pg', '-g'],
2116 'ldflags': ['-pg'],
2117 },
2118 'symbols': {
2119 'cflags': ['-g'],
2120 },
2121 },
[email protected]606116d22009-05-06 22:38:232122 'conditions': [
[email protected]04b482602011-09-14 02:36:212123 ['target_arch=="ia32"', {
2124 'target_conditions': [
2125 ['_toolset=="target"', {
2126 'asflags': [
2127 # Needed so that libs with .s files (e.g. libicudata.a)
2128 # are compatible with the general 32-bit-ness.
2129 '-32',
2130 ],
2131 # All floating-point computations on x87 happens in 80-bit
2132 # precision. Because the C and C++ language standards allow
2133 # the compiler to keep the floating-point values in higher
2134 # precision than what's specified in the source and doing so
2135 # is more efficient than constantly rounding up to 64-bit or
2136 # 32-bit precision as specified in the source, the compiler,
2137 # especially in the optimized mode, tries very hard to keep
2138 # values in x87 floating-point stack (in 80-bit precision)
2139 # as long as possible. This has important side effects, that
2140 # the real value used in computation may change depending on
2141 # how the compiler did the optimization - that is, the value
2142 # kept in 80-bit is different than the value rounded down to
2143 # 64-bit or 32-bit. There are possible compiler options to
2144 # make this behavior consistent (e.g. -ffloat-store would keep
2145 # all floating-values in the memory, thus force them to be
2146 # rounded to its original precision) but they have significant
2147 # runtime performance penalty.
2148 #
2149 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2150 # which keep floating-point values in SSE registers in its
2151 # native precision (32-bit for single precision, and 64-bit
2152 # for double precision values). This means the floating-point
2153 # value used during computation does not change depending on
2154 # how the compiler optimized the code, since the value is
2155 # always kept in its specified precision.
2156 'conditions': [
2157 ['branding=="Chromium" and disable_sse2==0', {
2158 'cflags': [
2159 '-march=pentium4',
2160 '-msse2',
2161 '-mfpmath=sse',
2162 ],
2163 }],
2164 # ChromeOS targets Pinetrail, which is sse3, but most of the
2165 # benefit comes from sse2 so this setting allows ChromeOS
2166 # to build on other CPUs. In the future -march=atom would
2167 # help but requires a newer compiler.
2168 ['chromeos==1 and disable_sse2==0', {
2169 'cflags': [
2170 '-msse2',
2171 ],
2172 }],
2173 # Install packages have started cropping up with
2174 # different headers between the 32-bit and 64-bit
2175 # versions, so we have to shadow those differences off
2176 # and make sure a 32-bit-on-64-bit build picks up the
2177 # right files.
[email protected]32594022012-05-10 03:22:282178 # For android build, use NDK headers instead of host headers
2179 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212180 'include_dirs+': [
2181 '/usr/include32',
2182 ],
2183 }],
2184 ],
2185 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2186 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062187 'cflags': [
[email protected]04b482602011-09-14 02:36:212188 '-m32',
2189 '-mmmx',
2190 ],
2191 'ldflags': [
2192 '-m32',
[email protected]ffde7932009-05-29 00:39:062193 ],
2194 }],
[email protected]606116d22009-05-06 22:38:232195 ],
2196 }],
[email protected]3dda8a962009-08-10 18:58:072197 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292198 'target_conditions': [
2199 ['_toolset=="target"', {
2200 'cflags_cc': [
2201 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2202 # has changed whenever it encounters a varargs function. This
2203 # silences those warnings, as they are not helpful and
2204 # clutter legitimate warnings.
2205 '-Wno-abi',
2206 ],
2207 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012208 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292209 'cflags': [
2210 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292211 ]
2212 }],
2213 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252214 'cflags': [
2215 '-march=armv7-a',
2216 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112217 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252218 ],
[email protected]eafc0b452010-02-26 21:53:432219 'conditions': [
2220 ['arm_neon==1', {
2221 'cflags': [ '-mfpu=neon', ],
2222 }, {
[email protected]53e0f642010-03-05 01:41:562223 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072224 }],
[email protected]eafc0b452010-02-26 21:53:432225 ],
[email protected]dc9711f2009-11-13 19:30:252226 }],
[email protected]da1c8d692011-09-20 20:35:012227 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532228 # Most of the following flags are derived from what Android
2229 # uses by default when building for arm, reference for which
2230 # can be found in the following file in the Android NDK:
2231 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2232 'cflags': [
2233 # The tree-sra optimization (scalar replacement for
2234 # aggregates enabling subsequent optimizations) leads to
2235 # invalid code generation when using the Android NDK's
2236 # compiler (r5-r7). This can be verified using
2237 # TestWebKitAPI's WTF.Checked_int8_t test.
2238 '-fno-tree-sra',
2239 '-Wno-psabi',
2240 ],
[email protected]ad17e342012-07-17 20:45:482241 # Android now supports .relro sections properly.
2242 # NOTE: While these flags enable the generation of .relro
2243 # sections, the generated libraries can still be loaded on
2244 # older Android platform versions.
2245 'ldflags': [
2246 '-Wl,-z,relro',
2247 '-Wl,-z,now',
2248 ],
[email protected]da1c8d692011-09-20 20:35:012249 'conditions': [
2250 ['arm_thumb == 1', {
2251 # Android toolchain doesn't support -mimplicit-it=thumb
2252 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
2253 'cflags': [ '-mthumb-interwork', ],
2254 }],
2255 ['armv7==0', {
2256 # Flags suitable for Android emulator
2257 'cflags': [
2258 '-march=armv5te',
2259 '-mtune=xscale',
2260 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362261 ],
2262 'defines': [
2263 '__ARM_ARCH_5__',
2264 '__ARM_ARCH_5T__',
2265 '__ARM_ARCH_5E__',
2266 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012267 ],
2268 }],
[email protected]220ea5932012-08-09 10:44:072269 ['clang==1', {
2270 'cflags!': [
2271 # Clang does not support the following options.
2272 '-mthumb-interwork',
2273 '-finline-limit=64',
2274 '-fno-tree-sra',
2275 '-Wno-psabi',
2276 ],
2277 }],
[email protected]da1c8d692011-09-20 20:35:012278 ],
2279 }],
[email protected]3dda8a962009-08-10 18:58:072280 ],
2281 }],
2282 ],
2283 }],
[email protected]2fb843b2010-08-12 02:11:082284 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582285 'cflags': [
2286 '-fPIC',
2287 ],
[email protected]d3f692b32011-12-14 19:04:352288 'ldflags': [
2289 '-fPIC',
2290 ],
[email protected]c76723a2010-01-25 23:10:582291 }],
[email protected]ee28c9f2009-09-04 01:53:012292 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572293 'target_conditions': [
2294 ['_toolset=="target"', {
2295 'cflags': [
2296 '--sysroot=<(sysroot)',
2297 ],
2298 'ldflags': [
2299 '--sysroot=<(sysroot)',
2300 ],
2301 }]]
[email protected]ee28c9f2009-09-04 01:53:012302 }],
[email protected]58680ce2010-09-18 00:09:152303 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122304 'cflags': [
2305 '-Wheader-hygiene',
2306 # Clang spots more unused functions.
2307 '-Wno-unused-function',
2308 # Don't die on dtoa code that uses a char as an array index.
2309 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332310 # Especially needed for gtest macros using enum values from Mac
2311 # system headers.
2312 # TODO(pkasting): In C++11 this is legal, so this should be
2313 # removed when we change to that. (This is also why we don't
2314 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122315 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302316 # This (rightyfully) complains about 'override', which we use
2317 # heavily.
2318 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102319
2320 # Warns on switches on enums that cover all enum values but
2321 # also contain a default: branch. Chrome is full of that.
2322 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122323 ],
2324 'cflags!': [
2325 # Clang doesn't seem to know know this flag.
2326 '-mfpmath=sse',
2327 ],
[email protected]58680ce2010-09-18 00:09:152328 }],
[email protected]5d451ad2011-02-11 16:43:462329 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262330 'cflags': [
[email protected]c872dc52012-05-19 06:36:312331 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262332 ],
[email protected]5d451ad2011-02-11 16:43:462333 }],
[email protected]4a9ac22e2011-12-02 03:41:532334 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262335 'cflags': [
2336 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532337 ],
2338 }],
2339 ['clang==1 and clang_add_plugin!=""', {
2340 'cflags': [
[email protected]d23720682011-08-11 00:16:262341 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2342 ],
[email protected]5e781232011-01-28 02:57:592343 }],
[email protected]2616d45d2012-01-19 03:15:482344 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2345 'cflags': [
2346 # See http://crbug.com/110262
2347 '-fcolor-diagnostics',
2348 ],
2349 }],
[email protected]92799b632011-08-15 14:33:062350 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422351 'target_conditions': [
2352 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452353 'cflags': [
2354 '-faddress-sanitizer',
2355 '-fno-omit-frame-pointer',
2356 ],
2357 'ldflags': [
2358 '-faddress-sanitizer',
2359 ],
2360 'defines': [
2361 'ADDRESS_SANITIZER',
2362 ],
[email protected]1ffc3b3962012-05-16 14:08:422363 }],
[email protected]921c7b52011-11-25 10:34:352364 ],
[email protected]92799b632011-08-15 14:33:062365 }],
[email protected]c9a829272012-07-04 07:51:122366 ['tsan==1', {
2367 'target_conditions': [
2368 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452369 'cflags': [
2370 '-fthread-sanitizer',
2371 '-fno-omit-frame-pointer',
2372 '-fPIE',
2373 ],
2374 'ldflags': [
2375 '-fthread-sanitizer',
2376 ],
2377 'defines': [
2378 'THREAD_SANITIZER',
2379 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
2380 ],
2381 'target_conditions': [
2382 ['_type=="executable"', {
2383 'ldflags': [
[email protected]c9a829272012-07-04 07:51:122384 '-pie',
[email protected]cb770a4c2012-07-25 20:06:452385 ],
2386 }],
2387 ],
[email protected]c9a829272012-07-04 07:51:122388 }],
2389 ],
2390 }],
[email protected]8a6abd12012-05-16 10:04:442391 ['order_profiling!=0 and (chromeos==1 or OS=="linux")', {
2392 'target_conditions' : [
2393 ['_toolset=="target"', {
2394 'cflags': [
2395 '-finstrument-functions',
2396 ],
2397 }],
2398 ],
2399 }],
[email protected]cbd5fd52009-08-26 00:14:272400 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172401 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272402 'defines': ['USE_LINUX_BREAKPAD'],
2403 }],
[email protected]d8b60602010-03-26 09:41:222404 ['linux_use_heapchecker==1', {
2405 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402406 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222407 }],
[email protected]61a9b2d82010-02-26 00:31:082408 ['linux_use_tcmalloc==0', {
2409 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242410 }],
[email protected]64e2d4a42010-08-27 10:13:212411 ['linux_keep_shadow_stacks==1', {
2412 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512413 'cflags': [
2414 '-finstrument-functions',
2415 # Allow mmx intrinsics to inline, so that the compiler can expand
2416 # the intrinsics.
2417 '-finstrument-functions-exclude-file-list=mmintrin.h',
2418 ],
[email protected]64e2d4a42010-08-27 10:13:212419 }],
[email protected]8d726a42012-02-09 03:49:002420 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172421 'ldflags': [
2422 # Experimentation found that using four linking threads
2423 # saved ~20% of link time.
2424 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2425 '-Wl,--threads',
2426 '-Wl,--thread-count=4',
2427 ],
[email protected]8d726a42012-02-09 03:49:002428 'conditions': [
2429 ['release_valgrind_build==0', {
2430 'target_conditions': [
2431 ['_toolset=="target"', {
2432 'ldflags': [
2433 # There seems to be a conflict of --icf and -pie
2434 # in gold which can generate crashy binaries. As
2435 # a security measure, -pie takes precendence for
2436 # now.
2437 #'-Wl,--icf=safe',
2438 '-Wl,--icf=none',
2439 ],
2440 }],
2441 ],
2442 }],
2443 ],
2444 }],
[email protected]b07806c12012-02-03 22:44:592445 ['linux_use_gold_binary==1', {
2446 'variables': {
[email protected]516312d2012-02-28 05:17:262447 'conditions': [
2448 ['inside_chromium_build==1', {
2449 # We pass the path to gold to the compiler. gyp leaves
2450 # unspecified what the cwd is when running the compiler,
2451 # so the normal gyp path-munging fails us. This hack
2452 # gets the right path.
2453 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2454 }, {
2455 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2456 }]
2457 ]
[email protected]b07806c12012-02-03 22:44:592458 },
2459 'ldflags': [
2460 # Put our gold binary in the search path for the linker.
2461 '-B<(gold_path)',
2462 ],
2463 }],
[email protected]606116d22009-05-06 22:38:232464 ],
[email protected]9d384032009-03-20 23:13:262465 },
2466 }],
[email protected]c51e8d52009-12-11 20:04:062467 # FreeBSD-specific options; note that most FreeBSD options are set above,
2468 # with Linux.
2469 ['OS=="freebsd"', {
2470 'target_defaults': {
2471 'ldflags': [
2472 '-Wl,--no-keep-memory',
2473 ],
2474 },
2475 }],
[email protected]da1c8d692011-09-20 20:35:012476 # Android-specific options; note that most are set above with Linux.
2477 ['OS=="android"', {
2478 'variables': {
[email protected]febc41db2012-03-24 02:44:432479 'target_arch%': 'arm', # target_arch in android terms.
[email protected]da1c8d692011-09-20 20:35:012480 'conditions': [
2481 # Android uses x86 instead of ia32 for their target_arch designation.
2482 ['target_arch=="ia32"', {
[email protected]febc41db2012-03-24 02:44:432483 'target_arch%': 'x86',
[email protected]da1c8d692011-09-20 20:35:012484 }],
2485 # Use shared stlport library when system one used.
2486 # Figure this out early since it needs symbols from libgcc.a, so it
2487 # has to be before that in the set of libraries.
2488 ['use_system_stlport==1', {
2489 'android_stlport_library': 'stlport',
2490 }, {
2491 'android_stlport_library': 'stlport_static',
2492 }],
2493 ],
2494
2495 # Placing this variable here prevents from forking libvpx, used
2496 # by remoting. Remoting is off, so it needn't built,
2497 # so forking it's deps seems like overkill.
2498 # But this variable need defined to properly run gyp.
2499 # A proper solution is to have an OS==android conditional
2500 # in third_party/libvpx/libvpx.gyp to define it.
2501 'libvpx_path': 'lib/linux/arm',
2502 },
2503 'target_defaults': {
[email protected]8a37e4502012-08-14 22:42:552504 # TODO(wangxianzhu): We used to build Release version with DCHECK
2505 # by default. Now we build Release without DCHECK, and build Debug
2506 # with size optimizations. Remove the following line after everyone
2507 # knows how to deal with the change.
[email protected]da1c8d692011-09-20 20:35:012508 'default_configuration': 'Release',
2509
2510 'variables': {
2511 'release_extra_cflags%': '',
[email protected]8a37e4502012-08-14 22:42:552512 },
[email protected]da1c8d692011-09-20 20:35:012513
2514 'target_conditions': [
2515 # Settings for building device targets using Android's toolchain.
2516 # These are based on the setup.mk file from the Android NDK.
2517 #
2518 # The NDK Android executable link step looks as follows:
2519 # $LDFLAGS
2520 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2521 # $(PRIVATE_OBJECTS) <-- The .o that we built
2522 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2523 # $(TARGET_LIBGCC) <-- libgcc.a
2524 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2525 # $(PRIVATE_LDLIBS) <-- System .so
2526 # $(TARGET_CRTEND_O) <-- crtend.o
2527 #
2528 # For now the above are approximated for executables by adding
2529 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2530 # of 'libraries'.
2531 #
2532 # The NDK Android shared library link step looks as follows:
2533 # $LDFLAGS
2534 # $(PRIVATE_OBJECTS) <-- The .o that we built
2535 # -l,--whole-archive
2536 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2537 # -l,--no-whole-archive
2538 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2539 # $(TARGET_LIBGCC) <-- libgcc.a
2540 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2541 # $(PRIVATE_LDLIBS) <-- System .so
2542 #
[email protected]ad17e342012-07-17 20:45:482543 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:012544 #
2545 # For both executables and shared libraries, add the proper
2546 # libgcc.a to the start of libraries which puts it in the
2547 # proper spot after .o and .a files get linked in.
2548 #
2549 # TODO: The proper thing to do longer-tem would be proper gyp
2550 # support for a custom link command line.
2551 ['_toolset=="target"', {
2552 'cflags!': [
2553 '-pthread', # Not supported by Android toolchain.
2554 ],
2555 'cflags': [
[email protected]da1c8d692011-09-20 20:35:012556 '-ffunction-sections',
2557 '-funwind-tables',
2558 '-g',
2559 '-fstack-protector',
2560 '-fno-short-enums',
2561 '-finline-limit=64',
2562 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:012563 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:012564 ],
2565 'defines': [
2566 'ANDROID',
2567 '__GNU_SOURCE=1', # Necessary for clone()
2568 'USE_STLPORT=1',
2569 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]da1c8d692011-09-20 20:35:012570 ],
2571 'ldflags!': [
2572 '-pthread', # Not supported by Android toolchain.
2573 ],
2574 'ldflags': [
2575 '-nostdlib',
2576 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012577 # Don't export symbols from statically linked libraries.
2578 '-Wl,--exclude-libs=ALL',
2579 ],
[email protected]a0e48b02011-11-22 07:53:012580 'libraries': [
2581 '-l<(android_stlport_library)',
2582 # Manually link the libgcc.a that the cross compiler uses.
[email protected]d10e2cc2012-03-20 10:45:272583 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012584 '-lc',
2585 '-ldl',
2586 '-lstdc++',
2587 '-lm',
[email protected]da1c8d692011-09-20 20:35:012588 ],
2589 'conditions': [
[email protected]e0825562012-05-10 01:50:472590 ['android_upstream_bringup==1', {
2591 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2592 }],
[email protected]220ea5932012-08-09 10:44:072593 ['clang==1', {
2594 'cflags': [
2595 # Work around incompatibilities between bionic and clang
2596 # headers.
2597 '-D__compiler_offsetof=__builtin_offsetof',
2598 '-Dnan=__builtin_nan',
2599 ],
2600 'conditions': [
2601 ['target_arch=="arm"', {
2602 'cflags': [
2603 '-target arm-linux-androideabi',
2604 '-mllvm -arm-enable-ehabi',
2605 ],
2606 'ldflags': [
2607 '-target arm-linux-androideabi',
2608 ],
2609 }],
2610 ['target_arch=="ia32"', {
2611 'cflags': [
2612 '-target x86-linux-androideabi',
2613 ],
2614 'ldflags': [
2615 '-target x86-linux-androideabi',
2616 ],
2617 }],
2618 ],
2619 }],
[email protected]da1c8d692011-09-20 20:35:012620 ['android_build_type==0', {
[email protected]34baed112012-06-27 16:10:462621 'defines': [
[email protected]f5c7758a2012-07-25 16:17:572622 # The NDK has these things, but doesn't define the constants
2623 # to say that it does. Define them here instead.
2624 'HAVE_SYS_UIO_H',
2625 ],
2626 'cflags': [
2627 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:462628 ],
[email protected]da1c8d692011-09-20 20:35:012629 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522630 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012631 ],
2632 }],
[email protected]febd3572012-05-03 09:17:452633 ['target_arch == "arm"', {
2634 'ldflags': [
2635 # Enable identical code folding to reduce size.
2636 '-Wl,--icf=safe',
2637 ],
2638 }],
[email protected]da1c8d692011-09-20 20:35:012639 # NOTE: The stlport header include paths below are specified in
2640 # cflags rather than include_dirs because they need to come
2641 # after include_dirs. Think of them like system headers, but
2642 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2643 # toolchain (circa Gingerbread) will exhibit strange errors.
2644 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:512645 ['use_system_stlport==1', {
2646 'cflags': [
2647 # For libstdc++/include, which is used by stlport.
2648 '-I<(android_src)/bionic',
2649 '-I<(android_src)/external/stlport/stlport',
2650 ],
2651 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:012652 'cflags': [
2653 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2654 ],
2655 'conditions': [
2656 ['target_arch=="arm" and armv7==1', {
2657 'ldflags': [
2658 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2659 ],
2660 }],
2661 ['target_arch=="arm" and armv7==0', {
2662 'ldflags': [
2663 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2664 ],
2665 }],
2666 ['target_arch=="ia32"', {
2667 'ldflags': [
2668 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2669 ],
2670 }],
2671 ],
2672 }],
2673 ['target_arch=="ia32"', {
2674 # The x86 toolchain currently has problems with stack-protector.
2675 'cflags!': [
2676 '-fstack-protector',
2677 ],
2678 'cflags': [
2679 '-fno-stack-protector',
2680 ],
2681 }],
2682 ],
2683 'target_conditions': [
2684 ['_type=="executable"', {
2685 'ldflags': [
2686 '-Bdynamic',
2687 '-Wl,-dynamic-linker,/system/bin/linker',
2688 '-Wl,--gc-sections',
2689 '-Wl,-z,nocopyreloc',
2690 # crtbegin_dynamic.o should be the last item in ldflags.
2691 '<(android_ndk_lib)/crtbegin_dynamic.o',
2692 ],
2693 'libraries': [
2694 # crtend_android.o needs to be the last item in libraries.
2695 # Do not add any libraries after this!
2696 '<(android_ndk_lib)/crtend_android.o',
2697 ],
2698 }],
[email protected]f5c7758a2012-07-25 16:17:572699 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:012700 'ldflags': [
2701 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:462702 # crtbegin_so.o should be the last item in ldflags.
2703 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:012704 ],
[email protected]a08029b42012-04-25 03:18:462705 'libraries': [
2706 # crtend_so.o needs to be the last item in libraries.
2707 # Do not add any libraries after this!
2708 '<(android_ndk_lib)/crtend_so.o',
2709 ],
[email protected]da1c8d692011-09-20 20:35:012710 }],
2711 ],
2712 }],
2713 # Settings for building host targets using the system toolchain.
2714 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122715 'cflags!': [
2716 # Due to issues in Clang build system, using ASan on 32-bit
2717 # binaries on x86_64 host is problematic.
2718 # TODO(eugenis): re-enable.
2719 '-faddress-sanitizer',
2720 ],
[email protected]da1c8d692011-09-20 20:35:012721 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122722 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012723 '-Wl,-z,noexecstack',
2724 '-Wl,--gc-sections',
2725 '-Wl,-O1',
2726 '-Wl,--as-needed',
2727 ],
[email protected]965b6b22011-09-29 16:07:282728 'sources/': [
2729 ['exclude', '_android(_unittest)?\\.cc$'],
2730 ['exclude', '(^|/)android/']
2731 ],
[email protected]da1c8d692011-09-20 20:35:012732 }],
2733 ],
2734 },
2735 }],
[email protected]93f21e42010-04-01 00:35:152736 ['OS=="solaris"', {
2737 'cflags!': ['-fvisibility=hidden'],
2738 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2739 }],
[email protected]1e013672012-06-29 22:12:202740 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:552741 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:422742 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552743 'xcode_settings': {
2744 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042745 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2746 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:042747 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2748 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2749 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252750 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2751 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042752 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2753 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2754 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2755 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552756 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042757 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:552758 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:042759 'WARNING_CFLAGS': [
2760 '-Wall',
2761 '-Wendif-labels',
2762 '-Wextra',
2763 # Don't warn about unused function parameters.
2764 '-Wno-unused-parameter',
2765 # Don't warn about the "struct foo f = {0};" initialization
2766 # pattern.
2767 '-Wno-missing-field-initializers',
2768 ],
[email protected]b3fb8092009-03-12 19:09:242769 'conditions': [
2770 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592771 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2772 ],
[email protected]1e013672012-06-29 22:12:202773 ],
2774 },
2775 'target_conditions': [
2776 ['_type!="static_library"', {
2777 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2778 }],
2779 ['_mac_bundle', {
2780 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
2781 }],
2782 ], # target_conditions
2783 }, # target_defaults
2784 }], # OS=="mac" or OS=="ios"
2785 ['OS=="mac"', {
2786 'target_defaults': {
2787 'variables': {
2788 # These should end with %, but there seems to be a bug with % in
2789 # variables that are intended to be set to different values in
2790 # different targets, like these.
2791 'mac_pie': 1, # Most executables can be position-independent.
2792 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
2793 # Strip debugging symbols from the target.
2794 'mac_strip': '<(mac_strip_release)',
2795 },
2796 'xcode_settings': {
2797 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2798 # (Equivalent to -fPIC)
2799 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2800 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
2801 # Keep pch files below xcodebuild/.
2802 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
2803 'OTHER_CFLAGS': [
2804 '-fno-strict-aliasing', # See http://crbug.com/32204
2805 ],
2806 'conditions': [
[email protected]66733172010-09-22 00:09:282807 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302808 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2809 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382810
[email protected]6c648f12011-12-24 07:50:432811 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2812 # when buliding with clang. This warning is triggered when the
2813 # override keyword is used via the OVERRIDE macro from
2814 # base/compiler_specific.h.
2815 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382816
[email protected]34f40892011-09-06 21:53:302817 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282818 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072819 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282820 # Don't die on dtoa code that uses a char as an array index.
2821 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2822 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452823 # Clang spots more unused functions.
2824 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332825 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052826 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302827 # This (rightyfully) complains about 'override', which we use
2828 # heavily.
2829 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102830
2831 # Warns on switches on enums that cover all enum values but
2832 # also contain a default: branch. Chrome is full of that.
2833 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:282834 ],
2835 }],
[email protected]5d451ad2011-02-11 16:43:462836 ['clang==1 and clang_use_chrome_plugins==1', {
2837 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:312838 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:462839 ],
2840 }],
[email protected]4a9ac22e2011-12-02 03:41:532841 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592842 'OTHER_CFLAGS': [
2843 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532844 ],
2845 }],
2846 ['clang==1 and clang_add_plugin!=""', {
2847 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592848 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2849 ],
2850 }],
[email protected]2616d45d2012-01-19 03:15:482851 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2852 'OTHER_CFLAGS': [
2853 # See http://crbug.com/110262
2854 '-fcolor-diagnostics',
2855 ],
2856 }],
[email protected]b3fb8092009-03-12 19:09:242857 ],
[email protected]2f80c312009-02-25 21:26:552858 },
[email protected]34f40892011-09-06 21:53:302859 'conditions': [
2860 ['clang==1', {
2861 'variables': {
2862 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2863 },
2864 }],
[email protected]921c7b52011-11-25 10:34:352865 ['asan==1', {
2866 'xcode_settings': {
2867 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352868 '-faddress-sanitizer',
[email protected]921c7b52011-11-25 10:34:352869 ],
2870 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352871 '-faddress-sanitizer',
2872 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372873 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352874 # on the prior OS X versions. Because Chromium is currently
2875 # targeting 10.5.0, we need to explicitly mark these
2876 # symbols as dynamic_lookup.
2877 '-Wl,-U,_malloc_default_purgeable_zone',
2878 '-Wl,-U,_malloc_zone_memalign',
2879 '-Wl,-U,_dispatch_sync_f',
2880 '-Wl,-U,_dispatch_async_f',
2881 '-Wl,-U,_dispatch_barrier_async_f',
2882 '-Wl,-U,_dispatch_group_async_f',
2883 '-Wl,-U,_dispatch_after_f',
2884 ],
2885 },
2886 'defines': [
2887 'ADDRESS_SANITIZER',
2888 ],
2889 }],
[email protected]34f40892011-09-06 21:53:302890 ],
[email protected]2f80c312009-02-25 21:26:552891 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552892 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462893 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2894 }],
2895 ['_mac_bundle', {
2896 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082897 }],
[email protected]6303fed2011-08-11 01:12:102898 ['_type=="executable"', {
2899 'postbuilds': [
2900 {
2901 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362902 # code execution when running on Mac OS X 10.7 ("Lion"), and
2903 # ensures that the position-independent executable (PIE) bit
2904 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102905 'variables': {
[email protected]8c40f322011-08-24 03:33:362906 # Define change_mach_o_flags in a variable ending in _path
2907 # so that GYP understands it's a path and performs proper
2908 # relativization during dict merging.
2909 'change_mach_o_flags_path':
2910 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172911 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132912 ],
2913 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172914 ['mac_pie==0 or release_valgrind_build==1', {
2915 # Don't enable PIE if it's unwanted. It's unwanted if
2916 # the target specifies mac_pie=0 or if building for
2917 # Valgrind, because Valgrind doesn't understand slide.
2918 # See the similar mac_pie/release_valgrind_build check
2919 # below.
[email protected]081c0342011-08-24 14:59:132920 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132921 '--no-pie',
2922 ],
2923 }],
2924 ],
[email protected]6303fed2011-08-11 01:12:102925 },
[email protected]8c40f322011-08-24 03:33:362926 'postbuild_name': 'Change Mach-O Flags',
2927 'action': [
2928 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132929 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362930 ],
[email protected]6303fed2011-08-11 01:12:102931 },
2932 ],
[email protected]5a5d97aa2011-09-02 15:34:002933 'conditions': [
2934 ['asan==1', {
2935 'variables': {
2936 'asan_saves_file': 'asan.saves',
2937 },
2938 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562939 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002940 },
2941 }],
2942 ],
[email protected]162407f2011-09-08 15:33:172943 'target_conditions': [
2944 ['mac_pie==1 and release_valgrind_build==0', {
2945 # Turn on position-independence (ASLR) for executables. When
2946 # PIE is on for the Chrome executables, the framework will
2947 # also be subject to ASLR.
2948 # Don't do this when building for Valgrind, because Valgrind
2949 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2950 # understand slide, and get rid of the Valgrind check.
2951 'xcode_settings': {
2952 'OTHER_LDFLAGS': [
2953 '-Wl,-pie', # Position-independent executable (MH_PIE)
2954 ],
2955 },
2956 }],
2957 ],
[email protected]6a0242bc2011-07-01 00:34:462958 }],
[email protected]9a5e72862010-09-02 16:16:582959 ['(_type=="executable" or _type=="shared_library" or \
2960 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202961 'target_conditions': [
2962 ['mac_real_dsym == 1', {
2963 # To get a real .dSYM bundle produced by dsymutil, set the
2964 # debug information format to dwarf-with-dsym. Since
2965 # strip_from_xcode will not be used, set Xcode to do the
2966 # stripping as well.
2967 'configurations': {
[email protected]5153767c2009-12-22 01:52:502968 'Release_Base': {
[email protected]24700642009-06-01 16:01:202969 'xcode_settings': {
2970 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2971 'DEPLOYMENT_POSTPROCESSING': 'YES',
2972 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072973 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252974 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072975 # The Xcode default is to strip debugging symbols
2976 # only (-S). Local symbols should be stripped as
2977 # well, which will be handled by -x. Xcode will
2978 # continue to insert -S when stripping even when
2979 # additional flags are added with STRIPFLAGS.
2980 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252981 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072982 ], # target_conditions
2983 }, # xcode_settings
2984 }, # configuration "Release"
2985 }, # configurations
[email protected]24700642009-06-01 16:01:202986 }, { # mac_real_dsym != 1
2987 # To get a fast fake .dSYM bundle, use a post-build step to
2988 # produce the .dSYM and strip the executable. strip_from_xcode
2989 # only operates in the Release configuration.
2990 'postbuilds': [
2991 {
2992 'variables': {
2993 # Define strip_from_xcode in a variable ending in _path
2994 # so that gyp understands it's a path and performs proper
2995 # relativization during dict merging.
2996 'strip_from_xcode_path': 'mac/strip_from_xcode',
2997 },
2998 'postbuild_name': 'Strip If Needed',
2999 'action': ['<(strip_from_xcode_path)'],
3000 },
[email protected]e14a9f92009-08-05 19:26:073001 ], # postbuilds
3002 }], # mac_real_dsym
3003 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583004 }], # (_type=="executable" or _type=="shared_library" or
3005 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073006 ], # target_conditions
3007 }, # target_defaults
3008 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203009 ['OS=="ios"', {
3010 'target_defaults': {
3011 'xcode_settings' : {
3012 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3013
3014 # This next block is mostly common with the 'mac' section above,
3015 # but keying off (or setting) 'clang' isn't valid for iOS as it
3016 # also seems to mean using the custom build of clang.
3017
3018 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
3019 # when buliding with clang. This warning is triggered when the
3020 # override keyword is used via the OVERRIDE macro from
3021 # base/compiler_specific.h.
3022 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
3023 'WARNING_CFLAGS': [
3024 '-Wheader-hygiene',
3025 # Don't die on dtoa code that uses a char as an array index.
3026 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3027 '-Wno-char-subscripts',
3028 # Clang spots more unused functions.
3029 '-Wno-unused-function',
3030 # See comments on this flag higher up in this file.
3031 '-Wno-unnamed-type-template-args',
3032 # This (rightyfully) complains about 'override', which we use
3033 # heavily.
3034 '-Wno-c++11-extensions',
3035 ],
3036 },
3037 'target_conditions': [
3038 ['_type=="executable"', {
3039 'configurations': {
3040 'Release_Base': {
3041 'xcode_settings': {
3042 'DEPLOYMENT_POSTPROCESSING': 'YES',
3043 'STRIP_INSTALLED_PRODUCT': 'YES',
3044 },
3045 },
3046 },
3047 'xcode_settings': {
3048 'conditions': [
3049 ['chromium_ios_signing', {
3050 # iOS SDK wants everything for device signed.
3051 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3052 }, {
3053 'CODE_SIGNING_REQUIRED': 'NO',
3054 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3055 }],
3056 ],
3057 },
3058 }],
3059 ], # target_conditions
3060 }, # target_defaults
3061 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553062 ['OS=="win"', {
3063 'target_defaults': {
3064 'defines': [
[email protected]8e345da2012-07-01 22:10:303065 '_WIN32_WINNT=0x0602',
3066 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553067 'WIN32',
3068 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553069 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283070 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553071 '_CRT_RAND_S',
3072 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3073 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273074 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553075 ],
[email protected]8974e042010-06-21 18:06:523076 'conditions': [
[email protected]2212d272011-12-20 21:37:373077 ['buildtype=="Official"', {
3078 # In official builds, targets can self-select an optimization
3079 # level by defining a variable named 'optimize', and setting it
3080 # to one of
3081 # - "size", optimizes for minimal code size - the default.
3082 # - "speed", optimizes for speed over code size.
3083 # - "max", whole program optimization and link-time code
3084 # generation. This is very expensive and should be used
3085 # sparingly.
3086 'variables': {
3087 'optimize%': 'size',
3088 },
3089 'target_conditions': [
3090 ['optimize=="size"', {
3091 'msvs_settings': {
3092 'VCCLCompilerTool': {
3093 # 1, optimizeMinSpace, Minimize Size (/O1)
3094 'Optimization': '1',
3095 # 2, favorSize - Favor small code (/Os)
3096 'FavorSizeOrSpeed': '2',
3097 },
3098 },
3099 },
3100 ],
3101 ['optimize=="speed"', {
3102 'msvs_settings': {
3103 'VCCLCompilerTool': {
3104 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3105 'Optimization': '2',
3106 # 1, favorSpeed - Favor fast code (/Ot)
3107 'FavorSizeOrSpeed': '1',
3108 },
3109 },
3110 },
3111 ],
3112 ['optimize=="max"', {
3113 'msvs_settings': {
3114 'VCCLCompilerTool': {
3115 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3116 'Optimization': '2',
3117 # 1, favorSpeed - Favor fast code (/Ot)
3118 'FavorSizeOrSpeed': '1',
3119 # This implies link time code generation.
3120 'WholeProgramOptimization': 'true',
3121 },
3122 },
3123 },
3124 ],
3125 ],
3126 },
3127 ],
[email protected]8974e042010-06-21 18:06:523128 ['component=="static_library"', {
3129 'defines': [
3130 '_HAS_EXCEPTIONS=0',
3131 ],
3132 }],
[email protected]c7b95392012-03-28 00:25:203133 ['MSVS_VERSION=="2008"', {
3134 'defines': [
3135 '_HAS_TR1=0',
3136 ],
3137 }],
[email protected]3e2648a2011-03-21 20:58:503138 ['secure_atl', {
3139 'defines': [
3140 '_SECURE_ATL',
3141 ],
3142 }],
[email protected]8974e042010-06-21 18:06:523143 ],
[email protected]5b5ca7cb2009-07-20 23:00:203144 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:053145 '<(windows_sdk_path)/Include/shared',
3146 '<(windows_sdk_path)/Include/um',
3147 '<(windows_sdk_path)/Include/winrt',
[email protected]1f8d9402012-07-06 22:47:563148 '<(directx_sdk_path)/Include',
[email protected]2f80c312009-02-25 21:26:553149 '$(VSInstallDir)/VC/atlmfc/include',
3150 ],
[email protected]a8d99cef2009-08-26 20:47:493151 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:113152 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3153 # TODO(maruel): These warnings are level 4. They will be slowly
3154 # removed as code is fixed.
3155 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3156 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3157 4702, 4706,
3158 ],
[email protected]2f80c312009-02-25 21:26:553159 'msvs_settings': {
3160 'VCCLCompilerTool': {
3161 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:553162 'BufferSecurityCheck': 'true',
3163 'EnableFunctionLevelLinking': 'true',
3164 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:113165 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:553166 'WarnAsError': 'true',
3167 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:583168 'conditions': [
[email protected]3e2648a2011-03-21 20:58:503169 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:163170 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:553171 }],
[email protected]3e2648a2011-03-21 20:58:503172 ['MSVS_VERSION=="2005e"', {
3173 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
3174 }],
[email protected]8974e042010-06-21 18:06:523175 ['component=="shared_library"', {
3176 'ExceptionHandling': '1', # /EHsc
3177 }, {
3178 'ExceptionHandling': '0',
3179 }],
[email protected]3fef6e62009-07-31 19:58:583180 ],
[email protected]2f80c312009-02-25 21:26:553181 },
3182 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:163183 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:373184 'AdditionalLibraryDirectories': [
[email protected]1f8d9402012-07-06 22:47:563185 '<(directx_sdk_path)/Lib/x86',
[email protected]1ab48032012-07-02 21:48:053186 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373187 ],
[email protected]2f80c312009-02-25 21:26:553188 },
3189 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:553190 'AdditionalDependencies': [
3191 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:503192 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:553193 'version.lib',
3194 'msimg32.lib',
3195 'ws2_32.lib',
3196 'usp10.lib',
3197 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:083198 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:483199 'winmm.lib',
3200 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:553201 ],
[email protected]60c219832012-03-21 22:59:323202
[email protected]4de39f82011-03-28 12:01:293203 'conditions': [
[email protected]3e2648a2011-03-21 20:58:503204 ['msvs_express', {
3205 # Explicitly required when using the ATL with express
3206 'AdditionalDependencies': [
3207 'atlthunk.lib',
3208 ],
[email protected]60c219832012-03-21 22:59:323209
3210 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3211 # almost eight hundred LNK4254 and LNK4078 warnings:
3212 # - warning LNK4254: section 'ATL' (50000040) merged into
3213 # '.rdata' (40000040) with different attributes
3214 # - warning LNK4078: multiple 'ATL' sections found with
3215 # different attributes
3216 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
[email protected]3e2648a2011-03-21 20:58:503217 }],
3218 ['MSVS_VERSION=="2005e"', {
3219 # Non-express versions link automatically to these
3220 'AdditionalDependencies': [
3221 'advapi32.lib',
3222 'comdlg32.lib',
3223 'ole32.lib',
3224 'shell32.lib',
3225 'user32.lib',
3226 'winspool.lib',
3227 ],
3228 }],
3229 ],
[email protected]a78da50e2010-06-09 21:31:373230 'AdditionalLibraryDirectories': [
[email protected]1f8d9402012-07-06 22:47:563231 '<(directx_sdk_path)/Lib/x86',
[email protected]1ab48032012-07-02 21:48:053232 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373233 ],
[email protected]2f80c312009-02-25 21:26:553234 'GenerateDebugInformation': 'true',
3235 'MapFileName': '$(OutDir)\\$(TargetName).map',
3236 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:553237 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483238 # SubSystem values:
3239 # 0 == not set
3240 # 1 == /SUBSYSTEM:CONSOLE
3241 # 2 == /SUBSYSTEM:WINDOWS
3242 # Most of the executables we'll ever create are tests
3243 # and utilities with console output.
3244 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553245 },
3246 'VCMIDLTool': {
3247 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093248 'TypeLibraryName': '$(InputName).tlb',
3249 'OutputDirectory': '$(IntDir)',
3250 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333251 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093252 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3253 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553254 },
3255 'VCResourceCompilerTool': {
3256 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383257 'AdditionalIncludeDirectories': [
3258 '<(DEPTH)',
3259 '<(SHARED_INTERMEDIATE_DIR)',
3260 ],
[email protected]2f80c312009-02-25 21:26:553261 },
3262 },
3263 },
3264 }],
[email protected]79e2336c2011-05-12 18:18:343265 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313266 'target_defaults': {
3267 'defines': [
3268 'DISABLE_NACL',
3269 ],
3270 },
3271 }],
[email protected]cfbf9bc2009-12-07 22:07:563272 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193273 'target_defaults': {
3274 'msvs_settings': {
3275 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193276 'DelayLoadDLLs': [
3277 'dbghelp.dll',
3278 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013279 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193280 'uxtheme.dll',
3281 ],
3282 },
3283 },
[email protected]ef4fa4072009-12-04 22:46:503284 'configurations': {
[email protected]5153767c2009-12-22 01:52:503285 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503286 'msvs_settings': {
3287 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163288 'AdditionalOptions': [
3289 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333290 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163291 '/ignore:4199',
3292 '/ignore:4221',
3293 '/nxcompat',
3294 ],
[email protected]ef4fa4072009-12-04 22:46:503295 },
3296 },
3297 },
[email protected]5153767c2009-12-22 01:52:503298 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503299 'msvs_settings': {
3300 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163301 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503302 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333303 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163304 '/ignore:4199',
3305 '/ignore:4221',
3306 '/nxcompat',
3307 ],
[email protected]ef4fa4072009-12-04 22:46:503308 },
3309 },
3310 },
3311 },
[email protected]48c7af72009-07-03 22:00:193312 },
3313 }],
[email protected]9821d0d2010-04-16 22:40:373314 ['enable_new_npdevice_api==1', {
3315 'target_defaults': {
3316 'defines': [
3317 'ENABLE_NEW_NPDEVICE_API',
3318 ],
3319 },
3320 }],
[email protected]220ea5932012-08-09 10:44:073321 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303322 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:243323 ['CC', '<(make_clang_dir)/bin/clang'],
3324 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:073325 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:303326 ['CC.host', '$(CC)'],
3327 ['CXX.host', '$(CXX)'],
3328 ['LINK.host', '$(LINK)'],
3329 ],
3330 }],
[email protected]615fa6642012-08-14 19:17:073331 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:273332 # Hardcode the compiler names in the Makefile so that
3333 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:113334 'make_global_settings': [
3335 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
3336 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'],
3337 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:073338 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
3339 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3340 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:273341 ],
3342 }],
[email protected]2f80c312009-02-25 21:26:553343 ],
3344 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503345 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3346 # This block adds *project-wide* configuration settings to each project
3347 # file. It's almost always wrong to put things here. Specify your
3348 # custom xcode_settings in target_defaults to add them to targets instead.
3349
[email protected]1e013672012-06-29 22:12:203350 'conditions': [
[email protected]fca3d812012-07-27 00:55:363351 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3352 # setting sets the SDK on a project-wide basis. In order to get the
3353 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3354 # here at the project level.
3355 ['mac_sdk_path==""', {
3356 'conditions': [
3357 ['OS=="mac"', {
3358 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
3359 }],
3360 ['OS=="ios"', {
3361 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
3362 }],
3363 ],
3364 }, { # else: mac_sdk_path!=""
3365 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]1e013672012-06-29 22:12:203366 }],
3367 ['OS=="ios"', {
3368 # Just build armv7 since iOS 4.3+ only supports armv7.
3369 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
3370 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:203371 # Target both iPhone and iPad.
3372 'TARGETED_DEVICE_FAMILY': '1,2',
3373 }],
3374 ],
[email protected]0c8ab452009-11-06 21:57:503375
[email protected]2f80c312009-02-25 21:26:553376 # The Xcode generator will look for an xcode_settings section at the root
3377 # of each dict and use it to apply settings on a file-wide basis. Most
3378 # settings should not be here, they should be in target-specific
3379 # xcode_settings sections, or better yet, should use non-Xcode-specific
3380 # settings in target dicts. SYMROOT is a special case, because many other
3381 # Xcode variables depend on it, including variables such as
3382 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3383 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3384 # files to appear (when present) in the UI as actual files and not red
3385 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3386 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163387 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553388 },
[email protected]ee28c9f2009-09-04 01:53:013389}