blob: 8fb2a06c1730b05a8aee89c35c22a088833a3daa [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,
[email protected]c335f4802013-04-06 04:51:2129
30 # Whether or not we are using the embedded messagepump.
31 'use_messagepump_linux%': 0,
[email protected]8796d922012-08-07 01:23:1132 },
33 # Copy conditionally-set variables out one scope.
34 'chromeos%': '<(chromeos)',
35 'use_aura%': '<(use_aura)',
36 'use_ash%': '<(use_ash)',
[email protected]e72e55b2011-01-06 22:19:3037
[email protected]c335f4802013-04-06 04:51:2138 # Whether or not we are using the /dev/input/event* message pump.
39 'use_messagepump_linux%': '<(use_messagepump_linux)',
40
[email protected]3fa441d2011-09-18 17:28:5041 # Whether we are using Views Toolkit
42 'toolkit_views%': 0,
43
[email protected]e0b85a52011-10-06 03:30:4244 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
45 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2746
[email protected]7ddea9802012-02-22 23:08:0547 # Disable viewport meta tag by default.
48 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2449
50 # Enable HiDPI support.
51 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4052
[email protected]6155e702012-05-02 17:56:0653 # Enable touch optimized art assets and metrics.
54 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1855
[email protected]f1f362b42012-05-15 17:46:5856 # Override buildtype to select the desired build flavor.
57 # Dev - everyday build for development/testing
58 # Official - release build (generally implies additional processing)
59 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
60 # conversion is done), some of the things which are now controlled by
61 # 'branding', such as symbol generation, will need to be refactored
62 # based on 'buildtype' (i.e. we don't care about saving symbols for
63 # non-Official # builds).
64 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1165
66 'conditions': [
67 # ChromeOS implies ash.
68 ['chromeos==1', {
69 'use_ash%': 1,
70 'use_aura%': 1,
71 }],
72
[email protected]e9c4c1c2013-02-06 06:46:4873 # For now, Windows builds that |use_aura| should also imply using
74 # ash. This rule should be removed for the future when Windows is
75 # using the aura windows without the ash interface.
76 ['use_aura==1 and OS=="win"', {
[email protected]8796d922012-08-07 01:23:1177 'use_ash%': 1,
78 }],
79 ['use_ash==1', {
80 'use_aura%': 1,
81 }],
[email protected]94cdbf42012-12-11 19:49:2282
83 # Compute the architecture that we're building on.
84 ['OS=="win" or OS=="mac" or OS=="ios"', {
85 'host_arch%': 'ia32',
86 }, {
87 # This handles the Unix platforms for which there is some support.
88 # Anything else gets passed through, which probably won't work
89 # very well; such hosts should pass an explicit target_arch to
90 # gyp.
91 'host_arch%':
92 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
93 }],
[email protected]8796d922012-08-07 01:23:1194 ],
[email protected]bb6aba32011-01-07 19:04:4395 },
96 # Copy conditionally-set variables out one scope.
97 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5898 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1699 'use_ash%': '<(use_ash)',
[email protected]c335f4802013-04-06 04:51:21100 'use_messagepump_linux%': '<(use_messagepump_linux)',
[email protected]e0b85a52011-10-06 03:30:42101 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05102 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24103 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06104 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:58105 'buildtype%': '<(buildtype)',
[email protected]94cdbf42012-12-11 19:49:22106 'host_arch%': '<(host_arch)',
107
108 # Default architecture we're building for is the architecture we're
109 # building on.
110 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58111
[email protected]d999c3cb2013-03-12 10:22:36112 # This is set when building the Android WebView inside the Android
113 # build system, using the 'android' gyp backend. The WebView code is
114 # still built when this is unset, but builds using the normal chromium
115 # build system.
116 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53117
[email protected]55d92492013-01-31 05:03:39118 # Sets whether chrome is built for google tv device.
119 'google_tv%': 0,
120
[email protected]5b38a522013-03-20 17:00:47121 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they
122 # are built under a chromium full build (1) or a webkit.org chromium
123 # build (0).
124 'inside_chromium_build%': 1,
125
[email protected]e72e55b2011-01-06 22:19:30126 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50127 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35128 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43129 'toolkit_views%': 1,
130 }, {
131 'toolkit_views%': 0,
132 }],
[email protected]1efbaaa2012-04-24 02:43:24133
[email protected]8796d922012-08-07 01:23:11134 # Set toolkit_uses_gtk for the Chromium browser on Linux.
135 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
136 'toolkit_uses_gtk%': 1,
137 }, {
138 'toolkit_uses_gtk%': 0,
139 }],
140
[email protected]3aa8a682012-08-11 00:04:29141 # Enable HiDPI on Mac OS and Chrome OS.
142 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24143 'enable_hidpi%': 1,
144 }],
[email protected]219c7312012-05-10 20:32:40145
[email protected]c71fe6402012-08-15 15:22:55146 # Enable touch UI on Metro.
147 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06148 'enable_touch_ui%': 1,
149 }],
[email protected]dc4e8b82012-11-15 03:58:16150
[email protected]b1a2b542013-01-10 07:33:09151 # Enable App Launcher only on ChromeOS, Windows and OSX.
152 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16153 'enable_app_list%': 1,
154 }, {
155 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09156 }],
157
[email protected]f4fb8422013-03-14 11:59:59158 # Enable Message Center only on ChromeOS, Windows, and Mac for now.
159 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]b1a2b542013-01-10 07:33:09160 'enable_message_center%': 1,
161 }, {
[email protected]9b5dbf72013-01-09 20:29:15162 'enable_message_center%': 0,
[email protected]dc4e8b82012-11-15 03:58:16163 }],
[email protected]cb800562012-11-20 22:36:07164
165 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26166 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07167 }, {
168 'use_default_render_theme%': 0,
169 }],
[email protected]e72e55b2011-01-06 22:19:30170 ],
171 },
172
173 # Copy conditionally-set variables out one scope.
174 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30175 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22176 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43177 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11178 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58179 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16180 'use_ash%': '<(use_ash)',
[email protected]c335f4802013-04-06 04:51:21181 'use_messagepump_linux%': '<(use_messagepump_linux)',
[email protected]e0b85a52011-10-06 03:30:42182 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05183 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24184 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06185 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]d999c3cb2013-03-12 10:22:36186 'android_webview_build%': '<(android_webview_build)',
[email protected]55d92492013-01-31 05:03:39187 'google_tv%': '<(google_tv)',
[email protected]5b38a522013-03-20 17:00:47188 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]dc4e8b82012-11-15 03:58:16189 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15190 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07191 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22192 'buildtype%': '<(buildtype)',
[email protected]023d8242011-11-22 01:25:27193
[email protected]e14a9f92009-08-05 19:26:07194 # Override branding to select the desired branding flavor.
195 'branding%': 'Chromium',
196
[email protected]c86fd472013-04-02 19:42:30197 # Set to 1 to enable fast builds. Set to 2 for even faster builds
198 # (it disables debug info for fastest compilation - only for use
199 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30200 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49201
[email protected]20960e072011-09-20 20:59:01202 # Set to 1 to enable dcheck in release without having to use the flag.
203 'dcheck_always_on%': 0,
204
[email protected]464750f2011-10-24 23:16:18205 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51206 'file_manager_extension%': 0,
207
[email protected]77a848262013-02-22 11:17:25208 # Disable image loader component extension by default.
209 'image_loader_extension%': 0,
210
[email protected]e72e55b2011-01-06 22:19:30211 # Python version.
[email protected]a43c5a02011-05-27 06:54:51212 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17213
[email protected]e72e55b2011-01-06 22:19:30214 # Set ARM-v7 compilation flags
215 'armv7%': 0,
216
217 # Set Neon compilation flags (only meaningful if armv7==1).
218 'arm_neon%': 1,
219
220 # The system root for cross-compiles. Default: none.
221 'sysroot%': '',
222
[email protected]945361a2011-09-30 04:38:43223 # The system libdir used for this ABI.
224 'system_libdir%': 'lib',
225
[email protected]e72e55b2011-01-06 22:19:30226 # On Linux, we build with sse2 for Chromium builds.
227 'disable_sse2%': 0,
228
229 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03230 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30231
[email protected]d9113542012-07-18 17:11:28232 # Use system libjpeg. Note that the system's libjepg will be used even if
233 # use_libjpeg_turbo is set.
234 'use_system_libjpeg%': 0,
235
[email protected]aa5e01fc2013-03-06 14:06:17236 # By default, component is set to static_library and it can be overriden
237 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53238 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30239
[email protected]bb6aba32011-01-07 19:04:43240 # Set to select the Title Case versions of strings in GRD files.
241 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21242
[email protected]98da0042011-02-02 00:10:27243 # Use translations provided by volunteers at launchpad.net. This
244 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19245 'use_third_party_translations%': 0,
246
[email protected]9a425422011-01-11 00:53:18247 # Remoting compilation is enabled by default. Set to 0 to disable.
248 'remoting%': 1,
249
[email protected]1ec68c42011-06-01 13:56:25250 # Configuration policy is enabled by default. Set to 0 to disable.
251 'configuration_policy%': 1,
252
[email protected]6c521fed2012-11-29 17:00:03253 # Variable safe_browsing is used to control the build time configuration
254 # for safe browsing feature. Safe browsing can be compiled in 3 different
255 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
256 # reporting features without enabling phishing and malware detection. This
257 # is useful to integrate a third party phishing/malware detection to
258 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56259 'safe_browsing%': 1,
260
[email protected]9eb100e2011-10-14 05:08:22261 # Speech input is compiled in by default. Set to 0 to disable.
262 'input_speech%': 1,
263
[email protected]7cce3232011-10-28 10:41:57264 # Notifications are compiled in by default. Set to 0 to disable.
265 'notifications%' : 1,
266
[email protected]970fd4e2012-12-19 11:09:37267 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
268 # regular builds and 1 for ASan builds.
269 'mac_want_real_dsym%': 'default',
270
[email protected]5d451ad2011-02-11 16:43:46271 # If this is set, the clang plugins used on the buildbot will be used.
272 # Run tools/clang/scripts/update.sh to make sure they are compiled.
273 # This causes 'clang_chrome_plugins_flags' to be set.
274 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08275 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46276
[email protected]2e82fa52012-11-27 23:41:44277 # Enable building with ASAN (Clang's -fsanitize=address option).
278 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06279 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
280 'asan%': 0,
281
[email protected]927a9d672012-11-09 11:28:20282 # Enable building with TSAN (Clang's -fsanitize=thread option).
283 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12284 # See http://clang.llvm.org/docs/ThreadSanitizer.html
285 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16286 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12287
[email protected]a10ddd2d2013-02-26 20:06:59288 # Enable building with MSAN (Clang's -fsanitize=memory option).
289 # MemorySanitizer only works with clang, but msan=1 implies clang=1
290 # See http://clang.llvm.org/docs/MemorySanitizer.html
291 'msan%': 0,
292
[email protected]7ce58b22012-09-26 05:17:25293 # Use a modified version of Clang to intercept allocated types and sizes
294 # for allocated objects. clang_type_profiler=1 implies clang=1.
295 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
296 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
297 'clang_type_profiler%': 0,
298
[email protected]8a6abd12012-05-16 10:04:44299 # Set to true to instrument the code with function call logger.
300 # See src/third_party/cygprofile/cyg-profile.cc for details.
301 'order_profiling%': 0,
302
[email protected]00b0a7f2012-01-25 15:30:46303 # Use the provided profiled order file to link Chrome image with it.
304 # This makes Chrome faster by better using CPU cache when executing code.
305 # This is known as PGO (profile guided optimization).
306 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
307 'order_text_section%' : "",
308
[email protected]1ad5a7b2011-06-24 03:15:13309 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
310 # libraries on linux x86-64 and arm, plus ASLR.
311 'linux_fpic%': 1,
312
[email protected]bd7b6fe2012-03-05 21:02:40313 # Whether one-click signin is enabled or not.
314 'enable_one_click_signin%': 0,
315
[email protected]6a3cd37e2012-04-17 17:13:34316 # Enable Chrome browser extensions
317 'enable_extensions%': 1,
318
[email protected]658677f2012-06-09 06:04:02319 # Enable browser automation.
320 'enable_automation%': 1,
321
[email protected]6ee43a72012-12-07 22:44:40322 # Enable Google Now.
323 'enable_google_now%': 1,
324
[email protected]703369a2012-11-05 20:40:31325 # Enable language detection.
326 'enable_language_detection%': 1,
327
[email protected]658677f2012-06-09 06:04:02328 # Enable printing support and UI.
329 'enable_printing%': 1,
330
[email protected]dda90ae2011-07-19 22:07:48331 # Webrtc compilation is enabled by default. Set to 0 to disable.
332 'enable_webrtc%': 1,
333
[email protected]cdb756ef2012-04-05 18:34:53334 # Enables use of the session service, which is enabled by default.
335 # Support for disabling depends on the platform.
336 'enable_session_service%': 1,
337
[email protected]6b40bb582012-03-15 20:50:38338 # Enables theme support, which is enabled by default. Support for
339 # disabling depends on the platform.
340 'enable_themes%': 1,
341
[email protected]57e67ac2013-02-22 03:37:22342 # Enables autofill dialog and associated features; disabled by default.
343 'enable_autofill_dialog%' : 0,
344
[email protected]4ffe78a2012-10-04 20:55:15345 # Uses OEM-specific wallpaper resources on Chrome OS.
346 'use_oem_wallpaper%': 0,
347
[email protected]0acdd772012-04-05 22:53:00348 # Enables support for background apps.
349 'enable_background%': 1,
350
[email protected]44879ed2012-04-06 01:11:02351 # Enable the task manager by default.
352 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45353
[email protected]9bfe0ab2012-08-30 13:18:11354 # Enable FTP support by default.
355 'disable_ftp_support%': 0,
356
[email protected]22d6dd72012-05-15 07:29:55357 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
358 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
359 # the input value also defines the required XI2 minor minimum version.
360 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
361 'use_xi2_mt%': 0,
362
[email protected]9061bee82012-01-16 11:45:17363 # Use of precompiled headers on Windows.
364 #
[email protected]9061bee82012-01-16 11:45:17365 # This variable may be explicitly set to 1 (enabled) or 0
366 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
367 # This setting will override the default.
368 #
[email protected]c3340fb32012-12-20 20:45:39369 # See
[email protected]9061bee82012-01-16 11:45:17370 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
371 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16372 'chromium_win_pch%': 0,
373
[email protected]3bb37e62012-04-19 03:40:08374 # Set this to true when building with Clang.
375 # See http://code.google.com/p/chromium/wiki/Clang for details.
376 'clang%': 0,
377
[email protected]18e0f39b2012-01-17 16:47:34378 # Enable plug-in installation by default.
379 'enable_plugin_installation%': 1,
380
[email protected]6d17f6392012-12-05 05:24:54381 # Enable PPAPI and NPAPI by default.
382 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
383 # as PPAPI; see crbug.com/162667.
384 'enable_plugins%': 1,
385
[email protected]62424a52012-03-18 03:09:50386 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42387 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35388 # Chrome UI.
389 # TODO(asvitkine): Enable this on all platforms and delete this flag.
390 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50391 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35392
[email protected]a9318c72012-03-01 01:29:47393 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
394 # with one of those tools.
395 'build_for_tool%': '',
396
[email protected]37138132013-01-17 23:08:52397 # If no directory is specified then a temporary directory will be used.
398 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47399 # True if isolate should fail if the isolate files refer to files
400 # that are missing.
401 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56402
[email protected]740ebed2012-06-27 19:14:06403 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12404 'wix_path%': '<(DEPTH)/third_party/wix',
405
[email protected]0850e842013-01-19 03:44:31406 # Managed users are enabled by default.
407 'enable_managed_users%': 1,
408
[email protected]199def22013-02-21 17:52:29409 'spdy_proxy_auth_origin%' : '',
410 'spdy_proxy_auth_property%' : '',
411
[email protected]bb6aba32011-01-07 19:04:43412 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34413 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37414 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34415 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37416 }, {
417 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34418 }],
419
[email protected]df9167b2011-11-14 19:15:25420 # A flag for BSD platforms
421 ['OS=="freebsd" or OS=="openbsd"', {
422 'os_bsd%': 1,
423 }, {
424 'os_bsd%': 0,
425 }],
426
[email protected]c329adf82011-10-05 14:34:57427 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42428 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57429 'use_nss%': 1,
430 }, {
431 'use_nss%': 0,
432 }],
[email protected]e0b85a52011-10-06 03:30:42433
[email protected]c335f4802013-04-06 04:51:21434 # Flags to use X11 on non-Mac POSIX platforms.
435 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_messagepump_linux==1', {
[email protected]79e2336c2011-05-12 18:18:34436 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37437 }, {
[email protected]c49ab0c2011-05-18 17:25:37438 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34439 }],
[email protected]9a8175892012-03-20 02:11:58440
[email protected]c335f4802013-04-06 04:51:21441 # Flags to use glib on non-Mac POSIX platforms.
442 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
443 'use_glib%': 0,
444 }, {
445 'use_glib%': 1,
446 }],
447
[email protected]efadeacf2011-10-27 19:01:00448 # We always use skia text rendering in Aura on Windows, since GDI
449 # doesn't agree with our BackingStore.
450 # TODO(beng): remove once skia text rendering is on by default.
451 ['use_aura==1 and OS=="win"', {
452 'enable_skia_text%': 1,
453 }],
[email protected]9edeb712011-09-20 21:20:33454
[email protected]63692212010-09-16 00:22:21455 # A flag to enable or disable our compile-time dependency
456 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
457 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49458 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50459 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21460 'use_gnome_keyring%': 0,
461 }, {
462 'use_gnome_keyring%': 1,
463 }],
[email protected]0afe5212010-10-01 18:56:11464
[email protected]8796d922012-08-07 01:23:11465 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20466 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43467 'use_titlecase_in_grd_files%': 1,
468 }],
469
[email protected]77a848262013-02-22 11:17:25470 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06471 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50472 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25473 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50474 }, {
[email protected]3d38d8e2011-04-16 20:48:51475 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25476 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51477 }],
[email protected]7de46352011-09-12 15:39:19478
[email protected]c79d1972013-02-06 18:47:29479 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01480 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51481 }],
482
[email protected]da1c8d692011-09-20 20:35:01483 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49484 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46485 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40486 'enable_google_now%': 0,
[email protected]7831e9a2013-02-20 13:54:12487 'enable_language_detection%': 1,
[email protected]55e02302012-08-21 00:50:46488 'enable_printing%': 0,
489 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46490 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58491 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01492 }],
[email protected]839d5172011-10-13 17:18:11493
[email protected]57e67ac2013-02-22 03:37:22494 # Enable autofill dialog for Android and Views-enabled platforms for now.
[email protected]d999c3cb2013-03-12 10:22:36495 ['toolkit_views==1 or (OS=="android" and android_webview_build==0)', {
[email protected]57e67ac2013-02-22 03:37:22496 'enable_autofill_dialog%': 1
497 }],
498
[email protected]d999c3cb2013-03-12 10:22:36499 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43500 'enable_webrtc%': 1,
501 }],
502
503 # Disable WebRTC for building WebView as part of Android system.
504 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
505 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36506 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43507 'enable_webrtc%': 0,
508 }],
509
[email protected]0d16f292012-07-02 22:10:48510 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24511 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11512 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24513 'enable_automation%': 0,
514 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40515 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31516 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24517 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44518 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24519 'enable_themes%': 0,
520 'enable_webrtc%': 0,
521 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48522 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44523 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31524 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48525 }],
526
[email protected]839d5172011-10-13 17:18:11527 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27528 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01529 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33530 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11531 }, {
[email protected]1ee7c56c2011-10-19 14:51:33532 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11533 }],
[email protected]9061bee82012-01-16 11:45:17534
[email protected]c3340fb32012-12-20 20:45:39535 # Turn precompiled headers on by default.
536 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17537 'chromium_win_pch%': 1
538 }],
[email protected]18e0f39b2012-01-17 16:47:34539
[email protected]3d5173ec2012-03-27 04:08:23540 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34541 'enable_plugin_installation%': 0,
542 }, {
543 'enable_plugin_installation%': 1,
544 }],
[email protected]b07806c12012-02-03 22:44:59545
[email protected]55d92492013-01-31 05:03:39546 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54547 'enable_plugins%': 0,
548 }, {
549 'enable_plugins%': 1,
550 }],
551
[email protected]8d726a42012-02-09 03:49:00552 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56553 # third_party/gold. Gold is not used for 32-bit linux builds
554 # as it runs out of address space.
555 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51556 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17557 }, {
[email protected]bd68ea52013-03-26 09:49:37558 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34559 }],
560
561 # linux_use_gold_flags: whether to use build flags that rely on gold.
562 # On by default for x64 Linux. Temporarily off for ChromeOS as
563 # it failed on a buildbot.
564 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
565 'linux_use_gold_flags%': 1,
566 }, {
[email protected]8d726a42012-02-09 03:49:00567 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59568 }],
[email protected]2e22e2f2012-03-15 21:53:10569
[email protected]9394a3a2012-12-19 19:22:39570 ['chromeos==1', {
571 'linux_use_libgps%': 1,
572 }, { # chromeos==0
573 # Do not use libgps on desktop Linux by default,
574 # see http://crbug.com/103751.
575 'linux_use_libgps%': 0,
576 }],
577
[email protected]a95d5302012-11-03 00:02:19578 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32579 'enable_captive_portal_detection%': 0,
580 }, {
581 'enable_captive_portal_detection%': 1,
582 }],
583
[email protected]3bd47e022012-03-22 04:19:12584 # Enable Skia UI text drawing incrementally on different platforms.
585 # http://crbug.com/105550
586 #
587 # On Aura, this allows per-tile painting to be used in the browser
588 # compositor.
[email protected]9197a9282012-05-30 14:12:32589 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12590 'use_canvas_skia%': 1,
591 }],
[email protected]adb44342012-07-23 13:36:12592
[email protected]0753ea42012-08-30 20:15:44593 ['chromeos==1', {
594 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
595 'use_libjpeg_turbo%': 0,
596 }],
597
[email protected]adb44342012-07-23 13:36:12598 ['OS=="android"', {
599 # When building as part of the Android system, use system libraries
600 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36601 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12602 }],
[email protected]8a46f5f2012-12-05 00:47:12603
604 # Enable Settings App only on Windows.
605 ['enable_app_list==1 and OS=="win"', {
606 'enable_settings_app%': 1,
607 }, {
608 'enable_settings_app%': 0,
609 }],
[email protected]94cdbf42012-12-11 19:49:22610
611 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
612 # Set some defaults for arm/linux chrome builds
613 'armv7%': 1,
614 'linux_breakpad%': 0,
615 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43616 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22617 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43618 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22619 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46620
621 ['target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07622 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28623 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46624 }],
[email protected]5b38a522013-03-20 17:00:47625
626 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01627 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47628 # e.g. base_unittests_run runs the target base_unittests. The test
629 # target always calls tools/swarm_client/isolate.py. See the script's
630 # --help for more information and the valid --mode values. Meant to be
631 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01632 # TODO(maruel): Remove the conditions as more configurations are
633 # supported.
[email protected]349f3062013-04-10 20:44:51634 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
635 # again.
[email protected]93fe4002013-04-10 00:17:01636 # NOTE: The check for disable_nacl==0 and component=="static_library"
637 # can't be used here because these variables are not defined yet, but it
638 # is still not supported.
[email protected]349f3062013-04-10 20:44:51639 ['inside_chromium_build==1 and OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47640 'test_isolation_mode%': 'check',
641 }, {
642 'test_isolation_mode%': 'noop',
643 }],
[email protected]d29d61b2013-04-17 04:00:53644 # Whether Android ARM build uses OpenMAX DL FFT. Default is
645 # yes. This will also enable WebAudio on Android ARM.
[email protected]fc3ab0c2013-04-17 15:26:34646 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
[email protected]d29d61b2013-04-17 04:00:53647 'use_openmax_dl_fft%': 1,
648 }, {
649 'use_openmax_dl_fft%': 0,
650 }],
[email protected]b3f23ba2010-04-26 22:58:17651 ],
[email protected]2b113652012-09-17 17:01:39652
653 # Set this to 1 to use the Google-internal file containing
654 # official API keys for Google Chrome even in a developer build.
655 # Setting this variable explicitly to 1 will cause your build to
656 # fail if the internal file is missing.
657 #
658 # Set this to 0 to not use the internal file, even when it
659 # exists in your checkout.
660 #
661 # Leave set to 2 to have this variable implicitly set to 1 if
662 # you have src/google_apis/internal/google_chrome_api_keys.h in
663 # your checkout, and implicitly set to 0 if not.
664 #
665 # Note that official builds always behave as if this variable
666 # was explicitly set to 1, i.e. they always use official keys,
667 # and will fail to build if the internal file is missing.
668 'use_official_google_api_keys%': 2,
669
670 # Set these to bake the specified API keys and OAuth client
671 # IDs/secrets into your build.
672 #
673 # If you create a build without values baked in, you can instead
674 # set environment variables to provide the keys at runtime (see
675 # src/google_apis/google_api_keys.h for details). Features that
676 # require server-side APIs may fail to work if no keys are
677 # provided.
678 #
679 # Note that if you are building an official build or if
680 # use_official_google_api_keys has been set to 1 (explicitly or
681 # implicitly), these values will be ignored and the official
682 # keys will be used instead.
683 'google_api_key%': '',
684 'google_default_client_id%': '',
685 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07686 },
687
[email protected]e72e55b2011-01-06 22:19:30688 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07689 'branding%': '<(branding)',
690 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27691 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59692 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44693 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33694 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58695 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16696 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42697 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57698 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25699 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34700 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19701 'use_glib%': '<(use_glib)',
[email protected]c335f4802013-04-06 04:51:21702 'use_messagepump_linux%': '<(use_messagepump_linux)',
[email protected]79e2336c2011-05-12 18:18:34703 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
704 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21705 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11706 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44707 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05708 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24709 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06710 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35711 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20712 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25713 'image_loader_extension%': '<(image_loader_extension)',
[email protected]b2f030c2009-09-24 20:36:21714 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54715 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01716 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36717 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43718 'armv7%': '<(armv7)',
719 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23720 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43721 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52722 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43723 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17724 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18725 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40726 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48727 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16728 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25729 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56730 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22731 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57732 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46733 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37734 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06735 'asan%': '<(asan)',
[email protected]a10ddd2d2013-02-26 20:06:59736 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12737 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16738 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25739 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44740 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46741 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34742 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34743 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54744 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53745 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38746 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22747 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]4ffe78a2012-10-04 20:55:15748 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00749 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59750 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00751 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39752 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50753 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33754 'test_isolation_mode%': '<(test_isolation_mode)',
755 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47756 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10757 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02758 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40759 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31760 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32761 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11762 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02763 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06764 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12765 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44766 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12767 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36768 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46769 'gyp_managed_install%': 0,
[email protected]55d92492013-01-31 05:03:39770 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16771 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15772 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07773 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16774 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39775 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
776 'google_api_key%': '<(google_api_key)',
777 'google_default_client_id%': '<(google_default_client_id)',
778 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31779 'enable_managed_users%': '<(enable_managed_users)',
[email protected]199def22013-02-21 17:52:29780 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
781 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]01971642012-03-07 14:39:56782
[email protected]b32da81e2013-02-20 10:35:01783 # Use system ffmpeg instead of bundled one.
784 'use_system_ffmpeg%': 0,
785
[email protected]46aa05cc42013-01-15 17:34:31786 # Use system mesa instead of bundled one.
787 'use_system_mesa%': 0,
788
[email protected]c486e4e2013-01-08 16:49:07789 # Use system nspr instead of the bundled one.
790 'use_system_nspr%': 0,
791
[email protected]2f325672012-10-31 23:29:37792 # Use system protobuf instead of bundled one.
793 'use_system_protobuf%': 0,
794
[email protected]371e1092011-10-12 20:37:36795 # Use system yasm instead of bundled one.
796 'use_system_yasm%': 0,
797
[email protected]cd00bd862012-02-29 00:40:36798 # Default to enabled PIE; this is important for ASLR but we may need to be
799 # able to turn it off for various reasons.
800 'linux_disable_pie%': 0,
801
[email protected]caa95c82009-11-23 22:39:32802 # The release channel that this build targets. This is used to restrict
803 # channel-specific build options, like which installer packages to create.
804 # The default is 'all', which does no channel-specific filtering.
805 'channel%': 'all',
806
[email protected]b3fb8092009-03-12 19:09:24807 # Override chromium_mac_pch and set it to 0 to suppress the use of
808 # precompiled headers on the Mac. Prefix header injection may still be
809 # used, but prefix headers will not be precompiled. This is useful when
810 # using distcc to distribute a build to compile slaves that don't
811 # share the same compiler executable as the system driving the compilation,
812 # because precompiled headers rely on pointers into a specific compiler
813 # executable's image. Setting this to 0 is needed to use an experimental
814 # Linux-Mac cross compiler distcc farm.
815 'chromium_mac_pch%': 1,
816
[email protected]27b687ec42012-03-26 22:22:15817 # The default value for mac_strip in target_defaults. This cannot be
818 # set there, per the comment about variable% in a target_defaults.
819 'mac_strip_release%': 1,
820
[email protected]f5ecbba12009-04-03 04:35:18821 # Set to 1 to enable code coverage. In addition to build changes
822 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
823 # project file called "coverage".
824 # Currently ignored on Windows.
825 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49826
[email protected]9619e65d2012-05-23 19:06:52827 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
828 # This is useful for parallel compilation tools which can't support /Zi.
829 # Only used on Windows.
830 'win_z7%' : 0,
831
[email protected]7477ea6f2009-12-22 23:28:15832 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47833 # environment variable, the libcmt shim it uses sometimes gets in
834 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
835 # 'win_use_allocator_shim': 0,
836 # 'win_release_RuntimeLibrary': 2
837 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52838 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11839
[email protected]95ff8082009-11-13 22:21:01840 # Whether usage of OpenMAX is enabled.
841 'enable_openmax%': 0,
842
[email protected]d01120e62010-05-10 17:04:48843 # Whether proprietary audio/video codecs are assumed to be included with
844 # this build (only meaningful if branding!=Chrome).
845 'proprietary_codecs%': 0,
846
[email protected]e5b2eaa2009-04-14 01:39:12847 # TODO(bradnelson): eliminate this when possible.
848 # To allow local gyp files to prevent release.vsprops from being included.
849 # Yes(1) means include release.vsprops.
850 # Once all vsprops settings are migrated into gyp, this can go away.
851 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23852
[email protected]cbd5fd52009-08-26 00:14:27853 # TODO(bradnelson): eliminate this when possible.
854 # To allow local gyp files to override additional linker options for msvs.
855 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19856 'msvs_use_common_linker_extras%': 1,
857
[email protected]1ffb6502009-06-02 07:46:24858 # TODO(sgk): eliminate this if possible.
859 # It would be nicer to support this via a setting in 'target_defaults'
860 # in chrome/app/locales/locales.gypi overriding the setting in the
861 # 'Debug' configuration in the 'target_defaults' dict below,
862 # but that doesn't work as we'd like.
863 'msvs_debug_link_incremental%': '2',
864
[email protected]1f790ef2011-01-11 20:45:36865 # Needed for some of the largest modules.
866 'msvs_debug_link_nonincremental%': '1',
867
[email protected]6f390be2012-08-16 18:57:10868 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06869 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26870 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06871
[email protected]c54b41cb2012-08-24 20:58:24872 # The default settings for third party code for treating
873 # warnings-as-errors. Ideally, this would not be required, however there
874 # is some third party code that takes a long time to fix/roll. So, this
875 # flag allows us to have warnings as errors in general to prevent
876 # regressions in most modules, while working on the bits that are
877 # remaining.
878 'win_third_party_warn_as_error%': 'true',
879
[email protected]573136142009-07-15 22:48:37880 # This is the location of the sandbox binary. Chrome looks for this before
881 # running the zygote process. If found, and SUID, it will be used to
882 # sandbox the zygote process and, thus, all renderer processes.
883 'linux_sandbox_path%': '',
884
[email protected]ad6d2c42009-09-15 20:13:38885 # Set this to true to enable SELinux support.
886 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57887
[email protected]3bb37e62012-04-19 03:40:08888 # Clang stuff.
889 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24890 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15891
[email protected]5e781232011-01-28 02:57:59892 # These two variables can be set in GYP_DEFINES while running
893 # |gclient runhooks| to let clang run a plugin in every compilation.
894 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
895 # Example:
[email protected]93120fe2011-02-03 20:46:42896 # 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:59897
898 'clang_load%': '',
899 'clang_add_plugin%': '',
900
[email protected]da1c8d692011-09-20 20:35:01901 # The default type of gtest.
902 'gtest_target_type%': 'executable',
903
[email protected]7664ab32011-02-01 23:35:25904 # Enable sampling based profiler.
905 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
906 'profiling%': '0',
907
[email protected]93b373502011-08-16 19:06:22908 # Enable strict glibc debug mode.
909 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10910 # Compile in Breakpad support by default so that it can be tested,
911 # even if it not enabled by default at runtime.
912 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01913 # And if we want to dump symbols for Breakpad-enabled builds.
914 'linux_dump_symbols%': 0,
915 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03916 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49917 # Strip the test binaries needed for Linux reliability tests.
918 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03919
[email protected]46ce5b562010-06-16 18:39:53920 # Enable TCMalloc.
921 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24922
[email protected]d8b60602010-03-26 09:41:22923 # Disable TCMalloc's heapchecker.
924 'linux_use_heapchecker%': 0,
925
[email protected]64e2d4a42010-08-27 10:13:21926 # Disable shadow stack keeping used by heapcheck to unwind the stacks
927 # better.
928 'linux_keep_shadow_stacks%': 0,
929
[email protected]556c5d72010-06-10 05:45:01930 # Set to 1 to link against libgnome-keyring instead of using dlopen().
931 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35932 # Set to 1 to link against gsettings APIs instead of using dlopen().
933 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01934
[email protected]77c1b29392009-12-04 06:21:29935 # Set Thumb compilation flags.
936 'arm_thumb%': 0,
937
[email protected]53e0f642010-03-05 01:41:56938 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
939 # arm_neon==0).
940 'arm_fpu%': 'vfpv3',
941
[email protected]5252af72012-05-04 19:26:40942 # Set ARM float abi compilation flag.
943 'arm_float_abi%': 'softfp',
944
[email protected]a63e8d22013-03-23 16:17:08945 # Enable use of OpenMAX DL FFT routines.
946 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:34947
[email protected]9821d0d2010-04-16 22:40:37948 # Enable new NPDevice API.
949 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50950
951 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14952 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50953
[email protected]6f51b27e2010-06-22 20:43:53954 # Enable a variable used elsewhere throughout the GYP files to determine
955 # whether to compile in the sources for the GPU plugin / process.
956 'enable_gpu%': 1,
957
[email protected]e72e55b2011-01-06 22:19:30958 # .gyp files or targets should set chromium_code to 1 if they build
959 # Chromium-specific code, as opposed to external code. This variable is
960 # used to control such things as the set of warnings to enable, and
961 # whether warnings are treated as errors.
962 'chromium_code%': 0,
963
[email protected]8d726a42012-02-09 03:49:00964 'release_valgrind_build%': 0,
965
[email protected]b1eb341c2011-11-09 18:46:07966 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
967 'enable_wexit_time_destructors%': 0,
968
[email protected]e72e55b2011-01-06 22:19:30969 # Set to 1 to compile with the built in pdf viewer.
970 'internal_pdf%': 0,
971
[email protected]9e1149d72012-07-24 01:27:17972 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
973 'internal_gles2_conform_tests%': 0,
974
[email protected]e72e55b2011-01-06 22:19:30975 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
976 # so Cocoa is happy (http://crbug.com/20441).
977 'locales': [
978 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
979 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
980 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:41981 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30982 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
983 'vi', 'zh-CN', 'zh-TW',
984 ],
985
[email protected]cc0322d2011-07-24 09:29:19986 # Pseudo locales are special locales which are used for testing and
987 # debugging. They don't get copied to the final app. For more info,
988 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
989 'pseudo_locales': [
990 'fake-bidi',
991 ],
992
[email protected]bb6aba32011-01-07 19:04:43993 'grit_defines': [],
994
[email protected]bd3bd442011-03-28 07:58:51995 # If debug_devtools is set to 1, JavaScript files for DevTools are
996 # stored as is and loaded from disk. Otherwise, a concatenated file
997 # is stored in resources.pak. It is still possible to load JS files
998 # from disk by passing --debug-devtools cmdline switch.
999 'debug_devtools%': 0,
1000
[email protected]464750f2011-10-24 23:16:181001 # The Java Bridge is not compiled in by default.
1002 'java_bridge%': 0,
1003
[email protected]1e013672012-06-29 22:12:201004 # Code signing for iOS binaries. The bots need to be able to disable this.
1005 'chromium_ios_signing%': 1,
1006
[email protected]33e1c372011-12-14 16:32:071007 # This flag is only used when disable_nacl==0 and disables all those
1008 # subcomponents which would require the installation of a native_client
1009 # untrusted toolchain.
1010 'disable_nacl_untrusted%': 0,
1011
[email protected]407dfa632011-12-23 11:59:351012 # Disable Dart by default.
1013 'enable_dart%': 0,
1014
[email protected]ff10b132012-02-29 22:53:301015 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1016 'msbuild_toolset%': '',
1017
[email protected]836285f22012-04-03 16:19:261018 # Native Client is enabled by default.
1019 'disable_nacl%': 0,
1020
[email protected]1e40ba002013-03-07 22:07:331021 # Portable Native Client is enabled by default.
1022 'disable_pnacl%': 0,
1023
[email protected]fa9d4e262012-08-21 04:39:001024 # Whether to build full debug version for Debug configuration on Android.
1025 # Compared to full debug version, the default Debug configuration on Android
1026 # has no full v8 debug, has size optimization and linker gc section, so that
1027 # we can build a debug version with acceptable size and performance.
1028 'android_full_debug%': 0,
1029
[email protected]65885272012-10-05 23:55:501030 # Sets the default version name and code for Android app, by default we
1031 # do a developer build.
1032 'android_app_version_name%': 'Developer Build',
1033 'android_app_version_code%': 0,
1034
[email protected]d999c3cb2013-03-12 10:22:361035 # Temporarily set android_build_type until all uses of it have been renamed.
1036 # http://crbug.com/184431
1037 'android_build_type%': '<(android_webview_build)',
1038
[email protected]740ebed2012-06-27 19:14:061039 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121040 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1041
[email protected]1f8d9402012-07-06 22:47:561042 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1043 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051044
[email protected]fd6d8822012-12-08 06:56:111045 # Whether we are using the rlz library or not. Platforms like Android send
1046 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221047 'enable_rlz%': 0,
1048
[email protected]912c55c2009-07-31 23:33:551049 'conditions': [
[email protected]1f8d9402012-07-06 22:47:561050 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1051 'windows_sdk_path%': '<(windows_sdk_default_path)',
1052 }, {
1053 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1054 }],
1055 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1056 'directx_sdk_path%': '<(directx_sdk_default_path)',
1057 }, {
1058 'directx_sdk_path%': '$(DXSDK_DIR)',
1059 }],
[email protected]54184ce72012-10-18 07:11:261060 ['OS=="win"', {
1061 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071062 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1063 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1064 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261065 }],
[email protected]2b113652012-09-17 17:01:391066 # If use_official_google_api_keys is already set (to 0 or 1), we
1067 # do none of the implicit checking. If it is set to 1 and the
1068 # internal keys file is missing, the build will fail at compile
1069 # time. If it is set to 0 and keys are not provided by other
1070 # means, a warning will be printed at compile time.
1071 ['use_official_google_api_keys==2', {
1072 'use_official_google_api_keys%':
1073 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1074 }],
[email protected]1e013672012-06-29 22:12:201075 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231076 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431077 '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:271078 'conditions': [
[email protected]07c27ab02012-07-17 17:00:201079 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1080 # that it takes effect here.
[email protected]a10ddd2d2013-02-26 20:06:591081 ['clang==0 and asan==0 and tsan==0 and msan==0', {
[email protected]07c27ab02012-07-17 17:00:201082 # This will set gcc_version to XY if you are running gcc X.Y.*.
1083 # This is used to tweak build flags for gcc 4.5.
1084 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1085 }, {
1086 'gcc_version%': 0,
1087 }],
[email protected]eb5f1672013-01-31 07:56:461088 ['target_arch=="mipsel"', {
1089 'werror%': '',
1090 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461091 'nacl_untrusted_build%': 0,
1092 'linux_use_tcmalloc%': 0,
1093 'linux_breakpad%': 0,
1094 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281095 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461096 }],
[email protected]4c9cc6c2009-10-01 18:54:571097 # All Chrome builds have breakpad symbols, but only process the
1098 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081099 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571100 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571101 }],
[email protected]cbd5fd52009-08-26 00:14:271102 ],
[email protected]1e013672012-06-29 22:12:201103 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481104 ['OS=="ios"', {
1105 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191106 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151107 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071108 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351109 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151110 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131111 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471112 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411113 'locales==': [
1114 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
1115 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nl', 'pl',
1116 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
1117 'zh-CN', 'zh-TW',
1118 ],
[email protected]57871bc2012-08-20 16:28:121119
1120 # The Mac SDK is set for iOS builds and passed through to Mac
1121 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1122 # overridden from the command line the same way it is for a Mac build.
1123 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291124
1125 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1126 # what is required, but the value is left blank so when it is set in
1127 # the project files it will be the "current" iOS SDK. Forcing 5.0
1128 # even though it is "current" causes Xcode to spit out a warning for
1129 # every single project file for not using the "current" SDK.
1130 'ios_sdk%': '',
1131 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181132 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321133
1134 'conditions': [
1135 # ios_product_name is set to the name of the .app bundle as it should
1136 # appear on disk.
1137 ['branding=="Chrome"', {
1138 'ios_product_name%': 'Chrome',
1139 }, { # else: branding!="Chrome"
1140 'ios_product_name%': 'Chromium',
1141 }],
1142 ['branding=="Chrome" and buildtype=="Official"', {
1143 'ios_breakpad%': 1,
1144 }, { # else: branding!="Chrome" or buildtype!="Official"
1145 'ios_breakpad%': 0,
1146 }],
1147 ],
1148 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011149 ['OS=="android"', {
1150 # Location of Android NDK.
1151 'variables': {
1152 'variables': {
[email protected]5061d152013-01-16 17:45:571153 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1154 # they're passed to ant which uses a different relative path from
1155 # gyp.
1156 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1157 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1158 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041159 # Android API-level of the SDK used for compilation.
1160 'android_sdk_version%': '17',
[email protected]da1c8d692011-09-20 20:35:011161 },
[email protected]5061d152013-01-16 17:45:571162 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011163 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571164 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041165 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221166 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
1167 'android_libstdcpp_root': '<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6',
[email protected]5061d152013-01-16 17:45:571168
[email protected]e20a8ad2013-03-18 15:05:041169 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571170
[email protected]5cfec2b2013-03-05 20:54:331171 # Android API level 14 is ICS (Android 4.0) which is the minimum
1172 # platform requirement for Chrome on Android, we use it for native
1173 # code compilation.
[email protected]5061d152013-01-16 17:45:571174 'conditions': [
1175 ['target_arch == "ia32"', {
1176 'android_app_abi%': 'x86',
1177 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331178 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571179 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1180 }],
1181 ['target_arch=="arm"', {
1182 'conditions': [
1183 ['armv7==0', {
1184 'android_app_abi%': 'armeabi',
1185 }, {
1186 'android_app_abi%': 'armeabi-v7a',
1187 }],
1188 ],
1189 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331190 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571191 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1192 }],
1193 ],
[email protected]da1c8d692011-09-20 20:35:011194 },
[email protected]5061d152013-01-16 17:45:571195 # Copy conditionally-set variables out one scope.
1196 'android_app_abi%': '<(android_app_abi)',
1197 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011198 'android_ndk_root%': '<(android_ndk_root)',
1199 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571200 'android_sdk_root%': '<(android_sdk_root)',
1201 'android_sdk_version%': '<(android_sdk_version)',
1202 'android_toolchain%': '<(android_toolchain)',
1203
[email protected]da1c8d692011-09-20 20:35:011204 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1205 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571206 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
[email protected]e20a8ad2013-03-18 15:05:041207 'android_sdk%': '<(android_sdk)',
1208 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011209
[email protected]225ec632013-04-03 18:20:221210 'android_stlport_root': '<(android_stlport_root)',
1211 'android_libstdcpp_root': '<(android_libstdcpp_root)',
1212 'android_stlport_include': '<(android_stlport_root)/stlport',
1213 'android_libstdcpp_include': '<(android_libstdcpp_root)/include',
1214 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
1215 'android_libstdcpp_libs_dir': '<(android_libstdcpp_root)/libs/<(android_app_abi)',
1216
[email protected]c0f76312012-08-16 13:52:041217 # Location of the "strip" binary, used by both gyp and scripts.
1218 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1219
[email protected]225ec632013-04-03 18:20:221220 # Location of the "readelf" binary.
1221 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1222
[email protected]ef7ed7a2012-05-29 23:19:131223 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1224 # to specify the output directory for Ant in the Android build.
1225 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1226
[email protected]d8621ce2013-02-22 00:37:331227 # Determines whether we should optimize JNI generation at the cost of
1228 # breaking assumptions in the build system that when inputs have changed
1229 # the outputs should always change as well. This is meant purely for
1230 # developer builds, to avoid spurious re-linking of native files.
1231 'optimize_jni_generation%': 0,
1232
[email protected]da1c8d692011-09-20 20:35:011233 # Always uses openssl.
1234 'use_openssl%': 1,
1235
1236 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021237 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071238 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011239 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221240 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021241 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181242 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581243 'build_ffmpegsumo%': 0,
1244 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021245
[email protected]ad17e342012-07-17 20:45:481246 # Disable Native Client.
1247 'disable_nacl%': 1,
1248
[email protected]58242012012-04-12 16:14:311249 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001250 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111251
[email protected]cdb756ef2012-04-05 18:34:531252 # Sessions are store separately in the Java side.
1253 'enable_session_service%': 0,
1254
[email protected]5fd2e842012-03-01 00:29:111255 # Set to 1 once we have a notification system for Android.
1256 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571257 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011258
[email protected]ad17e342012-07-17 20:45:481259 'p2p_apis%' : 0,
1260
[email protected]48de0fc2012-08-02 11:03:581261 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011262
1263 # Uses system APIs for decoding audio and video.
1264 'use_libffmpeg%': '0',
1265
[email protected]f1dc1e52012-12-12 21:39:001266 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011267 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011268
[email protected]adb44342012-07-23 13:36:121269 # When building as part of the Android system, use system libraries
1270 # where possible to reduce ROM size.
1271 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361272 'use_system_sqlite%': 0, # '<(android_webview_build)',
1273 'use_system_expat%': '<(android_webview_build)',
1274 'use_system_icu%': '<(android_webview_build)',
1275 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121276
[email protected]0850e842013-01-19 03:44:311277 'enable_managed_users%': 0,
1278
[email protected]da1c8d692011-09-20 20:35:011279 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361280 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011281 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071282 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291283 'variables': {
1284 # Mac OS X SDK and deployment target support. The SDK identifies
1285 # the version of the system headers that will be used, and
1286 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1287 # macro. "Maximum allowed" refers to the operating system version
1288 # whose APIs are available in the headers. The deployment target
1289 # identifies the minimum system version that the built products are
1290 # expected to function on. It corresponds to the
1291 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1292 # macros are available, #include <AvailabilityMacros.h>. Additional
1293 # documentation on these macros is available at
1294 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1295 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1296 # deployment target to 10.6. Other projects, such as O3D, may
1297 # override these defaults.
1298
1299 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1300 # about that is at least the specified version. In official builds,
1301 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1302 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1303 # path to the SDK; when set to a non-empty string, SDK detection
1304 # based on mac_sdk_min will be bypassed entirely.
1305 'mac_sdk_min%': '10.6',
1306 'mac_sdk_path%': '',
1307
1308 'mac_deployment_target%': '10.6',
1309 },
1310
1311 'mac_sdk_min': '<(mac_sdk_min)',
1312 'mac_sdk_path': '<(mac_sdk_path)',
1313 'mac_deployment_target': '<(mac_deployment_target)',
1314
[email protected]e1ece302011-09-15 03:58:111315 # Enable clang on mac by default!
1316 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291317
[email protected]794fb4782011-12-14 19:10:561318 # Compile in Breakpad support by default so that it can be
1319 # tested, even if it is not enabled by default at runtime.
1320 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071321 'conditions': [
1322 # mac_product_name is set to the name of the .app bundle as it should
1323 # appear on disk. This duplicates data from
1324 # chrome/app/theme/chromium/BRANDING and
1325 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1326 # these names into the build system.
1327 ['branding=="Chrome"', {
1328 'mac_product_name%': 'Google Chrome',
1329 }, { # else: branding!="Chrome"
1330 'mac_product_name%': 'Chromium',
1331 }],
1332
[email protected]e14a9f92009-08-05 19:26:071333 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291334 '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:561335 # Enable uploading crash dumps.
1336 'mac_breakpad_uploads%': 1,
1337 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071338 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561339 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071340 'mac_keystone%': 1,
1341 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291342 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561343 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071344 'mac_breakpad%': 0,
1345 'mac_keystone%': 0,
1346 }],
1347 ],
1348 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551349 ['OS=="win"', {
1350 'conditions': [
[email protected]8974e042010-06-21 18:06:521351 ['component=="shared_library"', {
1352 'win_use_allocator_shim%': 0,
1353 }],
[email protected]fa0f16e2012-08-20 22:30:041354 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101355 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041356 # Not enabled for component=static_library because some targets
1357 # are too large and the toolchain fails due to the size of the
1358 # .obj files.
[email protected]6f390be2012-08-16 18:57:101359 'incremental_chrome_dll%': 1,
1360 }],
[email protected]10bb8c92009-08-07 21:16:031361 # Don't do incremental linking for large modules on 32-bit.
1362 ['MSVS_OS_BITS==32', {
1363 'msvs_large_module_debug_link_mode%': '1', # No
1364 },{
1365 'msvs_large_module_debug_link_mode%': '2', # Yes
1366 }],
[email protected]78764182013-01-23 20:32:511367 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501368 'msvs_express%': 1,
1369 'secure_atl%': 0,
1370 },{
1371 'msvs_express%': 0,
1372 'secure_atl%': 1,
1373 }],
[email protected]912c55c2009-07-31 23:33:551374 ],
[email protected]ef4fa4072009-12-04 22:46:501375 'nacl_win64_defines': [
1376 # This flag is used to minimize dependencies when building
1377 # Native Client loader for 64-bit Windows.
1378 'NACL_WIN64',
1379 ],
[email protected]912c55c2009-07-31 23:33:551380 }],
[email protected]bb6aba32011-01-07 19:04:431381
[email protected]a35aa362012-10-30 13:55:071382 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f492010-10-25 20:05:441383 'use_cups%': 1,
1384 }, {
1385 'use_cups%': 0,
1386 }],
[email protected]bb6aba32011-01-07 19:04:431387
[email protected]eb5f1672013-01-31 07:56:461388 # Native Client glibc toolchain is enabled
1389 # by default except on arm and mips.
1390 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321391 'disable_glibc%': 1,
1392 }, {
1393 'disable_glibc%': 0,
1394 }],
1395
[email protected]712c3da2012-09-24 21:31:241396 # Disable SSE2 when building for ARM or MIPS.
1397 ['target_arch=="arm" or target_arch=="mipsel"', {
1398 'disable_sse2%': 1,
1399 }, {
1400 'disable_sse2%': '<(disable_sse2)',
1401 }],
1402
[email protected]19fe8f0b2010-12-07 07:27:271403 # Set the relative path from this file to the GYP file of the JPEG
1404 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281405 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1406 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271407 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281408 }, {
1409 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1410 }],
[email protected]bb6aba32011-01-07 19:04:431411
[email protected]abcc9ac2011-05-16 20:04:351412 # Options controlling the use of GConf (the classic GNOME configuration
1413 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311414 ['chromeos==1', {
1415 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351416 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311417 }, {
1418 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351419 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311420 }],
1421
[email protected]4de39f82011-03-28 12:01:291422 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291423 ['branding=="Chrome"', {
1424 # TODO(mmoss) The .grd files look for _google_chrome, but for
1425 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291426 'grit_defines': ['-D', '_google_chrome',
1427 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291428 }, {
[email protected]4de39f82011-03-28 12:01:291429 'grit_defines': ['-D', '_chromium',
1430 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291431 }],
[email protected]bb6aba32011-01-07 19:04:431432 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131433 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431434 }],
1435 ['toolkit_views==1', {
1436 'grit_defines': ['-D', 'toolkit_views'],
1437 }],
[email protected]8dd791d2011-09-16 16:37:301438 ['use_aura==1', {
1439 'grit_defines': ['-D', 'use_aura'],
1440 }],
[email protected]ed329be2012-01-03 22:02:161441 ['use_ash==1', {
1442 'grit_defines': ['-D', 'use_ash'],
1443 }],
[email protected]c329adf82011-10-05 14:34:571444 ['use_nss==1', {
1445 'grit_defines': ['-D', 'use_nss'],
1446 }],
[email protected]e47c32032011-03-01 19:26:201447 ['file_manager_extension==1', {
1448 'grit_defines': ['-D', 'file_manager_extension'],
1449 }],
[email protected]77a848262013-02-22 11:17:251450 ['image_loader_extension==1', {
1451 'grit_defines': ['-D', 'image_loader_extension'],
1452 }],
[email protected]9a425422011-01-11 00:53:181453 ['remoting==1', {
1454 'grit_defines': ['-D', 'remoting'],
1455 }],
[email protected]bb6aba32011-01-07 19:04:431456 ['use_titlecase_in_grd_files==1', {
1457 'grit_defines': ['-D', 'use_titlecase'],
1458 }],
[email protected]00dc155832011-02-01 18:51:191459 ['use_third_party_translations==1', {
1460 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121461 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161462 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1463 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121464 ],
[email protected]00dc155832011-02-01 18:51:191465 }],
[email protected]da1c8d692011-09-20 20:35:011466 ['OS=="android"', {
[email protected]7dc76812013-03-26 07:31:571467 'grit_defines': ['-D', 'android',
1468 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]da1c8d692011-09-20 20:35:011469 }],
[email protected]d39e3862012-06-26 22:38:231470 ['OS=="mac"', {
1471 'grit_defines': ['-D', 'scale_factors=2x'],
1472 }],
[email protected]ad563d02012-10-03 10:37:031473 ['OS == "ios"', {
1474 'grit_defines': [
1475 # define for iOS specific resources.
1476 '-D', 'ios',
1477 # iOS uses a whitelist to filter resources.
1478 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1479 ],
1480 }],
[email protected]6a3cd37e2012-04-17 17:13:341481 ['enable_extensions==1', {
1482 'grit_defines': ['-D', 'enable_extensions'],
1483 }],
[email protected]658677f2012-06-09 06:04:021484 ['enable_printing==1', {
1485 'grit_defines': ['-D', 'enable_printing'],
1486 }],
[email protected]c2aad542012-07-31 20:40:331487 ['enable_themes==1', {
1488 'grit_defines': ['-D', 'enable_themes'],
1489 }],
[email protected]4ffe78a2012-10-04 20:55:151490 ['use_oem_wallpaper==1', {
1491 'grit_defines': ['-D', 'use_oem_wallpaper'],
1492 }],
[email protected]ef1dd5062012-12-17 06:41:331493 ['enable_app_list==1', {
1494 'grit_defines': ['-D', 'enable_app_list'],
1495 }],
[email protected]dc4e8b82012-11-15 03:58:161496 ['enable_settings_app==1', {
1497 'grit_defines': ['-D', 'enable_settings_app'],
1498 }],
[email protected]5411d8202013-01-30 01:32:151499 ['enable_google_now==1', {
1500 'grit_defines': ['-D', 'enable_google_now'],
1501 }],
[email protected]3bb37e62012-04-19 03:40:081502 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201503 'clang_chrome_plugins_flags': [
1504 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311505 ],
[email protected]5d451ad2011-02-11 16:43:461506 }],
[email protected]cfa2e1102011-04-27 22:30:231507
[email protected]696de4e62012-11-21 21:18:541508 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061509 'clang%': 1,
1510 }],
[email protected]f5d8c222012-08-29 17:47:021511 ['asan==1 and OS=="mac"', {
1512 # See http://crbug.com/145503.
1513 'component': "static_library",
[email protected]93064ee2013-02-11 19:25:091514 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1515 # runtime is fully adopted. See http://crbug.com/170629.
1516 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021517 }],
[email protected]c9a829272012-07-04 07:51:121518 ['tsan==1', {
1519 'clang%': 1,
1520 }],
[email protected]a10ddd2d2013-02-26 20:06:591521 ['msan==1', {
1522 'clang%': 1,
1523 }],
[email protected]c9a829272012-07-04 07:51:121524
[email protected]7ce58b22012-09-26 05:17:251525 ['OS=="linux" and clang_type_profiler==1', {
1526 'clang%': 1,
1527 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321528 'conditions': [
1529 ['host_arch=="x64"', {
1530 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1531 }],
1532 ['host_arch=="ia32"', {
1533 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1534 # Clang in this directory at your own risk if needed for some
1535 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1536 # usage). Any failure by this compiler should not close the tree.
1537 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1538 }],
1539 ],
[email protected]7ce58b22012-09-26 05:17:251540 }],
1541
[email protected]a9318c72012-03-01 01:29:471542 # On valgrind bots, override the optimizer settings so we don't inline too
1543 # much and make the stacks harder to figure out.
1544 #
1545 # TODO(rnk): Kill off variables that no one else uses and just implement
1546 # them under a build_for_tool== condition.
1547 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1548 # gcc flags
1549 'mac_debug_optimization': '1',
1550 'mac_release_optimization': '1',
1551 'release_optimize': '1',
1552 'no_gc_sections': 1,
1553 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1554 '-fno-builtin -fno-optimize-sibling-calls',
1555 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1556 '-fno-builtin -fno-optimize-sibling-calls',
1557
1558 # MSVS flags for TSan on Pin and Windows.
1559 'win_debug_RuntimeChecks': '0',
1560 'win_debug_disable_iterator_debugging': '1',
1561 'win_debug_Optimization': '1',
1562 'win_debug_InlineFunctionExpansion': '0',
1563 'win_release_InlineFunctionExpansion': '0',
1564 'win_release_OmitFramePointers': '0',
1565
1566 'linux_use_tcmalloc': 1,
1567 'release_valgrind_build': 1,
1568 'werror': '',
1569 'component': 'static_library',
1570 'use_system_zlib': 0,
1571 }],
1572
1573 # Build tweaks for DrMemory.
1574 # TODO(rnk): Combine with tsan config to share the builder.
1575 # http://crbug.com/108155
1576 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471577 # These runtime checks force initialization of stack vars which blocks
1578 # DrMemory's uninit detection.
1579 'win_debug_RuntimeChecks': '0',
1580 # Iterator debugging is slow.
1581 'win_debug_disable_iterator_debugging': '1',
1582 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161583 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1584 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1585 # compiler bug, so we use /Ob1 instead.
1586 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471587 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501588 # Ditto for debug, to support bumping win_debug_Optimization.
1589 'win_debug_InlineFunctionExpansion': 0,
1590 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471591 # Keep the code under #ifndef NVALGRIND.
1592 'release_valgrind_build': 1,
1593 }],
[email protected]b6a5ac92012-10-29 18:17:221594
[email protected]f40a6912012-12-10 21:52:411595 # Enable RLZ on Win, Mac and ChromeOS.
1596 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221597 'enable_rlz%': 1,
1598 }],
[email protected]912c55c2009-07-31 23:33:551599 ],
[email protected]a9318c72012-03-01 01:29:471600
[email protected]35958422011-09-28 02:03:591601 # List of default apps to install in new profiles. The first list contains
1602 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061603 # contains the destination location for each of the files. When a crx
1604 # is added or removed from the list, the chrome/browser/resources/
1605 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591606 'default_apps_list': [
1607 'browser/resources/default_apps/external_extensions.json',
1608 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061609 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591610 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001611 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231612 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591613 ],
1614 'default_apps_list_linux_dest': [
1615 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1616 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061617 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591618 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001619 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231620 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591621 ],
[email protected]2f80c312009-02-25 21:26:551622 },
1623 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261624 'variables': {
[email protected]a6e22132010-02-10 20:43:181625 # The condition that operates on chromium_code is in a target_conditions
1626 # section, and will not have access to the default fallback value of
1627 # chromium_code at the top of this file, or to the chromium_code
1628 # variable placed at the root variables scope of .gyp files, because
1629 # those variables are not set at target scope. As a workaround,
1630 # if chromium_code is not set at target scope, define it in target scope
1631 # to contain whatever value it has during early variable expansion.
1632 # That's enough to make it available during target conditional
1633 # processing.
1634 'chromium_code%': '<(chromium_code)',
1635
[email protected]7e0d664a2009-12-03 21:07:471636 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1637 'win_release_Optimization%': '2', # 2 = /Os
1638 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331639
1640 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241641 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111642 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241643 # Tri-state: blank is default, 1 on, 0 off
1644 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331645
[email protected]6b0507b2010-05-07 07:41:211646 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1647 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331648
[email protected]6b0507b2010-05-07 07:41:211649 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151650 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1651 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331652
[email protected]fac10d12010-11-08 16:00:311653 # VS inserts quite a lot of extra checks to algorithms like
1654 # std::partial_sort in Debug build which make them O(N^2)
1655 # instead of O(N*logN). This is particularly slow under memory
1656 # tools like ThreadSanitizer so we want it to be disablable.
1657 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1658 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471659
[email protected]ffd984b12009-09-11 19:37:001660 'release_extra_cflags%': '',
1661 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001662
1663 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521664
[email protected]ef5c5f1b2011-12-17 02:16:241665 # the non-qualified versions are widely assumed to be *nix-only
1666 'win_release_extra_cflags%': '',
1667 'win_debug_extra_cflags%': '',
1668
[email protected]b1eb341c2011-11-09 18:46:071669 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1670 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1671
[email protected]ef3326702011-10-06 18:06:441672 # Only used by Windows build for now. Can be used to build into a
1673 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1674 # output files in src/build/VS2010_{Debug,Release}.
1675 'build_dir_prefix%': '',
1676
[email protected]9ac2db692012-06-08 01:01:571677 # Targets are by default not nacl untrusted code.
1678 'nacl_untrusted_build%': 0,
1679
[email protected]9c55d9d2012-11-15 23:28:441680 'pnacl_compile_flags': [
1681 # pnacl uses the clang compiler so we need to supress all the
1682 # same warnings as we do for clang.
1683 # TODO(sbc): Remove these if/when they are removed from the clang
1684 # build.
1685 '-Wno-unused-function',
1686 '-Wno-char-subscripts',
1687 '-Wno-c++11-extensions',
1688 '-Wno-unnamed-type-template-args',
1689 ],
1690
[email protected]8974e042010-06-21 18:06:521691 'conditions': [
1692 ['OS=="win" and component=="shared_library"', {
1693 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161694 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1695 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521696 }, {
1697 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1698 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1699 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1700 }],
[email protected]1e013672012-06-29 22:12:201701 ['OS=="ios"', {
1702 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1703 'mac_release_optimization%': 's', # Use -Os unless overridden
1704 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1705 }, {
1706 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1707 'mac_release_optimization%': '3', # Use -O3 unless overridden
1708 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1709 }],
[email protected]8974e042010-06-21 18:06:521710 ],
[email protected]1c966092009-08-20 21:19:261711 },
[email protected]32aa8cc2009-03-04 21:36:391712 'conditions': [
[email protected]d808e212013-03-12 14:06:161713 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311714 'dependencies': [
1715 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1716 ],
1717 }],
[email protected]7ce58b22012-09-26 05:17:251718 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1719 'cflags_cc!': ['-fno-rtti'],
1720 'cflags_cc+': [
1721 '-frtti',
1722 '-gline-tables-only',
1723 '-fintercept-allocation-functions',
1724 ],
1725 'defines': ['TYPE_PROFILING'],
1726 'dependencies': [
1727 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1728 ],
1729 }],
[email protected]b0c45722013-01-23 04:47:321730 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1731 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1732 # See http://crbug.com/162818.
1733 'cflags+': ['-Wno-sentinel'],
1734 }],
[email protected]ff10b132012-02-29 22:53:301735 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1736 'msbuild_toolset': '<(msbuild_toolset)',
1737 }],
[email protected]32aa8cc2009-03-04 21:36:391738 ['branding=="Chrome"', {
1739 'defines': ['GOOGLE_CHROME_BUILD'],
1740 }, { # else: branding!="Chrome"
1741 'defines': ['CHROMIUM_BUILD'],
1742 }],
[email protected]286d9a12012-05-30 16:20:381743 ['OS=="mac" and component=="shared_library"', {
1744 'xcode_settings': {
1745 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1746 'LD_RUNPATH_SEARCH_PATHS': [
1747 # For unbundled binaries.
1748 '@loader_path/.',
1749 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1750 '@loader_path/../../..',
1751 ],
1752 },
1753 }],
[email protected]b6a5ac92012-10-29 18:17:221754 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171755 'defines': ['ENABLE_RLZ'],
1756 }],
[email protected]63e39a282011-07-13 20:41:281757 ['component=="shared_library"', {
1758 'defines': ['COMPONENT_BUILD'],
1759 }],
[email protected]06c756182010-04-27 18:31:311760 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171761 'defines': ['TOOLKIT_VIEWS=1'],
1762 }],
[email protected]1ee7c56c2011-10-19 14:51:331763 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111764 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1765 }],
[email protected]41423092011-08-25 15:39:581766 ['use_aura==1', {
1767 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351768 }],
[email protected]ed329be2012-01-03 22:02:161769 ['use_ash==1', {
1770 'defines': ['USE_ASH=1'],
1771 }],
[email protected]c335f4802013-04-06 04:51:211772 ['use_messagepump_linux==1', {
1773 'defines': ['USE_MESSAGEPUMP_LINUX=1'],
1774 }],
[email protected]cb800562012-11-20 22:36:071775 ['use_default_render_theme==1', {
1776 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1777 }],
[email protected]e190d272012-08-30 17:36:441778 ['use_libjpeg_turbo==1', {
1779 'defines': ['USE_LIBJPEG_TURBO=1'],
1780 }],
[email protected]c329adf82011-10-05 14:34:571781 ['use_nss==1', {
1782 'defines': ['USE_NSS=1'],
1783 }],
[email protected]bd7b6fe2012-03-05 21:02:401784 ['enable_one_click_signin==1', {
1785 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1786 }],
[email protected]a47aa892011-11-22 03:12:311787 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1788 # TODO(erg): We are progressively sealing up use of deprecated features
1789 # in gtk in preparation for an eventual porting to gtk3.
1790 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1791 }],
[email protected]fdc5bed2010-01-09 01:16:571792 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291793 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501794 }],
[email protected]55d92492013-01-31 05:03:391795 ['google_tv==1', {
1796 'defines': ['GOOGLE_TV=1'],
1797 }],
[email protected]f56797b2011-09-25 00:04:351798 ['use_xi2_mt!=0', {
1799 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1800 }],
[email protected]e47c32032011-03-01 19:26:201801 ['file_manager_extension==1', {
1802 'defines': ['FILE_MANAGER_EXTENSION=1'],
1803 }],
[email protected]77a848262013-02-22 11:17:251804 ['image_loader_extension==1', {
1805 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1806 }],
[email protected]7664ab32011-02-01 23:35:251807 ['profiling==1', {
1808 'defines': ['ENABLE_PROFILING=1'],
1809 }],
[email protected]93b373502011-08-16 19:06:221810 ['OS=="linux" and glibcxx_debug==1', {
1811 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591812 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221813 }],
[email protected]542bf24a2010-06-11 23:08:171814 ['remoting==1', {
1815 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001816 }],
[email protected]5b87e782012-02-09 18:19:321817 ['enable_webrtc==1', {
1818 'defines': ['ENABLE_WEBRTC=1'],
1819 }],
[email protected]d01120e62010-05-10 17:04:481820 ['proprietary_codecs==1', {
1821 'defines': ['USE_PROPRIETARY_CODECS'],
1822 }],
[email protected]7ddea9802012-02-22 23:08:051823 ['enable_viewport==1', {
1824 'defines': ['ENABLE_VIEWPORT'],
1825 }],
[email protected]f31e2e52011-07-14 16:01:191826 ['configuration_policy==1', {
1827 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1828 }],
[email protected]9eb100e2011-10-14 05:08:221829 ['input_speech==1', {
1830 'defines': ['ENABLE_INPUT_SPEECH'],
1831 }],
[email protected]7cce3232011-10-28 10:41:571832 ['notifications==1', {
1833 'defines': ['ENABLE_NOTIFICATIONS'],
1834 }],
[email protected]1efbaaa2012-04-24 02:43:241835 ['enable_hidpi==1', {
1836 'defines': ['ENABLE_HIDPI=1'],
1837 }],
[email protected]9c1949e2009-10-02 19:59:541838 ['fastbuild!=0', {
1839 'conditions': [
[email protected]7df38122012-11-05 23:54:431840 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:301841 # Clang creates chubby debug information, which makes linking very
1842 # slow. For now, don't create debug information with clang. See
1843 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:431844 'conditions': [
1845 ['OS=="linux"', {
1846 'variables': {
1847 'debug_extra_cflags': '-g0',
1848 },
1849 }],
1850 # Android builds symbols on release by default, disable them.
1851 ['OS=="android"', {
1852 'variables': {
1853 'debug_extra_cflags': '-g0',
1854 'release_extra_cflags': '-g0',
1855 },
1856 }],
1857 ],
1858 }, { # else clang!=1
1859 'conditions': [
[email protected]c86fd472013-04-02 19:42:301860 ['OS=="win" and fastbuild==2', {
1861 # Completely disable debug information.
1862 'msvs_settings': {
1863 'VCLinkerTool': {
1864 'GenerateDebugInformation': 'false',
1865 },
1866 'VCCLCompilerTool': {
1867 'DebugInformationFormat': '0',
1868 },
1869 },
1870 }],
1871 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431872 'msvs_settings': {
1873 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:311874 # This tells the linker to generate .pdbs, so that
1875 # we can get meaningful stack traces.
1876 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:431877 },
1878 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:311879 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:431880 'DebugInformationFormat': '0',
1881 },
1882 },
1883 }],
1884 ['OS=="mac"', {
1885 'xcode_settings': {
1886 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1887 },
1888 }],
[email protected]c86fd472013-04-02 19:42:301889 ['OS=="linux" and fastbuild==2', {
1890 'variables': {
1891 'debug_extra_cflags': '-g0',
1892 },
1893 }],
1894 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431895 'variables': {
1896 'debug_extra_cflags': '-g1',
1897 },
1898 }],
[email protected]c86fd472013-04-02 19:42:301899 ['OS=="android" and fastbuild==2', {
1900 'variables': {
1901 'debug_extra_cflags': '-g0',
1902 'release_extra_cflags': '-g0',
1903 },
1904 }],
1905 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431906 'variables': {
1907 'debug_extra_cflags': '-g1',
1908 'release_extra_cflags': '-g1',
1909 },
1910 }],
1911 ],
1912 }], # clang!=1
1913 ],
[email protected]9c1949e2009-10-02 19:59:541914 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011915 ['dcheck_always_on!=0', {
1916 'defines': ['DCHECK_ALWAYS_ON=1'],
1917 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381918 ['selinux==1', {
1919 'defines': ['CHROMIUM_SELINUX=1'],
1920 }],
[email protected]7e0d664a2009-12-03 21:07:471921 ['win_use_allocator_shim==0', {
1922 'conditions': [
1923 ['OS=="win"', {
1924 'defines': ['NO_TCMALLOC'],
1925 }],
1926 ],
1927 }],
[email protected]43f28f832010-02-03 02:28:481928 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151929 'defines': [
1930 'ENABLE_GPU=1',
1931 ],
1932 }],
[email protected]b1c2a5542010-10-08 12:44:401933 ['use_openssl==1', {
1934 'defines': [
1935 'USE_OPENSSL=1',
1936 ],
1937 }],
[email protected]ed154592010-04-29 00:18:501938 ['enable_eglimage==1', {
1939 'defines': [
1940 'ENABLE_EGLIMAGE=1',
1941 ],
1942 }],
[email protected]696de4e62012-11-21 21:18:541943 ['asan==1 and OS=="win"', {
1944 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1945 # produce appropriate pdbs.
1946 'msvs_settings': {
1947 'VCLinkerTool': {
1948 'Profile': 'true',
1949 },
1950 },
[email protected]2ff7ef5f2012-12-14 00:40:251951 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:541952 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:181953 ['coverage!=0', {
1954 'conditions': [
[email protected]fc642ec2012-10-12 19:07:031955 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:181956 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041957 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1958 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471959 },
[email protected]fc642ec2012-10-12 19:07:031960 }],
1961 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:431962 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101963 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431964 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181965 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431966 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181967 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471968 }],
1969 ],
1970 }],
[email protected]da1c8d692011-09-20 20:35:011971 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181972 'cflags': [ '-ftest-coverage',
1973 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001974 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181975 }],
[email protected]e8f6ff42009-07-07 18:20:531976 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:071977 'variables': {
1978 # Disable incremental linking for all modules.
1979 # 0: inherit, 1: disabled, 2: enabled.
1980 'msvs_debug_link_incremental': '1',
1981 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:291982 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
1983 # binaries for now.
1984 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:071985 },
1986 'defines': [
1987 # Disable iterator debugging (huge speed boost without any
1988 # change in coverage results).
1989 '_HAS_ITERATOR_DEBUGGING=0',
1990 ],
[email protected]e8f6ff42009-07-07 18:20:531991 'msvs_settings': {
1992 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:071993 # Enable profile information (necessary for coverage
1994 # instrumentation). This is incompatible with incremental
1995 # linking.
[email protected]e8f6ff42009-07-07 18:20:531996 'Profile': 'true',
1997 },
[email protected]e8f6ff42009-07-07 18:20:531998 }
1999 }], # OS==win
2000 ], # conditions for coverage
2001 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382002 ['OS=="win"', {
2003 'defines': [
2004 '__STD_C',
2005 '_CRT_SECURE_NO_DEPRECATE',
2006 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102007 # This define is required to pull in the new Win8 interfaces from
2008 # system headers like ShObjIdl.h.
2009 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382010 ],
2011 'include_dirs': [
2012 '<(DEPTH)/third_party/wtl/include',
2013 ],
[email protected]9619e65d2012-05-23 19:06:522014 'conditions': [
2015 ['win_z7!=0', {
2016 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092017 # Generates debug info when win_z7=1
2018 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2019 'VCLinkerTool': {
2020 'GenerateDebugInformation': 'true',
2021 },
[email protected]9619e65d2012-05-23 19:06:522022 'VCCLCompilerTool': {
2023 'DebugInformationFormat': '1',
2024 }
2025 }
2026 }],
[email protected]45a77072012-11-17 00:28:422027 ['"<(GENERATOR)"=="msvs"', {
2028 'msvs_settings': {
2029 'VCLinkerTool': {
2030 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2031 # have foo.pdb. The ninja generator already defaults to this and
2032 # can't handle the $(TargetPath) macro.
2033 'ProgramDatabaseFile': '$(TargetPath).pdb',
2034 }
2035 },
2036 }],
[email protected]9619e65d2012-05-23 19:06:522037 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382038 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022039 ['enable_task_manager==1', {
2040 'defines': [
2041 'ENABLE_TASK_MANAGER=1',
2042 ],
2043 }],
[email protected]6a3cd37e2012-04-17 17:13:342044 ['enable_extensions==1', {
2045 'defines': [
2046 'ENABLE_EXTENSIONS=1',
2047 ],
2048 }],
[email protected]13eb97d2012-01-05 01:07:122049 ['OS=="win" and branding=="Chrome"', {
2050 'defines': ['ENABLE_SWIFTSHADER'],
2051 }],
[email protected]407dfa632011-12-23 11:59:352052 ['enable_dart==1', {
2053 'defines': ['WEBKIT_USING_DART=1'],
2054 }],
[email protected]18e0f39b2012-01-17 16:47:342055 ['enable_plugin_installation==1', {
2056 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2057 }],
[email protected]6d17f6392012-12-05 05:24:542058 ['enable_plugins==1', {
2059 'defines': ['ENABLE_PLUGINS=1'],
2060 }],
[email protected]cdb756ef2012-04-05 18:34:532061 ['enable_session_service==1', {
2062 'defines': ['ENABLE_SESSION_SERVICE=1'],
2063 }],
[email protected]6b40bb582012-03-15 20:50:382064 ['enable_themes==1', {
2065 'defines': ['ENABLE_THEMES=1'],
2066 }],
[email protected]57e67ac2013-02-22 03:37:222067 ['enable_autofill_dialog==1', {
2068 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2069 }],
[email protected]0acdd772012-04-05 22:53:002070 ['enable_background==1', {
2071 'defines': ['ENABLE_BACKGROUND=1'],
2072 }],
[email protected]2e22e2f2012-03-15 21:53:102073 ['enable_automation==1', {
2074 'defines': ['ENABLE_AUTOMATION=1'],
2075 }],
[email protected]6ee43a72012-12-07 22:44:402076 ['enable_google_now==1', {
2077 'defines': ['ENABLE_GOOGLE_NOW=1'],
2078 }],
[email protected]703369a2012-11-05 20:40:312079 ['enable_language_detection==1', {
2080 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
2081 }],
[email protected]658677f2012-06-09 06:04:022082 ['enable_printing==1', {
2083 'defines': ['ENABLE_PRINTING=1'],
2084 }],
[email protected]e6026962012-06-14 21:28:322085 ['enable_captive_portal_detection==1', {
2086 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2087 }],
[email protected]dc4e8b82012-11-15 03:58:162088 ['enable_app_list==1', {
2089 'defines': ['ENABLE_APP_LIST=1'],
2090 }],
[email protected]9b5dbf72013-01-09 20:29:152091 ['enable_message_center==1', {
2092 'defines': ['ENABLE_MESSAGE_CENTER=1'],
2093 }],
[email protected]dc4e8b82012-11-15 03:58:162094 ['enable_settings_app==1', {
2095 'defines': ['ENABLE_SETTINGS_APP=1'],
2096 }],
[email protected]9bfe0ab2012-08-30 13:18:112097 ['disable_ftp_support==1', {
2098 'defines': ['DISABLE_FTP_SUPPORT=1'],
2099 }],
[email protected]0850e842013-01-19 03:44:312100 ['enable_managed_users==1', {
2101 'defines': ['ENABLE_MANAGED_USERS=1'],
2102 }],
[email protected]199def22013-02-21 17:52:292103 ['spdy_proxy_auth_origin != ""', {
2104 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2105 }],
2106 ['spdy_proxy_auth_property != ""', {
2107 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2108 }],
[email protected]a6e22132010-02-10 20:43:182109 ], # conditions for 'target_defaults'
2110 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072111 ['enable_wexit_time_destructors==1', {
2112 'conditions': [
2113 [ 'clang==1', {
2114 'cflags': [
2115 '-Wexit-time-destructors',
2116 ],
2117 'xcode_settings': {
2118 'WARNING_CFLAGS': [
2119 '-Wexit-time-destructors',
2120 ],
2121 },
2122 }],
2123 ],
2124 }],
[email protected]c14d8e772010-02-09 22:06:152125 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282126 'conditions': [
[email protected]1e013672012-06-29 22:12:202127 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332128 # We don't want to get warnings from third-party code,
2129 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282130 'cflags!': [
2131 '-Wall',
2132 '-Wextra',
[email protected]d8543312010-02-10 17:43:282133 ],
[email protected]167ec822011-10-24 22:05:272134 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002135 # Don't warn about hash_map in third-party code.
2136 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272137 ],
2138 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332139 # Don't warn about printf format problems.
2140 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222141 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002142 ],
[email protected]d16bd642011-07-25 23:59:182143 'cflags_cc!': [
2144 # TODO(fischman): remove this.
2145 # http://code.google.com/p/chromium/issues/detail?id=90453
2146 '-Wsign-compare',
2147 ]
[email protected]d8543312010-02-10 17:43:282148 }],
[email protected]82dd5eb32012-08-18 04:24:322149 # TODO: Fix all warnings on chromeos too.
2150 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2151 'cflags!': [
2152 '-Werror',
2153 ],
2154 }],
[email protected]bc073c062012-01-13 06:28:032155 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112156 'cflags': [
2157 # Don't warn about ignoring the return value from e.g. close().
2158 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032159 # BSD systems do not support this option, since they are usually
2160 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112161 '-Wno-unused-result',
2162 ],
2163 }],
[email protected]d8543312010-02-10 17:43:282164 [ 'OS=="win"', {
2165 'defines': [
2166 '_CRT_SECURE_NO_DEPRECATE',
2167 '_CRT_NONSTDC_NO_WARNINGS',
2168 '_CRT_NONSTDC_NO_DEPRECATE',
2169 '_SCL_SECURE_NO_DEPRECATE',
2170 ],
2171 'msvs_disabled_warnings': [4800],
2172 'msvs_settings': {
2173 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112174 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242175 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282176 'Detect64BitPortabilityProblems': 'false',
2177 },
2178 },
[email protected]c54b41cb2012-08-24 20:58:242179 'conditions': [
2180 ['buildtype=="Official"', {
2181 'msvs_settings': {
2182 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2183 }
2184 }],
2185 ],
[email protected]d8543312010-02-10 17:43:282186 }],
[email protected]0915c3b2012-11-22 17:24:072187 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422188 [ 'OS=="win" and component=="shared_library"', {
2189 'msvs_disabled_warnings': [
2190 4251, # class 'std::xx' needs to have dll-interface.
2191 ],
2192 }],
[email protected]1e013672012-06-29 22:12:202193 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282194 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062195 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282196 },
[email protected]3a352c362012-05-08 19:45:492197 'conditions': [
2198 ['buildtype=="Official"', {
2199 'xcode_settings': {
2200 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2201 },
2202 }],
2203 ],
[email protected]d8543312010-02-10 17:43:282204 }],
[email protected]1e013672012-06-29 22:12:202205 [ 'OS=="ios"', {
2206 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222207 # TODO(ios): Fix remaining warnings in third-party code, then
2208 # remove this; the Mac cleanup didn't get everything that's
2209 # flagged in an iOS build.
2210 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202211 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2212 },
2213 }],
[email protected]c14d8e772010-02-09 22:06:152214 ],
2215 }, {
[email protected]a5c598152012-01-27 04:55:132216 'includes': [
2217 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2218 'filename_rules.gypi',
2219 ],
[email protected]41af4f82012-11-08 00:09:312220 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152221 # C99 macros on Mac and Linux.
2222 'defines': [
[email protected]41af4f82012-11-08 00:09:312223 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152224 '__STDC_FORMAT_MACROS',
2225 ],
2226 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152227 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072228 # turn on warnings for signed/unsigned mismatch on chromium code.
2229 'msvs_settings': {
2230 'VCCLCompilerTool': {
2231 'AdditionalOptions': ['/we4389'],
2232 },
2233 },
[email protected]c14d8e772010-02-09 22:06:152234 }],
[email protected]63e39a282011-07-13 20:41:282235 ['OS=="win" and component=="shared_library"', {
2236 'msvs_disabled_warnings': [
2237 4251, # class 'std::xx' needs to have dll-interface.
2238 ],
2239 }],
[email protected]c14d8e772010-02-09 22:06:152240 ],
2241 }],
[email protected]a6e22132010-02-10 20:43:182242 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552243 'default_configuration': 'Debug',
2244 'configurations': {
[email protected]5153767c2009-12-22 01:52:502245 # VCLinkerTool LinkIncremental values below:
2246 # 0 == default
2247 # 1 == /INCREMENTAL:NO
2248 # 2 == /INCREMENTAL
2249 # Debug links incremental, Release does not.
2250 #
[email protected]7b99801e2010-11-03 17:26:232251 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502252 #
2253 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562254 'abstract': 1,
2255 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512256 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562257 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2258 'CharacterSet': '1',
2259 },
[email protected]f59e1302013-02-15 13:48:402260 # Add the default import libs.
2261 'msvs_settings':{
2262 'VCLinkerTool': {
2263 'AdditionalDependencies': [
2264 'kernel32.lib',
2265 'gdi32.lib',
2266 'winspool.lib',
2267 'comdlg32.lib',
2268 'advapi32.lib',
2269 'shell32.lib',
2270 'ole32.lib',
2271 'oleaut32.lib',
2272 'user32.lib',
2273 'uuid.lib',
2274 'odbc32.lib',
2275 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392276 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402277 ],
2278 },
2279 },
[email protected]5153767c2009-12-22 01:52:502280 },
2281 'x86_Base': {
2282 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502283 'msvs_settings': {
2284 'VCLinkerTool': {
2285 'TargetMachine': '1',
2286 },
2287 },
[email protected]2fa40782009-11-01 21:17:342288 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562289 },
[email protected]5153767c2009-12-22 01:52:502290 'x64_Base': {
2291 'abstract': 1,
2292 'msvs_configuration_platform': 'x64',
2293 'msvs_settings': {
2294 'VCLinkerTool': {
2295 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502296 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052297 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502298 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052299 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362300 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2301 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502302 },
[email protected]d26b4418ab2010-03-24 22:06:352303 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502304 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052305 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502306 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052307 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502308 },
2309 },
[email protected]5153767c2009-12-22 01:52:502310 },
2311 'Debug_Base': {
2312 'abstract': 1,
[email protected]14339762011-04-05 07:36:582313 'defines': [
2314 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2315 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2316 ],
[email protected]1c966092009-08-20 21:19:262317 'xcode_settings': {
2318 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292319 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492320 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492321 '<@(debug_extra_cflags)',
2322 ],
[email protected]1c966092009-08-20 21:19:262323 },
[email protected]bb05e452009-10-29 21:24:562324 'msvs_settings': {
2325 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472326 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562327 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212328 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472329 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152330 'conditions': [
2331 # According to MSVS, InlineFunctionExpansion=0 means
2332 # "default inlining", not "/Ob0".
2333 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2334 ['win_debug_InlineFunctionExpansion==0', {
2335 'AdditionalOptions': ['/Ob0'],
2336 }],
2337 ['win_debug_InlineFunctionExpansion!=""', {
2338 'InlineFunctionExpansion':
2339 '<(win_debug_InlineFunctionExpansion)',
2340 }],
[email protected]fac10d12010-11-08 16:00:312341 ['win_debug_disable_iterator_debugging==1', {
2342 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2343 }],
[email protected]ef5c5f1b2011-12-17 02:16:242344
2345 # if win_debug_OmitFramePointers is blank, leave as default
2346 ['win_debug_OmitFramePointers==1', {
2347 'OmitFramePointers': 'true',
2348 }],
2349 ['win_debug_OmitFramePointers==0', {
2350 'OmitFramePointers': 'false',
2351 # The above is not sufficient (http://crbug.com/106711): it
2352 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2353 # perform FPO regardless, so we must explicitly disable.
2354 # We still want the false setting above to avoid having
2355 # "/Oy /Oy-" and warnings about overriding.
2356 'AdditionalOptions': ['/Oy-'],
2357 }],
[email protected]2ae6e022010-05-07 13:19:152358 ],
[email protected]ef5c5f1b2011-12-17 02:16:242359 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562360 },
2361 'VCLinkerTool': {
2362 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332363 # ASLR makes debugging with windbg difficult because Chrome.exe and
2364 # Chrome.dll share the same base name. As result, windbg will
2365 # name the Chrome.dll module like chrome_<base address>, where
2366 # <base address> typically changes with each launch. This in turn
2367 # means that breakpoints in Chrome.dll don't stick from one launch
2368 # to the next. For this reason, we turn ASLR off in debug builds.
2369 # Note that this is a three-way bool, where 0 means to pick up
2370 # the default setting, 1 is off and 2 is on.
2371 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562372 },
2373 'VCResourceCompilerTool': {
2374 'PreprocessorDefinitions': ['_DEBUG'],
2375 },
2376 },
[email protected]2f80c312009-02-25 21:26:552377 'conditions': [
[email protected]78204c92012-09-14 04:42:552378 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542379 'target_conditions': [
2380 ['_toolset=="target"', {
2381 'cflags': [
2382 '<@(debug_extra_cflags)',
2383 ],
2384 }],
[email protected]bb05e452009-10-29 21:24:562385 ],
[email protected]2f80c312009-02-25 21:26:552386 }],
[email protected]1e013672012-06-29 22:12:202387 # Disabled on iOS because it was causing a crash on startup.
2388 # TODO(michelea): investigate, create a reduced test and possibly
2389 # submit a radar.
2390 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352391 'xcode_settings': {
2392 'OTHER_CFLAGS': [
2393 '-fstack-protector-all', # Implies -fstack-protector
2394 ],
2395 },
2396 }],
[email protected]2f80c312009-02-25 21:26:552397 ],
2398 },
[email protected]5153767c2009-12-22 01:52:502399 'Release_Base': {
2400 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552401 'defines': [
2402 'NDEBUG',
2403 ],
[email protected]1c966092009-08-20 21:19:262404 'xcode_settings': {
2405 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2406 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002407 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262408 },
[email protected]bb05e452009-10-29 21:24:562409 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472410 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472411 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152412 'conditions': [
[email protected]2212d272011-12-20 21:37:372413 # In official builds, each target will self-select
2414 # an optimization level.
2415 ['buildtype!="Official"', {
2416 'Optimization': '<(win_release_Optimization)',
2417 },
2418 ],
[email protected]2ae6e022010-05-07 13:19:152419 # According to MSVS, InlineFunctionExpansion=0 means
2420 # "default inlining", not "/Ob0".
2421 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2422 ['win_release_InlineFunctionExpansion==0', {
2423 'AdditionalOptions': ['/Ob0'],
2424 }],
2425 ['win_release_InlineFunctionExpansion!=""', {
2426 'InlineFunctionExpansion':
2427 '<(win_release_InlineFunctionExpansion)',
2428 }],
[email protected]626d2d22011-10-11 15:47:332429
[email protected]ef5c5f1b2011-12-17 02:16:242430 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332431 ['win_release_OmitFramePointers==1', {
2432 'OmitFramePointers': 'true',
2433 }],
2434 ['win_release_OmitFramePointers==0', {
2435 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242436 # The above is not sufficient (http://crbug.com/106711): it
2437 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2438 # perform FPO regardless, so we must explicitly disable.
2439 # We still want the false setting above to avoid having
2440 # "/Oy /Oy-" and warnings about overriding.
2441 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332442 }],
[email protected]2ae6e022010-05-07 13:19:152443 ],
[email protected]ef5c5f1b2011-12-17 02:16:242444 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472445 },
[email protected]bb05e452009-10-29 21:24:562446 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342447 # LinkIncremental is a tri-state boolean, where 0 means default
2448 # (i.e., inherit from parent solution), 1 means false, and
2449 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562450 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342451 # This corresponds to the /PROFILE flag which ensures the PDB
2452 # file contains FIXUP information (growing the PDB file by about
2453 # 5%) but does not otherwise alter the output binary. This
2454 # information is used by the Syzygy optimization tool when
2455 # decomposing the release image.
2456 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562457 },
2458 },
[email protected]2f80c312009-02-25 21:26:552459 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162460 ['msvs_use_common_release', {
2461 'includes': ['release.gypi'],
2462 }],
[email protected]7bdd7d7c2012-11-01 10:36:162463 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582464 'defines': [
2465 'NVALGRIND',
2466 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2467 ],
[email protected]ee857512010-05-14 08:24:422468 }, {
[email protected]14339762011-04-05 07:36:582469 'defines': [
2470 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2471 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2472 ],
[email protected]92822e82009-09-18 14:26:562473 }],
[email protected]7e0d664a2009-12-03 21:07:472474 ['win_use_allocator_shim==0', {
2475 'defines': ['NO_TCMALLOC'],
2476 }],
[email protected]37305ae2012-12-11 01:54:582477 ['os_posix==1 and chromium_code==1', {
2478 # Non-chromium code is not guaranteed to compile cleanly
2479 # with _FORTIFY_SOURCE. Also, fortified build may fail
2480 # when optimizations are disabled, so only do that for Release
2481 # build.
2482 'defines': [
2483 '_FORTIFY_SOURCE=2',
2484 ],
2485 }],
[email protected]7df38122012-11-05 23:54:432486 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542487 'target_conditions': [
2488 ['_toolset=="target"', {
2489 'cflags': [
2490 '<@(release_extra_cflags)',
2491 ],
2492 }],
[email protected]bb05e452009-10-29 21:24:562493 ],
2494 }],
[email protected]2f80c312009-02-25 21:26:552495 ],
2496 },
[email protected]5153767c2009-12-22 01:52:502497 #
2498 # Concrete configurations
2499 #
2500 'Debug': {
2501 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2502 },
2503 'Release': {
2504 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502505 },
[email protected]f926fa0a2009-08-04 22:50:132506 'conditions': [
2507 [ 'OS=="win"', {
2508 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502509 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502510 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302511 },
2512 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502513 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302514 },
[email protected]f926fa0a2009-08-04 22:50:132515 }],
2516 ],
[email protected]2f80c312009-02-25 21:26:552517 },
2518 },
2519 'conditions': [
[email protected]43539ec2012-11-20 22:35:252520 ['os_posix==1', {
2521 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252522 'ldflags': [
2523 '-Wl,-z,now',
2524 '-Wl,-z,relro',
2525 ],
[email protected]43539ec2012-11-20 22:35:252526 },
2527 }],
[email protected]d2ca75c2013-02-01 05:47:172528 ['os_posix==1 and chromeos==0', {
2529 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2530 # and we want to avoid overriding this, so stack-protector is only
2531 # enabled when not building on Chrome OS.
2532 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2533 # supports it.
2534 'target_defaults': {
2535 'cflags': [
2536 '-fstack-protector',
2537 '--param=ssp-buffer-size=4',
2538 ],
2539 },
2540 }],
[email protected]1e013672012-06-29 22:12:202541 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262542 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272543 # Enable -Werror by default, but put it in a variable so it can
2544 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2545 'variables': {
[email protected]cbbb3472012-01-25 18:32:312546 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202547 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272548 },
[email protected]6863896f2012-01-25 17:51:362549 'defines': [
2550 '_FILE_OFFSET_BITS=64',
2551 ],
[email protected]9d384032009-03-20 23:13:262552 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162553 '<(werror)', # See note above about the werror variable.
2554 '-pthread',
2555 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292556 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162557 '-Wall',
[email protected]0fa17082010-03-26 00:48:052558 # TODO(evan): turn this back on once all the builds work.
2559 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202560 # Don't warn about unused function params. We use those everywhere.
2561 '-Wno-unused-parameter',
2562 # Don't warn about the "struct foo f = {0};" initialization pattern.
2563 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122564 # Don't export any symbols (for example, to plugins we dlopen()).
2565 # Note: this is *required* to make some plugins work.
2566 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352567 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242568 ],
2569 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222570 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242571 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362572 # Make inline functions have hidden visiblity by default.
2573 # Surprisingly, not covered by -fvisibility=hidden.
2574 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172575 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2576 # so we specify it explicitly.
2577 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182578 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172579 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262580 ],
[email protected]a6cf87e2009-04-03 04:07:382581 'ldflags': [
[email protected]138241f2010-03-30 23:53:102582 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262583 ],
[email protected]1e013672012-06-29 22:12:202584 'libraries' : [
2585 '<(libraries_for_target)',
2586 ],
[email protected]3aacaf952009-04-02 15:34:092587 'configurations': {
[email protected]5153767c2009-12-22 01:52:502588 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312589 'variables': {
2590 'debug_optimize%': '0',
2591 },
[email protected]3aacaf952009-04-02 15:34:092592 'defines': [
2593 '_DEBUG',
2594 ],
2595 'cflags': [
[email protected]95ad2032012-08-24 00:49:252596 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092597 '-g',
2598 ],
[email protected]da1c8d692011-09-20 20:35:012599 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342600 ['OS=="android"', {
2601 # Only link with needed input sections. This is to avoid getting
2602 # undefined reference to __cxa_bad_typeid in the CDU library.
2603 'ldflags': [
2604 '-Wl,--gc-sections',
2605 ],
2606 }],
[email protected]fa9d4e262012-08-21 04:39:002607 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552608 # Some configurations are copied from Release_Base to reduce
2609 # the binary size.
2610 'variables': {
2611 'debug_optimize%': 's',
2612 },
[email protected]da1c8d692011-09-20 20:35:012613 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552614 '-fomit-frame-pointer',
2615 '-fdata-sections',
2616 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012617 ],
[email protected]8a37e4502012-08-14 22:42:552618 'ldflags': [
2619 '-Wl,-O1',
2620 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552621 ],
[email protected]da1c8d692011-09-20 20:35:012622 }],
[email protected]d4c0ec5b2013-03-10 03:07:452623 ['OS=="linux" and target_arch=="ia32"', {
2624 'ldflags': [
2625 '-Wl,--no-as-needed',
2626 ],
2627 }],
[email protected]da1c8d692011-09-20 20:35:012628 ],
[email protected]5315f2842009-04-28 00:43:272629 },
[email protected]5153767c2009-12-22 01:52:502630 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012631 'variables': {
2632 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512633 # Binaries become big and gold is unable to perform GC
2634 # and remove unused sections for some of test targets
2635 # on 32 bit platform.
2636 # (This is currently observed only in chromeos valgrind bots)
2637 # The following flag is to disable --gc-sections linker
2638 # option for these bots.
2639 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122640
2641 # TODO(bradnelson): reexamine how this is done if we change the
2642 # expansion of configurations
2643 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012644 },
[email protected]3aacaf952009-04-02 15:34:092645 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182646 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532647 # Don't emit the GCC version ident directives, they just end up
2648 # in the .comment section taking up binary size.
2649 '-fno-ident',
2650 # Put data and code in their own sections, so that unused symbols
2651 # can be removed at link time with --gc-sections.
2652 '-fdata-sections',
2653 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092654 ],
[email protected]c902f2c2010-08-06 20:04:182655 'ldflags': [
2656 # Specifically tell the linker to perform optimizations.
2657 # See http://lwn.net/Articles/192624/ .
2658 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222659 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182660 ],
[email protected]1dd529642010-05-15 01:02:512661 'conditions' : [
2662 ['no_gc_sections==0', {
2663 'ldflags': [
2664 '-Wl,--gc-sections',
2665 ],
2666 }],
[email protected]da1c8d692011-09-20 20:35:012667 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582668 'variables': {
2669 'release_optimize%': 's',
2670 },
[email protected]da1c8d692011-09-20 20:35:012671 'cflags': [
2672 '-fomit-frame-pointer',
2673 ],
2674 }],
[email protected]ecf7b6482010-10-13 09:15:202675 ['clang==1', {
2676 'cflags!': [
2677 '-fno-ident',
2678 ],
2679 }],
[email protected]7664ab32011-02-01 23:35:252680 ['profiling==1', {
2681 'cflags': [
2682 '-fno-omit-frame-pointer',
2683 '-g',
2684 ],
2685 }],
[email protected]bdbe3d22013-02-22 04:10:352686 # Can be omitted to reduce output size. Does not seem to affect
2687 # crash reporting.
2688 ['target_arch=="ia32"', {
2689 'cflags': [
2690 '-fno-unwind-tables',
2691 '-fno-asynchronous-unwind-tables',
2692 ],
2693 }],
[email protected]8d726a42012-02-09 03:49:002694 ],
[email protected]3aacaf952009-04-02 15:34:092695 },
2696 },
[email protected]601b540222009-04-03 21:32:042697 'variants': {
2698 'coverage': {
2699 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2700 'ldflags': ['-fprofile-arcs'],
2701 },
2702 'profile': {
2703 'cflags': ['-pg', '-g'],
2704 'ldflags': ['-pg'],
2705 },
2706 'symbols': {
2707 'cflags': ['-g'],
2708 },
2709 },
[email protected]606116d22009-05-06 22:38:232710 'conditions': [
[email protected]04b482602011-09-14 02:36:212711 ['target_arch=="ia32"', {
2712 'target_conditions': [
2713 ['_toolset=="target"', {
2714 'asflags': [
2715 # Needed so that libs with .s files (e.g. libicudata.a)
2716 # are compatible with the general 32-bit-ness.
2717 '-32',
2718 ],
2719 # All floating-point computations on x87 happens in 80-bit
2720 # precision. Because the C and C++ language standards allow
2721 # the compiler to keep the floating-point values in higher
2722 # precision than what's specified in the source and doing so
2723 # is more efficient than constantly rounding up to 64-bit or
2724 # 32-bit precision as specified in the source, the compiler,
2725 # especially in the optimized mode, tries very hard to keep
2726 # values in x87 floating-point stack (in 80-bit precision)
2727 # as long as possible. This has important side effects, that
2728 # the real value used in computation may change depending on
2729 # how the compiler did the optimization - that is, the value
2730 # kept in 80-bit is different than the value rounded down to
2731 # 64-bit or 32-bit. There are possible compiler options to
2732 # make this behavior consistent (e.g. -ffloat-store would keep
2733 # all floating-values in the memory, thus force them to be
2734 # rounded to its original precision) but they have significant
2735 # runtime performance penalty.
2736 #
2737 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2738 # which keep floating-point values in SSE registers in its
2739 # native precision (32-bit for single precision, and 64-bit
2740 # for double precision values). This means the floating-point
2741 # value used during computation does not change depending on
2742 # how the compiler optimized the code, since the value is
2743 # always kept in its specified precision.
2744 'conditions': [
2745 ['branding=="Chromium" and disable_sse2==0', {
2746 'cflags': [
2747 '-march=pentium4',
2748 '-msse2',
2749 '-mfpmath=sse',
2750 ],
2751 }],
2752 # ChromeOS targets Pinetrail, which is sse3, but most of the
2753 # benefit comes from sse2 so this setting allows ChromeOS
2754 # to build on other CPUs. In the future -march=atom would
2755 # help but requires a newer compiler.
2756 ['chromeos==1 and disable_sse2==0', {
2757 'cflags': [
2758 '-msse2',
2759 ],
2760 }],
[email protected]0a0063c52013-03-29 06:36:212761 # Use gold linker for Android ia32 target.
2762 ['OS=="android"', {
2763 'cflags': [
2764 '-fuse-ld=gold',
2765 ],
2766 'ldflags': [
2767 '-fuse-ld=gold',
2768 ],
2769 }],
[email protected]04b482602011-09-14 02:36:212770 # Install packages have started cropping up with
2771 # different headers between the 32-bit and 64-bit
2772 # versions, so we have to shadow those differences off
2773 # and make sure a 32-bit-on-64-bit build picks up the
2774 # right files.
[email protected]32594022012-05-10 03:22:282775 # For android build, use NDK headers instead of host headers
2776 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212777 'include_dirs+': [
2778 '/usr/include32',
2779 ],
2780 }],
2781 ],
2782 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2783 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062784 'cflags': [
[email protected]04b482602011-09-14 02:36:212785 '-m32',
2786 '-mmmx',
2787 ],
2788 'ldflags': [
2789 '-m32',
[email protected]ffde7932009-05-29 00:39:062790 ],
2791 }],
[email protected]606116d22009-05-06 22:38:232792 ],
2793 }],
[email protected]3dda8a962009-08-10 18:58:072794 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292795 'target_conditions': [
2796 ['_toolset=="target"', {
2797 'cflags_cc': [
2798 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2799 # has changed whenever it encounters a varargs function. This
2800 # silences those warnings, as they are not helpful and
2801 # clutter legitimate warnings.
2802 '-Wno-abi',
2803 ],
2804 'conditions': [
[email protected]4b05289f2013-03-14 17:46:222805 ['arm_thumb==1 and android_webview_build==0', {
[email protected]77c1b29392009-12-04 06:21:292806 'cflags': [
2807 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292808 ]
2809 }],
[email protected]4b05289f2013-03-14 17:46:222810 ['armv7==1 and android_webview_build==0', {
[email protected]dc9711f2009-11-13 19:30:252811 'cflags': [
2812 '-march=armv7-a',
2813 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112814 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252815 ],
[email protected]eafc0b452010-02-26 21:53:432816 'conditions': [
2817 ['arm_neon==1', {
2818 'cflags': [ '-mfpu=neon', ],
2819 }, {
[email protected]53e0f642010-03-05 01:41:562820 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072821 }],
[email protected]eafc0b452010-02-26 21:53:432822 ],
[email protected]dc9711f2009-11-13 19:30:252823 }],
[email protected]da1c8d692011-09-20 20:35:012824 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532825 # Most of the following flags are derived from what Android
2826 # uses by default when building for arm, reference for which
2827 # can be found in the following file in the Android NDK:
2828 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2829 'cflags': [
2830 # The tree-sra optimization (scalar replacement for
2831 # aggregates enabling subsequent optimizations) leads to
2832 # invalid code generation when using the Android NDK's
2833 # compiler (r5-r7). This can be verified using
2834 # TestWebKitAPI's WTF.Checked_int8_t test.
2835 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482836 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532837 '-Wno-psabi',
2838 ],
[email protected]ad17e342012-07-17 20:45:482839 # Android now supports .relro sections properly.
2840 # NOTE: While these flags enable the generation of .relro
2841 # sections, the generated libraries can still be loaded on
2842 # older Android platform versions.
2843 'ldflags': [
2844 '-Wl,-z,relro',
2845 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482846 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482847 ],
[email protected]da1c8d692011-09-20 20:35:012848 'conditions': [
[email protected]4b05289f2013-03-14 17:46:222849 ['arm_thumb==1 and android_webview_build==0', {
[email protected]94cdbf42012-12-11 19:49:222850 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012851 }],
[email protected]4b05289f2013-03-14 17:46:222852 ['armv7==0 and android_webview_build==0', {
[email protected]da1c8d692011-09-20 20:35:012853 # Flags suitable for Android emulator
2854 'cflags': [
2855 '-march=armv5te',
2856 '-mtune=xscale',
2857 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362858 ],
2859 'defines': [
2860 '__ARM_ARCH_5__',
2861 '__ARM_ARCH_5T__',
2862 '__ARM_ARCH_5E__',
2863 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012864 ],
2865 }],
[email protected]4c48ef102012-11-29 22:00:382866 ['profiling==1', {
2867 'cflags': [
2868 '-marm', # Probably reduntant, but recommend by "perf" docs.
2869 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2870 ],
2871 }],
[email protected]220ea5932012-08-09 10:44:072872 ['clang==1', {
2873 'cflags!': [
2874 # Clang does not support the following options.
2875 '-mthumb-interwork',
2876 '-finline-limit=64',
2877 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482878 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072879 '-Wno-psabi',
2880 ],
2881 }],
[email protected]da1c8d692011-09-20 20:35:012882 ],
[email protected]3cf73842012-11-24 03:35:252883 'target_conditions': [
2884 # ndk-build copies .a's around the filesystem, breaking
2885 # relative paths in thin archives. Disable using thin
2886 # archives to avoid problems until one of these is fixed:
2887 # http://code.google.com/p/android/issues/detail?id=40302
2888 # http://code.google.com/p/android/issues/detail?id=40303
2889 ['_type=="static_library"', {
2890 'standalone_static_library': 1,
2891 }],
2892 ],
[email protected]da1c8d692011-09-20 20:35:012893 }],
[email protected]3dda8a962009-08-10 18:58:072894 ],
2895 }],
2896 ],
2897 }],
[email protected]2fb843b2010-08-12 02:11:082898 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582899 'cflags': [
2900 '-fPIC',
2901 ],
[email protected]d3f692b32011-12-14 19:04:352902 'ldflags': [
2903 '-fPIC',
2904 ],
[email protected]c76723a2010-01-25 23:10:582905 }],
[email protected]ee28c9f2009-09-04 01:53:012906 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572907 'target_conditions': [
2908 ['_toolset=="target"', {
2909 'cflags': [
2910 '--sysroot=<(sysroot)',
2911 ],
2912 'ldflags': [
2913 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:152914 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:572915 ],
2916 }]]
[email protected]ee28c9f2009-09-04 01:53:012917 }],
[email protected]58680ce2010-09-18 00:09:152918 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122919 'cflags': [
2920 '-Wheader-hygiene',
2921 # Clang spots more unused functions.
2922 '-Wno-unused-function',
2923 # Don't die on dtoa code that uses a char as an array index.
2924 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332925 # Especially needed for gtest macros using enum values from Mac
2926 # system headers.
2927 # TODO(pkasting): In C++11 this is legal, so this should be
2928 # removed when we change to that. (This is also why we don't
2929 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122930 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:532931 # This (rightfully) complains about 'override', which we use
[email protected]241109b52011-10-15 19:00:302932 # heavily.
2933 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102934
2935 # Warns on switches on enums that cover all enum values but
2936 # also contain a default: branch. Chrome is full of that.
2937 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:512938
2939 # Warns when a const char[] is converted to bool.
2940 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:122941 ],
2942 'cflags!': [
2943 # Clang doesn't seem to know know this flag.
2944 '-mfpmath=sse',
2945 ],
[email protected]58680ce2010-09-18 00:09:152946 }],
[email protected]5d451ad2011-02-11 16:43:462947 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262948 'cflags': [
[email protected]c872dc52012-05-19 06:36:312949 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262950 ],
[email protected]5d451ad2011-02-11 16:43:462951 }],
[email protected]4a9ac22e2011-12-02 03:41:532952 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262953 'cflags': [
2954 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532955 ],
2956 }],
2957 ['clang==1 and clang_add_plugin!=""', {
2958 'cflags': [
[email protected]d23720682011-08-11 00:16:262959 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2960 ],
[email protected]5e781232011-01-28 02:57:592961 }],
[email protected]2616d45d2012-01-19 03:15:482962 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2963 'cflags': [
2964 # See http://crbug.com/110262
2965 '-fcolor-diagnostics',
2966 ],
2967 }],
[email protected]92799b632011-08-15 14:33:062968 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422969 'target_conditions': [
2970 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452971 'cflags': [
[email protected]48688df02012-11-27 21:04:562972 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452973 '-fno-omit-frame-pointer',
[email protected]48688df02012-11-27 21:04:562974 '-w', # http://crbug.com/162783
[email protected]73c15b32013-01-29 13:04:302975 '-gline-tables-only',
[email protected]cb770a4c2012-07-25 20:06:452976 ],
2977 'ldflags': [
[email protected]48688df02012-11-27 21:04:562978 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452979 ],
2980 'defines': [
2981 'ADDRESS_SANITIZER',
2982 ],
[email protected]1ffc3b3962012-05-16 14:08:422983 }],
[email protected]921c7b52011-11-25 10:34:352984 ],
[email protected]1d3bc322013-04-12 14:26:372985 'conditions': [
2986 ['OS=="mac"', {
2987 'cflags': [
2988 '-mllvm -asan-globals=0', # http://crbug.com/196561
2989 ],
2990 }],
2991 ],
[email protected]92799b632011-08-15 14:33:062992 }],
[email protected]c9a829272012-07-04 07:51:122993 ['tsan==1', {
2994 'target_conditions': [
2995 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452996 'cflags': [
[email protected]927a9d672012-11-09 11:28:202997 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452998 '-fno-omit-frame-pointer',
[email protected]9d46a572013-01-23 10:38:292999 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203000 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453001 ],
3002 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203003 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453004 ],
3005 'defines': [
3006 'THREAD_SANITIZER',
3007 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163008 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453009 ],
3010 'target_conditions': [
3011 ['_type=="executable"', {
3012 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123013 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453014 ],
3015 }],
3016 ],
[email protected]c9a829272012-07-04 07:51:123017 }],
3018 ],
3019 }],
[email protected]a10ddd2d2013-02-26 20:06:593020 ['msan==1', {
3021 'target_conditions': [
3022 ['_toolset=="target"', {
3023 'cflags': [
3024 '-fsanitize=memory',
3025 '-fsanitize-memory-track-origins',
3026 '-fno-omit-frame-pointer',
3027 '-fPIC',
3028 ],
3029 'ldflags': [
3030 '-fsanitize=memory',
3031 ],
3032 'defines': [
3033 'MEMORY_SANITIZER',
3034 ],
3035 'target_conditions': [
3036 ['_type=="executable"', {
3037 'ldflags': [
3038 '-pie',
3039 ],
3040 }],
3041 ],
3042 }],
3043 ],
3044 }],
[email protected]8a48f3f2012-12-04 20:14:043045 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443046 'target_conditions' : [
3047 ['_toolset=="target"', {
3048 'cflags': [
3049 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453050 # Allow mmx intrinsics to inline, so that the
3051 # compiler can expand the intrinsics.
3052 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443053 ],
3054 }],
3055 ],
3056 }],
[email protected]cbd5fd52009-08-26 00:14:273057 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:273058 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:103059 }],
3060 ['linux_dump_symbols==1', {
3061 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253062 'conditions': [
[email protected]791262fe2013-02-21 17:20:153063 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253064 'target_conditions': [
3065 ['_toolset=="target"', {
3066 'ldflags': [
[email protected]567370a32013-03-01 00:11:233067 # Workaround for linker OOM.
3068 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253069 ],
3070 }],
3071 ],
3072 }],
3073 ],
[email protected]cbd5fd52009-08-26 00:14:273074 }],
[email protected]d8b60602010-03-26 09:41:223075 ['linux_use_heapchecker==1', {
3076 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:403077 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:223078 }],
[email protected]61a9b2d82010-02-26 00:31:083079 ['linux_use_tcmalloc==0', {
3080 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243081 }],
[email protected]64e2d4a42010-08-27 10:13:213082 ['linux_keep_shadow_stacks==1', {
3083 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513084 'cflags': [
3085 '-finstrument-functions',
3086 # Allow mmx intrinsics to inline, so that the compiler can expand
3087 # the intrinsics.
3088 '-finstrument-functions-exclude-file-list=mmintrin.h',
3089 ],
[email protected]64e2d4a42010-08-27 10:13:213090 }],
[email protected]8d726a42012-02-09 03:49:003091 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:323092 'ldflags': [
3093 # Experimentation found that using four linking threads
3094 # saved ~20% of link time.
3095 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3096 '-Wl,--threads',
3097 '-Wl,--thread-count=4',
3098 ],
[email protected]8d726a42012-02-09 03:49:003099 'conditions': [
3100 ['release_valgrind_build==0', {
3101 'target_conditions': [
3102 ['_toolset=="target"', {
3103 'ldflags': [
3104 # There seems to be a conflict of --icf and -pie
3105 # in gold which can generate crashy binaries. As
3106 # a security measure, -pie takes precendence for
3107 # now.
3108 #'-Wl,--icf=safe',
3109 '-Wl,--icf=none',
3110 ],
3111 }],
3112 ],
3113 }],
3114 ],
3115 }],
[email protected]b07806c12012-02-03 22:44:593116 ['linux_use_gold_binary==1', {
3117 'variables': {
[email protected]516312d2012-02-28 05:17:263118 'conditions': [
3119 ['inside_chromium_build==1', {
3120 # We pass the path to gold to the compiler. gyp leaves
3121 # unspecified what the cwd is when running the compiler,
3122 # so the normal gyp path-munging fails us. This hack
3123 # gets the right path.
3124 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
3125 }, {
3126 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
3127 }]
3128 ]
[email protected]b07806c12012-02-03 22:44:593129 },
3130 'ldflags': [
3131 # Put our gold binary in the search path for the linker.
3132 '-B<(gold_path)',
3133 ],
3134 }],
[email protected]606116d22009-05-06 22:38:233135 ],
[email protected]9d384032009-03-20 23:13:263136 },
3137 }],
[email protected]c51e8d52009-12-11 20:04:063138 # FreeBSD-specific options; note that most FreeBSD options are set above,
3139 # with Linux.
3140 ['OS=="freebsd"', {
3141 'target_defaults': {
3142 'ldflags': [
3143 '-Wl,--no-keep-memory',
3144 ],
3145 },
3146 }],
[email protected]da1c8d692011-09-20 20:35:013147 # Android-specific options; note that most are set above with Linux.
3148 ['OS=="android"', {
3149 'variables': {
[email protected]25036722012-12-11 10:36:173150 # This is a unique identifier for a given build. It's used for
3151 # identifying various build artifacts corresponding to a particular
3152 # build of chrome (e.g. where to find archived symbols).
3153 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013154 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013155 # Use shared stlport library when system one used.
3156 # Figure this out early since it needs symbols from libgcc.a, so it
3157 # has to be before that in the set of libraries.
3158 ['use_system_stlport==1', {
3159 'android_stlport_library': 'stlport',
3160 }, {
[email protected]806b5232012-11-19 21:19:043161 'conditions': [
3162 ['component=="shared_library"', {
3163 'android_stlport_library': 'stlport_shared',
3164 }, {
3165 'android_stlport_library': 'stlport_static',
3166 }],
3167 ],
[email protected]da1c8d692011-09-20 20:35:013168 }],
3169 ],
3170
3171 # Placing this variable here prevents from forking libvpx, used
3172 # by remoting. Remoting is off, so it needn't built,
3173 # so forking it's deps seems like overkill.
3174 # But this variable need defined to properly run gyp.
3175 # A proper solution is to have an OS==android conditional
3176 # in third_party/libvpx/libvpx.gyp to define it.
3177 'libvpx_path': 'lib/linux/arm',
3178 },
3179 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013180 'variables': {
3181 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593182 'conditions': [
3183 # If we're using the components build, append "cr" to all shared
3184 # libraries to avoid naming collisions with android system library
3185 # versions with the same name (e.g. skia, icu).
3186 ['component=="shared_library"', {
3187 'android_product_extension': 'cr.so',
3188 }, {
3189 'android_product_extension': 'so',
3190 } ],
3191 ],
[email protected]8a37e4502012-08-14 22:42:553192 },
[email protected]da1c8d692011-09-20 20:35:013193 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593194 ['_type=="shared_library"', {
3195 'product_extension': '<(android_product_extension)',
3196 }],
3197
[email protected]da1c8d692011-09-20 20:35:013198 # Settings for building device targets using Android's toolchain.
3199 # These are based on the setup.mk file from the Android NDK.
3200 #
3201 # The NDK Android executable link step looks as follows:
3202 # $LDFLAGS
3203 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3204 # $(PRIVATE_OBJECTS) <-- The .o that we built
3205 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3206 # $(TARGET_LIBGCC) <-- libgcc.a
3207 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3208 # $(PRIVATE_LDLIBS) <-- System .so
3209 # $(TARGET_CRTEND_O) <-- crtend.o
3210 #
3211 # For now the above are approximated for executables by adding
3212 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3213 # of 'libraries'.
3214 #
3215 # The NDK Android shared library link step looks as follows:
3216 # $LDFLAGS
3217 # $(PRIVATE_OBJECTS) <-- The .o that we built
3218 # -l,--whole-archive
3219 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3220 # -l,--no-whole-archive
3221 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3222 # $(TARGET_LIBGCC) <-- libgcc.a
3223 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3224 # $(PRIVATE_LDLIBS) <-- System .so
3225 #
[email protected]ad17e342012-07-17 20:45:483226 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013227 #
3228 # For both executables and shared libraries, add the proper
3229 # libgcc.a to the start of libraries which puts it in the
3230 # proper spot after .o and .a files get linked in.
3231 #
3232 # TODO: The proper thing to do longer-tem would be proper gyp
3233 # support for a custom link command line.
3234 ['_toolset=="target"', {
3235 'cflags!': [
3236 '-pthread', # Not supported by Android toolchain.
3237 ],
3238 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013239 '-ffunction-sections',
3240 '-funwind-tables',
3241 '-g',
3242 '-fstack-protector',
3243 '-fno-short-enums',
3244 '-finline-limit=64',
3245 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013246 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013247 ],
3248 'defines': [
3249 'ANDROID',
3250 '__GNU_SOURCE=1', # Necessary for clone()
3251 'USE_STLPORT=1',
3252 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173253 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013254 ],
3255 'ldflags!': [
3256 '-pthread', # Not supported by Android toolchain.
3257 ],
3258 'ldflags': [
3259 '-nostdlib',
3260 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013261 # Don't export symbols from statically linked libraries.
3262 '-Wl,--exclude-libs=ALL',
3263 ],
[email protected]a0e48b02011-11-22 07:53:013264 'libraries': [
3265 '-l<(android_stlport_library)',
3266 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043267 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013268 '-lc',
3269 '-ldl',
3270 '-lstdc++',
3271 '-lm',
[email protected]da1c8d692011-09-20 20:35:013272 ],
3273 'conditions': [
[email protected]806b5232012-11-19 21:19:043274 ['component=="shared_library"', {
3275 'libraries': [
3276 '-lgnustl_shared',
3277 ],
[email protected]4d6f9d7db2012-11-21 16:27:473278 'ldflags!': [
3279 '-Wl,--exclude-libs=ALL',
3280 ],
[email protected]806b5232012-11-19 21:19:043281 }],
[email protected]220ea5932012-08-09 10:44:073282 ['clang==1', {
3283 'cflags': [
3284 # Work around incompatibilities between bionic and clang
3285 # headers.
3286 '-D__compiler_offsetof=__builtin_offsetof',
3287 '-Dnan=__builtin_nan',
3288 ],
3289 'conditions': [
3290 ['target_arch=="arm"', {
3291 'cflags': [
3292 '-target arm-linux-androideabi',
3293 '-mllvm -arm-enable-ehabi',
3294 ],
3295 'ldflags': [
3296 '-target arm-linux-androideabi',
3297 ],
3298 }],
3299 ['target_arch=="ia32"', {
3300 'cflags': [
3301 '-target x86-linux-androideabi',
3302 ],
3303 'ldflags': [
3304 '-target x86-linux-androideabi',
3305 ],
3306 }],
3307 ],
3308 }],
[email protected]ed70ed1862012-11-07 12:11:253309 ['asan==1', {
3310 'cflags': [
3311 # Android build relies on -Wl,--gc-sections removing
3312 # unreachable code. ASan instrumentation for globals inhibits
3313 # this and results in a library with unresolvable relocations.
3314 # TODO(eugenis): find a way to reenable this.
3315 '-mllvm -asan-globals=0',
3316 ],
3317 }],
[email protected]d999c3cb2013-03-12 10:22:363318 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463319 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573320 # The NDK has these things, but doesn't define the constants
3321 # to say that it does. Define them here instead.
3322 'HAVE_SYS_UIO_H',
3323 ],
3324 'cflags': [
3325 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463326 ],
[email protected]da1c8d692011-09-20 20:35:013327 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523328 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013329 ],
3330 }],
[email protected]d999c3cb2013-03-12 10:22:363331 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083332 'include_dirs': [
3333 # OpenAL headers from the Android tree.
3334 '<(android_src)/frameworks/wilhelm/include',
3335 ],
3336 'cflags': [
[email protected]04882132012-11-21 12:40:453337 # Android predefines this as 1; undefine it here so Chromium
3338 # can redefine it later to be 2 for chromium code and unset
3339 # for third party code. This works because cflags are added
3340 # before defines.
3341 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553342 # Disable any additional warnings enabled by the Android build system but which
3343 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083344 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553345 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3346 '-Wno-ignored-qualifiers',
3347 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083348 ],
3349 'cflags_cc': [
3350 # Disabling c++0x-compat should be handled in WebKit, but
3351 # this currently doesn't work because gcc_version is not set
3352 # correctly when building with the Android build system.
3353 # TODO(torne): Fix this in WebKit.
3354 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163355 # Other things unrelated to -Wextra:
3356 '-Wno-non-virtual-dtor',
3357 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083358 ],
3359 }],
[email protected]d999c3cb2013-03-12 10:22:363360 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083361 'cflags': [
3362 # There is a class of warning which:
3363 # 1) Android always enables and also treats as errors
3364 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163365 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553366 '-Wno-address',
3367 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553368 '-Wno-return-type',
3369 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083370 ],
[email protected]2f34a202013-03-11 13:59:163371 'cflags_cc': [
3372 '-Wno-non-virtual-dtor',
3373 ]
[email protected]0d7291e2012-10-04 19:16:083374 }],
[email protected]febd3572012-05-03 09:17:453375 ['target_arch == "arm"', {
3376 'ldflags': [
3377 # Enable identical code folding to reduce size.
3378 '-Wl,--icf=safe',
3379 ],
3380 }],
[email protected]da1c8d692011-09-20 20:35:013381 # NOTE: The stlport header include paths below are specified in
3382 # cflags rather than include_dirs because they need to come
3383 # after include_dirs. Think of them like system headers, but
3384 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3385 # toolchain (circa Gingerbread) will exhibit strange errors.
3386 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513387 ['use_system_stlport==1', {
3388 'cflags': [
3389 # For libstdc++/include, which is used by stlport.
3390 '-I<(android_src)/bionic',
3391 '-I<(android_src)/external/stlport/stlport',
3392 ],
3393 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013394 'cflags': [
[email protected]225ec632013-04-03 18:20:223395 '-I<(android_stlport_include)',
3396 '-I<(android_libstdcpp_include)',
[email protected]da1c8d692011-09-20 20:35:013397 ],
[email protected]225ec632013-04-03 18:20:223398 'ldflags': [
3399 '-L<(android_stlport_libs_dir)',
3400 '-L<(android_libstdcpp_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013401 ],
3402 }],
3403 ['target_arch=="ia32"', {
3404 # The x86 toolchain currently has problems with stack-protector.
3405 'cflags!': [
3406 '-fstack-protector',
3407 ],
3408 'cflags': [
3409 '-fno-stack-protector',
3410 ],
3411 }],
3412 ],
3413 'target_conditions': [
3414 ['_type=="executable"', {
3415 'ldflags': [
3416 '-Bdynamic',
3417 '-Wl,-dynamic-linker,/system/bin/linker',
3418 '-Wl,--gc-sections',
3419 '-Wl,-z,nocopyreloc',
3420 # crtbegin_dynamic.o should be the last item in ldflags.
3421 '<(android_ndk_lib)/crtbegin_dynamic.o',
3422 ],
3423 'libraries': [
3424 # crtend_android.o needs to be the last item in libraries.
3425 # Do not add any libraries after this!
3426 '<(android_ndk_lib)/crtend_android.o',
3427 ],
[email protected]63a131fd2012-11-06 16:01:213428 'conditions': [
3429 ['asan==1', {
3430 'cflags': [
3431 '-fPIE',
3432 ],
3433 'ldflags': [
3434 '-pie',
3435 ],
3436 }],
3437 ],
[email protected]da1c8d692011-09-20 20:35:013438 }],
[email protected]f5c7758a2012-07-25 16:17:573439 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013440 'ldflags': [
3441 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:463442 # crtbegin_so.o should be the last item in ldflags.
3443 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:013444 ],
[email protected]a08029b42012-04-25 03:18:463445 'libraries': [
3446 # crtend_so.o needs to be the last item in libraries.
3447 # Do not add any libraries after this!
3448 '<(android_ndk_lib)/crtend_so.o',
3449 ],
[email protected]da1c8d692011-09-20 20:35:013450 }],
3451 ],
3452 }],
3453 # Settings for building host targets using the system toolchain.
3454 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123455 'cflags!': [
3456 # Due to issues in Clang build system, using ASan on 32-bit
3457 # binaries on x86_64 host is problematic.
3458 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563459 '-fsanitize=address',
3460 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123461 ],
[email protected]da1c8d692011-09-20 20:35:013462 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443463 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013464 '-Wl,-z,noexecstack',
3465 '-Wl,--gc-sections',
3466 '-Wl,-O1',
3467 '-Wl,--as-needed',
3468 ],
[email protected]965b6b22011-09-29 16:07:283469 'sources/': [
3470 ['exclude', '_android(_unittest)?\\.cc$'],
3471 ['exclude', '(^|/)android/']
3472 ],
[email protected]da1c8d692011-09-20 20:35:013473 }],
[email protected]0ccf578f2013-03-13 11:13:393474 # Settings for building host targets on mac.
3475 ['_toolset=="host" and host_os=="mac"', {
3476 'ldflags!': [
3477 '-Wl,-z,now',
3478 '-Wl,-z,relro',
3479 ],
3480 }],
[email protected]da1c8d692011-09-20 20:35:013481 ],
3482 },
3483 }],
[email protected]93f21e42010-04-01 00:35:153484 ['OS=="solaris"', {
3485 'cflags!': ['-fvisibility=hidden'],
3486 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3487 }],
[email protected]1e013672012-06-29 22:12:203488 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553489 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423490 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553491 'xcode_settings': {
3492 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243493 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3494 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043495 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3496 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043497 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3498 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3499 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253500 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3501 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043502 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3503 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3504 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3505 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553506 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043507 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553508 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043509 'WARNING_CFLAGS': [
3510 '-Wall',
3511 '-Wendif-labels',
3512 '-Wextra',
3513 # Don't warn about unused function parameters.
3514 '-Wno-unused-parameter',
3515 # Don't warn about the "struct foo f = {0};" initialization
3516 # pattern.
3517 '-Wno-missing-field-initializers',
3518 ],
[email protected]b3fb8092009-03-12 19:09:243519 'conditions': [
3520 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593521 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3522 ],
[email protected]2936b8c2012-10-29 10:57:313523 # Note that the prebuilt Clang binaries should not be used for iOS
3524 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283525 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303526 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3527 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383528
[email protected]6c648f12011-12-24 07:50:433529 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533530 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433531 # override keyword is used via the OVERRIDE macro from
3532 # base/compiler_specific.h.
3533 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443534 # Warn if automatic synthesis is triggered with
3535 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533536 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303537 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283538 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073539 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523540
3541 # This warns on using ints as initializers for floats in
3542 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3543 # which happens in several places in chrome code. Not sure if
3544 # this is worth fixing.
3545 '-Wno-c++11-narrowing',
3546
3547 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3548 # user-defined literals, this is now a string literal with a UD
3549 # suffix. However, this is used heavily in NaCl code, so disable
3550 # the warning for now.
3551 '-Wno-reserved-user-defined-literal',
3552
[email protected]66733172010-09-22 00:09:283553 # Don't die on dtoa code that uses a char as an array index.
3554 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3555 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453556 # Clang spots more unused functions.
3557 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103558
3559 # Warns on switches on enums that cover all enum values but
3560 # also contain a default: branch. Chrome is full of that.
3561 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513562
3563 # Warns when a const char[] is converted to bool.
3564 '-Wstring-conversion',
[email protected]66733172010-09-22 00:09:283565 ],
[email protected]c67e8ca2012-12-04 16:01:523566 'OTHER_CPLUSPLUSFLAGS': [
3567 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3568 # defined. (Else e.g. finite() in base/float_util.h needs to
3569 # be isfinite() which doesn't exist on the android bots.)
3570 # typeof() is also disabled in c++11 (but we could use
3571 # decltype() instead).
3572 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3573 # bots use xcode 4 -- http://crbug.com/147515).
3574 # TODO(thakis): Eventually switch this to c++11 instead of
3575 # gnu++11 (once typeof can be removed, which is blocked on c++11
3576 # being available everywhere).
3577 '$(inherited)', '-std=gnu++11',
3578 ],
[email protected]66733172010-09-22 00:09:283579 }],
[email protected]5d451ad2011-02-11 16:43:463580 ['clang==1 and clang_use_chrome_plugins==1', {
3581 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313582 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463583 ],
3584 }],
[email protected]4a9ac22e2011-12-02 03:41:533585 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593586 'OTHER_CFLAGS': [
3587 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533588 ],
3589 }],
3590 ['clang==1 and clang_add_plugin!=""', {
3591 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593592 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3593 ],
3594 }],
[email protected]2616d45d2012-01-19 03:15:483595 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3596 'OTHER_CFLAGS': [
3597 # See http://crbug.com/110262
3598 '-fcolor-diagnostics',
3599 ],
3600 }],
[email protected]b3fb8092009-03-12 19:09:243601 ],
[email protected]2f80c312009-02-25 21:26:553602 },
[email protected]34f40892011-09-06 21:53:303603 'conditions': [
3604 ['clang==1', {
3605 'variables': {
3606 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3607 },
3608 }],
[email protected]921c7b52011-11-25 10:34:353609 ['asan==1', {
3610 'xcode_settings': {
3611 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563612 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373613 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563614 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353615 ],
[email protected]921c7b52011-11-25 10:34:353616 },
3617 'defines': [
3618 'ADDRESS_SANITIZER',
3619 ],
3620 }],
[email protected]34f40892011-09-06 21:53:303621 ],
[email protected]2f80c312009-02-25 21:26:553622 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553623 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463624 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083625 'conditions': [
3626 ['asan==1', {
3627 'xcode_settings': {
3628 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443629 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083630 ],
3631 },
3632 }],
3633 ],
[email protected]5d7dc972009-04-16 15:30:463634 }],
3635 ['_mac_bundle', {
3636 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313637 'target_conditions': [
3638 ['_type=="executable"', {
3639 'conditions': [
3640 ['asan==1', {
3641 'postbuilds': [
3642 {
3643 'variables': {
3644 # Define copy_asan_dylib_path in a variable ending in
3645 # _path so that gyp understands it's a path and
3646 # performs proper relativization during dict merging.
3647 'copy_asan_dylib_path':
3648 'mac/copy_asan_runtime_dylib.sh',
3649 },
3650 'postbuild_name': 'Copy ASan runtime dylib',
3651 'action': [
3652 '<(copy_asan_dylib_path)',
3653 ],
3654 },
3655 ],
3656 }],
3657 ],
3658 }],
3659 ],
[email protected]87fde4a2009-02-28 00:50:083660 }],
[email protected]2936b8c2012-10-29 10:57:313661 ], # target_conditions
3662 }, # target_defaults
3663 }], # OS=="mac" or OS=="ios"
3664 ['OS=="mac"', {
3665 'target_defaults': {
3666 'variables': {
3667 # These should end with %, but there seems to be a bug with % in
3668 # variables that are intended to be set to different values in
3669 # different targets, like these.
3670 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313671 # Strip debugging symbols from the target.
3672 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373673 'conditions': [
3674 ['asan==1', {
3675 'conditions': [
3676 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353677 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373678 }, {
3679 'mac_real_dsym': '<(mac_want_real_dsym)'
3680 }],
3681 ],
3682 }, {
3683 'conditions': [
3684 ['mac_want_real_dsym=="default"', {
3685 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3686 }, {
3687 'mac_real_dsym': '<(mac_want_real_dsym)'
3688 }],
3689 ],
3690 }],
3691 ],
[email protected]2936b8c2012-10-29 10:57:313692 },
3693 'xcode_settings': {
3694 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3695 # (Equivalent to -fPIC)
3696 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3697 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3698 # Keep pch files below xcodebuild/.
3699 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3700 'OTHER_CFLAGS': [
3701 '-fno-strict-aliasing', # See http://crbug.com/32204
3702 ],
3703 },
3704 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103705 ['_type=="executable"', {
3706 'postbuilds': [
3707 {
3708 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363709 # code execution when running on Mac OS X 10.7 ("Lion"), and
3710 # ensures that the position-independent executable (PIE) bit
3711 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103712 'variables': {
[email protected]8c40f322011-08-24 03:33:363713 # Define change_mach_o_flags in a variable ending in _path
3714 # so that GYP understands it's a path and performs proper
3715 # relativization during dict merging.
3716 'change_mach_o_flags_path':
3717 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173718 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133719 ],
3720 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173721 ['mac_pie==0 or release_valgrind_build==1', {
3722 # Don't enable PIE if it's unwanted. It's unwanted if
3723 # the target specifies mac_pie=0 or if building for
3724 # Valgrind, because Valgrind doesn't understand slide.
3725 # See the similar mac_pie/release_valgrind_build check
3726 # below.
[email protected]081c0342011-08-24 14:59:133727 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133728 '--no-pie',
3729 ],
3730 }],
3731 ],
[email protected]6303fed2011-08-11 01:12:103732 },
[email protected]8c40f322011-08-24 03:33:363733 'postbuild_name': 'Change Mach-O Flags',
3734 'action': [
3735 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133736 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363737 ],
[email protected]6303fed2011-08-11 01:12:103738 },
3739 ],
[email protected]5a5d97aa2011-09-02 15:34:003740 'conditions': [
3741 ['asan==1', {
3742 'variables': {
3743 'asan_saves_file': 'asan.saves',
3744 },
3745 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563746 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003747 },
3748 }],
3749 ],
[email protected]162407f2011-09-08 15:33:173750 'target_conditions': [
3751 ['mac_pie==1 and release_valgrind_build==0', {
3752 # Turn on position-independence (ASLR) for executables. When
3753 # PIE is on for the Chrome executables, the framework will
3754 # also be subject to ASLR.
3755 # Don't do this when building for Valgrind, because Valgrind
3756 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3757 # understand slide, and get rid of the Valgrind check.
3758 'xcode_settings': {
3759 'OTHER_LDFLAGS': [
3760 '-Wl,-pie', # Position-independent executable (MH_PIE)
3761 ],
3762 },
3763 }],
3764 ],
[email protected]6a0242bc2011-07-01 00:34:463765 }],
[email protected]9a5e72862010-09-02 16:16:583766 ['(_type=="executable" or _type=="shared_library" or \
3767 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203768 'target_conditions': [
3769 ['mac_real_dsym == 1', {
3770 # To get a real .dSYM bundle produced by dsymutil, set the
3771 # debug information format to dwarf-with-dsym. Since
3772 # strip_from_xcode will not be used, set Xcode to do the
3773 # stripping as well.
3774 'configurations': {
[email protected]5153767c2009-12-22 01:52:503775 'Release_Base': {
[email protected]24700642009-06-01 16:01:203776 'xcode_settings': {
3777 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3778 'DEPLOYMENT_POSTPROCESSING': 'YES',
3779 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073780 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253781 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073782 # The Xcode default is to strip debugging symbols
3783 # only (-S). Local symbols should be stripped as
3784 # well, which will be handled by -x. Xcode will
3785 # continue to insert -S when stripping even when
3786 # additional flags are added with STRIPFLAGS.
3787 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:403788 }], # _type=="shared_library" or _type=="loadable_module"
3789 ['_type=="executable"', {
3790 'conditions': [
3791 ['asan==1', {
3792 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3793 }]
3794 ],
3795 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:073796 ], # target_conditions
3797 }, # xcode_settings
3798 }, # configuration "Release"
3799 }, # configurations
[email protected]24700642009-06-01 16:01:203800 }, { # mac_real_dsym != 1
3801 # To get a fast fake .dSYM bundle, use a post-build step to
3802 # produce the .dSYM and strip the executable. strip_from_xcode
3803 # only operates in the Release configuration.
3804 'postbuilds': [
3805 {
3806 'variables': {
3807 # Define strip_from_xcode in a variable ending in _path
3808 # so that gyp understands it's a path and performs proper
3809 # relativization during dict merging.
3810 'strip_from_xcode_path': 'mac/strip_from_xcode',
3811 },
3812 'postbuild_name': 'Strip If Needed',
3813 'action': ['<(strip_from_xcode_path)'],
3814 },
[email protected]e14a9f92009-08-05 19:26:073815 ], # postbuilds
3816 }], # mac_real_dsym
3817 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583818 }], # (_type=="executable" or _type=="shared_library" or
3819 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073820 ], # target_conditions
3821 }, # target_defaults
3822 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203823 ['OS=="ios"', {
3824 'target_defaults': {
3825 'xcode_settings' : {
3826 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3827
3828 # This next block is mostly common with the 'mac' section above,
3829 # but keying off (or setting) 'clang' isn't valid for iOS as it
3830 # also seems to mean using the custom build of clang.
3831
3832 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533833 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203834 # override keyword is used via the OVERRIDE macro from
3835 # base/compiler_specific.h.
3836 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443837 # Warn if automatic synthesis is triggered with
3838 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533839 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:203840 'WARNING_CFLAGS': [
3841 '-Wheader-hygiene',
3842 # Don't die on dtoa code that uses a char as an array index.
3843 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3844 '-Wno-char-subscripts',
3845 # Clang spots more unused functions.
3846 '-Wno-unused-function',
3847 # See comments on this flag higher up in this file.
3848 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:533849 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:203850 # heavily.
3851 '-Wno-c++11-extensions',
3852 ],
3853 },
3854 'target_conditions': [
3855 ['_type=="executable"', {
3856 'configurations': {
3857 'Release_Base': {
3858 'xcode_settings': {
3859 'DEPLOYMENT_POSTPROCESSING': 'YES',
3860 'STRIP_INSTALLED_PRODUCT': 'YES',
3861 },
3862 },
[email protected]3c6aa862012-11-05 17:11:443863 'Debug_Base': {
3864 'xcode_settings': {
3865 # Remove dSYM to reduce build time.
3866 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3867 },
3868 },
[email protected]1e013672012-06-29 22:12:203869 },
3870 'xcode_settings': {
3871 'conditions': [
3872 ['chromium_ios_signing', {
3873 # iOS SDK wants everything for device signed.
3874 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3875 }, {
3876 'CODE_SIGNING_REQUIRED': 'NO',
3877 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3878 }],
3879 ],
3880 },
3881 }],
3882 ], # target_conditions
3883 }, # target_defaults
3884 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553885 ['OS=="win"', {
3886 'target_defaults': {
3887 'defines': [
[email protected]8e345da2012-07-01 22:10:303888 '_WIN32_WINNT=0x0602',
3889 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553890 'WIN32',
3891 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553892 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283893 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553894 '_CRT_RAND_S',
3895 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3896 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273897 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553898 ],
[email protected]8974e042010-06-21 18:06:523899 'conditions': [
[email protected]2212d272011-12-20 21:37:373900 ['buildtype=="Official"', {
3901 # In official builds, targets can self-select an optimization
3902 # level by defining a variable named 'optimize', and setting it
3903 # to one of
3904 # - "size", optimizes for minimal code size - the default.
3905 # - "speed", optimizes for speed over code size.
3906 # - "max", whole program optimization and link-time code
3907 # generation. This is very expensive and should be used
3908 # sparingly.
3909 'variables': {
3910 'optimize%': 'size',
3911 },
3912 'target_conditions': [
3913 ['optimize=="size"', {
3914 'msvs_settings': {
3915 'VCCLCompilerTool': {
3916 # 1, optimizeMinSpace, Minimize Size (/O1)
3917 'Optimization': '1',
3918 # 2, favorSize - Favor small code (/Os)
3919 'FavorSizeOrSpeed': '2',
3920 },
3921 },
3922 },
3923 ],
3924 ['optimize=="speed"', {
3925 'msvs_settings': {
3926 'VCCLCompilerTool': {
3927 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3928 'Optimization': '2',
3929 # 1, favorSpeed - Favor fast code (/Ot)
3930 'FavorSizeOrSpeed': '1',
3931 },
3932 },
3933 },
3934 ],
3935 ['optimize=="max"', {
3936 'msvs_settings': {
3937 'VCCLCompilerTool': {
3938 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3939 'Optimization': '2',
3940 # 1, favorSpeed - Favor fast code (/Ot)
3941 'FavorSizeOrSpeed': '1',
3942 # This implies link time code generation.
3943 'WholeProgramOptimization': 'true',
3944 },
3945 },
3946 },
3947 ],
3948 ],
3949 },
3950 ],
[email protected]8974e042010-06-21 18:06:523951 ['component=="static_library"', {
3952 'defines': [
3953 '_HAS_EXCEPTIONS=0',
3954 ],
3955 }],
[email protected]3e2648a2011-03-21 20:58:503956 ['secure_atl', {
3957 'defines': [
3958 '_SECURE_ATL',
3959 ],
3960 }],
[email protected]54184ce72012-10-18 07:11:263961 ['msvs_express', {
3962 'configurations': {
3963 'x86_Base': {
3964 'msvs_settings': {
3965 'VCLinkerTool': {
3966 'AdditionalLibraryDirectories':
3967 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3968 },
3969 'VCLibrarianTool': {
3970 'AdditionalLibraryDirectories':
3971 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3972 },
3973 },
3974 },
3975 'x64_Base': {
3976 'msvs_settings': {
3977 'VCLibrarianTool': {
3978 'AdditionalLibraryDirectories':
3979 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3980 },
3981 'VCLinkerTool': {
3982 'AdditionalLibraryDirectories':
3983 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3984 },
3985 },
3986 },
3987 },
3988 'msvs_settings': {
3989 'VCLinkerTool': {
3990 # Explicitly required when using the ATL with express
3991 'AdditionalDependencies': ['atlthunk.lib'],
3992
3993 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3994 # almost eight hundred LNK4254 and LNK4078 warnings:
3995 # - warning LNK4254: section 'ATL' (50000040) merged into
3996 # '.rdata' (40000040) with different attributes
3997 # - warning LNK4078: multiple 'ATL' sections found with
3998 # different attributes
3999 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4000 },
4001 },
4002 'msvs_system_include_dirs': [
4003 '<(windows_driver_kit_path)/inc/atl71',
4004 '<(windows_driver_kit_path)/inc/mfc42',
4005 ],
4006 }],
[email protected]8974e042010-06-21 18:06:524007 ],
[email protected]5b5ca7cb2009-07-20 23:00:204008 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054009 '<(windows_sdk_path)/Include/shared',
4010 '<(windows_sdk_path)/Include/um',
4011 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554012 '$(VSInstallDir)/VC/atlmfc/include',
4013 ],
[email protected]a8d99cef2009-08-26 20:47:494014 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:114015 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
4016 # TODO(maruel): These warnings are level 4. They will be slowly
4017 # removed as code is fixed.
4018 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
4019 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
4020 4702, 4706,
4021 ],
[email protected]2f80c312009-02-25 21:26:554022 'msvs_settings': {
4023 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444024 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554025 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554026 'BufferSecurityCheck': 'true',
4027 'EnableFunctionLevelLinking': 'true',
4028 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114029 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554030 'WarnAsError': 'true',
4031 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584032 'conditions': [
[email protected]8974e042010-06-21 18:06:524033 ['component=="shared_library"', {
4034 'ExceptionHandling': '1', # /EHsc
4035 }, {
4036 'ExceptionHandling': '0',
4037 }],
[email protected]3fef6e62009-07-31 19:58:584038 ],
[email protected]2f80c312009-02-25 21:26:554039 },
4040 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164041 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374042 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054043 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374044 ],
[email protected]2f80c312009-02-25 21:26:554045 },
4046 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554047 'AdditionalDependencies': [
4048 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504049 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554050 'version.lib',
4051 'msimg32.lib',
4052 'ws2_32.lib',
4053 'usp10.lib',
4054 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084055 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484056 'winmm.lib',
4057 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554058 ],
[email protected]a78da50e2010-06-09 21:31:374059 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054060 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374061 ],
[email protected]2f80c312009-02-25 21:26:554062 'GenerateDebugInformation': 'true',
4063 'MapFileName': '$(OutDir)\\$(TargetName).map',
4064 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554065 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484066 # SubSystem values:
4067 # 0 == not set
4068 # 1 == /SUBSYSTEM:CONSOLE
4069 # 2 == /SUBSYSTEM:WINDOWS
4070 # Most of the executables we'll ever create are tests
4071 # and utilities with console output.
4072 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554073 },
4074 'VCMIDLTool': {
4075 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094076 'TypeLibraryName': '$(InputName).tlb',
4077 'OutputDirectory': '$(IntDir)',
4078 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334079 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094080 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4081 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554082 },
4083 'VCResourceCompilerTool': {
4084 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384085 'AdditionalIncludeDirectories': [
4086 '<(DEPTH)',
4087 '<(SHARED_INTERMEDIATE_DIR)',
4088 ],
[email protected]2f80c312009-02-25 21:26:554089 },
4090 },
4091 },
4092 }],
[email protected]79e2336c2011-05-12 18:18:344093 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314094 'target_defaults': {
4095 'defines': [
4096 'DISABLE_NACL',
4097 ],
4098 },
4099 }],
[email protected]cfbf9bc2009-12-07 22:07:564100 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194101 'target_defaults': {
4102 'msvs_settings': {
4103 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194104 'DelayLoadDLLs': [
4105 'dbghelp.dll',
4106 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014107 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194108 'uxtheme.dll',
4109 ],
4110 },
4111 },
[email protected]ef4fa4072009-12-04 22:46:504112 'configurations': {
[email protected]5153767c2009-12-22 01:52:504113 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504114 'msvs_settings': {
4115 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164116 'AdditionalOptions': [
4117 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334118 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164119 '/ignore:4199',
4120 '/ignore:4221',
4121 '/nxcompat',
4122 ],
[email protected]ef4fa4072009-12-04 22:46:504123 },
4124 },
4125 },
[email protected]5153767c2009-12-22 01:52:504126 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504127 'msvs_settings': {
4128 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164129 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504130 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334131 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164132 '/ignore:4199',
4133 '/ignore:4221',
4134 '/nxcompat',
4135 ],
[email protected]ef4fa4072009-12-04 22:46:504136 },
4137 },
4138 },
4139 },
[email protected]48c7af72009-07-03 22:00:194140 },
4141 }],
[email protected]9821d0d2010-04-16 22:40:374142 ['enable_new_npdevice_api==1', {
4143 'target_defaults': {
4144 'defines': [
4145 'ENABLE_NEW_NPDEVICE_API',
4146 ],
4147 },
4148 }],
[email protected]220ea5932012-08-09 10:44:074149 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234150 'conditions': [
4151 ['OS=="android"', {
4152 # Android could use the goma with clang.
4153 'make_global_settings': [
4154 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4155 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4156 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4157 ['CC.host', '$(CC)'],
4158 ['CXX.host', '$(CXX)'],
4159 ['LINK.host', '$(LINK)'],
4160 ],
4161 }, {
4162 'make_global_settings': [
4163 ['CC', '<(make_clang_dir)/bin/clang'],
4164 ['CXX', '<(make_clang_dir)/bin/clang++'],
4165 ['LINK', '$(CXX)'],
4166 ['CC.host', '$(CC)'],
4167 ['CXX.host', '$(CXX)'],
4168 ['LINK.host', '$(LINK)'],
4169 ],
4170 }],
[email protected]34f40892011-09-06 21:53:304171 ],
4172 }],
[email protected]615fa6642012-08-14 19:17:074173 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274174 # Hardcode the compiler names in the Makefile so that
4175 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114176 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044177 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4178 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4179 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074180 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4181 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4182 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274183 ],
4184 }],
[email protected]eb5f1672013-01-31 07:56:464185 ['target_arch=="mipsel"', {
4186 'make_global_settings': [
4187 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4188 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4189 ['LINK', '$(CXX)'],
4190 ['CC.host', '<!(which gcc)'],
4191 ['CXX.host', '<!(which g++)'],
4192 ['LINK.host', '<!(which g++)'],
4193 ],
4194 }],
[email protected]2f80c312009-02-25 21:26:554195 ],
4196 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504197 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4198 # This block adds *project-wide* configuration settings to each project
4199 # file. It's almost always wrong to put things here. Specify your
4200 # custom xcode_settings in target_defaults to add them to targets instead.
4201
[email protected]1e013672012-06-29 22:12:204202 'conditions': [
[email protected]fca3d812012-07-27 00:55:364203 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4204 # setting sets the SDK on a project-wide basis. In order to get the
4205 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4206 # here at the project level.
[email protected]2c261532012-10-06 00:46:294207 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364208 'conditions': [
[email protected]2c261532012-10-06 00:46:294209 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364210 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294211 }, {
4212 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364213 }],
4214 ],
[email protected]2c261532012-10-06 00:46:294215 }],
4216 ['OS=="ios"', {
4217 'conditions': [
4218 ['ios_sdk_path==""', {
4219 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4220 }, {
4221 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4222 }],
4223 ],
[email protected]1e013672012-06-29 22:12:204224 }],
4225 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204226 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:444227 # Just build armv7, until armv7s is correctly tested.
4228 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204229 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:204230 # Target both iPhone and iPad.
4231 'TARGETED_DEVICE_FAMILY': '1,2',
4232 }],
[email protected]f9335b42013-01-24 21:00:234233 ['target_arch=="x64"', {
4234 'ARCHS': [
4235 'x86_64'
4236 ],
4237 }],
[email protected]1e013672012-06-29 22:12:204238 ],
[email protected]0c8ab452009-11-06 21:57:504239
[email protected]2f80c312009-02-25 21:26:554240 # The Xcode generator will look for an xcode_settings section at the root
4241 # of each dict and use it to apply settings on a file-wide basis. Most
4242 # settings should not be here, they should be in target-specific
4243 # xcode_settings sections, or better yet, should use non-Xcode-specific
4244 # settings in target dicts. SYMROOT is a special case, because many other
4245 # Xcode variables depend on it, including variables such as
4246 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4247 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4248 # files to appear (when present) in the UI as actual files and not red
4249 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4250 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164251 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554252 },
[email protected]ee28c9f2009-09-04 01:53:014253}