blob: 4aac66f8e7f304d0888a0ce46efa52d8d33e214e [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]7ddea9802012-02-22 23:08:0541 # Disable viewport meta tag by default.
42 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2443
44 # Enable HiDPI support.
45 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4046
[email protected]6155e702012-05-02 17:56:0647 # Enable touch optimized art assets and metrics.
48 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1849
[email protected]f1f362b42012-05-15 17:46:5850 # Override buildtype to select the desired build flavor.
51 # Dev - everyday build for development/testing
52 # Official - release build (generally implies additional processing)
53 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
54 # conversion is done), some of the things which are now controlled by
55 # 'branding', such as symbol generation, will need to be refactored
56 # based on 'buildtype' (i.e. we don't care about saving symbols for
57 # non-Official # builds).
58 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1159
60 'conditions': [
61 # ChromeOS implies ash.
62 ['chromeos==1', {
63 'use_ash%': 1,
64 'use_aura%': 1,
65 }],
66
[email protected]e9c4c1c2013-02-06 06:46:4867 # For now, Windows builds that |use_aura| should also imply using
68 # ash. This rule should be removed for the future when Windows is
69 # using the aura windows without the ash interface.
70 ['use_aura==1 and OS=="win"', {
[email protected]8796d922012-08-07 01:23:1171 'use_ash%': 1,
72 }],
73 ['use_ash==1', {
74 'use_aura%': 1,
75 }],
[email protected]94cdbf42012-12-11 19:49:2276
77 # Compute the architecture that we're building on.
78 ['OS=="win" or OS=="mac" or OS=="ios"', {
79 'host_arch%': 'ia32',
80 }, {
81 # This handles the Unix platforms for which there is some support.
82 # Anything else gets passed through, which probably won't work
83 # very well; such hosts should pass an explicit target_arch to
84 # gyp.
85 'host_arch%':
86 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
87 }],
[email protected]8796d922012-08-07 01:23:1188 ],
[email protected]bb6aba32011-01-07 19:04:4389 },
90 # Copy conditionally-set variables out one scope.
91 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5892 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1693 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4294 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:0595 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2496 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:0697 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:5898 'buildtype%': '<(buildtype)',
[email protected]94cdbf42012-12-11 19:49:2299 'host_arch%': '<(host_arch)',
100
101 # Default architecture we're building for is the architecture we're
102 # building on.
103 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58104
[email protected]0115f042012-07-27 20:36:53105 # Sets whether we're building with the Android SDK/NDK (and hence with
106 # Ant, value 0), or as part of the Android system (and hence with the
107 # Android build system, value 1).
108 'android_build_type%': 0,
109
[email protected]55d92492013-01-31 05:03:39110 # Sets whether chrome is built for google tv device.
111 'google_tv%': 0,
112
[email protected]e72e55b2011-01-06 22:19:30113 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50114 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35115 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43116 'toolkit_views%': 1,
117 }, {
118 'toolkit_views%': 0,
119 }],
[email protected]1efbaaa2012-04-24 02:43:24120
[email protected]8796d922012-08-07 01:23:11121 # Set toolkit_uses_gtk for the Chromium browser on Linux.
122 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
123 'toolkit_uses_gtk%': 1,
124 }, {
125 'toolkit_uses_gtk%': 0,
126 }],
127
[email protected]3aa8a682012-08-11 00:04:29128 # Enable HiDPI on Mac OS and Chrome OS.
129 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24130 'enable_hidpi%': 1,
131 }],
[email protected]219c7312012-05-10 20:32:40132
[email protected]c71fe6402012-08-15 15:22:55133 # Enable touch UI on Metro.
134 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06135 'enable_touch_ui%': 1,
136 }],
[email protected]dc4e8b82012-11-15 03:58:16137
[email protected]b1a2b542013-01-10 07:33:09138 # Enable App Launcher only on ChromeOS, Windows and OSX.
139 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16140 'enable_app_list%': 1,
141 }, {
142 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09143 }],
144
145 # Enable Message Center only on ChromeOS and Windows for now.
146 ['use_ash==1 or OS=="win"', {
147 'enable_message_center%': 1,
148 }, {
[email protected]9b5dbf72013-01-09 20:29:15149 'enable_message_center%': 0,
[email protected]dc4e8b82012-11-15 03:58:16150 }],
[email protected]cb800562012-11-20 22:36:07151
152 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26153 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07154 }, {
155 'use_default_render_theme%': 0,
156 }],
[email protected]e72e55b2011-01-06 22:19:30157 ],
158 },
159
160 # Copy conditionally-set variables out one scope.
161 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30162 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22163 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43164 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11165 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58166 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16167 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42168 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05169 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24170 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06171 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]0115f042012-07-27 20:36:53172 'android_build_type%': '<(android_build_type)',
[email protected]55d92492013-01-31 05:03:39173 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16174 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15175 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07176 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22177 'buildtype%': '<(buildtype)',
[email protected]023d8242011-11-22 01:25:27178
[email protected]e14a9f92009-08-05 19:26:07179 # Override branding to select the desired branding flavor.
180 'branding%': 'Chromium',
181
[email protected]1f3d48e2013-03-05 15:52:20182 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
183 # are built under a chromium full build (1) or a webkit.org chromium
184 # build (0).
185 'inside_chromium_build%': 1,
186
[email protected]e72e55b2011-01-06 22:19:30187 # Set to 1 to enable fast builds. It disables debug info for fastest
188 # compilation.
189 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49190
[email protected]20960e072011-09-20 20:59:01191 # Set to 1 to enable dcheck in release without having to use the flag.
192 'dcheck_always_on%': 0,
193
[email protected]464750f2011-10-24 23:16:18194 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51195 'file_manager_extension%': 0,
196
[email protected]77a848262013-02-22 11:17:25197 # Disable image loader component extension by default.
198 'image_loader_extension%': 0,
199
[email protected]e72e55b2011-01-06 22:19:30200 # Python version.
[email protected]a43c5a02011-05-27 06:54:51201 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17202
[email protected]e72e55b2011-01-06 22:19:30203 # Set ARM-v7 compilation flags
204 'armv7%': 0,
205
206 # Set Neon compilation flags (only meaningful if armv7==1).
207 'arm_neon%': 1,
208
209 # The system root for cross-compiles. Default: none.
210 'sysroot%': '',
211
[email protected]945361a2011-09-30 04:38:43212 # The system libdir used for this ABI.
213 'system_libdir%': 'lib',
214
[email protected]e72e55b2011-01-06 22:19:30215 # On Linux, we build with sse2 for Chromium builds.
216 'disable_sse2%': 0,
217
218 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03219 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30220
[email protected]d9113542012-07-18 17:11:28221 # Use system libjpeg. Note that the system's libjepg will be used even if
222 # use_libjpeg_turbo is set.
223 'use_system_libjpeg%': 0,
224
[email protected]aa5e01fc2013-03-06 14:06:17225 # By default, component is set to static_library and it can be overriden
226 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53227 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30228
[email protected]bb6aba32011-01-07 19:04:43229 # Set to select the Title Case versions of strings in GRD files.
230 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21231
[email protected]98da0042011-02-02 00:10:27232 # Use translations provided by volunteers at launchpad.net. This
233 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19234 'use_third_party_translations%': 0,
235
[email protected]9a425422011-01-11 00:53:18236 # Remoting compilation is enabled by default. Set to 0 to disable.
237 'remoting%': 1,
238
[email protected]1ec68c42011-06-01 13:56:25239 # Configuration policy is enabled by default. Set to 0 to disable.
240 'configuration_policy%': 1,
241
[email protected]6c521fed2012-11-29 17:00:03242 # Variable safe_browsing is used to control the build time configuration
243 # for safe browsing feature. Safe browsing can be compiled in 3 different
244 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
245 # reporting features without enabling phishing and malware detection. This
246 # is useful to integrate a third party phishing/malware detection to
247 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56248 'safe_browsing%': 1,
249
[email protected]9eb100e2011-10-14 05:08:22250 # Speech input is compiled in by default. Set to 0 to disable.
251 'input_speech%': 1,
252
[email protected]7cce3232011-10-28 10:41:57253 # Notifications are compiled in by default. Set to 0 to disable.
254 'notifications%' : 1,
255
[email protected]970fd4e2012-12-19 11:09:37256 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
257 # regular builds and 1 for ASan builds.
258 'mac_want_real_dsym%': 'default',
259
[email protected]5d451ad2011-02-11 16:43:46260 # If this is set, the clang plugins used on the buildbot will be used.
261 # Run tools/clang/scripts/update.sh to make sure they are compiled.
262 # This causes 'clang_chrome_plugins_flags' to be set.
263 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08264 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46265
[email protected]2e82fa52012-11-27 23:41:44266 # Enable building with ASAN (Clang's -fsanitize=address option).
267 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06268 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
269 'asan%': 0,
270
[email protected]927a9d672012-11-09 11:28:20271 # Enable building with TSAN (Clang's -fsanitize=thread option).
272 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12273 # See http://clang.llvm.org/docs/ThreadSanitizer.html
274 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16275 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12276
[email protected]a10ddd2d2013-02-26 20:06:59277 # Enable building with MSAN (Clang's -fsanitize=memory option).
278 # MemorySanitizer only works with clang, but msan=1 implies clang=1
279 # See http://clang.llvm.org/docs/MemorySanitizer.html
280 'msan%': 0,
281
[email protected]7ce58b22012-09-26 05:17:25282 # Use a modified version of Clang to intercept allocated types and sizes
283 # for allocated objects. clang_type_profiler=1 implies clang=1.
284 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
285 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
286 'clang_type_profiler%': 0,
287
[email protected]8a6abd12012-05-16 10:04:44288 # Set to true to instrument the code with function call logger.
289 # See src/third_party/cygprofile/cyg-profile.cc for details.
290 'order_profiling%': 0,
291
[email protected]00b0a7f2012-01-25 15:30:46292 # Use the provided profiled order file to link Chrome image with it.
293 # This makes Chrome faster by better using CPU cache when executing code.
294 # This is known as PGO (profile guided optimization).
295 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
296 'order_text_section%' : "",
297
[email protected]1ad5a7b2011-06-24 03:15:13298 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
299 # libraries on linux x86-64 and arm, plus ASLR.
300 'linux_fpic%': 1,
301
[email protected]bd7b6fe2012-03-05 21:02:40302 # Whether one-click signin is enabled or not.
303 'enable_one_click_signin%': 0,
304
[email protected]6a3cd37e2012-04-17 17:13:34305 # Enable Chrome browser extensions
306 'enable_extensions%': 1,
307
[email protected]658677f2012-06-09 06:04:02308 # Enable browser automation.
309 'enable_automation%': 1,
310
[email protected]6ee43a72012-12-07 22:44:40311 # Enable Google Now.
312 'enable_google_now%': 1,
313
[email protected]703369a2012-11-05 20:40:31314 # Enable language detection.
315 'enable_language_detection%': 1,
316
[email protected]658677f2012-06-09 06:04:02317 # Enable printing support and UI.
318 'enable_printing%': 1,
319
[email protected]dda90ae2011-07-19 22:07:48320 # Webrtc compilation is enabled by default. Set to 0 to disable.
321 'enable_webrtc%': 1,
322
[email protected]0dfb6132013-03-08 11:10:10323 # PPAPI by default does not support plugins making calls off the main
324 # thread. Set to 1 to turn on experimental support for out-of-process
325 # plugins to make call of the main thread.
326 'enable_pepper_threading%': 1,
327
[email protected]cdb756ef2012-04-05 18:34:53328 # Enables use of the session service, which is enabled by default.
329 # Support for disabling depends on the platform.
330 'enable_session_service%': 1,
331
[email protected]6b40bb582012-03-15 20:50:38332 # Enables theme support, which is enabled by default. Support for
333 # disabling depends on the platform.
334 'enable_themes%': 1,
335
[email protected]57e67ac2013-02-22 03:37:22336 # Enables autofill dialog and associated features; disabled by default.
337 'enable_autofill_dialog%' : 0,
338
[email protected]4ffe78a2012-10-04 20:55:15339 # Uses OEM-specific wallpaper resources on Chrome OS.
340 'use_oem_wallpaper%': 0,
341
[email protected]0acdd772012-04-05 22:53:00342 # Enables support for background apps.
343 'enable_background%': 1,
344
[email protected]44879ed2012-04-06 01:11:02345 # Enable the task manager by default.
346 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45347
[email protected]9bfe0ab2012-08-30 13:18:11348 # Enable FTP support by default.
349 'disable_ftp_support%': 0,
350
[email protected]22d6dd72012-05-15 07:29:55351 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
352 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
353 # the input value also defines the required XI2 minor minimum version.
354 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
355 'use_xi2_mt%': 0,
356
[email protected]9061bee82012-01-16 11:45:17357 # Use of precompiled headers on Windows.
358 #
[email protected]9061bee82012-01-16 11:45:17359 # This variable may be explicitly set to 1 (enabled) or 0
360 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
361 # This setting will override the default.
362 #
[email protected]c3340fb32012-12-20 20:45:39363 # See
[email protected]9061bee82012-01-16 11:45:17364 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
365 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16366 'chromium_win_pch%': 0,
367
[email protected]3bb37e62012-04-19 03:40:08368 # Set this to true when building with Clang.
369 # See http://code.google.com/p/chromium/wiki/Clang for details.
370 'clang%': 0,
371
[email protected]18e0f39b2012-01-17 16:47:34372 # Enable plug-in installation by default.
373 'enable_plugin_installation%': 1,
374
[email protected]6d17f6392012-12-05 05:24:54375 # Enable PPAPI and NPAPI by default.
376 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
377 # as PPAPI; see crbug.com/162667.
378 'enable_plugins%': 1,
379
[email protected]62424a52012-03-18 03:09:50380 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42381 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35382 # Chrome UI.
383 # TODO(asvitkine): Enable this on all platforms and delete this flag.
384 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50385 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35386
[email protected]a9318c72012-03-01 01:29:47387 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
388 # with one of those tools.
389 'build_for_tool%': '',
390
[email protected]1f3d48e2013-03-05 15:52:20391 # Whether tests targets should be run, archived or just have the
392 # dependencies verified. All the tests targets have the '_run' suffix,
393 # e.g. base_unittests_run runs the target base_unittests. The test target
394 # always calls tools/swarm_client/isolate.py. See the script's --help for
395 # more information and the valid --mode values. Meant to be overriden with
396 # GYP_DEFINES.
397 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
398 # be done while the builders are being reconfigured to check out test data
399 # files.
400 'test_isolation_mode%': 'noop',
[email protected]37138132013-01-17 23:08:52401 # If no directory is specified then a temporary directory will be used.
402 'test_isolation_outdir%': '',
[email protected]01971642012-03-07 14:39:56403
[email protected]740ebed2012-06-27 19:14:06404 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12405 'wix_path%': '<(DEPTH)/third_party/wix',
406
[email protected]0850e842013-01-19 03:44:31407 # Managed users are enabled by default.
408 'enable_managed_users%': 1,
409
[email protected]199def22013-02-21 17:52:29410 'spdy_proxy_auth_origin%' : '',
411 'spdy_proxy_auth_property%' : '',
412
[email protected]bb6aba32011-01-07 19:04:43413 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34414 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37415 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34416 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37417 }, {
418 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34419 }],
420
[email protected]df9167b2011-11-14 19:15:25421 # A flag for BSD platforms
422 ['OS=="freebsd" or OS=="openbsd"', {
423 'os_bsd%': 1,
424 }, {
425 'os_bsd%': 0,
426 }],
427
[email protected]c329adf82011-10-05 14:34:57428 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42429 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57430 'use_nss%': 1,
431 }, {
432 'use_nss%': 0,
433 }],
[email protected]e0b85a52011-10-06 03:30:42434
[email protected]258dca42011-09-21 00:17:19435 # Flags to use X11 on non-Mac POSIX platforms
[email protected]1e013672012-06-29 22:12:20436 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19437 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34438 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37439 }, {
[email protected]258dca42011-09-21 00:17:19440 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37441 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34442 }],
[email protected]9a8175892012-03-20 02:11:58443
[email protected]efadeacf2011-10-27 19:01:00444 # We always use skia text rendering in Aura on Windows, since GDI
445 # doesn't agree with our BackingStore.
446 # TODO(beng): remove once skia text rendering is on by default.
447 ['use_aura==1 and OS=="win"', {
448 'enable_skia_text%': 1,
449 }],
[email protected]9edeb712011-09-20 21:20:33450
[email protected]63692212010-09-16 00:22:21451 # A flag to enable or disable our compile-time dependency
452 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
453 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49454 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50455 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21456 'use_gnome_keyring%': 0,
457 }, {
458 'use_gnome_keyring%': 1,
459 }],
[email protected]0afe5212010-10-01 18:56:11460
[email protected]8796d922012-08-07 01:23:11461 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20462 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43463 'use_titlecase_in_grd_files%': 1,
464 }],
465
[email protected]77a848262013-02-22 11:17:25466 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06467 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50468 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25469 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50470 }, {
[email protected]3d38d8e2011-04-16 20:48:51471 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25472 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51473 }],
[email protected]7de46352011-09-12 15:39:19474
[email protected]c79d1972013-02-06 18:47:29475 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01476 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51477 }],
478
[email protected]da1c8d692011-09-20 20:35:01479 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49480 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46481 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40482 'enable_google_now%': 0,
[email protected]7831e9a2013-02-20 13:54:12483 'enable_language_detection%': 1,
[email protected]55e02302012-08-21 00:50:46484 'enable_printing%': 0,
485 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46486 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58487 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01488 }],
[email protected]839d5172011-10-13 17:18:11489
[email protected]57e67ac2013-02-22 03:37:22490 # Enable autofill dialog for Android and Views-enabled platforms for now.
491 ['toolkit_views==1 or (OS=="android" and android_build_type==0)', {
492 'enable_autofill_dialog%': 1
493 }],
494
[email protected]118347052013-01-12 08:35:43495 ['OS=="android" and android_build_type==0', {
496 'enable_webrtc%': 1,
497 }],
498
499 # Disable WebRTC for building WebView as part of Android system.
500 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
501 # the necessary third_party repositories.
502 ['OS=="android" and android_build_type==1', {
503 'enable_webrtc%': 0,
504 }],
505
[email protected]0d16f292012-07-02 22:10:48506 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24507 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11508 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24509 'enable_automation%': 0,
510 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40511 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31512 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24513 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44514 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24515 'enable_themes%': 0,
516 'enable_webrtc%': 0,
517 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48518 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44519 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31520 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48521 }],
522
[email protected]839d5172011-10-13 17:18:11523 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27524 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01525 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33526 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11527 }, {
[email protected]1ee7c56c2011-10-19 14:51:33528 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11529 }],
[email protected]9061bee82012-01-16 11:45:17530
[email protected]c3340fb32012-12-20 20:45:39531 # Turn precompiled headers on by default.
532 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17533 'chromium_win_pch%': 1
534 }],
[email protected]18e0f39b2012-01-17 16:47:34535
[email protected]3d5173ec2012-03-27 04:08:23536 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34537 'enable_plugin_installation%': 0,
538 }, {
539 'enable_plugin_installation%': 1,
540 }],
[email protected]b07806c12012-02-03 22:44:59541
[email protected]55d92492013-01-31 05:03:39542 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54543 'enable_plugins%': 0,
544 }, {
545 'enable_plugins%': 1,
546 }],
547
[email protected]8d726a42012-02-09 03:49:00548 # linux_use_gold_binary: whether to use the binary checked into
549 # third_party/gold.
[email protected]567370a32013-03-01 00:11:23550 ['OS=="linux" and target_arch=="x64"', {
[email protected]1e033482012-02-09 19:33:51551 'linux_use_gold_binary%': 1,
552 }, {
553 'linux_use_gold_binary%': 0,
554 }],
555
[email protected]be239492012-02-09 19:00:17556 # linux_use_gold_flags: whether to use build flags that rely on gold.
557 # On by default for x64 Linux. Temporarily off for ChromeOS as
558 # it failed on a buildbot.
[email protected]567370a32013-03-01 00:11:23559 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17560 'linux_use_gold_flags%': 1,
561 }, {
[email protected]8d726a42012-02-09 03:49:00562 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59563 }],
[email protected]2e22e2f2012-03-15 21:53:10564
[email protected]9394a3a2012-12-19 19:22:39565 ['chromeos==1', {
566 'linux_use_libgps%': 1,
567 }, { # chromeos==0
568 # Do not use libgps on desktop Linux by default,
569 # see http://crbug.com/103751.
570 'linux_use_libgps%': 0,
571 }],
572
[email protected]a95d5302012-11-03 00:02:19573 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32574 'enable_captive_portal_detection%': 0,
575 }, {
576 'enable_captive_portal_detection%': 1,
577 }],
578
[email protected]3bd47e022012-03-22 04:19:12579 # Enable Skia UI text drawing incrementally on different platforms.
580 # http://crbug.com/105550
581 #
582 # On Aura, this allows per-tile painting to be used in the browser
583 # compositor.
[email protected]9197a9282012-05-30 14:12:32584 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12585 'use_canvas_skia%': 1,
586 }],
[email protected]adb44342012-07-23 13:36:12587
[email protected]0753ea42012-08-30 20:15:44588 ['chromeos==1', {
589 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
590 'use_libjpeg_turbo%': 0,
591 }],
592
[email protected]adb44342012-07-23 13:36:12593 ['OS=="android"', {
594 # When building as part of the Android system, use system libraries
595 # where possible to reduce ROM size.
596 'use_system_libjpeg%': '<(android_build_type)',
597 }],
[email protected]8a46f5f2012-12-05 00:47:12598
599 # Enable Settings App only on Windows.
600 ['enable_app_list==1 and OS=="win"', {
601 'enable_settings_app%': 1,
602 }, {
603 'enable_settings_app%': 0,
604 }],
[email protected]94cdbf42012-12-11 19:49:22605
606 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
607 # Set some defaults for arm/linux chrome builds
608 'armv7%': 1,
609 'linux_breakpad%': 0,
610 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43611 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22612 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43613 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22614 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46615
616 ['target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07617 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28618 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46619 }],
[email protected]b3f23ba2010-04-26 22:58:17620 ],
[email protected]2b113652012-09-17 17:01:39621
622 # Set this to 1 to use the Google-internal file containing
623 # official API keys for Google Chrome even in a developer build.
624 # Setting this variable explicitly to 1 will cause your build to
625 # fail if the internal file is missing.
626 #
627 # Set this to 0 to not use the internal file, even when it
628 # exists in your checkout.
629 #
630 # Leave set to 2 to have this variable implicitly set to 1 if
631 # you have src/google_apis/internal/google_chrome_api_keys.h in
632 # your checkout, and implicitly set to 0 if not.
633 #
634 # Note that official builds always behave as if this variable
635 # was explicitly set to 1, i.e. they always use official keys,
636 # and will fail to build if the internal file is missing.
637 'use_official_google_api_keys%': 2,
638
639 # Set these to bake the specified API keys and OAuth client
640 # IDs/secrets into your build.
641 #
642 # If you create a build without values baked in, you can instead
643 # set environment variables to provide the keys at runtime (see
644 # src/google_apis/google_api_keys.h for details). Features that
645 # require server-side APIs may fail to work if no keys are
646 # provided.
647 #
648 # Note that if you are building an official build or if
649 # use_official_google_api_keys has been set to 1 (explicitly or
650 # implicitly), these values will be ignored and the official
651 # keys will be used instead.
652 'google_api_key%': '',
653 'google_default_client_id%': '',
654 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07655 },
656
[email protected]e72e55b2011-01-06 22:19:30657 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07658 'branding%': '<(branding)',
659 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27660 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59661 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44662 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33663 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58664 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16665 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42666 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57667 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25668 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34669 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19670 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34671 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
672 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21673 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11674 'linux_fpic%': '<(linux_fpic)',
[email protected]0dfb6132013-03-08 11:10:10675 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44676 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05677 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24678 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06679 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35680 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20681 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25682 'image_loader_extension%': '<(image_loader_extension)',
[email protected]b2f030c2009-09-24 20:36:21683 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54684 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01685 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36686 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43687 'armv7%': '<(armv7)',
688 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23689 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43690 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52691 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43692 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17693 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18694 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40695 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48696 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16697 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25698 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56699 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22700 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57701 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46702 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37703 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06704 'asan%': '<(asan)',
[email protected]a10ddd2d2013-02-26 20:06:59705 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12706 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16707 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25708 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44709 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46710 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34711 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34712 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54713 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53714 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38715 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22716 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]4ffe78a2012-10-04 20:55:15717 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00718 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59719 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00720 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39721 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50722 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33723 'test_isolation_mode%': '<(test_isolation_mode)',
724 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10725 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02726 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40727 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31728 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32729 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11730 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02731 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06732 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12733 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44734 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12735 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]0115f042012-07-27 20:36:53736 'android_build_type%': '<(android_build_type)',
[email protected]55d92492013-01-31 05:03:39737 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16738 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15739 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07740 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16741 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39742 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
743 'google_api_key%': '<(google_api_key)',
744 'google_default_client_id%': '<(google_default_client_id)',
745 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31746 'enable_managed_users%': '<(enable_managed_users)',
[email protected]199def22013-02-21 17:52:29747 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
748 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]01971642012-03-07 14:39:56749
[email protected]b32da81e2013-02-20 10:35:01750 # Use system ffmpeg instead of bundled one.
751 'use_system_ffmpeg%': 0,
752
[email protected]46aa05cc42013-01-15 17:34:31753 # Use system mesa instead of bundled one.
754 'use_system_mesa%': 0,
755
[email protected]c486e4e2013-01-08 16:49:07756 # Use system nspr instead of the bundled one.
757 'use_system_nspr%': 0,
758
[email protected]2f325672012-10-31 23:29:37759 # Use system protobuf instead of bundled one.
760 'use_system_protobuf%': 0,
761
[email protected]371e1092011-10-12 20:37:36762 # Use system yasm instead of bundled one.
763 'use_system_yasm%': 0,
764
[email protected]cd00bd862012-02-29 00:40:36765 # Default to enabled PIE; this is important for ASLR but we may need to be
766 # able to turn it off for various reasons.
767 'linux_disable_pie%': 0,
768
[email protected]caa95c82009-11-23 22:39:32769 # The release channel that this build targets. This is used to restrict
770 # channel-specific build options, like which installer packages to create.
771 # The default is 'all', which does no channel-specific filtering.
772 'channel%': 'all',
773
[email protected]b3fb8092009-03-12 19:09:24774 # Override chromium_mac_pch and set it to 0 to suppress the use of
775 # precompiled headers on the Mac. Prefix header injection may still be
776 # used, but prefix headers will not be precompiled. This is useful when
777 # using distcc to distribute a build to compile slaves that don't
778 # share the same compiler executable as the system driving the compilation,
779 # because precompiled headers rely on pointers into a specific compiler
780 # executable's image. Setting this to 0 is needed to use an experimental
781 # Linux-Mac cross compiler distcc farm.
782 'chromium_mac_pch%': 1,
783
[email protected]27b687ec42012-03-26 22:22:15784 # The default value for mac_strip in target_defaults. This cannot be
785 # set there, per the comment about variable% in a target_defaults.
786 'mac_strip_release%': 1,
787
[email protected]f5ecbba12009-04-03 04:35:18788 # Set to 1 to enable code coverage. In addition to build changes
789 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
790 # project file called "coverage".
791 # Currently ignored on Windows.
792 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49793
[email protected]9619e65d2012-05-23 19:06:52794 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
795 # This is useful for parallel compilation tools which can't support /Zi.
796 # Only used on Windows.
797 'win_z7%' : 0,
798
[email protected]7477ea6f2009-12-22 23:28:15799 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47800 # environment variable, the libcmt shim it uses sometimes gets in
801 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
802 # 'win_use_allocator_shim': 0,
803 # 'win_release_RuntimeLibrary': 2
804 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52805 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11806
[email protected]95ff8082009-11-13 22:21:01807 # Whether usage of OpenMAX is enabled.
808 'enable_openmax%': 0,
809
[email protected]d01120e62010-05-10 17:04:48810 # Whether proprietary audio/video codecs are assumed to be included with
811 # this build (only meaningful if branding!=Chrome).
812 'proprietary_codecs%': 0,
813
[email protected]e5b2eaa2009-04-14 01:39:12814 # TODO(bradnelson): eliminate this when possible.
815 # To allow local gyp files to prevent release.vsprops from being included.
816 # Yes(1) means include release.vsprops.
817 # Once all vsprops settings are migrated into gyp, this can go away.
818 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23819
[email protected]cbd5fd52009-08-26 00:14:27820 # TODO(bradnelson): eliminate this when possible.
821 # To allow local gyp files to override additional linker options for msvs.
822 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19823 'msvs_use_common_linker_extras%': 1,
824
[email protected]1ffb6502009-06-02 07:46:24825 # TODO(sgk): eliminate this if possible.
826 # It would be nicer to support this via a setting in 'target_defaults'
827 # in chrome/app/locales/locales.gypi overriding the setting in the
828 # 'Debug' configuration in the 'target_defaults' dict below,
829 # but that doesn't work as we'd like.
830 'msvs_debug_link_incremental%': '2',
831
[email protected]1f790ef2011-01-11 20:45:36832 # Needed for some of the largest modules.
833 'msvs_debug_link_nonincremental%': '1',
834
[email protected]6f390be2012-08-16 18:57:10835 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06836 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26837 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06838
[email protected]c54b41cb2012-08-24 20:58:24839 # The default settings for third party code for treating
840 # warnings-as-errors. Ideally, this would not be required, however there
841 # is some third party code that takes a long time to fix/roll. So, this
842 # flag allows us to have warnings as errors in general to prevent
843 # regressions in most modules, while working on the bits that are
844 # remaining.
845 'win_third_party_warn_as_error%': 'true',
846
[email protected]573136142009-07-15 22:48:37847 # This is the location of the sandbox binary. Chrome looks for this before
848 # running the zygote process. If found, and SUID, it will be used to
849 # sandbox the zygote process and, thus, all renderer processes.
850 'linux_sandbox_path%': '',
851
[email protected]ad6d2c42009-09-15 20:13:38852 # Set this to true to enable SELinux support.
853 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57854
[email protected]3bb37e62012-04-19 03:40:08855 # Clang stuff.
856 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24857 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15858
[email protected]5e781232011-01-28 02:57:59859 # These two variables can be set in GYP_DEFINES while running
860 # |gclient runhooks| to let clang run a plugin in every compilation.
861 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
862 # Example:
[email protected]93120fe2011-02-03 20:46:42863 # 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:59864
865 'clang_load%': '',
866 'clang_add_plugin%': '',
867
[email protected]da1c8d692011-09-20 20:35:01868 # The default type of gtest.
869 'gtest_target_type%': 'executable',
870
[email protected]7664ab32011-02-01 23:35:25871 # Enable sampling based profiler.
872 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
873 'profiling%': '0',
874
[email protected]93b373502011-08-16 19:06:22875 # Enable strict glibc debug mode.
876 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10877 # Compile in Breakpad support by default so that it can be tested,
878 # even if it not enabled by default at runtime.
879 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01880 # And if we want to dump symbols for Breakpad-enabled builds.
881 'linux_dump_symbols%': 0,
882 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03883 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49884 # Strip the test binaries needed for Linux reliability tests.
885 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03886
[email protected]46ce5b562010-06-16 18:39:53887 # Enable TCMalloc.
888 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24889
[email protected]d8b60602010-03-26 09:41:22890 # Disable TCMalloc's heapchecker.
891 'linux_use_heapchecker%': 0,
892
[email protected]64e2d4a42010-08-27 10:13:21893 # Disable shadow stack keeping used by heapcheck to unwind the stacks
894 # better.
895 'linux_keep_shadow_stacks%': 0,
896
[email protected]556c5d72010-06-10 05:45:01897 # Set to 1 to link against libgnome-keyring instead of using dlopen().
898 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35899 # Set to 1 to link against gsettings APIs instead of using dlopen().
900 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01901
[email protected]77c1b29392009-12-04 06:21:29902 # Set Thumb compilation flags.
903 'arm_thumb%': 0,
904
[email protected]53e0f642010-03-05 01:41:56905 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
906 # arm_neon==0).
907 'arm_fpu%': 'vfpv3',
908
[email protected]5252af72012-05-04 19:26:40909 # Set ARM float abi compilation flag.
910 'arm_float_abi%': 'softfp',
911
[email protected]9821d0d2010-04-16 22:40:37912 # Enable new NPDevice API.
913 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50914
915 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14916 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50917
[email protected]6f51b27e2010-06-22 20:43:53918 # Enable a variable used elsewhere throughout the GYP files to determine
919 # whether to compile in the sources for the GPU plugin / process.
920 'enable_gpu%': 1,
921
[email protected]e72e55b2011-01-06 22:19:30922 # .gyp files or targets should set chromium_code to 1 if they build
923 # Chromium-specific code, as opposed to external code. This variable is
924 # used to control such things as the set of warnings to enable, and
925 # whether warnings are treated as errors.
926 'chromium_code%': 0,
927
[email protected]8d726a42012-02-09 03:49:00928 'release_valgrind_build%': 0,
929
[email protected]b1eb341c2011-11-09 18:46:07930 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
931 'enable_wexit_time_destructors%': 0,
932
[email protected]e72e55b2011-01-06 22:19:30933 # Set to 1 to compile with the built in pdf viewer.
934 'internal_pdf%': 0,
935
[email protected]9e1149d72012-07-24 01:27:17936 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
937 'internal_gles2_conform_tests%': 0,
938
[email protected]e72e55b2011-01-06 22:19:30939 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
940 # so Cocoa is happy (http://crbug.com/20441).
941 'locales': [
942 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
943 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
944 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]507066e2012-10-26 10:50:47945 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30946 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
947 'vi', 'zh-CN', 'zh-TW',
948 ],
949
[email protected]cc0322d2011-07-24 09:29:19950 # Pseudo locales are special locales which are used for testing and
951 # debugging. They don't get copied to the final app. For more info,
952 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
953 'pseudo_locales': [
954 'fake-bidi',
955 ],
956
[email protected]bb6aba32011-01-07 19:04:43957 'grit_defines': [],
958
[email protected]bd3bd442011-03-28 07:58:51959 # If debug_devtools is set to 1, JavaScript files for DevTools are
960 # stored as is and loaded from disk. Otherwise, a concatenated file
961 # is stored in resources.pak. It is still possible to load JS files
962 # from disk by passing --debug-devtools cmdline switch.
963 'debug_devtools%': 0,
964
[email protected]464750f2011-10-24 23:16:18965 # The Java Bridge is not compiled in by default.
966 'java_bridge%': 0,
967
[email protected]1e013672012-06-29 22:12:20968 # Code signing for iOS binaries. The bots need to be able to disable this.
969 'chromium_ios_signing%': 1,
970
[email protected]33e1c372011-12-14 16:32:07971 # This flag is only used when disable_nacl==0 and disables all those
972 # subcomponents which would require the installation of a native_client
973 # untrusted toolchain.
974 'disable_nacl_untrusted%': 0,
975
[email protected]407dfa632011-12-23 11:59:35976 # Disable Dart by default.
977 'enable_dart%': 0,
978
[email protected]ff10b132012-02-29 22:53:30979 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
980 'msbuild_toolset%': '',
981
[email protected]836285f22012-04-03 16:19:26982 # Native Client is enabled by default.
983 'disable_nacl%': 0,
984
[email protected]1e40ba002013-03-07 22:07:33985 # Portable Native Client is enabled by default.
986 'disable_pnacl%': 0,
987
[email protected]fa9d4e262012-08-21 04:39:00988 # Whether to build full debug version for Debug configuration on Android.
989 # Compared to full debug version, the default Debug configuration on Android
990 # has no full v8 debug, has size optimization and linker gc section, so that
991 # we can build a debug version with acceptable size and performance.
992 'android_full_debug%': 0,
993
[email protected]65885272012-10-05 23:55:50994 # Sets the default version name and code for Android app, by default we
995 # do a developer build.
996 'android_app_version_name%': 'Developer Build',
997 'android_app_version_code%': 0,
998
[email protected]740ebed2012-06-27 19:14:06999 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121000 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1001
[email protected]1f8d9402012-07-06 22:47:561002 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1003 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051004
[email protected]fd6d8822012-12-08 06:56:111005 # Whether we are using the rlz library or not. Platforms like Android send
1006 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221007 'enable_rlz%': 0,
1008
[email protected]912c55c2009-07-31 23:33:551009 'conditions': [
[email protected]1f8d9402012-07-06 22:47:561010 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1011 'windows_sdk_path%': '<(windows_sdk_default_path)',
1012 }, {
1013 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1014 }],
1015 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1016 'directx_sdk_path%': '<(directx_sdk_default_path)',
1017 }, {
1018 'directx_sdk_path%': '$(DXSDK_DIR)',
1019 }],
[email protected]54184ce72012-10-18 07:11:261020 ['OS=="win"', {
1021 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071022 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1023 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1024 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261025 }],
[email protected]2b113652012-09-17 17:01:391026 # If use_official_google_api_keys is already set (to 0 or 1), we
1027 # do none of the implicit checking. If it is set to 1 and the
1028 # internal keys file is missing, the build will fail at compile
1029 # time. If it is set to 0 and keys are not provided by other
1030 # means, a warning will be printed at compile time.
1031 ['use_official_google_api_keys==2', {
1032 'use_official_google_api_keys%':
1033 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1034 }],
[email protected]1e013672012-06-29 22:12:201035 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231036 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431037 '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:271038 'conditions': [
[email protected]07c27ab02012-07-17 17:00:201039 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1040 # that it takes effect here.
[email protected]a10ddd2d2013-02-26 20:06:591041 ['clang==0 and asan==0 and tsan==0 and msan==0', {
[email protected]07c27ab02012-07-17 17:00:201042 # This will set gcc_version to XY if you are running gcc X.Y.*.
1043 # This is used to tweak build flags for gcc 4.5.
1044 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1045 }, {
1046 'gcc_version%': 0,
1047 }],
[email protected]eb5f1672013-01-31 07:56:461048 ['target_arch=="mipsel"', {
1049 'werror%': '',
1050 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461051 'nacl_untrusted_build%': 0,
1052 'linux_use_tcmalloc%': 0,
1053 'linux_breakpad%': 0,
1054 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281055 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461056 }],
[email protected]4c9cc6c2009-10-01 18:54:571057 # All Chrome builds have breakpad symbols, but only process the
1058 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081059 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571060 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571061 }],
[email protected]cbd5fd52009-08-26 00:14:271062 ],
[email protected]1e013672012-06-29 22:12:201063 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481064 ['OS=="ios"', {
1065 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191066 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151067 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071068 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351069 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151070 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131071 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471072 'use_system_sqlite%': 1,
[email protected]57871bc2012-08-20 16:28:121073
1074 # The Mac SDK is set for iOS builds and passed through to Mac
1075 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1076 # overridden from the command line the same way it is for a Mac build.
1077 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291078
1079 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1080 # what is required, but the value is left blank so when it is set in
1081 # the project files it will be the "current" iOS SDK. Forcing 5.0
1082 # even though it is "current" causes Xcode to spit out a warning for
1083 # every single project file for not using the "current" SDK.
1084 'ios_sdk%': '',
1085 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181086 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321087
1088 'conditions': [
1089 # ios_product_name is set to the name of the .app bundle as it should
1090 # appear on disk.
1091 ['branding=="Chrome"', {
1092 'ios_product_name%': 'Chrome',
1093 }, { # else: branding!="Chrome"
1094 'ios_product_name%': 'Chromium',
1095 }],
1096 ['branding=="Chrome" and buildtype=="Official"', {
1097 'ios_breakpad%': 1,
1098 }, { # else: branding!="Chrome" or buildtype!="Official"
1099 'ios_breakpad%': 0,
1100 }],
1101 ],
1102 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011103 ['OS=="android"', {
1104 # Location of Android NDK.
1105 'variables': {
1106 'variables': {
[email protected]5061d152013-01-16 17:45:571107 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1108 # they're passed to ant which uses a different relative path from
1109 # gyp.
1110 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1111 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1112 'android_host_arch%': '<!(uname -m)',
[email protected]da1c8d692011-09-20 20:35:011113 },
[email protected]5061d152013-01-16 17:45:571114 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011115 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571116 'android_sdk_root%': '<(android_sdk_root)',
1117
1118 # Android API-level of the SDK used for compilation.
1119 'android_sdk_version%': '17',
1120
[email protected]5cfec2b2013-03-05 20:54:331121 # Android API level 14 is ICS (Android 4.0) which is the minimum
1122 # platform requirement for Chrome on Android, we use it for native
1123 # code compilation.
[email protected]5061d152013-01-16 17:45:571124 'conditions': [
1125 ['target_arch == "ia32"', {
1126 'android_app_abi%': 'x86',
1127 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331128 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571129 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1130 }],
1131 ['target_arch=="arm"', {
1132 'conditions': [
1133 ['armv7==0', {
1134 'android_app_abi%': 'armeabi',
1135 }, {
1136 'android_app_abi%': 'armeabi-v7a',
1137 }],
1138 ],
1139 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331140 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571141 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1142 }],
1143 ],
[email protected]da1c8d692011-09-20 20:35:011144 },
[email protected]5061d152013-01-16 17:45:571145 # Copy conditionally-set variables out one scope.
1146 'android_app_abi%': '<(android_app_abi)',
1147 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011148 'android_ndk_root%': '<(android_ndk_root)',
1149 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571150 'android_sdk_root%': '<(android_sdk_root)',
1151 'android_sdk_version%': '<(android_sdk_version)',
1152 'android_toolchain%': '<(android_toolchain)',
1153
[email protected]da1c8d692011-09-20 20:35:011154 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1155 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571156 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
1157 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]da1c8d692011-09-20 20:35:011158
[email protected]c0f76312012-08-16 13:52:041159 # Location of the "strip" binary, used by both gyp and scripts.
1160 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1161
[email protected]ef7ed7a2012-05-29 23:19:131162 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1163 # to specify the output directory for Ant in the Android build.
1164 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1165
[email protected]d8621ce2013-02-22 00:37:331166 # Determines whether we should optimize JNI generation at the cost of
1167 # breaking assumptions in the build system that when inputs have changed
1168 # the outputs should always change as well. This is meant purely for
1169 # developer builds, to avoid spurious re-linking of native files.
1170 'optimize_jni_generation%': 0,
1171
[email protected]da1c8d692011-09-20 20:35:011172 # Always uses openssl.
1173 'use_openssl%': 1,
1174
1175 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021176 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071177 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011178 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221179 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021180 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181181 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581182 'build_ffmpegsumo%': 0,
1183 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021184
[email protected]ad17e342012-07-17 20:45:481185 # Disable Native Client.
1186 'disable_nacl%': 1,
1187
[email protected]58242012012-04-12 16:14:311188 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001189 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111190
[email protected]cdb756ef2012-04-05 18:34:531191 # Sessions are store separately in the Java side.
1192 'enable_session_service%': 0,
1193
[email protected]5fd2e842012-03-01 00:29:111194 # Set to 1 once we have a notification system for Android.
1195 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571196 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011197
[email protected]ad17e342012-07-17 20:45:481198 'p2p_apis%' : 0,
1199
[email protected]7b56f1872012-05-23 00:48:501200 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:091201 # OS==android, make all gtest_targets depend on
1202 # testing/android/native_test.gyp:native_test_apk.
[email protected]48de0fc2012-08-02 11:03:581203 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011204
1205 # Uses system APIs for decoding audio and video.
1206 'use_libffmpeg%': '0',
1207
[email protected]f1dc1e52012-12-12 21:39:001208 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011209 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011210
[email protected]adb44342012-07-23 13:36:121211 # When building as part of the Android system, use system libraries
1212 # where possible to reduce ROM size.
1213 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]3a820d12012-06-27 12:56:321214 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]03bdcc122012-07-10 09:02:251215 'use_system_expat%': '<(android_build_type)',
[email protected]ad17e342012-07-17 20:45:481216 'use_system_icu%': '<(android_build_type)',
[email protected]f91ba812012-07-11 00:00:511217 'use_system_stlport%': '<(android_build_type)',
[email protected]adb44342012-07-23 13:36:121218
[email protected]0850e842013-01-19 03:44:311219 'enable_managed_users%': 0,
1220
[email protected]da1c8d692011-09-20 20:35:011221 # Copy it out one scope.
1222 'android_build_type%': '<(android_build_type)',
1223 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071224 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291225 'variables': {
1226 # Mac OS X SDK and deployment target support. The SDK identifies
1227 # the version of the system headers that will be used, and
1228 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1229 # macro. "Maximum allowed" refers to the operating system version
1230 # whose APIs are available in the headers. The deployment target
1231 # identifies the minimum system version that the built products are
1232 # expected to function on. It corresponds to the
1233 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1234 # macros are available, #include <AvailabilityMacros.h>. Additional
1235 # documentation on these macros is available at
1236 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1237 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1238 # deployment target to 10.6. Other projects, such as O3D, may
1239 # override these defaults.
1240
1241 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1242 # about that is at least the specified version. In official builds,
1243 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1244 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1245 # path to the SDK; when set to a non-empty string, SDK detection
1246 # based on mac_sdk_min will be bypassed entirely.
1247 'mac_sdk_min%': '10.6',
1248 'mac_sdk_path%': '',
1249
1250 'mac_deployment_target%': '10.6',
1251 },
1252
1253 'mac_sdk_min': '<(mac_sdk_min)',
1254 'mac_sdk_path': '<(mac_sdk_path)',
1255 'mac_deployment_target': '<(mac_deployment_target)',
1256
[email protected]e1ece302011-09-15 03:58:111257 # Enable clang on mac by default!
1258 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291259
[email protected]794fb4782011-12-14 19:10:561260 # Compile in Breakpad support by default so that it can be
1261 # tested, even if it is not enabled by default at runtime.
1262 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071263 'conditions': [
1264 # mac_product_name is set to the name of the .app bundle as it should
1265 # appear on disk. This duplicates data from
1266 # chrome/app/theme/chromium/BRANDING and
1267 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1268 # these names into the build system.
1269 ['branding=="Chrome"', {
1270 'mac_product_name%': 'Google Chrome',
1271 }, { # else: branding!="Chrome"
1272 'mac_product_name%': 'Chromium',
1273 }],
1274
[email protected]e14a9f92009-08-05 19:26:071275 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291276 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
[email protected]794fb4782011-12-14 19:10:561277 # Enable uploading crash dumps.
1278 'mac_breakpad_uploads%': 1,
1279 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071280 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561281 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071282 'mac_keystone%': 1,
1283 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291284 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561285 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071286 'mac_breakpad%': 0,
1287 'mac_keystone%': 0,
1288 }],
1289 ],
1290 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551291 ['OS=="win"', {
1292 'conditions': [
[email protected]8974e042010-06-21 18:06:521293 ['component=="shared_library"', {
1294 'win_use_allocator_shim%': 0,
1295 }],
[email protected]fa0f16e2012-08-20 22:30:041296 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101297 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041298 # Not enabled for component=static_library because some targets
1299 # are too large and the toolchain fails due to the size of the
1300 # .obj files.
[email protected]6f390be2012-08-16 18:57:101301 'incremental_chrome_dll%': 1,
1302 }],
[email protected]10bb8c92009-08-07 21:16:031303 # Don't do incremental linking for large modules on 32-bit.
1304 ['MSVS_OS_BITS==32', {
1305 'msvs_large_module_debug_link_mode%': '1', # No
1306 },{
1307 'msvs_large_module_debug_link_mode%': '2', # Yes
1308 }],
[email protected]78764182013-01-23 20:32:511309 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501310 'msvs_express%': 1,
1311 'secure_atl%': 0,
1312 },{
1313 'msvs_express%': 0,
1314 'secure_atl%': 1,
1315 }],
[email protected]912c55c2009-07-31 23:33:551316 ],
[email protected]ef4fa4072009-12-04 22:46:501317 'nacl_win64_defines': [
1318 # This flag is used to minimize dependencies when building
1319 # Native Client loader for 64-bit Windows.
1320 'NACL_WIN64',
1321 ],
[email protected]912c55c2009-07-31 23:33:551322 }],
[email protected]bb6aba32011-01-07 19:04:431323
[email protected]a35aa362012-10-30 13:55:071324 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441325 'use_cups%': 1,
1326 }, {
1327 'use_cups%': 0,
1328 }],
[email protected]bb6aba32011-01-07 19:04:431329
[email protected]eb5f1672013-01-31 07:56:461330 # Native Client glibc toolchain is enabled
1331 # by default except on arm and mips.
1332 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321333 'disable_glibc%': 1,
1334 }, {
1335 'disable_glibc%': 0,
1336 }],
1337
[email protected]712c3da2012-09-24 21:31:241338 # Disable SSE2 when building for ARM or MIPS.
1339 ['target_arch=="arm" or target_arch=="mipsel"', {
1340 'disable_sse2%': 1,
1341 }, {
1342 'disable_sse2%': '<(disable_sse2)',
1343 }],
1344
[email protected]19fe8f0b2010-12-07 07:27:271345 # Set the relative path from this file to the GYP file of the JPEG
1346 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281347 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1348 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271349 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281350 }, {
1351 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1352 }],
[email protected]bb6aba32011-01-07 19:04:431353
[email protected]abcc9ac2011-05-16 20:04:351354 # Options controlling the use of GConf (the classic GNOME configuration
1355 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311356 ['chromeos==1', {
1357 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351358 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311359 }, {
1360 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351361 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311362 }],
1363
[email protected]4de39f82011-03-28 12:01:291364 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291365 ['branding=="Chrome"', {
1366 # TODO(mmoss) The .grd files look for _google_chrome, but for
1367 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291368 'grit_defines': ['-D', '_google_chrome',
1369 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291370 }, {
[email protected]4de39f82011-03-28 12:01:291371 'grit_defines': ['-D', '_chromium',
1372 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291373 }],
[email protected]bb6aba32011-01-07 19:04:431374 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131375 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431376 }],
1377 ['toolkit_views==1', {
1378 'grit_defines': ['-D', 'toolkit_views'],
1379 }],
[email protected]8dd791d2011-09-16 16:37:301380 ['use_aura==1', {
1381 'grit_defines': ['-D', 'use_aura'],
1382 }],
[email protected]ed329be2012-01-03 22:02:161383 ['use_ash==1', {
1384 'grit_defines': ['-D', 'use_ash'],
1385 }],
[email protected]c329adf82011-10-05 14:34:571386 ['use_nss==1', {
1387 'grit_defines': ['-D', 'use_nss'],
1388 }],
[email protected]e47c32032011-03-01 19:26:201389 ['file_manager_extension==1', {
1390 'grit_defines': ['-D', 'file_manager_extension'],
1391 }],
[email protected]77a848262013-02-22 11:17:251392 ['image_loader_extension==1', {
1393 'grit_defines': ['-D', 'image_loader_extension'],
1394 }],
[email protected]9a425422011-01-11 00:53:181395 ['remoting==1', {
1396 'grit_defines': ['-D', 'remoting'],
1397 }],
[email protected]bb6aba32011-01-07 19:04:431398 ['use_titlecase_in_grd_files==1', {
1399 'grit_defines': ['-D', 'use_titlecase'],
1400 }],
[email protected]00dc155832011-02-01 18:51:191401 ['use_third_party_translations==1', {
1402 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121403 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161404 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1405 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121406 ],
[email protected]00dc155832011-02-01 18:51:191407 }],
[email protected]da1c8d692011-09-20 20:35:011408 ['OS=="android"', {
1409 'grit_defines': ['-D', 'android'],
1410 }],
[email protected]d39e3862012-06-26 22:38:231411 ['OS=="mac"', {
1412 'grit_defines': ['-D', 'scale_factors=2x'],
1413 }],
[email protected]ad563d02012-10-03 10:37:031414 ['OS == "ios"', {
1415 'grit_defines': [
1416 # define for iOS specific resources.
1417 '-D', 'ios',
1418 # iOS uses a whitelist to filter resources.
1419 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1420 ],
[email protected]507066e2012-10-26 10:50:471421 # iOS uses pt instead of pt-BR.
1422 'locales': ['pt'],
1423 }, { # OS != "ios"
1424 'locales': ['pt-BR'],
[email protected]ad563d02012-10-03 10:37:031425 }],
[email protected]6a3cd37e2012-04-17 17:13:341426 ['enable_extensions==1', {
1427 'grit_defines': ['-D', 'enable_extensions'],
1428 }],
[email protected]658677f2012-06-09 06:04:021429 ['enable_printing==1', {
1430 'grit_defines': ['-D', 'enable_printing'],
1431 }],
[email protected]c2aad542012-07-31 20:40:331432 ['enable_themes==1', {
1433 'grit_defines': ['-D', 'enable_themes'],
1434 }],
[email protected]4ffe78a2012-10-04 20:55:151435 ['use_oem_wallpaper==1', {
1436 'grit_defines': ['-D', 'use_oem_wallpaper'],
1437 }],
[email protected]ef1dd5062012-12-17 06:41:331438 ['enable_app_list==1', {
1439 'grit_defines': ['-D', 'enable_app_list'],
1440 }],
[email protected]dc4e8b82012-11-15 03:58:161441 ['enable_settings_app==1', {
1442 'grit_defines': ['-D', 'enable_settings_app'],
1443 }],
[email protected]5411d8202013-01-30 01:32:151444 ['enable_google_now==1', {
1445 'grit_defines': ['-D', 'enable_google_now'],
1446 }],
[email protected]3bb37e62012-04-19 03:40:081447 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201448 'clang_chrome_plugins_flags': [
1449 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311450 ],
[email protected]5d451ad2011-02-11 16:43:461451 }],
[email protected]cfa2e1102011-04-27 22:30:231452
[email protected]696de4e62012-11-21 21:18:541453 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061454 'clang%': 1,
1455 }],
[email protected]f5d8c222012-08-29 17:47:021456 ['asan==1 and OS=="mac"', {
1457 # See http://crbug.com/145503.
1458 'component': "static_library",
[email protected]93064ee2013-02-11 19:25:091459 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1460 # runtime is fully adopted. See http://crbug.com/170629.
1461 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021462 }],
[email protected]c9a829272012-07-04 07:51:121463 ['tsan==1', {
1464 'clang%': 1,
1465 }],
[email protected]a10ddd2d2013-02-26 20:06:591466 ['msan==1', {
1467 'clang%': 1,
1468 }],
[email protected]c9a829272012-07-04 07:51:121469
[email protected]7ce58b22012-09-26 05:17:251470 ['OS=="linux" and clang_type_profiler==1', {
1471 'clang%': 1,
1472 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321473 'conditions': [
1474 ['host_arch=="x64"', {
1475 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1476 }],
1477 ['host_arch=="ia32"', {
1478 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1479 # Clang in this directory at your own risk if needed for some
1480 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1481 # usage). Any failure by this compiler should not close the tree.
1482 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1483 }],
1484 ],
[email protected]7ce58b22012-09-26 05:17:251485 }],
1486
[email protected]a9318c72012-03-01 01:29:471487 # On valgrind bots, override the optimizer settings so we don't inline too
1488 # much and make the stacks harder to figure out.
1489 #
1490 # TODO(rnk): Kill off variables that no one else uses and just implement
1491 # them under a build_for_tool== condition.
1492 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1493 # gcc flags
1494 'mac_debug_optimization': '1',
1495 'mac_release_optimization': '1',
1496 'release_optimize': '1',
1497 'no_gc_sections': 1,
1498 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1499 '-fno-builtin -fno-optimize-sibling-calls',
1500 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1501 '-fno-builtin -fno-optimize-sibling-calls',
1502
1503 # MSVS flags for TSan on Pin and Windows.
1504 'win_debug_RuntimeChecks': '0',
1505 'win_debug_disable_iterator_debugging': '1',
1506 'win_debug_Optimization': '1',
1507 'win_debug_InlineFunctionExpansion': '0',
1508 'win_release_InlineFunctionExpansion': '0',
1509 'win_release_OmitFramePointers': '0',
1510
1511 'linux_use_tcmalloc': 1,
1512 'release_valgrind_build': 1,
1513 'werror': '',
1514 'component': 'static_library',
1515 'use_system_zlib': 0,
1516 }],
1517
1518 # Build tweaks for DrMemory.
1519 # TODO(rnk): Combine with tsan config to share the builder.
1520 # http://crbug.com/108155
1521 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471522 # These runtime checks force initialization of stack vars which blocks
1523 # DrMemory's uninit detection.
1524 'win_debug_RuntimeChecks': '0',
1525 # Iterator debugging is slow.
1526 'win_debug_disable_iterator_debugging': '1',
1527 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161528 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1529 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1530 # compiler bug, so we use /Ob1 instead.
1531 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471532 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501533 # Ditto for debug, to support bumping win_debug_Optimization.
1534 'win_debug_InlineFunctionExpansion': 0,
1535 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471536 # Keep the code under #ifndef NVALGRIND.
1537 'release_valgrind_build': 1,
1538 }],
[email protected]b6a5ac92012-10-29 18:17:221539
[email protected]f40a6912012-12-10 21:52:411540 # Enable RLZ on Win, Mac and ChromeOS.
1541 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221542 'enable_rlz%': 1,
1543 }],
[email protected]912c55c2009-07-31 23:33:551544 ],
[email protected]a9318c72012-03-01 01:29:471545
[email protected]35958422011-09-28 02:03:591546 # List of default apps to install in new profiles. The first list contains
1547 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061548 # contains the destination location for each of the files. When a crx
1549 # is added or removed from the list, the chrome/browser/resources/
1550 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591551 'default_apps_list': [
1552 'browser/resources/default_apps/external_extensions.json',
1553 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061554 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591555 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001556 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231557 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591558 ],
1559 'default_apps_list_linux_dest': [
1560 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1561 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061562 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591563 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001564 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231565 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591566 ],
[email protected]2f80c312009-02-25 21:26:551567 },
1568 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261569 'variables': {
[email protected]a6e22132010-02-10 20:43:181570 # The condition that operates on chromium_code is in a target_conditions
1571 # section, and will not have access to the default fallback value of
1572 # chromium_code at the top of this file, or to the chromium_code
1573 # variable placed at the root variables scope of .gyp files, because
1574 # those variables are not set at target scope. As a workaround,
1575 # if chromium_code is not set at target scope, define it in target scope
1576 # to contain whatever value it has during early variable expansion.
1577 # That's enough to make it available during target conditional
1578 # processing.
1579 'chromium_code%': '<(chromium_code)',
1580
[email protected]7e0d664a2009-12-03 21:07:471581 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1582 'win_release_Optimization%': '2', # 2 = /Os
1583 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331584
1585 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241586 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111587 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241588 # Tri-state: blank is default, 1 on, 0 off
1589 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331590
[email protected]6b0507b2010-05-07 07:41:211591 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1592 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331593
[email protected]6b0507b2010-05-07 07:41:211594 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151595 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1596 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331597
[email protected]fac10d12010-11-08 16:00:311598 # VS inserts quite a lot of extra checks to algorithms like
1599 # std::partial_sort in Debug build which make them O(N^2)
1600 # instead of O(N*logN). This is particularly slow under memory
1601 # tools like ThreadSanitizer so we want it to be disablable.
1602 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1603 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471604
[email protected]ffd984b12009-09-11 19:37:001605 'release_extra_cflags%': '',
1606 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001607
1608 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521609
[email protected]ef5c5f1b2011-12-17 02:16:241610 # the non-qualified versions are widely assumed to be *nix-only
1611 'win_release_extra_cflags%': '',
1612 'win_debug_extra_cflags%': '',
1613
[email protected]b1eb341c2011-11-09 18:46:071614 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1615 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1616
[email protected]ef3326702011-10-06 18:06:441617 # Only used by Windows build for now. Can be used to build into a
1618 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1619 # output files in src/build/VS2010_{Debug,Release}.
1620 'build_dir_prefix%': '',
1621
[email protected]9ac2db692012-06-08 01:01:571622 # Targets are by default not nacl untrusted code.
1623 'nacl_untrusted_build%': 0,
1624
[email protected]9c55d9d2012-11-15 23:28:441625 'pnacl_compile_flags': [
1626 # pnacl uses the clang compiler so we need to supress all the
1627 # same warnings as we do for clang.
1628 # TODO(sbc): Remove these if/when they are removed from the clang
1629 # build.
1630 '-Wno-unused-function',
1631 '-Wno-char-subscripts',
1632 '-Wno-c++11-extensions',
1633 '-Wno-unnamed-type-template-args',
1634 ],
1635
[email protected]8974e042010-06-21 18:06:521636 'conditions': [
1637 ['OS=="win" and component=="shared_library"', {
1638 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161639 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1640 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521641 }, {
1642 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1643 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1644 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1645 }],
[email protected]1e013672012-06-29 22:12:201646 ['OS=="ios"', {
1647 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1648 'mac_release_optimization%': 's', # Use -Os unless overridden
1649 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1650 }, {
1651 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1652 'mac_release_optimization%': '3', # Use -O3 unless overridden
1653 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1654 }],
[email protected]8974e042010-06-21 18:06:521655 ],
[email protected]1c966092009-08-20 21:19:261656 },
[email protected]7d94d7592013-03-05 11:52:261657 # TODO(teravest): Remove this define once uses of USE_SKIA are cleaned up
1658 # throughout the codebase.
1659 'defines' : ['USE_SKIA'],
[email protected]32aa8cc2009-03-04 21:36:391660 'conditions': [
[email protected]7ce58b22012-09-26 05:17:251661 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1662 'cflags_cc!': ['-fno-rtti'],
1663 'cflags_cc+': [
1664 '-frtti',
1665 '-gline-tables-only',
1666 '-fintercept-allocation-functions',
1667 ],
1668 'defines': ['TYPE_PROFILING'],
1669 'dependencies': [
1670 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1671 ],
1672 }],
[email protected]b0c45722013-01-23 04:47:321673 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1674 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1675 # See http://crbug.com/162818.
1676 'cflags+': ['-Wno-sentinel'],
1677 }],
[email protected]ff10b132012-02-29 22:53:301678 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1679 'msbuild_toolset': '<(msbuild_toolset)',
1680 }],
[email protected]32aa8cc2009-03-04 21:36:391681 ['branding=="Chrome"', {
1682 'defines': ['GOOGLE_CHROME_BUILD'],
1683 }, { # else: branding!="Chrome"
1684 'defines': ['CHROMIUM_BUILD'],
1685 }],
[email protected]286d9a12012-05-30 16:20:381686 ['OS=="mac" and component=="shared_library"', {
1687 'xcode_settings': {
1688 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1689 'LD_RUNPATH_SEARCH_PATHS': [
1690 # For unbundled binaries.
1691 '@loader_path/.',
1692 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1693 '@loader_path/../../..',
1694 ],
1695 },
1696 }],
[email protected]b6a5ac92012-10-29 18:17:221697 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171698 'defines': ['ENABLE_RLZ'],
1699 }],
[email protected]63e39a282011-07-13 20:41:281700 ['component=="shared_library"', {
1701 'defines': ['COMPONENT_BUILD'],
1702 }],
[email protected]06c756182010-04-27 18:31:311703 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171704 'defines': ['TOOLKIT_VIEWS=1'],
1705 }],
[email protected]1ee7c56c2011-10-19 14:51:331706 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111707 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1708 }],
[email protected]41423092011-08-25 15:39:581709 ['use_aura==1', {
1710 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351711 }],
[email protected]ed329be2012-01-03 22:02:161712 ['use_ash==1', {
1713 'defines': ['USE_ASH=1'],
1714 }],
[email protected]cb800562012-11-20 22:36:071715 ['use_default_render_theme==1', {
1716 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1717 }],
[email protected]e190d272012-08-30 17:36:441718 ['use_libjpeg_turbo==1', {
1719 'defines': ['USE_LIBJPEG_TURBO=1'],
1720 }],
[email protected]c329adf82011-10-05 14:34:571721 ['use_nss==1', {
1722 'defines': ['USE_NSS=1'],
1723 }],
[email protected]bd7b6fe2012-03-05 21:02:401724 ['enable_one_click_signin==1', {
1725 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1726 }],
[email protected]a47aa892011-11-22 03:12:311727 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1728 # TODO(erg): We are progressively sealing up use of deprecated features
1729 # in gtk in preparation for an eventual porting to gtk3.
1730 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1731 }],
[email protected]fdc5bed2010-01-09 01:16:571732 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291733 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501734 }],
[email protected]55d92492013-01-31 05:03:391735 ['google_tv==1', {
1736 'defines': ['GOOGLE_TV=1'],
1737 }],
[email protected]f56797b2011-09-25 00:04:351738 ['use_xi2_mt!=0', {
1739 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1740 }],
[email protected]e47c32032011-03-01 19:26:201741 ['file_manager_extension==1', {
1742 'defines': ['FILE_MANAGER_EXTENSION=1'],
1743 }],
[email protected]77a848262013-02-22 11:17:251744 ['image_loader_extension==1', {
1745 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1746 }],
[email protected]7664ab32011-02-01 23:35:251747 ['profiling==1', {
1748 'defines': ['ENABLE_PROFILING=1'],
1749 }],
[email protected]93b373502011-08-16 19:06:221750 ['OS=="linux" and glibcxx_debug==1', {
1751 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591752 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221753 }],
[email protected]542bf24a2010-06-11 23:08:171754 ['remoting==1', {
1755 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001756 }],
[email protected]5b87e782012-02-09 18:19:321757 ['enable_webrtc==1', {
1758 'defines': ['ENABLE_WEBRTC=1'],
1759 }],
[email protected]d01120e62010-05-10 17:04:481760 ['proprietary_codecs==1', {
1761 'defines': ['USE_PROPRIETARY_CODECS'],
1762 }],
[email protected]0dfb6132013-03-08 11:10:101763 ['enable_pepper_threading==1', {
1764 'defines': ['ENABLE_PEPPER_THREADING'],
1765 }],
[email protected]7ddea9802012-02-22 23:08:051766 ['enable_viewport==1', {
1767 'defines': ['ENABLE_VIEWPORT'],
1768 }],
[email protected]f31e2e52011-07-14 16:01:191769 ['configuration_policy==1', {
1770 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1771 }],
[email protected]9eb100e2011-10-14 05:08:221772 ['input_speech==1', {
1773 'defines': ['ENABLE_INPUT_SPEECH'],
1774 }],
[email protected]7cce3232011-10-28 10:41:571775 ['notifications==1', {
1776 'defines': ['ENABLE_NOTIFICATIONS'],
1777 }],
[email protected]1efbaaa2012-04-24 02:43:241778 ['enable_hidpi==1', {
1779 'defines': ['ENABLE_HIDPI=1'],
1780 }],
[email protected]9c1949e2009-10-02 19:59:541781 ['fastbuild!=0', {
[email protected]7df38122012-11-05 23:54:431782 # Clang creates chubby debug information, which makes linking very
1783 # slow. For now, don't create debug information with clang. See
1784 # http://crbug.com/70000
[email protected]9c1949e2009-10-02 19:59:541785 'conditions': [
[email protected]7df38122012-11-05 23:54:431786 ['clang==1', {
1787 'conditions': [
1788 ['OS=="linux"', {
1789 'variables': {
1790 'debug_extra_cflags': '-g0',
1791 },
1792 }],
1793 # Android builds symbols on release by default, disable them.
1794 ['OS=="android"', {
1795 'variables': {
1796 'debug_extra_cflags': '-g0',
1797 'release_extra_cflags': '-g0',
1798 },
1799 }],
1800 ],
1801 }, { # else clang!=1
1802 'conditions': [
1803 # For Windows and Mac, we don't genererate debug information.
1804 ['OS=="win"', {
1805 'msvs_settings': {
1806 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:311807 # This tells the linker to generate .pdbs, so that
1808 # we can get meaningful stack traces.
1809 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:431810 },
1811 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:311812 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:431813 'DebugInformationFormat': '0',
1814 },
1815 },
1816 }],
1817 ['OS=="mac"', {
1818 'xcode_settings': {
1819 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1820 },
1821 }],
1822 ['OS=="linux"', {
1823 'variables': {
1824 'debug_extra_cflags': '-g1',
1825 },
1826 }],
1827 ['OS=="android"', {
1828 'variables': {
1829 'debug_extra_cflags': '-g1',
1830 'release_extra_cflags': '-g1',
1831 },
1832 }],
1833 ],
1834 }], # clang!=1
1835 ],
[email protected]9c1949e2009-10-02 19:59:541836 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011837 ['dcheck_always_on!=0', {
1838 'defines': ['DCHECK_ALWAYS_ON=1'],
1839 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381840 ['selinux==1', {
1841 'defines': ['CHROMIUM_SELINUX=1'],
1842 }],
[email protected]7e0d664a2009-12-03 21:07:471843 ['win_use_allocator_shim==0', {
1844 'conditions': [
1845 ['OS=="win"', {
1846 'defines': ['NO_TCMALLOC'],
1847 }],
1848 ],
1849 }],
[email protected]43f28f832010-02-03 02:28:481850 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151851 'defines': [
1852 'ENABLE_GPU=1',
1853 ],
1854 }],
[email protected]b1c2a5542010-10-08 12:44:401855 ['use_openssl==1', {
1856 'defines': [
1857 'USE_OPENSSL=1',
1858 ],
1859 }],
[email protected]ed154592010-04-29 00:18:501860 ['enable_eglimage==1', {
1861 'defines': [
1862 'ENABLE_EGLIMAGE=1',
1863 ],
1864 }],
[email protected]696de4e62012-11-21 21:18:541865 ['asan==1 and OS=="win"', {
1866 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1867 # produce appropriate pdbs.
1868 'msvs_settings': {
1869 'VCLinkerTool': {
1870 'Profile': 'true',
1871 },
1872 },
[email protected]2ff7ef5f2012-12-14 00:40:251873 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:541874 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:181875 ['coverage!=0', {
1876 'conditions': [
[email protected]fc642ec2012-10-12 19:07:031877 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:181878 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041879 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1880 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471881 },
[email protected]fc642ec2012-10-12 19:07:031882 }],
1883 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:431884 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101885 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431886 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181887 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431888 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181889 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471890 }],
1891 ],
1892 }],
[email protected]da1c8d692011-09-20 20:35:011893 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181894 'cflags': [ '-ftest-coverage',
1895 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001896 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181897 }],
[email protected]e8f6ff42009-07-07 18:20:531898 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:071899 'variables': {
1900 # Disable incremental linking for all modules.
1901 # 0: inherit, 1: disabled, 2: enabled.
1902 'msvs_debug_link_incremental': '1',
1903 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:291904 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
1905 # binaries for now.
1906 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:071907 },
1908 'defines': [
1909 # Disable iterator debugging (huge speed boost without any
1910 # change in coverage results).
1911 '_HAS_ITERATOR_DEBUGGING=0',
1912 ],
[email protected]e8f6ff42009-07-07 18:20:531913 'msvs_settings': {
1914 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:071915 # Enable profile information (necessary for coverage
1916 # instrumentation). This is incompatible with incremental
1917 # linking.
[email protected]e8f6ff42009-07-07 18:20:531918 'Profile': 'true',
1919 },
[email protected]e8f6ff42009-07-07 18:20:531920 }
1921 }], # OS==win
1922 ], # conditions for coverage
1923 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381924 ['OS=="win"', {
1925 'defines': [
1926 '__STD_C',
1927 '_CRT_SECURE_NO_DEPRECATE',
1928 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:101929 # This define is required to pull in the new Win8 interfaces from
1930 # system headers like ShObjIdl.h.
1931 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:381932 ],
1933 'include_dirs': [
1934 '<(DEPTH)/third_party/wtl/include',
1935 ],
[email protected]9619e65d2012-05-23 19:06:521936 'conditions': [
1937 ['win_z7!=0', {
1938 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:091939 # Generates debug info when win_z7=1
1940 # even if fastbuild=1 (that makes GenerateDebugInformation false).
1941 'VCLinkerTool': {
1942 'GenerateDebugInformation': 'true',
1943 },
[email protected]9619e65d2012-05-23 19:06:521944 'VCCLCompilerTool': {
1945 'DebugInformationFormat': '1',
1946 }
1947 }
1948 }],
[email protected]45a77072012-11-17 00:28:421949 ['"<(GENERATOR)"=="msvs"', {
1950 'msvs_settings': {
1951 'VCLinkerTool': {
1952 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
1953 # have foo.pdb. The ninja generator already defaults to this and
1954 # can't handle the $(TargetPath) macro.
1955 'ProgramDatabaseFile': '$(TargetPath).pdb',
1956 }
1957 },
1958 }],
[email protected]9619e65d2012-05-23 19:06:521959 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381960 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021961 ['enable_task_manager==1', {
1962 'defines': [
1963 'ENABLE_TASK_MANAGER=1',
1964 ],
1965 }],
[email protected]6a3cd37e2012-04-17 17:13:341966 ['enable_extensions==1', {
1967 'defines': [
1968 'ENABLE_EXTENSIONS=1',
1969 ],
1970 }],
[email protected]13eb97d2012-01-05 01:07:121971 ['OS=="win" and branding=="Chrome"', {
1972 'defines': ['ENABLE_SWIFTSHADER'],
1973 }],
[email protected]407dfa632011-12-23 11:59:351974 ['enable_dart==1', {
1975 'defines': ['WEBKIT_USING_DART=1'],
1976 }],
[email protected]18e0f39b2012-01-17 16:47:341977 ['enable_plugin_installation==1', {
1978 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1979 }],
[email protected]6d17f6392012-12-05 05:24:541980 ['enable_plugins==1', {
1981 'defines': ['ENABLE_PLUGINS=1'],
1982 }],
[email protected]cdb756ef2012-04-05 18:34:531983 ['enable_session_service==1', {
1984 'defines': ['ENABLE_SESSION_SERVICE=1'],
1985 }],
[email protected]6b40bb582012-03-15 20:50:381986 ['enable_themes==1', {
1987 'defines': ['ENABLE_THEMES=1'],
1988 }],
[email protected]57e67ac2013-02-22 03:37:221989 ['enable_autofill_dialog==1', {
1990 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
1991 }],
[email protected]0acdd772012-04-05 22:53:001992 ['enable_background==1', {
1993 'defines': ['ENABLE_BACKGROUND=1'],
1994 }],
[email protected]2e22e2f2012-03-15 21:53:101995 ['enable_automation==1', {
1996 'defines': ['ENABLE_AUTOMATION=1'],
1997 }],
[email protected]6ee43a72012-12-07 22:44:401998 ['enable_google_now==1', {
1999 'defines': ['ENABLE_GOOGLE_NOW=1'],
2000 }],
[email protected]703369a2012-11-05 20:40:312001 ['enable_language_detection==1', {
2002 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
2003 }],
[email protected]658677f2012-06-09 06:04:022004 ['enable_printing==1', {
2005 'defines': ['ENABLE_PRINTING=1'],
2006 }],
[email protected]e6026962012-06-14 21:28:322007 ['enable_captive_portal_detection==1', {
2008 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2009 }],
[email protected]dc4e8b82012-11-15 03:58:162010 ['enable_app_list==1', {
2011 'defines': ['ENABLE_APP_LIST=1'],
2012 }],
[email protected]9b5dbf72013-01-09 20:29:152013 ['enable_message_center==1', {
2014 'defines': ['ENABLE_MESSAGE_CENTER=1'],
2015 }],
[email protected]dc4e8b82012-11-15 03:58:162016 ['enable_settings_app==1', {
2017 'defines': ['ENABLE_SETTINGS_APP=1'],
2018 }],
[email protected]9bfe0ab2012-08-30 13:18:112019 ['disable_ftp_support==1', {
2020 'defines': ['DISABLE_FTP_SUPPORT=1'],
2021 }],
[email protected]0850e842013-01-19 03:44:312022 ['enable_managed_users==1', {
2023 'defines': ['ENABLE_MANAGED_USERS=1'],
2024 }],
[email protected]199def22013-02-21 17:52:292025 ['spdy_proxy_auth_origin != ""', {
2026 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2027 }],
2028 ['spdy_proxy_auth_property != ""', {
2029 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2030 }],
[email protected]a6e22132010-02-10 20:43:182031 ], # conditions for 'target_defaults'
2032 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072033 ['enable_wexit_time_destructors==1', {
2034 'conditions': [
2035 [ 'clang==1', {
2036 'cflags': [
2037 '-Wexit-time-destructors',
2038 ],
2039 'xcode_settings': {
2040 'WARNING_CFLAGS': [
2041 '-Wexit-time-destructors',
2042 ],
2043 },
2044 }],
2045 ],
2046 }],
[email protected]c14d8e772010-02-09 22:06:152047 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282048 'conditions': [
[email protected]1e013672012-06-29 22:12:202049 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332050 # We don't want to get warnings from third-party code,
2051 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282052 'cflags!': [
2053 '-Wall',
2054 '-Wextra',
[email protected]d8543312010-02-10 17:43:282055 ],
[email protected]167ec822011-10-24 22:05:272056 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002057 # Don't warn about hash_map in third-party code.
2058 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272059 ],
2060 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332061 # Don't warn about printf format problems.
2062 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222063 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002064 ],
[email protected]d16bd642011-07-25 23:59:182065 'cflags_cc!': [
2066 # TODO(fischman): remove this.
2067 # http://code.google.com/p/chromium/issues/detail?id=90453
2068 '-Wsign-compare',
2069 ]
[email protected]d8543312010-02-10 17:43:282070 }],
[email protected]82dd5eb32012-08-18 04:24:322071 # TODO: Fix all warnings on chromeos too.
2072 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2073 'cflags!': [
2074 '-Werror',
2075 ],
2076 }],
[email protected]bc073c062012-01-13 06:28:032077 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112078 'cflags': [
2079 # Don't warn about ignoring the return value from e.g. close().
2080 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032081 # BSD systems do not support this option, since they are usually
2082 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112083 '-Wno-unused-result',
2084 ],
2085 }],
[email protected]d8543312010-02-10 17:43:282086 [ 'OS=="win"', {
2087 'defines': [
2088 '_CRT_SECURE_NO_DEPRECATE',
2089 '_CRT_NONSTDC_NO_WARNINGS',
2090 '_CRT_NONSTDC_NO_DEPRECATE',
2091 '_SCL_SECURE_NO_DEPRECATE',
2092 ],
2093 'msvs_disabled_warnings': [4800],
2094 'msvs_settings': {
2095 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112096 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242097 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282098 'Detect64BitPortabilityProblems': 'false',
2099 },
2100 },
[email protected]c54b41cb2012-08-24 20:58:242101 'conditions': [
2102 ['buildtype=="Official"', {
2103 'msvs_settings': {
2104 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2105 }
2106 }],
2107 ],
[email protected]d8543312010-02-10 17:43:282108 }],
[email protected]0915c3b2012-11-22 17:24:072109 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422110 [ 'OS=="win" and component=="shared_library"', {
2111 'msvs_disabled_warnings': [
2112 4251, # class 'std::xx' needs to have dll-interface.
2113 ],
2114 }],
[email protected]1e013672012-06-29 22:12:202115 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282116 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062117 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282118 },
[email protected]3a352c362012-05-08 19:45:492119 'conditions': [
2120 ['buildtype=="Official"', {
2121 'xcode_settings': {
2122 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2123 },
2124 }],
2125 ],
[email protected]d8543312010-02-10 17:43:282126 }],
[email protected]1e013672012-06-29 22:12:202127 [ 'OS=="ios"', {
2128 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222129 # TODO(ios): Fix remaining warnings in third-party code, then
2130 # remove this; the Mac cleanup didn't get everything that's
2131 # flagged in an iOS build.
2132 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202133 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2134 },
2135 }],
[email protected]c14d8e772010-02-09 22:06:152136 ],
2137 }, {
[email protected]a5c598152012-01-27 04:55:132138 'includes': [
2139 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2140 'filename_rules.gypi',
2141 ],
[email protected]41af4f82012-11-08 00:09:312142 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152143 # C99 macros on Mac and Linux.
2144 'defines': [
[email protected]41af4f82012-11-08 00:09:312145 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152146 '__STDC_FORMAT_MACROS',
2147 ],
2148 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152149 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072150 # turn on warnings for signed/unsigned mismatch on chromium code.
2151 'msvs_settings': {
2152 'VCCLCompilerTool': {
2153 'AdditionalOptions': ['/we4389'],
2154 },
2155 },
[email protected]c14d8e772010-02-09 22:06:152156 }],
[email protected]63e39a282011-07-13 20:41:282157 ['OS=="win" and component=="shared_library"', {
2158 'msvs_disabled_warnings': [
2159 4251, # class 'std::xx' needs to have dll-interface.
2160 ],
2161 }],
[email protected]c14d8e772010-02-09 22:06:152162 ],
2163 }],
[email protected]a6e22132010-02-10 20:43:182164 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552165 'default_configuration': 'Debug',
2166 'configurations': {
[email protected]5153767c2009-12-22 01:52:502167 # VCLinkerTool LinkIncremental values below:
2168 # 0 == default
2169 # 1 == /INCREMENTAL:NO
2170 # 2 == /INCREMENTAL
2171 # Debug links incremental, Release does not.
2172 #
[email protected]7b99801e2010-11-03 17:26:232173 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502174 #
2175 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562176 'abstract': 1,
2177 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512178 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562179 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2180 'CharacterSet': '1',
2181 },
[email protected]f59e1302013-02-15 13:48:402182 # Add the default import libs.
2183 'msvs_settings':{
2184 'VCLinkerTool': {
2185 'AdditionalDependencies': [
2186 'kernel32.lib',
2187 'gdi32.lib',
2188 'winspool.lib',
2189 'comdlg32.lib',
2190 'advapi32.lib',
2191 'shell32.lib',
2192 'ole32.lib',
2193 'oleaut32.lib',
2194 'user32.lib',
2195 'uuid.lib',
2196 'odbc32.lib',
2197 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392198 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402199 ],
2200 },
2201 },
[email protected]5153767c2009-12-22 01:52:502202 },
2203 'x86_Base': {
2204 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502205 'msvs_settings': {
2206 'VCLinkerTool': {
2207 'TargetMachine': '1',
2208 },
2209 },
[email protected]2fa40782009-11-01 21:17:342210 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562211 },
[email protected]5153767c2009-12-22 01:52:502212 'x64_Base': {
2213 'abstract': 1,
2214 'msvs_configuration_platform': 'x64',
2215 'msvs_settings': {
2216 'VCLinkerTool': {
2217 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502218 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052219 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502220 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052221 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362222 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2223 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502224 },
[email protected]d26b4418ab2010-03-24 22:06:352225 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502226 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052227 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502228 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052229 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502230 },
2231 },
[email protected]5153767c2009-12-22 01:52:502232 },
2233 'Debug_Base': {
2234 'abstract': 1,
[email protected]14339762011-04-05 07:36:582235 'defines': [
2236 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2237 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2238 ],
[email protected]1c966092009-08-20 21:19:262239 'xcode_settings': {
2240 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292241 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492242 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492243 '<@(debug_extra_cflags)',
2244 ],
[email protected]1c966092009-08-20 21:19:262245 },
[email protected]bb05e452009-10-29 21:24:562246 'msvs_settings': {
2247 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472248 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562249 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212250 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472251 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152252 'conditions': [
2253 # According to MSVS, InlineFunctionExpansion=0 means
2254 # "default inlining", not "/Ob0".
2255 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2256 ['win_debug_InlineFunctionExpansion==0', {
2257 'AdditionalOptions': ['/Ob0'],
2258 }],
2259 ['win_debug_InlineFunctionExpansion!=""', {
2260 'InlineFunctionExpansion':
2261 '<(win_debug_InlineFunctionExpansion)',
2262 }],
[email protected]fac10d12010-11-08 16:00:312263 ['win_debug_disable_iterator_debugging==1', {
2264 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2265 }],
[email protected]ef5c5f1b2011-12-17 02:16:242266
2267 # if win_debug_OmitFramePointers is blank, leave as default
2268 ['win_debug_OmitFramePointers==1', {
2269 'OmitFramePointers': 'true',
2270 }],
2271 ['win_debug_OmitFramePointers==0', {
2272 'OmitFramePointers': 'false',
2273 # The above is not sufficient (http://crbug.com/106711): it
2274 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2275 # perform FPO regardless, so we must explicitly disable.
2276 # We still want the false setting above to avoid having
2277 # "/Oy /Oy-" and warnings about overriding.
2278 'AdditionalOptions': ['/Oy-'],
2279 }],
[email protected]2ae6e022010-05-07 13:19:152280 ],
[email protected]ef5c5f1b2011-12-17 02:16:242281 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562282 },
2283 'VCLinkerTool': {
2284 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332285 # ASLR makes debugging with windbg difficult because Chrome.exe and
2286 # Chrome.dll share the same base name. As result, windbg will
2287 # name the Chrome.dll module like chrome_<base address>, where
2288 # <base address> typically changes with each launch. This in turn
2289 # means that breakpoints in Chrome.dll don't stick from one launch
2290 # to the next. For this reason, we turn ASLR off in debug builds.
2291 # Note that this is a three-way bool, where 0 means to pick up
2292 # the default setting, 1 is off and 2 is on.
2293 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562294 },
2295 'VCResourceCompilerTool': {
2296 'PreprocessorDefinitions': ['_DEBUG'],
2297 },
2298 },
[email protected]2f80c312009-02-25 21:26:552299 'conditions': [
[email protected]78204c92012-09-14 04:42:552300 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542301 'target_conditions': [
2302 ['_toolset=="target"', {
2303 'cflags': [
2304 '<@(debug_extra_cflags)',
2305 ],
2306 }],
[email protected]bb05e452009-10-29 21:24:562307 ],
[email protected]2f80c312009-02-25 21:26:552308 }],
[email protected]1e013672012-06-29 22:12:202309 # Disabled on iOS because it was causing a crash on startup.
2310 # TODO(michelea): investigate, create a reduced test and possibly
2311 # submit a radar.
2312 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352313 'xcode_settings': {
2314 'OTHER_CFLAGS': [
2315 '-fstack-protector-all', # Implies -fstack-protector
2316 ],
2317 },
2318 }],
[email protected]2f80c312009-02-25 21:26:552319 ],
2320 },
[email protected]5153767c2009-12-22 01:52:502321 'Release_Base': {
2322 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552323 'defines': [
2324 'NDEBUG',
2325 ],
[email protected]1c966092009-08-20 21:19:262326 'xcode_settings': {
2327 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2328 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002329 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262330 },
[email protected]bb05e452009-10-29 21:24:562331 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472332 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472333 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152334 'conditions': [
[email protected]2212d272011-12-20 21:37:372335 # In official builds, each target will self-select
2336 # an optimization level.
2337 ['buildtype!="Official"', {
2338 'Optimization': '<(win_release_Optimization)',
2339 },
2340 ],
[email protected]2ae6e022010-05-07 13:19:152341 # According to MSVS, InlineFunctionExpansion=0 means
2342 # "default inlining", not "/Ob0".
2343 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2344 ['win_release_InlineFunctionExpansion==0', {
2345 'AdditionalOptions': ['/Ob0'],
2346 }],
2347 ['win_release_InlineFunctionExpansion!=""', {
2348 'InlineFunctionExpansion':
2349 '<(win_release_InlineFunctionExpansion)',
2350 }],
[email protected]626d2d22011-10-11 15:47:332351
[email protected]ef5c5f1b2011-12-17 02:16:242352 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332353 ['win_release_OmitFramePointers==1', {
2354 'OmitFramePointers': 'true',
2355 }],
2356 ['win_release_OmitFramePointers==0', {
2357 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242358 # The above is not sufficient (http://crbug.com/106711): it
2359 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2360 # perform FPO regardless, so we must explicitly disable.
2361 # We still want the false setting above to avoid having
2362 # "/Oy /Oy-" and warnings about overriding.
2363 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332364 }],
[email protected]2ae6e022010-05-07 13:19:152365 ],
[email protected]ef5c5f1b2011-12-17 02:16:242366 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472367 },
[email protected]bb05e452009-10-29 21:24:562368 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342369 # LinkIncremental is a tri-state boolean, where 0 means default
2370 # (i.e., inherit from parent solution), 1 means false, and
2371 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562372 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342373 # This corresponds to the /PROFILE flag which ensures the PDB
2374 # file contains FIXUP information (growing the PDB file by about
2375 # 5%) but does not otherwise alter the output binary. This
2376 # information is used by the Syzygy optimization tool when
2377 # decomposing the release image.
2378 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562379 },
2380 },
[email protected]2f80c312009-02-25 21:26:552381 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162382 ['msvs_use_common_release', {
2383 'includes': ['release.gypi'],
2384 }],
[email protected]7bdd7d7c2012-11-01 10:36:162385 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582386 'defines': [
2387 'NVALGRIND',
2388 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2389 ],
[email protected]ee857512010-05-14 08:24:422390 }, {
[email protected]14339762011-04-05 07:36:582391 'defines': [
2392 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2393 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2394 ],
[email protected]92822e82009-09-18 14:26:562395 }],
[email protected]7e0d664a2009-12-03 21:07:472396 ['win_use_allocator_shim==0', {
2397 'defines': ['NO_TCMALLOC'],
2398 }],
[email protected]37305ae2012-12-11 01:54:582399 ['os_posix==1 and chromium_code==1', {
2400 # Non-chromium code is not guaranteed to compile cleanly
2401 # with _FORTIFY_SOURCE. Also, fortified build may fail
2402 # when optimizations are disabled, so only do that for Release
2403 # build.
2404 'defines': [
2405 '_FORTIFY_SOURCE=2',
2406 ],
2407 }],
[email protected]7df38122012-11-05 23:54:432408 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542409 'target_conditions': [
2410 ['_toolset=="target"', {
2411 'cflags': [
2412 '<@(release_extra_cflags)',
2413 ],
2414 }],
[email protected]bb05e452009-10-29 21:24:562415 ],
2416 }],
[email protected]2f80c312009-02-25 21:26:552417 ],
2418 },
[email protected]5153767c2009-12-22 01:52:502419 #
2420 # Concrete configurations
2421 #
2422 'Debug': {
2423 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2424 },
2425 'Release': {
2426 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502427 },
[email protected]f926fa0a2009-08-04 22:50:132428 'conditions': [
2429 [ 'OS=="win"', {
2430 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502431 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502432 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302433 },
2434 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502435 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302436 },
[email protected]f926fa0a2009-08-04 22:50:132437 }],
2438 ],
[email protected]2f80c312009-02-25 21:26:552439 },
2440 },
2441 'conditions': [
[email protected]43539ec2012-11-20 22:35:252442 ['os_posix==1', {
2443 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252444 'ldflags': [
2445 '-Wl,-z,now',
2446 '-Wl,-z,relro',
2447 ],
[email protected]43539ec2012-11-20 22:35:252448 },
2449 }],
[email protected]d2ca75c2013-02-01 05:47:172450 ['os_posix==1 and chromeos==0', {
2451 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2452 # and we want to avoid overriding this, so stack-protector is only
2453 # enabled when not building on Chrome OS.
2454 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2455 # supports it.
2456 'target_defaults': {
2457 'cflags': [
2458 '-fstack-protector',
2459 '--param=ssp-buffer-size=4',
2460 ],
2461 },
2462 }],
[email protected]1e013672012-06-29 22:12:202463 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262464 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272465 # Enable -Werror by default, but put it in a variable so it can
2466 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2467 'variables': {
[email protected]cbbb3472012-01-25 18:32:312468 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202469 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272470 },
[email protected]6863896f2012-01-25 17:51:362471 'defines': [
2472 '_FILE_OFFSET_BITS=64',
2473 ],
[email protected]9d384032009-03-20 23:13:262474 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162475 '<(werror)', # See note above about the werror variable.
2476 '-pthread',
2477 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292478 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162479 '-Wall',
[email protected]0fa17082010-03-26 00:48:052480 # TODO(evan): turn this back on once all the builds work.
2481 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202482 # Don't warn about unused function params. We use those everywhere.
2483 '-Wno-unused-parameter',
2484 # Don't warn about the "struct foo f = {0};" initialization pattern.
2485 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122486 # Don't export any symbols (for example, to plugins we dlopen()).
2487 # Note: this is *required* to make some plugins work.
2488 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352489 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242490 ],
2491 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222492 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242493 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362494 # Make inline functions have hidden visiblity by default.
2495 # Surprisingly, not covered by -fvisibility=hidden.
2496 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172497 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2498 # so we specify it explicitly.
2499 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182500 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172501 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262502 ],
[email protected]a6cf87e2009-04-03 04:07:382503 'ldflags': [
[email protected]138241f2010-03-30 23:53:102504 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262505 ],
[email protected]1e013672012-06-29 22:12:202506 'libraries' : [
2507 '<(libraries_for_target)',
2508 ],
[email protected]3aacaf952009-04-02 15:34:092509 'configurations': {
[email protected]5153767c2009-12-22 01:52:502510 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312511 'variables': {
2512 'debug_optimize%': '0',
2513 },
[email protected]3aacaf952009-04-02 15:34:092514 'defines': [
2515 '_DEBUG',
2516 ],
2517 'cflags': [
[email protected]95ad2032012-08-24 00:49:252518 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092519 '-g',
2520 ],
[email protected]da1c8d692011-09-20 20:35:012521 'conditions' : [
[email protected]fa9d4e262012-08-21 04:39:002522 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552523 # Some configurations are copied from Release_Base to reduce
2524 # the binary size.
2525 'variables': {
2526 'debug_optimize%': 's',
2527 },
[email protected]da1c8d692011-09-20 20:35:012528 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552529 '-fomit-frame-pointer',
2530 '-fdata-sections',
2531 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012532 ],
[email protected]8a37e4502012-08-14 22:42:552533 'ldflags': [
2534 '-Wl,-O1',
2535 '-Wl,--as-needed',
2536 '-Wl,--gc-sections',
2537 ],
[email protected]da1c8d692011-09-20 20:35:012538 }],
2539 ],
[email protected]5315f2842009-04-28 00:43:272540 },
[email protected]5153767c2009-12-22 01:52:502541 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012542 'variables': {
2543 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512544 # Binaries become big and gold is unable to perform GC
2545 # and remove unused sections for some of test targets
2546 # on 32 bit platform.
2547 # (This is currently observed only in chromeos valgrind bots)
2548 # The following flag is to disable --gc-sections linker
2549 # option for these bots.
2550 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122551
2552 # TODO(bradnelson): reexamine how this is done if we change the
2553 # expansion of configurations
2554 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012555 },
[email protected]3aacaf952009-04-02 15:34:092556 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182557 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532558 # Don't emit the GCC version ident directives, they just end up
2559 # in the .comment section taking up binary size.
2560 '-fno-ident',
2561 # Put data and code in their own sections, so that unused symbols
2562 # can be removed at link time with --gc-sections.
2563 '-fdata-sections',
2564 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092565 ],
[email protected]c902f2c2010-08-06 20:04:182566 'ldflags': [
2567 # Specifically tell the linker to perform optimizations.
2568 # See http://lwn.net/Articles/192624/ .
2569 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222570 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182571 ],
[email protected]1dd529642010-05-15 01:02:512572 'conditions' : [
2573 ['no_gc_sections==0', {
2574 'ldflags': [
2575 '-Wl,--gc-sections',
2576 ],
2577 }],
[email protected]da1c8d692011-09-20 20:35:012578 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582579 'variables': {
2580 'release_optimize%': 's',
2581 },
[email protected]da1c8d692011-09-20 20:35:012582 'cflags': [
2583 '-fomit-frame-pointer',
2584 ],
2585 }],
[email protected]ecf7b6482010-10-13 09:15:202586 ['clang==1', {
2587 'cflags!': [
2588 '-fno-ident',
2589 ],
2590 }],
[email protected]7664ab32011-02-01 23:35:252591 ['profiling==1', {
2592 'cflags': [
2593 '-fno-omit-frame-pointer',
2594 '-g',
2595 ],
2596 }],
[email protected]bdbe3d22013-02-22 04:10:352597 # Can be omitted to reduce output size. Does not seem to affect
2598 # crash reporting.
2599 ['target_arch=="ia32"', {
2600 'cflags': [
2601 '-fno-unwind-tables',
2602 '-fno-asynchronous-unwind-tables',
2603 ],
2604 }],
[email protected]8d726a42012-02-09 03:49:002605 ],
[email protected]3aacaf952009-04-02 15:34:092606 },
2607 },
[email protected]601b540222009-04-03 21:32:042608 'variants': {
2609 'coverage': {
2610 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2611 'ldflags': ['-fprofile-arcs'],
2612 },
2613 'profile': {
2614 'cflags': ['-pg', '-g'],
2615 'ldflags': ['-pg'],
2616 },
2617 'symbols': {
2618 'cflags': ['-g'],
2619 },
2620 },
[email protected]606116d22009-05-06 22:38:232621 'conditions': [
[email protected]04b482602011-09-14 02:36:212622 ['target_arch=="ia32"', {
2623 'target_conditions': [
2624 ['_toolset=="target"', {
2625 'asflags': [
2626 # Needed so that libs with .s files (e.g. libicudata.a)
2627 # are compatible with the general 32-bit-ness.
2628 '-32',
2629 ],
2630 # All floating-point computations on x87 happens in 80-bit
2631 # precision. Because the C and C++ language standards allow
2632 # the compiler to keep the floating-point values in higher
2633 # precision than what's specified in the source and doing so
2634 # is more efficient than constantly rounding up to 64-bit or
2635 # 32-bit precision as specified in the source, the compiler,
2636 # especially in the optimized mode, tries very hard to keep
2637 # values in x87 floating-point stack (in 80-bit precision)
2638 # as long as possible. This has important side effects, that
2639 # the real value used in computation may change depending on
2640 # how the compiler did the optimization - that is, the value
2641 # kept in 80-bit is different than the value rounded down to
2642 # 64-bit or 32-bit. There are possible compiler options to
2643 # make this behavior consistent (e.g. -ffloat-store would keep
2644 # all floating-values in the memory, thus force them to be
2645 # rounded to its original precision) but they have significant
2646 # runtime performance penalty.
2647 #
2648 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2649 # which keep floating-point values in SSE registers in its
2650 # native precision (32-bit for single precision, and 64-bit
2651 # for double precision values). This means the floating-point
2652 # value used during computation does not change depending on
2653 # how the compiler optimized the code, since the value is
2654 # always kept in its specified precision.
2655 'conditions': [
2656 ['branding=="Chromium" and disable_sse2==0', {
2657 'cflags': [
2658 '-march=pentium4',
2659 '-msse2',
2660 '-mfpmath=sse',
2661 ],
2662 }],
2663 # ChromeOS targets Pinetrail, which is sse3, but most of the
2664 # benefit comes from sse2 so this setting allows ChromeOS
2665 # to build on other CPUs. In the future -march=atom would
2666 # help but requires a newer compiler.
2667 ['chromeos==1 and disable_sse2==0', {
2668 'cflags': [
2669 '-msse2',
2670 ],
2671 }],
2672 # Install packages have started cropping up with
2673 # different headers between the 32-bit and 64-bit
2674 # versions, so we have to shadow those differences off
2675 # and make sure a 32-bit-on-64-bit build picks up the
2676 # right files.
[email protected]32594022012-05-10 03:22:282677 # For android build, use NDK headers instead of host headers
2678 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212679 'include_dirs+': [
2680 '/usr/include32',
2681 ],
2682 }],
2683 ],
2684 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2685 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062686 'cflags': [
[email protected]04b482602011-09-14 02:36:212687 '-m32',
2688 '-mmmx',
2689 ],
2690 'ldflags': [
2691 '-m32',
[email protected]ffde7932009-05-29 00:39:062692 ],
2693 }],
[email protected]606116d22009-05-06 22:38:232694 ],
2695 }],
[email protected]3dda8a962009-08-10 18:58:072696 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292697 'target_conditions': [
2698 ['_toolset=="target"', {
2699 'cflags_cc': [
2700 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2701 # has changed whenever it encounters a varargs function. This
2702 # silences those warnings, as they are not helpful and
2703 # clutter legitimate warnings.
2704 '-Wno-abi',
2705 ],
2706 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012707 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292708 'cflags': [
2709 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292710 ]
2711 }],
2712 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252713 'cflags': [
2714 '-march=armv7-a',
2715 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112716 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252717 ],
[email protected]eafc0b452010-02-26 21:53:432718 'conditions': [
2719 ['arm_neon==1', {
2720 'cflags': [ '-mfpu=neon', ],
2721 }, {
[email protected]53e0f642010-03-05 01:41:562722 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072723 }],
[email protected]eafc0b452010-02-26 21:53:432724 ],
[email protected]dc9711f2009-11-13 19:30:252725 }],
[email protected]da1c8d692011-09-20 20:35:012726 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532727 # Most of the following flags are derived from what Android
2728 # uses by default when building for arm, reference for which
2729 # can be found in the following file in the Android NDK:
2730 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2731 'cflags': [
2732 # The tree-sra optimization (scalar replacement for
2733 # aggregates enabling subsequent optimizations) leads to
2734 # invalid code generation when using the Android NDK's
2735 # compiler (r5-r7). This can be verified using
2736 # TestWebKitAPI's WTF.Checked_int8_t test.
2737 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482738 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532739 '-Wno-psabi',
2740 ],
[email protected]ad17e342012-07-17 20:45:482741 # Android now supports .relro sections properly.
2742 # NOTE: While these flags enable the generation of .relro
2743 # sections, the generated libraries can still be loaded on
2744 # older Android platform versions.
2745 'ldflags': [
2746 '-Wl,-z,relro',
2747 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482748 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482749 ],
[email protected]da1c8d692011-09-20 20:35:012750 'conditions': [
[email protected]94cdbf42012-12-11 19:49:222751 ['arm_thumb==1', {
[email protected]da1c8d692011-09-20 20:35:012752 # Android toolchain doesn't support -mimplicit-it=thumb
[email protected]94cdbf42012-12-11 19:49:222753 'cflags!': [ '-Wa,-mimplicit-it=thumb' ],
2754 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012755 }],
2756 ['armv7==0', {
2757 # Flags suitable for Android emulator
2758 'cflags': [
2759 '-march=armv5te',
2760 '-mtune=xscale',
2761 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362762 ],
2763 'defines': [
2764 '__ARM_ARCH_5__',
2765 '__ARM_ARCH_5T__',
2766 '__ARM_ARCH_5E__',
2767 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012768 ],
2769 }],
[email protected]4c48ef102012-11-29 22:00:382770 ['profiling==1', {
2771 'cflags': [
2772 '-marm', # Probably reduntant, but recommend by "perf" docs.
2773 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2774 ],
2775 }],
[email protected]220ea5932012-08-09 10:44:072776 ['clang==1', {
2777 'cflags!': [
2778 # Clang does not support the following options.
2779 '-mthumb-interwork',
2780 '-finline-limit=64',
2781 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482782 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072783 '-Wno-psabi',
2784 ],
2785 }],
[email protected]da1c8d692011-09-20 20:35:012786 ],
[email protected]3cf73842012-11-24 03:35:252787 'target_conditions': [
2788 # ndk-build copies .a's around the filesystem, breaking
2789 # relative paths in thin archives. Disable using thin
2790 # archives to avoid problems until one of these is fixed:
2791 # http://code.google.com/p/android/issues/detail?id=40302
2792 # http://code.google.com/p/android/issues/detail?id=40303
2793 ['_type=="static_library"', {
2794 'standalone_static_library': 1,
2795 }],
2796 ],
[email protected]da1c8d692011-09-20 20:35:012797 }],
[email protected]3dda8a962009-08-10 18:58:072798 ],
2799 }],
2800 ],
2801 }],
[email protected]2fb843b2010-08-12 02:11:082802 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582803 'cflags': [
2804 '-fPIC',
2805 ],
[email protected]d3f692b32011-12-14 19:04:352806 'ldflags': [
2807 '-fPIC',
2808 ],
[email protected]c76723a2010-01-25 23:10:582809 }],
[email protected]ee28c9f2009-09-04 01:53:012810 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572811 'target_conditions': [
2812 ['_toolset=="target"', {
2813 'cflags': [
2814 '--sysroot=<(sysroot)',
2815 ],
2816 'ldflags': [
2817 '--sysroot=<(sysroot)',
2818 ],
2819 }]]
[email protected]ee28c9f2009-09-04 01:53:012820 }],
[email protected]58680ce2010-09-18 00:09:152821 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122822 'cflags': [
2823 '-Wheader-hygiene',
2824 # Clang spots more unused functions.
2825 '-Wno-unused-function',
2826 # Don't die on dtoa code that uses a char as an array index.
2827 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332828 # Especially needed for gtest macros using enum values from Mac
2829 # system headers.
2830 # TODO(pkasting): In C++11 this is legal, so this should be
2831 # removed when we change to that. (This is also why we don't
2832 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122833 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:532834 # This (rightfully) complains about 'override', which we use
[email protected]241109b52011-10-15 19:00:302835 # heavily.
2836 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102837
2838 # Warns on switches on enums that cover all enum values but
2839 # also contain a default: branch. Chrome is full of that.
2840 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:512841
2842 # Warns when a const char[] is converted to bool.
2843 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:122844 ],
2845 'cflags!': [
2846 # Clang doesn't seem to know know this flag.
2847 '-mfpmath=sse',
2848 ],
[email protected]58680ce2010-09-18 00:09:152849 }],
[email protected]5d451ad2011-02-11 16:43:462850 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262851 'cflags': [
[email protected]c872dc52012-05-19 06:36:312852 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262853 ],
[email protected]5d451ad2011-02-11 16:43:462854 }],
[email protected]4a9ac22e2011-12-02 03:41:532855 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262856 'cflags': [
2857 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532858 ],
2859 }],
2860 ['clang==1 and clang_add_plugin!=""', {
2861 'cflags': [
[email protected]d23720682011-08-11 00:16:262862 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2863 ],
[email protected]5e781232011-01-28 02:57:592864 }],
[email protected]2616d45d2012-01-19 03:15:482865 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2866 'cflags': [
2867 # See http://crbug.com/110262
2868 '-fcolor-diagnostics',
2869 ],
2870 }],
[email protected]92799b632011-08-15 14:33:062871 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422872 'target_conditions': [
2873 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452874 'cflags': [
[email protected]48688df02012-11-27 21:04:562875 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452876 '-fno-omit-frame-pointer',
[email protected]48688df02012-11-27 21:04:562877 '-w', # http://crbug.com/162783
[email protected]73c15b32013-01-29 13:04:302878 '-gline-tables-only',
[email protected]cb770a4c2012-07-25 20:06:452879 ],
2880 'ldflags': [
[email protected]48688df02012-11-27 21:04:562881 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452882 ],
2883 'defines': [
2884 'ADDRESS_SANITIZER',
2885 ],
[email protected]1ffc3b3962012-05-16 14:08:422886 }],
[email protected]921c7b52011-11-25 10:34:352887 ],
[email protected]92799b632011-08-15 14:33:062888 }],
[email protected]c9a829272012-07-04 07:51:122889 ['tsan==1', {
2890 'target_conditions': [
2891 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452892 'cflags': [
[email protected]927a9d672012-11-09 11:28:202893 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452894 '-fno-omit-frame-pointer',
[email protected]9d46a572013-01-23 10:38:292895 '-fPIC',
[email protected]927a9d672012-11-09 11:28:202896 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:452897 ],
2898 'ldflags': [
[email protected]927a9d672012-11-09 11:28:202899 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452900 ],
2901 'defines': [
2902 'THREAD_SANITIZER',
2903 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:162904 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:452905 ],
2906 'target_conditions': [
2907 ['_type=="executable"', {
2908 'ldflags': [
[email protected]c9a829272012-07-04 07:51:122909 '-pie',
[email protected]cb770a4c2012-07-25 20:06:452910 ],
2911 }],
2912 ],
[email protected]c9a829272012-07-04 07:51:122913 }],
2914 ],
2915 }],
[email protected]a10ddd2d2013-02-26 20:06:592916 ['msan==1', {
2917 'target_conditions': [
2918 ['_toolset=="target"', {
2919 'cflags': [
2920 '-fsanitize=memory',
2921 '-fsanitize-memory-track-origins',
2922 '-fno-omit-frame-pointer',
2923 '-fPIC',
2924 ],
2925 'ldflags': [
2926 '-fsanitize=memory',
2927 ],
2928 'defines': [
2929 'MEMORY_SANITIZER',
2930 ],
2931 'target_conditions': [
2932 ['_type=="executable"', {
2933 'ldflags': [
2934 '-pie',
2935 ],
2936 }],
2937 ],
2938 }],
2939 ],
2940 }],
[email protected]8a48f3f2012-12-04 20:14:042941 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:442942 'target_conditions' : [
2943 ['_toolset=="target"', {
2944 'cflags': [
2945 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:452946 # Allow mmx intrinsics to inline, so that the
2947 # compiler can expand the intrinsics.
2948 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:442949 ],
2950 }],
2951 ],
2952 }],
[email protected]cbd5fd52009-08-26 00:14:272953 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:272954 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:102955 }],
2956 ['linux_dump_symbols==1', {
2957 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:252958 'conditions': [
[email protected]791262fe2013-02-21 17:20:152959 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:252960 'target_conditions': [
2961 ['_toolset=="target"', {
2962 'ldflags': [
[email protected]567370a32013-03-01 00:11:232963 # Workaround for linker OOM.
2964 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:252965 ],
2966 }],
2967 ],
2968 }],
2969 ],
[email protected]cbd5fd52009-08-26 00:14:272970 }],
[email protected]d8b60602010-03-26 09:41:222971 ['linux_use_heapchecker==1', {
2972 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402973 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222974 }],
[email protected]61a9b2d82010-02-26 00:31:082975 ['linux_use_tcmalloc==0', {
2976 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242977 }],
[email protected]64e2d4a42010-08-27 10:13:212978 ['linux_keep_shadow_stacks==1', {
2979 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512980 'cflags': [
2981 '-finstrument-functions',
2982 # Allow mmx intrinsics to inline, so that the compiler can expand
2983 # the intrinsics.
2984 '-finstrument-functions-exclude-file-list=mmintrin.h',
2985 ],
[email protected]64e2d4a42010-08-27 10:13:212986 }],
[email protected]8d726a42012-02-09 03:49:002987 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:322988 'ldflags': [
2989 # Experimentation found that using four linking threads
2990 # saved ~20% of link time.
2991 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2992 '-Wl,--threads',
2993 '-Wl,--thread-count=4',
2994 ],
[email protected]8d726a42012-02-09 03:49:002995 'conditions': [
2996 ['release_valgrind_build==0', {
2997 'target_conditions': [
2998 ['_toolset=="target"', {
2999 'ldflags': [
3000 # There seems to be a conflict of --icf and -pie
3001 # in gold which can generate crashy binaries. As
3002 # a security measure, -pie takes precendence for
3003 # now.
3004 #'-Wl,--icf=safe',
3005 '-Wl,--icf=none',
3006 ],
3007 }],
3008 ],
3009 }],
3010 ],
3011 }],
[email protected]b07806c12012-02-03 22:44:593012 ['linux_use_gold_binary==1', {
3013 'variables': {
[email protected]516312d2012-02-28 05:17:263014 'conditions': [
3015 ['inside_chromium_build==1', {
3016 # We pass the path to gold to the compiler. gyp leaves
3017 # unspecified what the cwd is when running the compiler,
3018 # so the normal gyp path-munging fails us. This hack
3019 # gets the right path.
3020 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
3021 }, {
3022 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
3023 }]
3024 ]
[email protected]b07806c12012-02-03 22:44:593025 },
3026 'ldflags': [
3027 # Put our gold binary in the search path for the linker.
3028 '-B<(gold_path)',
3029 ],
3030 }],
[email protected]606116d22009-05-06 22:38:233031 ],
[email protected]9d384032009-03-20 23:13:263032 },
3033 }],
[email protected]c51e8d52009-12-11 20:04:063034 # FreeBSD-specific options; note that most FreeBSD options are set above,
3035 # with Linux.
3036 ['OS=="freebsd"', {
3037 'target_defaults': {
3038 'ldflags': [
3039 '-Wl,--no-keep-memory',
3040 ],
3041 },
3042 }],
[email protected]da1c8d692011-09-20 20:35:013043 # Android-specific options; note that most are set above with Linux.
3044 ['OS=="android"', {
3045 'variables': {
[email protected]25036722012-12-11 10:36:173046 # This is a unique identifier for a given build. It's used for
3047 # identifying various build artifacts corresponding to a particular
3048 # build of chrome (e.g. where to find archived symbols).
3049 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013050 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013051 # Use shared stlport library when system one used.
3052 # Figure this out early since it needs symbols from libgcc.a, so it
3053 # has to be before that in the set of libraries.
3054 ['use_system_stlport==1', {
3055 'android_stlport_library': 'stlport',
3056 }, {
[email protected]806b5232012-11-19 21:19:043057 'conditions': [
3058 ['component=="shared_library"', {
3059 'android_stlport_library': 'stlport_shared',
3060 }, {
3061 'android_stlport_library': 'stlport_static',
3062 }],
3063 ],
[email protected]da1c8d692011-09-20 20:35:013064 }],
3065 ],
3066
3067 # Placing this variable here prevents from forking libvpx, used
3068 # by remoting. Remoting is off, so it needn't built,
3069 # so forking it's deps seems like overkill.
3070 # But this variable need defined to properly run gyp.
3071 # A proper solution is to have an OS==android conditional
3072 # in third_party/libvpx/libvpx.gyp to define it.
3073 'libvpx_path': 'lib/linux/arm',
3074 },
3075 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013076 'variables': {
3077 'release_extra_cflags%': '',
[email protected]8a37e4502012-08-14 22:42:553078 },
[email protected]da1c8d692011-09-20 20:35:013079
3080 'target_conditions': [
3081 # Settings for building device targets using Android's toolchain.
3082 # These are based on the setup.mk file from the Android NDK.
3083 #
3084 # The NDK Android executable link step looks as follows:
3085 # $LDFLAGS
3086 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3087 # $(PRIVATE_OBJECTS) <-- The .o that we built
3088 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3089 # $(TARGET_LIBGCC) <-- libgcc.a
3090 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3091 # $(PRIVATE_LDLIBS) <-- System .so
3092 # $(TARGET_CRTEND_O) <-- crtend.o
3093 #
3094 # For now the above are approximated for executables by adding
3095 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3096 # of 'libraries'.
3097 #
3098 # The NDK Android shared library link step looks as follows:
3099 # $LDFLAGS
3100 # $(PRIVATE_OBJECTS) <-- The .o that we built
3101 # -l,--whole-archive
3102 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3103 # -l,--no-whole-archive
3104 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3105 # $(TARGET_LIBGCC) <-- libgcc.a
3106 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3107 # $(PRIVATE_LDLIBS) <-- System .so
3108 #
[email protected]ad17e342012-07-17 20:45:483109 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013110 #
3111 # For both executables and shared libraries, add the proper
3112 # libgcc.a to the start of libraries which puts it in the
3113 # proper spot after .o and .a files get linked in.
3114 #
3115 # TODO: The proper thing to do longer-tem would be proper gyp
3116 # support for a custom link command line.
3117 ['_toolset=="target"', {
3118 'cflags!': [
3119 '-pthread', # Not supported by Android toolchain.
3120 ],
3121 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013122 '-ffunction-sections',
3123 '-funwind-tables',
3124 '-g',
3125 '-fstack-protector',
3126 '-fno-short-enums',
3127 '-finline-limit=64',
3128 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013129 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013130 ],
3131 'defines': [
3132 'ANDROID',
3133 '__GNU_SOURCE=1', # Necessary for clone()
3134 'USE_STLPORT=1',
3135 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173136 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013137 ],
3138 'ldflags!': [
3139 '-pthread', # Not supported by Android toolchain.
3140 ],
3141 'ldflags': [
3142 '-nostdlib',
3143 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013144 # Don't export symbols from statically linked libraries.
3145 '-Wl,--exclude-libs=ALL',
3146 ],
[email protected]a0e48b02011-11-22 07:53:013147 'libraries': [
3148 '-l<(android_stlport_library)',
3149 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043150 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013151 '-lc',
3152 '-ldl',
3153 '-lstdc++',
3154 '-lm',
[email protected]da1c8d692011-09-20 20:35:013155 ],
3156 'conditions': [
[email protected]806b5232012-11-19 21:19:043157 ['component=="shared_library"', {
3158 'libraries': [
3159 '-lgnustl_shared',
3160 ],
[email protected]4d6f9d7db2012-11-21 16:27:473161 'ldflags!': [
3162 '-Wl,--exclude-libs=ALL',
3163 ],
[email protected]806b5232012-11-19 21:19:043164 }],
[email protected]220ea5932012-08-09 10:44:073165 ['clang==1', {
3166 'cflags': [
3167 # Work around incompatibilities between bionic and clang
3168 # headers.
3169 '-D__compiler_offsetof=__builtin_offsetof',
3170 '-Dnan=__builtin_nan',
3171 ],
3172 'conditions': [
3173 ['target_arch=="arm"', {
3174 'cflags': [
3175 '-target arm-linux-androideabi',
3176 '-mllvm -arm-enable-ehabi',
3177 ],
3178 'ldflags': [
3179 '-target arm-linux-androideabi',
3180 ],
3181 }],
3182 ['target_arch=="ia32"', {
3183 'cflags': [
3184 '-target x86-linux-androideabi',
3185 ],
3186 'ldflags': [
3187 '-target x86-linux-androideabi',
3188 ],
3189 }],
3190 ],
3191 }],
[email protected]ed70ed1862012-11-07 12:11:253192 ['asan==1', {
3193 'cflags': [
3194 # Android build relies on -Wl,--gc-sections removing
3195 # unreachable code. ASan instrumentation for globals inhibits
3196 # this and results in a library with unresolvable relocations.
3197 # TODO(eugenis): find a way to reenable this.
3198 '-mllvm -asan-globals=0',
3199 ],
3200 }],
[email protected]da1c8d692011-09-20 20:35:013201 ['android_build_type==0', {
[email protected]34baed112012-06-27 16:10:463202 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573203 # The NDK has these things, but doesn't define the constants
3204 # to say that it does. Define them here instead.
3205 'HAVE_SYS_UIO_H',
3206 ],
3207 'cflags': [
3208 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463209 ],
[email protected]da1c8d692011-09-20 20:35:013210 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523211 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013212 ],
3213 }],
[email protected]0d7291e2012-10-04 19:16:083214 ['android_build_type==1', {
3215 'include_dirs': [
3216 # OpenAL headers from the Android tree.
3217 '<(android_src)/frameworks/wilhelm/include',
3218 ],
3219 'cflags': [
[email protected]04882132012-11-21 12:40:453220 # Android predefines this as 1; undefine it here so Chromium
3221 # can redefine it later to be 2 for chromium code and unset
3222 # for third party code. This works because cflags are added
3223 # before defines.
3224 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553225 # Disable any additional warnings enabled by the Android build system but which
3226 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083227 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553228 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3229 '-Wno-ignored-qualifiers',
3230 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083231 # Other things unrelated to -Wextra:
[email protected]53f93c92013-01-04 00:48:553232 '-Wno-non-virtual-dtor',
3233 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083234 ],
3235 'cflags_cc': [
3236 # Disabling c++0x-compat should be handled in WebKit, but
3237 # this currently doesn't work because gcc_version is not set
3238 # correctly when building with the Android build system.
3239 # TODO(torne): Fix this in WebKit.
3240 '-Wno-error=c++0x-compat',
3241 ],
3242 }],
3243 ['android_build_type==1 and chromium_code==0', {
3244 'cflags': [
3245 # There is a class of warning which:
3246 # 1) Android always enables and also treats as errors
3247 # 2) Chromium ignores in third party code
3248 # For now, I am leaving these warnings enabled but preventing
3249 # them from being treated as errors here.
[email protected]53f93c92013-01-04 00:48:553250 '-Wno-address',
3251 '-Wno-format-security',
3252 '-Wno-non-virtual-dtor',
3253 '-Wno-return-type',
3254 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083255 ],
3256 }],
[email protected]febd3572012-05-03 09:17:453257 ['target_arch == "arm"', {
3258 'ldflags': [
3259 # Enable identical code folding to reduce size.
3260 '-Wl,--icf=safe',
3261 ],
3262 }],
[email protected]da1c8d692011-09-20 20:35:013263 # NOTE: The stlport header include paths below are specified in
3264 # cflags rather than include_dirs because they need to come
3265 # after include_dirs. Think of them like system headers, but
3266 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3267 # toolchain (circa Gingerbread) will exhibit strange errors.
3268 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513269 ['use_system_stlport==1', {
3270 'cflags': [
3271 # For libstdc++/include, which is used by stlport.
3272 '-I<(android_src)/bionic',
3273 '-I<(android_src)/external/stlport/stlport',
3274 ],
3275 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013276 'cflags': [
3277 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
[email protected]7aa96b12012-12-11 04:29:483278 '-I<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/include',
[email protected]da1c8d692011-09-20 20:35:013279 ],
3280 'conditions': [
3281 ['target_arch=="arm" and armv7==1', {
3282 'ldflags': [
3283 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
[email protected]806b5232012-11-19 21:19:043284 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a',
[email protected]da1c8d692011-09-20 20:35:013285 ],
3286 }],
3287 ['target_arch=="arm" and armv7==0', {
3288 'ldflags': [
3289 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
[email protected]806b5232012-11-19 21:19:043290 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi',
[email protected]da1c8d692011-09-20 20:35:013291 ],
3292 }],
3293 ['target_arch=="ia32"', {
3294 'ldflags': [
3295 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
[email protected]806b5232012-11-19 21:19:043296 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/x86',
[email protected]da1c8d692011-09-20 20:35:013297 ],
3298 }],
3299 ],
3300 }],
3301 ['target_arch=="ia32"', {
3302 # The x86 toolchain currently has problems with stack-protector.
3303 'cflags!': [
3304 '-fstack-protector',
3305 ],
3306 'cflags': [
3307 '-fno-stack-protector',
3308 ],
3309 }],
3310 ],
3311 'target_conditions': [
3312 ['_type=="executable"', {
3313 'ldflags': [
3314 '-Bdynamic',
3315 '-Wl,-dynamic-linker,/system/bin/linker',
3316 '-Wl,--gc-sections',
3317 '-Wl,-z,nocopyreloc',
3318 # crtbegin_dynamic.o should be the last item in ldflags.
3319 '<(android_ndk_lib)/crtbegin_dynamic.o',
3320 ],
3321 'libraries': [
3322 # crtend_android.o needs to be the last item in libraries.
3323 # Do not add any libraries after this!
3324 '<(android_ndk_lib)/crtend_android.o',
3325 ],
[email protected]63a131fd2012-11-06 16:01:213326 'conditions': [
3327 ['asan==1', {
3328 'cflags': [
3329 '-fPIE',
3330 ],
3331 'ldflags': [
3332 '-pie',
3333 ],
3334 }],
3335 ],
[email protected]da1c8d692011-09-20 20:35:013336 }],
[email protected]f5c7758a2012-07-25 16:17:573337 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013338 'ldflags': [
3339 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:463340 # crtbegin_so.o should be the last item in ldflags.
3341 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:013342 ],
[email protected]a08029b42012-04-25 03:18:463343 'libraries': [
3344 # crtend_so.o needs to be the last item in libraries.
3345 # Do not add any libraries after this!
3346 '<(android_ndk_lib)/crtend_so.o',
3347 ],
[email protected]da1c8d692011-09-20 20:35:013348 }],
3349 ],
3350 }],
3351 # Settings for building host targets using the system toolchain.
3352 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123353 'cflags!': [
3354 # Due to issues in Clang build system, using ASan on 32-bit
3355 # binaries on x86_64 host is problematic.
3356 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563357 '-fsanitize=address',
3358 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123359 ],
[email protected]da1c8d692011-09-20 20:35:013360 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443361 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013362 '-Wl,-z,noexecstack',
3363 '-Wl,--gc-sections',
3364 '-Wl,-O1',
3365 '-Wl,--as-needed',
3366 ],
[email protected]965b6b22011-09-29 16:07:283367 'sources/': [
3368 ['exclude', '_android(_unittest)?\\.cc$'],
3369 ['exclude', '(^|/)android/']
3370 ],
[email protected]da1c8d692011-09-20 20:35:013371 }],
3372 ],
3373 },
3374 }],
[email protected]93f21e42010-04-01 00:35:153375 ['OS=="solaris"', {
3376 'cflags!': ['-fvisibility=hidden'],
3377 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3378 }],
[email protected]1e013672012-06-29 22:12:203379 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553380 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423381 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553382 'xcode_settings': {
3383 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243384 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3385 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043386 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3387 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043388 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3389 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3390 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253391 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3392 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043393 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3394 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3395 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3396 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553397 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043398 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553399 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043400 'WARNING_CFLAGS': [
3401 '-Wall',
3402 '-Wendif-labels',
3403 '-Wextra',
3404 # Don't warn about unused function parameters.
3405 '-Wno-unused-parameter',
3406 # Don't warn about the "struct foo f = {0};" initialization
3407 # pattern.
3408 '-Wno-missing-field-initializers',
3409 ],
[email protected]b3fb8092009-03-12 19:09:243410 'conditions': [
3411 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593412 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3413 ],
[email protected]2936b8c2012-10-29 10:57:313414 # Note that the prebuilt Clang binaries should not be used for iOS
3415 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283416 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303417 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3418 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383419
[email protected]6c648f12011-12-24 07:50:433420 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533421 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433422 # override keyword is used via the OVERRIDE macro from
3423 # base/compiler_specific.h.
3424 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443425 # Warn if automatic synthesis is triggered with
3426 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533427 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303428 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283429 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073430 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523431
3432 # This warns on using ints as initializers for floats in
3433 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3434 # which happens in several places in chrome code. Not sure if
3435 # this is worth fixing.
3436 '-Wno-c++11-narrowing',
3437
3438 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3439 # user-defined literals, this is now a string literal with a UD
3440 # suffix. However, this is used heavily in NaCl code, so disable
3441 # the warning for now.
3442 '-Wno-reserved-user-defined-literal',
3443
[email protected]66733172010-09-22 00:09:283444 # Don't die on dtoa code that uses a char as an array index.
3445 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3446 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453447 # Clang spots more unused functions.
3448 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103449
3450 # Warns on switches on enums that cover all enum values but
3451 # also contain a default: branch. Chrome is full of that.
3452 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513453
3454 # Warns when a const char[] is converted to bool.
3455 '-Wstring-conversion',
[email protected]66733172010-09-22 00:09:283456 ],
[email protected]c67e8ca2012-12-04 16:01:523457 'OTHER_CPLUSPLUSFLAGS': [
3458 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3459 # defined. (Else e.g. finite() in base/float_util.h needs to
3460 # be isfinite() which doesn't exist on the android bots.)
3461 # typeof() is also disabled in c++11 (but we could use
3462 # decltype() instead).
3463 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3464 # bots use xcode 4 -- http://crbug.com/147515).
3465 # TODO(thakis): Eventually switch this to c++11 instead of
3466 # gnu++11 (once typeof can be removed, which is blocked on c++11
3467 # being available everywhere).
3468 '$(inherited)', '-std=gnu++11',
3469 ],
[email protected]66733172010-09-22 00:09:283470 }],
[email protected]5d451ad2011-02-11 16:43:463471 ['clang==1 and clang_use_chrome_plugins==1', {
3472 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313473 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463474 ],
3475 }],
[email protected]4a9ac22e2011-12-02 03:41:533476 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593477 'OTHER_CFLAGS': [
3478 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533479 ],
3480 }],
3481 ['clang==1 and clang_add_plugin!=""', {
3482 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593483 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3484 ],
3485 }],
[email protected]2616d45d2012-01-19 03:15:483486 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3487 'OTHER_CFLAGS': [
3488 # See http://crbug.com/110262
3489 '-fcolor-diagnostics',
3490 ],
3491 }],
[email protected]b3fb8092009-03-12 19:09:243492 ],
[email protected]2f80c312009-02-25 21:26:553493 },
[email protected]34f40892011-09-06 21:53:303494 'conditions': [
3495 ['clang==1', {
3496 'variables': {
3497 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3498 },
3499 }],
[email protected]921c7b52011-11-25 10:34:353500 ['asan==1', {
3501 'xcode_settings': {
3502 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563503 '-fsanitize=address',
3504 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353505 ],
[email protected]921c7b52011-11-25 10:34:353506 },
3507 'defines': [
3508 'ADDRESS_SANITIZER',
3509 ],
3510 }],
[email protected]34f40892011-09-06 21:53:303511 ],
[email protected]2f80c312009-02-25 21:26:553512 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553513 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463514 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083515 'conditions': [
3516 ['asan==1', {
3517 'xcode_settings': {
3518 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443519 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083520 ],
3521 },
3522 }],
3523 ],
[email protected]5d7dc972009-04-16 15:30:463524 }],
3525 ['_mac_bundle', {
3526 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:083527 }],
[email protected]2936b8c2012-10-29 10:57:313528 ], # target_conditions
3529 }, # target_defaults
3530 }], # OS=="mac" or OS=="ios"
3531 ['OS=="mac"', {
3532 'target_defaults': {
3533 'variables': {
3534 # These should end with %, but there seems to be a bug with % in
3535 # variables that are intended to be set to different values in
3536 # different targets, like these.
3537 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313538 # Strip debugging symbols from the target.
3539 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373540 'conditions': [
3541 ['asan==1', {
3542 'conditions': [
3543 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353544 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373545 }, {
3546 'mac_real_dsym': '<(mac_want_real_dsym)'
3547 }],
3548 ],
3549 }, {
3550 'conditions': [
3551 ['mac_want_real_dsym=="default"', {
3552 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3553 }, {
3554 'mac_real_dsym': '<(mac_want_real_dsym)'
3555 }],
3556 ],
3557 }],
3558 ],
[email protected]2936b8c2012-10-29 10:57:313559 },
3560 'xcode_settings': {
3561 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3562 # (Equivalent to -fPIC)
3563 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3564 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3565 # Keep pch files below xcodebuild/.
3566 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3567 'OTHER_CFLAGS': [
3568 '-fno-strict-aliasing', # See http://crbug.com/32204
3569 ],
3570 },
3571 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103572 ['_type=="executable"', {
3573 'postbuilds': [
3574 {
3575 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363576 # code execution when running on Mac OS X 10.7 ("Lion"), and
3577 # ensures that the position-independent executable (PIE) bit
3578 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103579 'variables': {
[email protected]8c40f322011-08-24 03:33:363580 # Define change_mach_o_flags in a variable ending in _path
3581 # so that GYP understands it's a path and performs proper
3582 # relativization during dict merging.
3583 'change_mach_o_flags_path':
3584 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173585 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133586 ],
3587 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173588 ['mac_pie==0 or release_valgrind_build==1', {
3589 # Don't enable PIE if it's unwanted. It's unwanted if
3590 # the target specifies mac_pie=0 or if building for
3591 # Valgrind, because Valgrind doesn't understand slide.
3592 # See the similar mac_pie/release_valgrind_build check
3593 # below.
[email protected]081c0342011-08-24 14:59:133594 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133595 '--no-pie',
3596 ],
3597 }],
3598 ],
[email protected]6303fed2011-08-11 01:12:103599 },
[email protected]8c40f322011-08-24 03:33:363600 'postbuild_name': 'Change Mach-O Flags',
3601 'action': [
3602 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133603 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363604 ],
[email protected]6303fed2011-08-11 01:12:103605 },
3606 ],
[email protected]5a5d97aa2011-09-02 15:34:003607 'conditions': [
3608 ['asan==1', {
3609 'variables': {
3610 'asan_saves_file': 'asan.saves',
3611 },
3612 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563613 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003614 },
3615 }],
3616 ],
[email protected]162407f2011-09-08 15:33:173617 'target_conditions': [
3618 ['mac_pie==1 and release_valgrind_build==0', {
3619 # Turn on position-independence (ASLR) for executables. When
3620 # PIE is on for the Chrome executables, the framework will
3621 # also be subject to ASLR.
3622 # Don't do this when building for Valgrind, because Valgrind
3623 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3624 # understand slide, and get rid of the Valgrind check.
3625 'xcode_settings': {
3626 'OTHER_LDFLAGS': [
3627 '-Wl,-pie', # Position-independent executable (MH_PIE)
3628 ],
3629 },
3630 }],
3631 ],
[email protected]6a0242bc2011-07-01 00:34:463632 }],
[email protected]9a5e72862010-09-02 16:16:583633 ['(_type=="executable" or _type=="shared_library" or \
3634 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203635 'target_conditions': [
3636 ['mac_real_dsym == 1', {
3637 # To get a real .dSYM bundle produced by dsymutil, set the
3638 # debug information format to dwarf-with-dsym. Since
3639 # strip_from_xcode will not be used, set Xcode to do the
3640 # stripping as well.
3641 'configurations': {
[email protected]5153767c2009-12-22 01:52:503642 'Release_Base': {
[email protected]24700642009-06-01 16:01:203643 'xcode_settings': {
3644 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3645 'DEPLOYMENT_POSTPROCESSING': 'YES',
3646 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073647 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253648 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073649 # The Xcode default is to strip debugging symbols
3650 # only (-S). Local symbols should be stripped as
3651 # well, which will be handled by -x. Xcode will
3652 # continue to insert -S when stripping even when
3653 # additional flags are added with STRIPFLAGS.
3654 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:403655 }], # _type=="shared_library" or _type=="loadable_module"
3656 ['_type=="executable"', {
3657 'conditions': [
3658 ['asan==1', {
3659 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3660 }]
3661 ],
3662 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:073663 ], # target_conditions
3664 }, # xcode_settings
3665 }, # configuration "Release"
3666 }, # configurations
[email protected]24700642009-06-01 16:01:203667 }, { # mac_real_dsym != 1
3668 # To get a fast fake .dSYM bundle, use a post-build step to
3669 # produce the .dSYM and strip the executable. strip_from_xcode
3670 # only operates in the Release configuration.
3671 'postbuilds': [
3672 {
3673 'variables': {
3674 # Define strip_from_xcode in a variable ending in _path
3675 # so that gyp understands it's a path and performs proper
3676 # relativization during dict merging.
3677 'strip_from_xcode_path': 'mac/strip_from_xcode',
3678 },
3679 'postbuild_name': 'Strip If Needed',
3680 'action': ['<(strip_from_xcode_path)'],
3681 },
[email protected]e14a9f92009-08-05 19:26:073682 ], # postbuilds
3683 }], # mac_real_dsym
3684 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583685 }], # (_type=="executable" or _type=="shared_library" or
3686 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073687 ], # target_conditions
3688 }, # target_defaults
3689 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203690 ['OS=="ios"', {
3691 'target_defaults': {
3692 'xcode_settings' : {
3693 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3694
3695 # This next block is mostly common with the 'mac' section above,
3696 # but keying off (or setting) 'clang' isn't valid for iOS as it
3697 # also seems to mean using the custom build of clang.
3698
3699 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533700 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203701 # override keyword is used via the OVERRIDE macro from
3702 # base/compiler_specific.h.
3703 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443704 # Warn if automatic synthesis is triggered with
3705 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533706 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:203707 'WARNING_CFLAGS': [
3708 '-Wheader-hygiene',
3709 # Don't die on dtoa code that uses a char as an array index.
3710 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3711 '-Wno-char-subscripts',
3712 # Clang spots more unused functions.
3713 '-Wno-unused-function',
3714 # See comments on this flag higher up in this file.
3715 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:533716 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:203717 # heavily.
3718 '-Wno-c++11-extensions',
3719 ],
3720 },
3721 'target_conditions': [
3722 ['_type=="executable"', {
3723 'configurations': {
3724 'Release_Base': {
3725 'xcode_settings': {
3726 'DEPLOYMENT_POSTPROCESSING': 'YES',
3727 'STRIP_INSTALLED_PRODUCT': 'YES',
3728 },
3729 },
[email protected]3c6aa862012-11-05 17:11:443730 'Debug_Base': {
3731 'xcode_settings': {
3732 # Remove dSYM to reduce build time.
3733 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3734 },
3735 },
[email protected]1e013672012-06-29 22:12:203736 },
3737 'xcode_settings': {
3738 'conditions': [
3739 ['chromium_ios_signing', {
3740 # iOS SDK wants everything for device signed.
3741 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3742 }, {
3743 'CODE_SIGNING_REQUIRED': 'NO',
3744 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3745 }],
3746 ],
3747 },
3748 }],
3749 ], # target_conditions
3750 }, # target_defaults
3751 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553752 ['OS=="win"', {
3753 'target_defaults': {
3754 'defines': [
[email protected]8e345da2012-07-01 22:10:303755 '_WIN32_WINNT=0x0602',
3756 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553757 'WIN32',
3758 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553759 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283760 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553761 '_CRT_RAND_S',
3762 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3763 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273764 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553765 ],
[email protected]8974e042010-06-21 18:06:523766 'conditions': [
[email protected]2212d272011-12-20 21:37:373767 ['buildtype=="Official"', {
3768 # In official builds, targets can self-select an optimization
3769 # level by defining a variable named 'optimize', and setting it
3770 # to one of
3771 # - "size", optimizes for minimal code size - the default.
3772 # - "speed", optimizes for speed over code size.
3773 # - "max", whole program optimization and link-time code
3774 # generation. This is very expensive and should be used
3775 # sparingly.
3776 'variables': {
3777 'optimize%': 'size',
3778 },
3779 'target_conditions': [
3780 ['optimize=="size"', {
3781 'msvs_settings': {
3782 'VCCLCompilerTool': {
3783 # 1, optimizeMinSpace, Minimize Size (/O1)
3784 'Optimization': '1',
3785 # 2, favorSize - Favor small code (/Os)
3786 'FavorSizeOrSpeed': '2',
3787 },
3788 },
3789 },
3790 ],
3791 ['optimize=="speed"', {
3792 'msvs_settings': {
3793 'VCCLCompilerTool': {
3794 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3795 'Optimization': '2',
3796 # 1, favorSpeed - Favor fast code (/Ot)
3797 'FavorSizeOrSpeed': '1',
3798 },
3799 },
3800 },
3801 ],
3802 ['optimize=="max"', {
3803 'msvs_settings': {
3804 'VCCLCompilerTool': {
3805 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3806 'Optimization': '2',
3807 # 1, favorSpeed - Favor fast code (/Ot)
3808 'FavorSizeOrSpeed': '1',
3809 # This implies link time code generation.
3810 'WholeProgramOptimization': 'true',
3811 },
3812 },
3813 },
3814 ],
3815 ],
3816 },
3817 ],
[email protected]8974e042010-06-21 18:06:523818 ['component=="static_library"', {
3819 'defines': [
3820 '_HAS_EXCEPTIONS=0',
3821 ],
3822 }],
[email protected]3e2648a2011-03-21 20:58:503823 ['secure_atl', {
3824 'defines': [
3825 '_SECURE_ATL',
3826 ],
3827 }],
[email protected]54184ce72012-10-18 07:11:263828 ['msvs_express', {
3829 'configurations': {
3830 'x86_Base': {
3831 'msvs_settings': {
3832 'VCLinkerTool': {
3833 'AdditionalLibraryDirectories':
3834 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3835 },
3836 'VCLibrarianTool': {
3837 'AdditionalLibraryDirectories':
3838 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3839 },
3840 },
3841 },
3842 'x64_Base': {
3843 'msvs_settings': {
3844 'VCLibrarianTool': {
3845 'AdditionalLibraryDirectories':
3846 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3847 },
3848 'VCLinkerTool': {
3849 'AdditionalLibraryDirectories':
3850 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3851 },
3852 },
3853 },
3854 },
3855 'msvs_settings': {
3856 'VCLinkerTool': {
3857 # Explicitly required when using the ATL with express
3858 'AdditionalDependencies': ['atlthunk.lib'],
3859
3860 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3861 # almost eight hundred LNK4254 and LNK4078 warnings:
3862 # - warning LNK4254: section 'ATL' (50000040) merged into
3863 # '.rdata' (40000040) with different attributes
3864 # - warning LNK4078: multiple 'ATL' sections found with
3865 # different attributes
3866 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
3867 },
3868 },
3869 'msvs_system_include_dirs': [
3870 '<(windows_driver_kit_path)/inc/atl71',
3871 '<(windows_driver_kit_path)/inc/mfc42',
3872 ],
3873 }],
[email protected]8974e042010-06-21 18:06:523874 ],
[email protected]5b5ca7cb2009-07-20 23:00:203875 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:053876 '<(windows_sdk_path)/Include/shared',
3877 '<(windows_sdk_path)/Include/um',
3878 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:553879 '$(VSInstallDir)/VC/atlmfc/include',
3880 ],
[email protected]a8d99cef2009-08-26 20:47:493881 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:113882 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3883 # TODO(maruel): These warnings are level 4. They will be slowly
3884 # removed as code is fixed.
3885 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3886 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3887 4702, 4706,
3888 ],
[email protected]2f80c312009-02-25 21:26:553889 'msvs_settings': {
3890 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:443891 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:553892 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:553893 'BufferSecurityCheck': 'true',
3894 'EnableFunctionLevelLinking': 'true',
3895 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:113896 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:553897 'WarnAsError': 'true',
3898 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:583899 'conditions': [
[email protected]8974e042010-06-21 18:06:523900 ['component=="shared_library"', {
3901 'ExceptionHandling': '1', # /EHsc
3902 }, {
3903 'ExceptionHandling': '0',
3904 }],
[email protected]3fef6e62009-07-31 19:58:583905 ],
[email protected]2f80c312009-02-25 21:26:553906 },
3907 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:163908 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:373909 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:053910 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373911 ],
[email protected]2f80c312009-02-25 21:26:553912 },
3913 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:553914 'AdditionalDependencies': [
3915 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:503916 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:553917 'version.lib',
3918 'msimg32.lib',
3919 'ws2_32.lib',
3920 'usp10.lib',
3921 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:083922 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:483923 'winmm.lib',
3924 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:553925 ],
[email protected]a78da50e2010-06-09 21:31:373926 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:053927 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373928 ],
[email protected]2f80c312009-02-25 21:26:553929 'GenerateDebugInformation': 'true',
3930 'MapFileName': '$(OutDir)\\$(TargetName).map',
3931 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:553932 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483933 # SubSystem values:
3934 # 0 == not set
3935 # 1 == /SUBSYSTEM:CONSOLE
3936 # 2 == /SUBSYSTEM:WINDOWS
3937 # Most of the executables we'll ever create are tests
3938 # and utilities with console output.
3939 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553940 },
3941 'VCMIDLTool': {
3942 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093943 'TypeLibraryName': '$(InputName).tlb',
3944 'OutputDirectory': '$(IntDir)',
3945 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333946 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093947 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3948 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553949 },
3950 'VCResourceCompilerTool': {
3951 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383952 'AdditionalIncludeDirectories': [
3953 '<(DEPTH)',
3954 '<(SHARED_INTERMEDIATE_DIR)',
3955 ],
[email protected]2f80c312009-02-25 21:26:553956 },
3957 },
3958 },
3959 }],
[email protected]79e2336c2011-05-12 18:18:343960 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313961 'target_defaults': {
3962 'defines': [
3963 'DISABLE_NACL',
3964 ],
3965 },
3966 }],
[email protected]cfbf9bc2009-12-07 22:07:563967 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193968 'target_defaults': {
3969 'msvs_settings': {
3970 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193971 'DelayLoadDLLs': [
3972 'dbghelp.dll',
3973 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013974 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193975 'uxtheme.dll',
3976 ],
3977 },
3978 },
[email protected]ef4fa4072009-12-04 22:46:503979 'configurations': {
[email protected]5153767c2009-12-22 01:52:503980 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503981 'msvs_settings': {
3982 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163983 'AdditionalOptions': [
3984 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333985 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163986 '/ignore:4199',
3987 '/ignore:4221',
3988 '/nxcompat',
3989 ],
[email protected]ef4fa4072009-12-04 22:46:503990 },
3991 },
3992 },
[email protected]5153767c2009-12-22 01:52:503993 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503994 'msvs_settings': {
3995 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163996 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503997 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333998 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163999 '/ignore:4199',
4000 '/ignore:4221',
4001 '/nxcompat',
4002 ],
[email protected]ef4fa4072009-12-04 22:46:504003 },
4004 },
4005 },
4006 },
[email protected]48c7af72009-07-03 22:00:194007 },
4008 }],
[email protected]9821d0d2010-04-16 22:40:374009 ['enable_new_npdevice_api==1', {
4010 'target_defaults': {
4011 'defines': [
4012 'ENABLE_NEW_NPDEVICE_API',
4013 ],
4014 },
4015 }],
[email protected]220ea5932012-08-09 10:44:074016 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234017 'conditions': [
4018 ['OS=="android"', {
4019 # Android could use the goma with clang.
4020 'make_global_settings': [
4021 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4022 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4023 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4024 ['CC.host', '$(CC)'],
4025 ['CXX.host', '$(CXX)'],
4026 ['LINK.host', '$(LINK)'],
4027 ],
4028 }, {
4029 'make_global_settings': [
4030 ['CC', '<(make_clang_dir)/bin/clang'],
4031 ['CXX', '<(make_clang_dir)/bin/clang++'],
4032 ['LINK', '$(CXX)'],
4033 ['CC.host', '$(CC)'],
4034 ['CXX.host', '$(CXX)'],
4035 ['LINK.host', '$(LINK)'],
4036 ],
4037 }],
[email protected]34f40892011-09-06 21:53:304038 ],
4039 }],
[email protected]615fa6642012-08-14 19:17:074040 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274041 # Hardcode the compiler names in the Makefile so that
4042 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114043 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044044 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4045 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4046 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074047 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4048 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4049 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274050 ],
4051 }],
[email protected]eb5f1672013-01-31 07:56:464052 ['target_arch=="mipsel"', {
4053 'make_global_settings': [
4054 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4055 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4056 ['LINK', '$(CXX)'],
4057 ['CC.host', '<!(which gcc)'],
4058 ['CXX.host', '<!(which g++)'],
4059 ['LINK.host', '<!(which g++)'],
4060 ],
4061 }],
[email protected]2f80c312009-02-25 21:26:554062 ],
4063 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504064 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4065 # This block adds *project-wide* configuration settings to each project
4066 # file. It's almost always wrong to put things here. Specify your
4067 # custom xcode_settings in target_defaults to add them to targets instead.
4068
[email protected]1e013672012-06-29 22:12:204069 'conditions': [
[email protected]fca3d812012-07-27 00:55:364070 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4071 # setting sets the SDK on a project-wide basis. In order to get the
4072 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4073 # here at the project level.
[email protected]2c261532012-10-06 00:46:294074 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364075 'conditions': [
[email protected]2c261532012-10-06 00:46:294076 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364077 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294078 }, {
4079 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364080 }],
4081 ],
[email protected]2c261532012-10-06 00:46:294082 }],
4083 ['OS=="ios"', {
4084 'conditions': [
4085 ['ios_sdk_path==""', {
4086 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4087 }, {
4088 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4089 }],
4090 ],
[email protected]1e013672012-06-29 22:12:204091 }],
4092 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204093 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:444094 # Just build armv7, until armv7s is correctly tested.
4095 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204096 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:204097 # Target both iPhone and iPad.
4098 'TARGETED_DEVICE_FAMILY': '1,2',
4099 }],
[email protected]f9335b42013-01-24 21:00:234100 ['target_arch=="x64"', {
4101 'ARCHS': [
4102 'x86_64'
4103 ],
4104 }],
[email protected]1e013672012-06-29 22:12:204105 ],
[email protected]0c8ab452009-11-06 21:57:504106
[email protected]2f80c312009-02-25 21:26:554107 # The Xcode generator will look for an xcode_settings section at the root
4108 # of each dict and use it to apply settings on a file-wide basis. Most
4109 # settings should not be here, they should be in target-specific
4110 # xcode_settings sections, or better yet, should use non-Xcode-specific
4111 # settings in target dicts. SYMROOT is a special case, because many other
4112 # Xcode variables depend on it, including variables such as
4113 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4114 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4115 # files to appear (when present) in the UI as actual files and not red
4116 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4117 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164118 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554119 },
[email protected]ee28c9f2009-09-04 01:53:014120}