blob: c2f26efa08fa781bebc01ffeb018b26b1efe8ae7 [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]7d6763422013-04-26 12:06:54126 # Set ARM architecture version.
127 'arm_version%': 7,
128
[email protected]e72e55b2011-01-06 22:19:30129 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50130 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35131 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43132 'toolkit_views%': 1,
133 }, {
134 'toolkit_views%': 0,
135 }],
[email protected]1efbaaa2012-04-24 02:43:24136
[email protected]8796d922012-08-07 01:23:11137 # Set toolkit_uses_gtk for the Chromium browser on Linux.
138 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
139 'toolkit_uses_gtk%': 1,
140 }, {
141 'toolkit_uses_gtk%': 0,
142 }],
143
[email protected]3aa8a682012-08-11 00:04:29144 # Enable HiDPI on Mac OS and Chrome OS.
145 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24146 'enable_hidpi%': 1,
147 }],
[email protected]219c7312012-05-10 20:32:40148
[email protected]c71fe6402012-08-15 15:22:55149 # Enable touch UI on Metro.
150 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06151 'enable_touch_ui%': 1,
152 }],
[email protected]dc4e8b82012-11-15 03:58:16153
[email protected]b1a2b542013-01-10 07:33:09154 # Enable App Launcher only on ChromeOS, Windows and OSX.
155 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16156 'enable_app_list%': 1,
157 }, {
158 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09159 }],
160
[email protected]f4fb8422013-03-14 11:59:59161 # Enable Message Center only on ChromeOS, Windows, and Mac for now.
162 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]b1a2b542013-01-10 07:33:09163 'enable_message_center%': 1,
164 }, {
[email protected]9b5dbf72013-01-09 20:29:15165 'enable_message_center%': 0,
[email protected]dc4e8b82012-11-15 03:58:16166 }],
[email protected]cb800562012-11-20 22:36:07167
168 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26169 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07170 }, {
171 'use_default_render_theme%': 0,
172 }],
[email protected]e72e55b2011-01-06 22:19:30173 ],
174 },
175
176 # Copy conditionally-set variables out one scope.
177 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30178 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22179 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43180 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11181 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58182 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16183 'use_ash%': '<(use_ash)',
[email protected]c335f4802013-04-06 04:51:21184 'use_messagepump_linux%': '<(use_messagepump_linux)',
[email protected]e0b85a52011-10-06 03:30:42185 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05186 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24187 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06188 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]d999c3cb2013-03-12 10:22:36189 'android_webview_build%': '<(android_webview_build)',
[email protected]55d92492013-01-31 05:03:39190 'google_tv%': '<(google_tv)',
[email protected]5b38a522013-03-20 17:00:47191 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]dc4e8b82012-11-15 03:58:16192 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15193 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07194 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22195 'buildtype%': '<(buildtype)',
[email protected]7d6763422013-04-26 12:06:54196 'arm_version%': '<(arm_version)',
[email protected]023d8242011-11-22 01:25:27197
[email protected]e14a9f92009-08-05 19:26:07198 # Override branding to select the desired branding flavor.
199 'branding%': 'Chromium',
200
[email protected]c86fd472013-04-02 19:42:30201 # Set to 1 to enable fast builds. Set to 2 for even faster builds
202 # (it disables debug info for fastest compilation - only for use
203 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30204 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49205
[email protected]20960e072011-09-20 20:59:01206 # Set to 1 to enable dcheck in release without having to use the flag.
207 'dcheck_always_on%': 0,
208
[email protected]464750f2011-10-24 23:16:18209 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51210 'file_manager_extension%': 0,
211
[email protected]77a848262013-02-22 11:17:25212 # Disable image loader component extension by default.
213 'image_loader_extension%': 0,
214
[email protected]e72e55b2011-01-06 22:19:30215 # Python version.
[email protected]a43c5a02011-05-27 06:54:51216 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17217
[email protected]e72e55b2011-01-06 22:19:30218
[email protected]7d6763422013-04-26 12:06:54219 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30220 'arm_neon%': 1,
221
[email protected]7d6763422013-04-26 12:06:54222 # Detect NEON support at run-time.
223 'arm_neon_optional%': 0,
224
[email protected]e72e55b2011-01-06 22:19:30225 # The system root for cross-compiles. Default: none.
226 'sysroot%': '',
227
[email protected]945361a2011-09-30 04:38:43228 # The system libdir used for this ABI.
229 'system_libdir%': 'lib',
230
[email protected]e72e55b2011-01-06 22:19:30231 # On Linux, we build with sse2 for Chromium builds.
232 'disable_sse2%': 0,
233
234 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03235 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30236
[email protected]d9113542012-07-18 17:11:28237 # Use system libjpeg. Note that the system's libjepg will be used even if
238 # use_libjpeg_turbo is set.
239 'use_system_libjpeg%': 0,
240
[email protected]aa5e01fc2013-03-06 14:06:17241 # By default, component is set to static_library and it can be overriden
242 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53243 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30244
[email protected]bb6aba32011-01-07 19:04:43245 # Set to select the Title Case versions of strings in GRD files.
246 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21247
[email protected]98da0042011-02-02 00:10:27248 # Use translations provided by volunteers at launchpad.net. This
249 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19250 'use_third_party_translations%': 0,
251
[email protected]9a425422011-01-11 00:53:18252 # Remoting compilation is enabled by default. Set to 0 to disable.
253 'remoting%': 1,
254
[email protected]1ec68c42011-06-01 13:56:25255 # Configuration policy is enabled by default. Set to 0 to disable.
256 'configuration_policy%': 1,
257
[email protected]6c521fed2012-11-29 17:00:03258 # Variable safe_browsing is used to control the build time configuration
259 # for safe browsing feature. Safe browsing can be compiled in 3 different
260 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
261 # reporting features without enabling phishing and malware detection. This
262 # is useful to integrate a third party phishing/malware detection to
263 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56264 'safe_browsing%': 1,
265
[email protected]9eb100e2011-10-14 05:08:22266 # Speech input is compiled in by default. Set to 0 to disable.
267 'input_speech%': 1,
268
[email protected]7cce3232011-10-28 10:41:57269 # Notifications are compiled in by default. Set to 0 to disable.
270 'notifications%' : 1,
271
[email protected]970fd4e2012-12-19 11:09:37272 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
273 # regular builds and 1 for ASan builds.
274 'mac_want_real_dsym%': 'default',
275
[email protected]5d451ad2011-02-11 16:43:46276 # If this is set, the clang plugins used on the buildbot will be used.
277 # Run tools/clang/scripts/update.sh to make sure they are compiled.
278 # This causes 'clang_chrome_plugins_flags' to be set.
279 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08280 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46281
[email protected]2e82fa52012-11-27 23:41:44282 # Enable building with ASAN (Clang's -fsanitize=address option).
283 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06284 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
285 'asan%': 0,
286
[email protected]927a9d672012-11-09 11:28:20287 # Enable building with TSAN (Clang's -fsanitize=thread option).
288 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12289 # See http://clang.llvm.org/docs/ThreadSanitizer.html
290 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16291 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12292
[email protected]a10ddd2d2013-02-26 20:06:59293 # Enable building with MSAN (Clang's -fsanitize=memory option).
294 # MemorySanitizer only works with clang, but msan=1 implies clang=1
295 # See http://clang.llvm.org/docs/MemorySanitizer.html
296 'msan%': 0,
297
[email protected]7ce58b22012-09-26 05:17:25298 # Use a modified version of Clang to intercept allocated types and sizes
299 # for allocated objects. clang_type_profiler=1 implies clang=1.
300 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
301 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
302 'clang_type_profiler%': 0,
303
[email protected]8a6abd12012-05-16 10:04:44304 # Set to true to instrument the code with function call logger.
305 # See src/third_party/cygprofile/cyg-profile.cc for details.
306 'order_profiling%': 0,
307
[email protected]00b0a7f2012-01-25 15:30:46308 # Use the provided profiled order file to link Chrome image with it.
309 # This makes Chrome faster by better using CPU cache when executing code.
310 # This is known as PGO (profile guided optimization).
311 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
312 'order_text_section%' : "",
313
[email protected]1ad5a7b2011-06-24 03:15:13314 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
315 # libraries on linux x86-64 and arm, plus ASLR.
316 'linux_fpic%': 1,
317
[email protected]bd7b6fe2012-03-05 21:02:40318 # Whether one-click signin is enabled or not.
319 'enable_one_click_signin%': 0,
320
[email protected]6a3cd37e2012-04-17 17:13:34321 # Enable Chrome browser extensions
322 'enable_extensions%': 1,
323
[email protected]658677f2012-06-09 06:04:02324 # Enable browser automation.
325 'enable_automation%': 1,
326
[email protected]6ee43a72012-12-07 22:44:40327 # Enable Google Now.
328 'enable_google_now%': 1,
329
[email protected]703369a2012-11-05 20:40:31330 # Enable language detection.
331 'enable_language_detection%': 1,
332
[email protected]658677f2012-06-09 06:04:02333 # Enable printing support and UI.
334 'enable_printing%': 1,
335
[email protected]dda90ae2011-07-19 22:07:48336 # Webrtc compilation is enabled by default. Set to 0 to disable.
337 'enable_webrtc%': 1,
338
[email protected]cdb756ef2012-04-05 18:34:53339 # Enables use of the session service, which is enabled by default.
340 # Support for disabling depends on the platform.
341 'enable_session_service%': 1,
342
[email protected]6b40bb582012-03-15 20:50:38343 # Enables theme support, which is enabled by default. Support for
344 # disabling depends on the platform.
345 'enable_themes%': 1,
346
[email protected]57e67ac2013-02-22 03:37:22347 # Enables autofill dialog and associated features; disabled by default.
348 'enable_autofill_dialog%' : 0,
349
[email protected]4ffe78a2012-10-04 20:55:15350 # Uses OEM-specific wallpaper resources on Chrome OS.
351 'use_oem_wallpaper%': 0,
352
[email protected]0acdd772012-04-05 22:53:00353 # Enables support for background apps.
354 'enable_background%': 1,
355
[email protected]44879ed2012-04-06 01:11:02356 # Enable the task manager by default.
357 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45358
[email protected]9bfe0ab2012-08-30 13:18:11359 # Enable FTP support by default.
360 'disable_ftp_support%': 0,
361
[email protected]22d6dd72012-05-15 07:29:55362 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
363 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
364 # the input value also defines the required XI2 minor minimum version.
365 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
366 'use_xi2_mt%': 0,
367
[email protected]9061bee82012-01-16 11:45:17368 # Use of precompiled headers on Windows.
369 #
[email protected]9061bee82012-01-16 11:45:17370 # This variable may be explicitly set to 1 (enabled) or 0
371 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
372 # This setting will override the default.
373 #
[email protected]c3340fb32012-12-20 20:45:39374 # See
[email protected]9061bee82012-01-16 11:45:17375 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
376 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16377 'chromium_win_pch%': 0,
378
[email protected]3bb37e62012-04-19 03:40:08379 # Set this to true when building with Clang.
380 # See http://code.google.com/p/chromium/wiki/Clang for details.
381 'clang%': 0,
382
[email protected]18e0f39b2012-01-17 16:47:34383 # Enable plug-in installation by default.
384 'enable_plugin_installation%': 1,
385
[email protected]6d17f6392012-12-05 05:24:54386 # Enable PPAPI and NPAPI by default.
387 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
388 # as PPAPI; see crbug.com/162667.
389 'enable_plugins%': 1,
390
[email protected]62424a52012-03-18 03:09:50391 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42392 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35393 # Chrome UI.
394 # TODO(asvitkine): Enable this on all platforms and delete this flag.
395 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50396 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35397
[email protected]a9318c72012-03-01 01:29:47398 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
399 # with one of those tools.
400 'build_for_tool%': '',
401
[email protected]37138132013-01-17 23:08:52402 # If no directory is specified then a temporary directory will be used.
403 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47404 # True if isolate should fail if the isolate files refer to files
405 # that are missing.
406 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56407
[email protected]740ebed2012-06-27 19:14:06408 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12409 'wix_path%': '<(DEPTH)/third_party/wix',
410
[email protected]0850e842013-01-19 03:44:31411 # Managed users are enabled by default.
412 'enable_managed_users%': 1,
413
[email protected]199def22013-02-21 17:52:29414 'spdy_proxy_auth_origin%' : '',
415 'spdy_proxy_auth_property%' : '',
416
[email protected]bb6aba32011-01-07 19:04:43417 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34418 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37419 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34420 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37421 }, {
422 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34423 }],
424
[email protected]df9167b2011-11-14 19:15:25425 # A flag for BSD platforms
426 ['OS=="freebsd" or OS=="openbsd"', {
427 'os_bsd%': 1,
428 }, {
429 'os_bsd%': 0,
430 }],
431
[email protected]7d6763422013-04-26 12:06:54432 # Set armv7 for backward compatibility.
433 ['arm_version==7', {
434 'armv7': 1,
435 }, {
436 'armv7': 0,
437 }],
438
[email protected]c329adf82011-10-05 14:34:57439 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42440 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57441 'use_nss%': 1,
442 }, {
443 'use_nss%': 0,
444 }],
[email protected]e0b85a52011-10-06 03:30:42445
[email protected]c335f4802013-04-06 04:51:21446 # Flags to use X11 on non-Mac POSIX platforms.
447 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_messagepump_linux==1', {
[email protected]79e2336c2011-05-12 18:18:34448 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37449 }, {
[email protected]c49ab0c2011-05-18 17:25:37450 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34451 }],
[email protected]9a8175892012-03-20 02:11:58452
[email protected]c335f4802013-04-06 04:51:21453 # Flags to use glib on non-Mac POSIX platforms.
454 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
455 'use_glib%': 0,
456 }, {
457 'use_glib%': 1,
458 }],
459
[email protected]efadeacf2011-10-27 19:01:00460 # We always use skia text rendering in Aura on Windows, since GDI
461 # doesn't agree with our BackingStore.
462 # TODO(beng): remove once skia text rendering is on by default.
463 ['use_aura==1 and OS=="win"', {
464 'enable_skia_text%': 1,
465 }],
[email protected]9edeb712011-09-20 21:20:33466
[email protected]63692212010-09-16 00:22:21467 # A flag to enable or disable our compile-time dependency
468 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
469 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49470 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50471 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21472 'use_gnome_keyring%': 0,
473 }, {
474 'use_gnome_keyring%': 1,
475 }],
[email protected]0afe5212010-10-01 18:56:11476
[email protected]8796d922012-08-07 01:23:11477 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20478 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43479 'use_titlecase_in_grd_files%': 1,
480 }],
481
[email protected]77a848262013-02-22 11:17:25482 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06483 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50484 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25485 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50486 }, {
[email protected]3d38d8e2011-04-16 20:48:51487 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25488 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51489 }],
[email protected]7de46352011-09-12 15:39:19490
[email protected]c79d1972013-02-06 18:47:29491 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01492 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51493 }],
494
[email protected]da1c8d692011-09-20 20:35:01495 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49496 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46497 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40498 'enable_google_now%': 0,
[email protected]7831e9a2013-02-20 13:54:12499 'enable_language_detection%': 1,
[email protected]55e02302012-08-21 00:50:46500 'enable_printing%': 0,
501 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46502 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58503 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54504 'arm_neon%': 0,
505 'arm_neon_optional%': 1,
[email protected]da1c8d692011-09-20 20:35:01506 }],
[email protected]839d5172011-10-13 17:18:11507
[email protected]57e67ac2013-02-22 03:37:22508 # Enable autofill dialog for Android and Views-enabled platforms for now.
[email protected]d999c3cb2013-03-12 10:22:36509 ['toolkit_views==1 or (OS=="android" and android_webview_build==0)', {
[email protected]57e67ac2013-02-22 03:37:22510 'enable_autofill_dialog%': 1
511 }],
512
[email protected]d999c3cb2013-03-12 10:22:36513 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43514 'enable_webrtc%': 1,
515 }],
516
517 # Disable WebRTC for building WebView as part of Android system.
518 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
519 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36520 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43521 'enable_webrtc%': 0,
522 }],
523
[email protected]0d16f292012-07-02 22:10:48524 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24525 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11526 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24527 'enable_automation%': 0,
528 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40529 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31530 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24531 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44532 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24533 'enable_themes%': 0,
534 'enable_webrtc%': 0,
535 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48536 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44537 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31538 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48539 }],
540
[email protected]839d5172011-10-13 17:18:11541 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27542 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01543 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33544 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11545 }, {
[email protected]1ee7c56c2011-10-19 14:51:33546 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11547 }],
[email protected]9061bee82012-01-16 11:45:17548
[email protected]c3340fb32012-12-20 20:45:39549 # Turn precompiled headers on by default.
550 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17551 'chromium_win_pch%': 1
552 }],
[email protected]18e0f39b2012-01-17 16:47:34553
[email protected]3d5173ec2012-03-27 04:08:23554 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34555 'enable_plugin_installation%': 0,
556 }, {
557 'enable_plugin_installation%': 1,
558 }],
[email protected]b07806c12012-02-03 22:44:59559
[email protected]55d92492013-01-31 05:03:39560 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54561 'enable_plugins%': 0,
562 }, {
563 'enable_plugins%': 1,
564 }],
565
[email protected]8d726a42012-02-09 03:49:00566 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56567 # third_party/gold. Gold is not used for 32-bit linux builds
568 # as it runs out of address space.
569 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51570 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17571 }, {
[email protected]bd68ea52013-03-26 09:49:37572 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34573 }],
574
575 # linux_use_gold_flags: whether to use build flags that rely on gold.
576 # On by default for x64 Linux. Temporarily off for ChromeOS as
577 # it failed on a buildbot.
578 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
579 'linux_use_gold_flags%': 1,
580 }, {
[email protected]8d726a42012-02-09 03:49:00581 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59582 }],
[email protected]2e22e2f2012-03-15 21:53:10583
[email protected]9394a3a2012-12-19 19:22:39584 ['chromeos==1', {
585 'linux_use_libgps%': 1,
586 }, { # chromeos==0
587 # Do not use libgps on desktop Linux by default,
588 # see http://crbug.com/103751.
589 'linux_use_libgps%': 0,
590 }],
591
[email protected]a95d5302012-11-03 00:02:19592 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32593 'enable_captive_portal_detection%': 0,
594 }, {
595 'enable_captive_portal_detection%': 1,
596 }],
597
[email protected]3bd47e022012-03-22 04:19:12598 # Enable Skia UI text drawing incrementally on different platforms.
599 # http://crbug.com/105550
600 #
601 # On Aura, this allows per-tile painting to be used in the browser
602 # compositor.
[email protected]9197a9282012-05-30 14:12:32603 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12604 'use_canvas_skia%': 1,
605 }],
[email protected]adb44342012-07-23 13:36:12606
[email protected]0753ea42012-08-30 20:15:44607 ['chromeos==1', {
608 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
609 'use_libjpeg_turbo%': 0,
610 }],
611
[email protected]adb44342012-07-23 13:36:12612 ['OS=="android"', {
613 # When building as part of the Android system, use system libraries
614 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36615 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12616 }],
[email protected]8a46f5f2012-12-05 00:47:12617
618 # Enable Settings App only on Windows.
619 ['enable_app_list==1 and OS=="win"', {
620 'enable_settings_app%': 1,
621 }, {
622 'enable_settings_app%': 0,
623 }],
[email protected]94cdbf42012-12-11 19:49:22624
625 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
626 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22627 'linux_breakpad%': 0,
628 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43629 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22630 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43631 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22632 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46633
634 ['target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07635 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28636 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46637 }],
[email protected]5b38a522013-03-20 17:00:47638
639 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01640 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47641 # e.g. base_unittests_run runs the target base_unittests. The test
642 # target always calls tools/swarm_client/isolate.py. See the script's
643 # --help for more information and the valid --mode values. Meant to be
644 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01645 # TODO(maruel): Remove the conditions as more configurations are
646 # supported.
[email protected]349f3062013-04-10 20:44:51647 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
648 # again.
[email protected]93fe4002013-04-10 00:17:01649 # NOTE: The check for disable_nacl==0 and component=="static_library"
650 # can't be used here because these variables are not defined yet, but it
651 # is still not supported.
[email protected]66f08bc2013-04-23 00:45:01652 ['inside_chromium_build==1 and OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47653 'test_isolation_mode%': 'check',
654 }, {
655 'test_isolation_mode%': 'noop',
656 }],
[email protected]5cbeb502013-04-23 19:25:27657 # Whether Android ARM build uses OpenMAX DL FFT.
[email protected]fc3ab0c2013-04-17 15:26:34658 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
[email protected]6558fd4f2013-04-17 18:51:38659 # Currently only supported on Android ARM, without webview.
660 # When enabled, this will also enable WebAudio on Android
[email protected]330f3a32013-04-23 05:47:58661 # ARM. Default is enabled.
662 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53663 }, {
664 'use_openmax_dl_fft%': 0,
665 }],
[email protected]b3f23ba2010-04-26 22:58:17666 ],
[email protected]2b113652012-09-17 17:01:39667
[email protected]a3a720f2013-04-25 19:35:42668 # Set this to 1 to enable use of concatenated impulse responses
669 # for the HRTF panner in WebAudio.
670 'use_concatenated_impulse_responses': 0,
671
[email protected]2b113652012-09-17 17:01:39672 # Set this to 1 to use the Google-internal file containing
673 # official API keys for Google Chrome even in a developer build.
674 # Setting this variable explicitly to 1 will cause your build to
675 # fail if the internal file is missing.
676 #
677 # Set this to 0 to not use the internal file, even when it
678 # exists in your checkout.
679 #
680 # Leave set to 2 to have this variable implicitly set to 1 if
681 # you have src/google_apis/internal/google_chrome_api_keys.h in
682 # your checkout, and implicitly set to 0 if not.
683 #
684 # Note that official builds always behave as if this variable
685 # was explicitly set to 1, i.e. they always use official keys,
686 # and will fail to build if the internal file is missing.
687 'use_official_google_api_keys%': 2,
688
689 # Set these to bake the specified API keys and OAuth client
690 # IDs/secrets into your build.
691 #
692 # If you create a build without values baked in, you can instead
693 # set environment variables to provide the keys at runtime (see
694 # src/google_apis/google_api_keys.h for details). Features that
695 # require server-side APIs may fail to work if no keys are
696 # provided.
697 #
698 # Note that if you are building an official build or if
699 # use_official_google_api_keys has been set to 1 (explicitly or
700 # implicitly), these values will be ignored and the official
701 # keys will be used instead.
702 'google_api_key%': '',
703 'google_default_client_id%': '',
704 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07705 },
706
[email protected]e72e55b2011-01-06 22:19:30707 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07708 'branding%': '<(branding)',
709 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27710 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59711 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44712 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33713 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58714 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16715 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42716 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57717 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25718 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34719 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19720 'use_glib%': '<(use_glib)',
[email protected]c335f4802013-04-06 04:51:21721 'use_messagepump_linux%': '<(use_messagepump_linux)',
[email protected]79e2336c2011-05-12 18:18:34722 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
723 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21724 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11725 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44726 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05727 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24728 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06729 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35730 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20731 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25732 'image_loader_extension%': '<(image_loader_extension)',
[email protected]b2f030c2009-09-24 20:36:21733 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54734 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01735 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36736 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54737 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43738 'armv7%': '<(armv7)',
739 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54740 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23741 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43742 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52743 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43744 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17745 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18746 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40747 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48748 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16749 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25750 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56751 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22752 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57753 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46754 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37755 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06756 'asan%': '<(asan)',
[email protected]a10ddd2d2013-02-26 20:06:59757 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12758 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16759 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25760 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44761 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46762 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34763 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34764 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54765 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53766 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38767 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22768 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]4ffe78a2012-10-04 20:55:15769 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00770 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59771 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00772 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39773 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50774 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33775 'test_isolation_mode%': '<(test_isolation_mode)',
776 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47777 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10778 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02779 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40780 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31781 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32782 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11783 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02784 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06785 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12786 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44787 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12788 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36789 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46790 'gyp_managed_install%': 0,
[email protected]55d92492013-01-31 05:03:39791 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16792 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15793 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07794 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16795 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39796 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
797 'google_api_key%': '<(google_api_key)',
798 'google_default_client_id%': '<(google_default_client_id)',
799 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31800 'enable_managed_users%': '<(enable_managed_users)',
[email protected]199def22013-02-21 17:52:29801 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
802 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]01971642012-03-07 14:39:56803
[email protected]b32da81e2013-02-20 10:35:01804 # Use system ffmpeg instead of bundled one.
805 'use_system_ffmpeg%': 0,
806
[email protected]46aa05cc42013-01-15 17:34:31807 # Use system mesa instead of bundled one.
808 'use_system_mesa%': 0,
809
[email protected]c486e4e2013-01-08 16:49:07810 # Use system nspr instead of the bundled one.
811 'use_system_nspr%': 0,
812
[email protected]2f325672012-10-31 23:29:37813 # Use system protobuf instead of bundled one.
814 'use_system_protobuf%': 0,
815
[email protected]371e1092011-10-12 20:37:36816 # Use system yasm instead of bundled one.
817 'use_system_yasm%': 0,
818
[email protected]ea02e962013-04-26 11:18:16819 # Use system ICU instead of bundled one.
820 'use_system_icu%' : 0,
821
[email protected]cd00bd862012-02-29 00:40:36822 # Default to enabled PIE; this is important for ASLR but we may need to be
823 # able to turn it off for various reasons.
824 'linux_disable_pie%': 0,
825
[email protected]caa95c82009-11-23 22:39:32826 # The release channel that this build targets. This is used to restrict
827 # channel-specific build options, like which installer packages to create.
828 # The default is 'all', which does no channel-specific filtering.
829 'channel%': 'all',
830
[email protected]b3fb8092009-03-12 19:09:24831 # Override chromium_mac_pch and set it to 0 to suppress the use of
832 # precompiled headers on the Mac. Prefix header injection may still be
833 # used, but prefix headers will not be precompiled. This is useful when
834 # using distcc to distribute a build to compile slaves that don't
835 # share the same compiler executable as the system driving the compilation,
836 # because precompiled headers rely on pointers into a specific compiler
837 # executable's image. Setting this to 0 is needed to use an experimental
838 # Linux-Mac cross compiler distcc farm.
839 'chromium_mac_pch%': 1,
840
[email protected]27b687ec42012-03-26 22:22:15841 # The default value for mac_strip in target_defaults. This cannot be
842 # set there, per the comment about variable% in a target_defaults.
843 'mac_strip_release%': 1,
844
[email protected]f5ecbba12009-04-03 04:35:18845 # Set to 1 to enable code coverage. In addition to build changes
846 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
847 # project file called "coverage".
848 # Currently ignored on Windows.
849 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49850
[email protected]9619e65d2012-05-23 19:06:52851 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
852 # This is useful for parallel compilation tools which can't support /Zi.
853 # Only used on Windows.
854 'win_z7%' : 0,
855
[email protected]7477ea6f2009-12-22 23:28:15856 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47857 # environment variable, the libcmt shim it uses sometimes gets in
858 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
859 # 'win_use_allocator_shim': 0,
860 # 'win_release_RuntimeLibrary': 2
861 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52862 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11863
[email protected]95ff8082009-11-13 22:21:01864 # Whether usage of OpenMAX is enabled.
865 'enable_openmax%': 0,
866
[email protected]d01120e62010-05-10 17:04:48867 # Whether proprietary audio/video codecs are assumed to be included with
868 # this build (only meaningful if branding!=Chrome).
869 'proprietary_codecs%': 0,
870
[email protected]e5b2eaa2009-04-14 01:39:12871 # TODO(bradnelson): eliminate this when possible.
872 # To allow local gyp files to prevent release.vsprops from being included.
873 # Yes(1) means include release.vsprops.
874 # Once all vsprops settings are migrated into gyp, this can go away.
875 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23876
[email protected]cbd5fd52009-08-26 00:14:27877 # TODO(bradnelson): eliminate this when possible.
878 # To allow local gyp files to override additional linker options for msvs.
879 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19880 'msvs_use_common_linker_extras%': 1,
881
[email protected]1ffb6502009-06-02 07:46:24882 # TODO(sgk): eliminate this if possible.
883 # It would be nicer to support this via a setting in 'target_defaults'
884 # in chrome/app/locales/locales.gypi overriding the setting in the
885 # 'Debug' configuration in the 'target_defaults' dict below,
886 # but that doesn't work as we'd like.
887 'msvs_debug_link_incremental%': '2',
888
[email protected]1f790ef2011-01-11 20:45:36889 # Needed for some of the largest modules.
890 'msvs_debug_link_nonincremental%': '1',
891
[email protected]6f390be2012-08-16 18:57:10892 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06893 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26894 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06895
[email protected]c54b41cb2012-08-24 20:58:24896 # The default settings for third party code for treating
897 # warnings-as-errors. Ideally, this would not be required, however there
898 # is some third party code that takes a long time to fix/roll. So, this
899 # flag allows us to have warnings as errors in general to prevent
900 # regressions in most modules, while working on the bits that are
901 # remaining.
902 'win_third_party_warn_as_error%': 'true',
903
[email protected]573136142009-07-15 22:48:37904 # This is the location of the sandbox binary. Chrome looks for this before
905 # running the zygote process. If found, and SUID, it will be used to
906 # sandbox the zygote process and, thus, all renderer processes.
907 'linux_sandbox_path%': '',
908
[email protected]ad6d2c42009-09-15 20:13:38909 # Set this to true to enable SELinux support.
910 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57911
[email protected]3bb37e62012-04-19 03:40:08912 # Clang stuff.
913 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24914 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15915
[email protected]5e781232011-01-28 02:57:59916 # These two variables can be set in GYP_DEFINES while running
917 # |gclient runhooks| to let clang run a plugin in every compilation.
918 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
919 # Example:
[email protected]93120fe2011-02-03 20:46:42920 # 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:59921
922 'clang_load%': '',
923 'clang_add_plugin%': '',
924
[email protected]da1c8d692011-09-20 20:35:01925 # The default type of gtest.
926 'gtest_target_type%': 'executable',
927
[email protected]7664ab32011-02-01 23:35:25928 # Enable sampling based profiler.
929 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
930 'profiling%': '0',
931
[email protected]93b373502011-08-16 19:06:22932 # Enable strict glibc debug mode.
933 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10934 # Compile in Breakpad support by default so that it can be tested,
935 # even if it not enabled by default at runtime.
936 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01937 # And if we want to dump symbols for Breakpad-enabled builds.
938 'linux_dump_symbols%': 0,
939 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03940 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49941 # Strip the test binaries needed for Linux reliability tests.
942 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03943
[email protected]46ce5b562010-06-16 18:39:53944 # Enable TCMalloc.
945 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24946
[email protected]d8b60602010-03-26 09:41:22947 # Disable TCMalloc's heapchecker.
948 'linux_use_heapchecker%': 0,
949
[email protected]64e2d4a42010-08-27 10:13:21950 # Disable shadow stack keeping used by heapcheck to unwind the stacks
951 # better.
952 'linux_keep_shadow_stacks%': 0,
953
[email protected]556c5d72010-06-10 05:45:01954 # Set to 1 to link against libgnome-keyring instead of using dlopen().
955 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35956 # Set to 1 to link against gsettings APIs instead of using dlopen().
957 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01958
[email protected]a63e8d22013-03-23 16:17:08959 # Enable use of OpenMAX DL FFT routines.
960 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:34961
[email protected]9821d0d2010-04-16 22:40:37962 # Enable new NPDevice API.
963 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50964
965 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14966 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50967
[email protected]6f51b27e2010-06-22 20:43:53968 # Enable a variable used elsewhere throughout the GYP files to determine
969 # whether to compile in the sources for the GPU plugin / process.
970 'enable_gpu%': 1,
971
[email protected]e72e55b2011-01-06 22:19:30972 # .gyp files or targets should set chromium_code to 1 if they build
973 # Chromium-specific code, as opposed to external code. This variable is
974 # used to control such things as the set of warnings to enable, and
975 # whether warnings are treated as errors.
976 'chromium_code%': 0,
977
[email protected]8d726a42012-02-09 03:49:00978 'release_valgrind_build%': 0,
979
[email protected]b1eb341c2011-11-09 18:46:07980 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
981 'enable_wexit_time_destructors%': 0,
982
[email protected]e72e55b2011-01-06 22:19:30983 # Set to 1 to compile with the built in pdf viewer.
984 'internal_pdf%': 0,
985
[email protected]9e1149d72012-07-24 01:27:17986 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
987 'internal_gles2_conform_tests%': 0,
988
[email protected]e72e55b2011-01-06 22:19:30989 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
990 # so Cocoa is happy (http://crbug.com/20441).
991 'locales': [
992 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
993 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
994 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:41995 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30996 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
997 'vi', 'zh-CN', 'zh-TW',
998 ],
999
[email protected]cc0322d2011-07-24 09:29:191000 # Pseudo locales are special locales which are used for testing and
1001 # debugging. They don't get copied to the final app. For more info,
1002 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1003 'pseudo_locales': [
1004 'fake-bidi',
1005 ],
1006
[email protected]bb6aba32011-01-07 19:04:431007 'grit_defines': [],
1008
[email protected]bd3bd442011-03-28 07:58:511009 # If debug_devtools is set to 1, JavaScript files for DevTools are
1010 # stored as is and loaded from disk. Otherwise, a concatenated file
1011 # is stored in resources.pak. It is still possible to load JS files
1012 # from disk by passing --debug-devtools cmdline switch.
1013 'debug_devtools%': 0,
1014
[email protected]464750f2011-10-24 23:16:181015 # The Java Bridge is not compiled in by default.
1016 'java_bridge%': 0,
1017
[email protected]1e013672012-06-29 22:12:201018 # Code signing for iOS binaries. The bots need to be able to disable this.
1019 'chromium_ios_signing%': 1,
1020
[email protected]33e1c372011-12-14 16:32:071021 # This flag is only used when disable_nacl==0 and disables all those
1022 # subcomponents which would require the installation of a native_client
1023 # untrusted toolchain.
1024 'disable_nacl_untrusted%': 0,
1025
[email protected]407dfa632011-12-23 11:59:351026 # Disable Dart by default.
1027 'enable_dart%': 0,
1028
[email protected]ff10b132012-02-29 22:53:301029 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1030 'msbuild_toolset%': '',
1031
[email protected]836285f22012-04-03 16:19:261032 # Native Client is enabled by default.
1033 'disable_nacl%': 0,
1034
[email protected]1e40ba002013-03-07 22:07:331035 # Portable Native Client is enabled by default.
1036 'disable_pnacl%': 0,
1037
[email protected]fa9d4e262012-08-21 04:39:001038 # Whether to build full debug version for Debug configuration on Android.
1039 # Compared to full debug version, the default Debug configuration on Android
1040 # has no full v8 debug, has size optimization and linker gc section, so that
1041 # we can build a debug version with acceptable size and performance.
1042 'android_full_debug%': 0,
1043
[email protected]65885272012-10-05 23:55:501044 # Sets the default version name and code for Android app, by default we
1045 # do a developer build.
1046 'android_app_version_name%': 'Developer Build',
1047 'android_app_version_code%': 0,
1048
[email protected]740ebed2012-06-27 19:14:061049 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121050 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1051
[email protected]1f8d9402012-07-06 22:47:561052 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1053 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051054
[email protected]fd6d8822012-12-08 06:56:111055 # Whether we are using the rlz library or not. Platforms like Android send
1056 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221057 'enable_rlz%': 0,
1058
[email protected]5cbeb502013-04-23 19:25:271059 # MDNS is disabled by default.
1060 'enable_mdns%' : 0,
1061
[email protected]912c55c2009-07-31 23:33:551062 'conditions': [
[email protected]1f8d9402012-07-06 22:47:561063 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1064 'windows_sdk_path%': '<(windows_sdk_default_path)',
1065 }, {
1066 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1067 }],
1068 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1069 'directx_sdk_path%': '<(directx_sdk_default_path)',
1070 }, {
1071 'directx_sdk_path%': '$(DXSDK_DIR)',
1072 }],
[email protected]54184ce72012-10-18 07:11:261073 ['OS=="win"', {
1074 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071075 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1076 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1077 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261078 }],
[email protected]2b113652012-09-17 17:01:391079 # If use_official_google_api_keys is already set (to 0 or 1), we
1080 # do none of the implicit checking. If it is set to 1 and the
1081 # internal keys file is missing, the build will fail at compile
1082 # time. If it is set to 0 and keys are not provided by other
1083 # means, a warning will be printed at compile time.
1084 ['use_official_google_api_keys==2', {
1085 'use_official_google_api_keys%':
1086 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1087 }],
[email protected]1e013672012-06-29 22:12:201088 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231089 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431090 '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:271091 'conditions': [
[email protected]07c27ab02012-07-17 17:00:201092 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1093 # that it takes effect here.
[email protected]a10ddd2d2013-02-26 20:06:591094 ['clang==0 and asan==0 and tsan==0 and msan==0', {
[email protected]07c27ab02012-07-17 17:00:201095 # This will set gcc_version to XY if you are running gcc X.Y.*.
1096 # This is used to tweak build flags for gcc 4.5.
1097 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1098 }, {
1099 'gcc_version%': 0,
1100 }],
[email protected]eb5f1672013-01-31 07:56:461101 ['target_arch=="mipsel"', {
1102 'werror%': '',
1103 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461104 'nacl_untrusted_build%': 0,
1105 'linux_use_tcmalloc%': 0,
1106 'linux_breakpad%': 0,
1107 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281108 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461109 }],
[email protected]4c9cc6c2009-10-01 18:54:571110 # All Chrome builds have breakpad symbols, but only process the
1111 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081112 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571113 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571114 }],
[email protected]cbd5fd52009-08-26 00:14:271115 ],
[email protected]1e013672012-06-29 22:12:201116 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481117 ['OS=="ios"', {
1118 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191119 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151120 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071121 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351122 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151123 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131124 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471125 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411126 'locales==': [
1127 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
1128 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nl', 'pl',
1129 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
1130 'zh-CN', 'zh-TW',
1131 ],
[email protected]57871bc2012-08-20 16:28:121132
1133 # The Mac SDK is set for iOS builds and passed through to Mac
1134 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1135 # overridden from the command line the same way it is for a Mac build.
1136 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291137
1138 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1139 # what is required, but the value is left blank so when it is set in
1140 # the project files it will be the "current" iOS SDK. Forcing 5.0
1141 # even though it is "current" causes Xcode to spit out a warning for
1142 # every single project file for not using the "current" SDK.
1143 'ios_sdk%': '',
1144 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181145 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321146
1147 'conditions': [
1148 # ios_product_name is set to the name of the .app bundle as it should
1149 # appear on disk.
1150 ['branding=="Chrome"', {
1151 'ios_product_name%': 'Chrome',
1152 }, { # else: branding!="Chrome"
1153 'ios_product_name%': 'Chromium',
1154 }],
1155 ['branding=="Chrome" and buildtype=="Official"', {
1156 'ios_breakpad%': 1,
1157 }, { # else: branding!="Chrome" or buildtype!="Official"
1158 'ios_breakpad%': 0,
1159 }],
1160 ],
1161 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011162 ['OS=="android"', {
1163 # Location of Android NDK.
1164 'variables': {
1165 'variables': {
[email protected]5061d152013-01-16 17:45:571166 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1167 # they're passed to ant which uses a different relative path from
1168 # gyp.
1169 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1170 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1171 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041172 # Android API-level of the SDK used for compilation.
1173 'android_sdk_version%': '17',
[email protected]da1c8d692011-09-20 20:35:011174 },
[email protected]5061d152013-01-16 17:45:571175 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011176 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571177 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041178 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221179 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
1180 'android_libstdcpp_root': '<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6',
[email protected]5061d152013-01-16 17:45:571181
[email protected]e20a8ad2013-03-18 15:05:041182 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571183
[email protected]5cfec2b2013-03-05 20:54:331184 # Android API level 14 is ICS (Android 4.0) which is the minimum
1185 # platform requirement for Chrome on Android, we use it for native
1186 # code compilation.
[email protected]5061d152013-01-16 17:45:571187 'conditions': [
1188 ['target_arch == "ia32"', {
1189 'android_app_abi%': 'x86',
1190 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331191 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571192 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1193 }],
1194 ['target_arch=="arm"', {
1195 'conditions': [
[email protected]7d6763422013-04-26 12:06:541196 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571197 'android_app_abi%': 'armeabi',
1198 }, {
1199 'android_app_abi%': 'armeabi-v7a',
1200 }],
1201 ],
1202 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331203 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571204 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1205 }],
1206 ],
[email protected]da1c8d692011-09-20 20:35:011207 },
[email protected]5061d152013-01-16 17:45:571208 # Copy conditionally-set variables out one scope.
1209 'android_app_abi%': '<(android_app_abi)',
1210 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011211 'android_ndk_root%': '<(android_ndk_root)',
1212 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571213 'android_sdk_root%': '<(android_sdk_root)',
1214 'android_sdk_version%': '<(android_sdk_version)',
1215 'android_toolchain%': '<(android_toolchain)',
1216
[email protected]da1c8d692011-09-20 20:35:011217 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1218 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571219 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
[email protected]e20a8ad2013-03-18 15:05:041220 'android_sdk%': '<(android_sdk)',
1221 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011222
[email protected]225ec632013-04-03 18:20:221223 'android_stlport_root': '<(android_stlport_root)',
1224 'android_libstdcpp_root': '<(android_libstdcpp_root)',
1225 'android_stlport_include': '<(android_stlport_root)/stlport',
1226 'android_libstdcpp_include': '<(android_libstdcpp_root)/include',
1227 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
1228 'android_libstdcpp_libs_dir': '<(android_libstdcpp_root)/libs/<(android_app_abi)',
1229
[email protected]c0f76312012-08-16 13:52:041230 # Location of the "strip" binary, used by both gyp and scripts.
1231 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1232
[email protected]225ec632013-04-03 18:20:221233 # Location of the "readelf" binary.
1234 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1235
[email protected]ef7ed7a2012-05-29 23:19:131236 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1237 # to specify the output directory for Ant in the Android build.
1238 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1239
[email protected]d8621ce2013-02-22 00:37:331240 # Determines whether we should optimize JNI generation at the cost of
1241 # breaking assumptions in the build system that when inputs have changed
1242 # the outputs should always change as well. This is meant purely for
1243 # developer builds, to avoid spurious re-linking of native files.
1244 'optimize_jni_generation%': 0,
1245
[email protected]da1c8d692011-09-20 20:35:011246 # Always uses openssl.
1247 'use_openssl%': 1,
1248
1249 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021250 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071251 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011252 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221253 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021254 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181255 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581256 'build_ffmpegsumo%': 0,
1257 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021258
[email protected]ad17e342012-07-17 20:45:481259 # Disable Native Client.
1260 'disable_nacl%': 1,
1261
[email protected]58242012012-04-12 16:14:311262 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001263 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111264
[email protected]cdb756ef2012-04-05 18:34:531265 # Sessions are store separately in the Java side.
1266 'enable_session_service%': 0,
1267
[email protected]5fd2e842012-03-01 00:29:111268 # Set to 1 once we have a notification system for Android.
1269 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571270 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011271
[email protected]ad17e342012-07-17 20:45:481272 'p2p_apis%' : 0,
1273
[email protected]48de0fc2012-08-02 11:03:581274 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011275
1276 # Uses system APIs for decoding audio and video.
1277 'use_libffmpeg%': '0',
1278
[email protected]f1dc1e52012-12-12 21:39:001279 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011280 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011281
[email protected]adb44342012-07-23 13:36:121282 # When building as part of the Android system, use system libraries
1283 # where possible to reduce ROM size.
1284 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361285 'use_system_sqlite%': 0, # '<(android_webview_build)',
1286 'use_system_expat%': '<(android_webview_build)',
1287 'use_system_icu%': '<(android_webview_build)',
1288 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121289
[email protected]0850e842013-01-19 03:44:311290 'enable_managed_users%': 0,
1291
[email protected]da1c8d692011-09-20 20:35:011292 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361293 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011294 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071295 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291296 'variables': {
1297 # Mac OS X SDK and deployment target support. The SDK identifies
1298 # the version of the system headers that will be used, and
1299 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1300 # macro. "Maximum allowed" refers to the operating system version
1301 # whose APIs are available in the headers. The deployment target
1302 # identifies the minimum system version that the built products are
1303 # expected to function on. It corresponds to the
1304 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1305 # macros are available, #include <AvailabilityMacros.h>. Additional
1306 # documentation on these macros is available at
1307 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1308 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1309 # deployment target to 10.6. Other projects, such as O3D, may
1310 # override these defaults.
1311
1312 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1313 # about that is at least the specified version. In official builds,
1314 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1315 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1316 # path to the SDK; when set to a non-empty string, SDK detection
1317 # based on mac_sdk_min will be bypassed entirely.
1318 'mac_sdk_min%': '10.6',
1319 'mac_sdk_path%': '',
1320
1321 'mac_deployment_target%': '10.6',
1322 },
1323
1324 'mac_sdk_min': '<(mac_sdk_min)',
1325 'mac_sdk_path': '<(mac_sdk_path)',
1326 'mac_deployment_target': '<(mac_deployment_target)',
1327
[email protected]e1ece302011-09-15 03:58:111328 # Enable clang on mac by default!
1329 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291330
[email protected]794fb4782011-12-14 19:10:561331 # Compile in Breakpad support by default so that it can be
1332 # tested, even if it is not enabled by default at runtime.
1333 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071334 'conditions': [
1335 # mac_product_name is set to the name of the .app bundle as it should
1336 # appear on disk. This duplicates data from
1337 # chrome/app/theme/chromium/BRANDING and
1338 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1339 # these names into the build system.
1340 ['branding=="Chrome"', {
1341 'mac_product_name%': 'Google Chrome',
1342 }, { # else: branding!="Chrome"
1343 'mac_product_name%': 'Chromium',
1344 }],
1345
[email protected]e14a9f92009-08-05 19:26:071346 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291347 '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:561348 # Enable uploading crash dumps.
1349 'mac_breakpad_uploads%': 1,
1350 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071351 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561352 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071353 'mac_keystone%': 1,
1354 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291355 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561356 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071357 'mac_breakpad%': 0,
1358 'mac_keystone%': 0,
1359 }],
1360 ],
1361 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551362 ['OS=="win"', {
1363 'conditions': [
[email protected]8974e042010-06-21 18:06:521364 ['component=="shared_library"', {
1365 'win_use_allocator_shim%': 0,
1366 }],
[email protected]fa0f16e2012-08-20 22:30:041367 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101368 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041369 # Not enabled for component=static_library because some targets
1370 # are too large and the toolchain fails due to the size of the
1371 # .obj files.
[email protected]6f390be2012-08-16 18:57:101372 'incremental_chrome_dll%': 1,
1373 }],
[email protected]10bb8c92009-08-07 21:16:031374 # Don't do incremental linking for large modules on 32-bit.
1375 ['MSVS_OS_BITS==32', {
1376 'msvs_large_module_debug_link_mode%': '1', # No
1377 },{
1378 'msvs_large_module_debug_link_mode%': '2', # Yes
1379 }],
[email protected]78764182013-01-23 20:32:511380 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501381 'msvs_express%': 1,
1382 'secure_atl%': 0,
1383 },{
1384 'msvs_express%': 0,
1385 'secure_atl%': 1,
1386 }],
[email protected]912c55c2009-07-31 23:33:551387 ],
[email protected]ef4fa4072009-12-04 22:46:501388 'nacl_win64_defines': [
1389 # This flag is used to minimize dependencies when building
1390 # Native Client loader for 64-bit Windows.
1391 'NACL_WIN64',
1392 ],
[email protected]912c55c2009-07-31 23:33:551393 }],
[email protected]bb6aba32011-01-07 19:04:431394
[email protected]a35aa362012-10-30 13:55:071395 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441396 'use_cups%': 1,
1397 }, {
1398 'use_cups%': 0,
1399 }],
[email protected]bb6aba32011-01-07 19:04:431400
[email protected]eb5f1672013-01-31 07:56:461401 # Native Client glibc toolchain is enabled
1402 # by default except on arm and mips.
1403 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321404 'disable_glibc%': 1,
1405 }, {
1406 'disable_glibc%': 0,
1407 }],
1408
[email protected]712c3da2012-09-24 21:31:241409 # Disable SSE2 when building for ARM or MIPS.
1410 ['target_arch=="arm" or target_arch=="mipsel"', {
1411 'disable_sse2%': 1,
1412 }, {
1413 'disable_sse2%': '<(disable_sse2)',
1414 }],
1415
[email protected]19fe8f0b2010-12-07 07:27:271416 # Set the relative path from this file to the GYP file of the JPEG
1417 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281418 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1419 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271420 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281421 }, {
1422 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1423 }],
[email protected]bb6aba32011-01-07 19:04:431424
[email protected]abcc9ac2011-05-16 20:04:351425 # Options controlling the use of GConf (the classic GNOME configuration
1426 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311427 ['chromeos==1', {
1428 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351429 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311430 }, {
1431 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351432 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311433 }],
1434
[email protected]4de39f82011-03-28 12:01:291435 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291436 ['branding=="Chrome"', {
1437 # TODO(mmoss) The .grd files look for _google_chrome, but for
1438 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291439 'grit_defines': ['-D', '_google_chrome',
1440 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291441 }, {
[email protected]4de39f82011-03-28 12:01:291442 'grit_defines': ['-D', '_chromium',
1443 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291444 }],
[email protected]bb6aba32011-01-07 19:04:431445 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131446 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431447 }],
1448 ['toolkit_views==1', {
1449 'grit_defines': ['-D', 'toolkit_views'],
1450 }],
[email protected]8dd791d2011-09-16 16:37:301451 ['use_aura==1', {
1452 'grit_defines': ['-D', 'use_aura'],
1453 }],
[email protected]ed329be2012-01-03 22:02:161454 ['use_ash==1', {
1455 'grit_defines': ['-D', 'use_ash'],
1456 }],
[email protected]c329adf82011-10-05 14:34:571457 ['use_nss==1', {
1458 'grit_defines': ['-D', 'use_nss'],
1459 }],
[email protected]e47c32032011-03-01 19:26:201460 ['file_manager_extension==1', {
1461 'grit_defines': ['-D', 'file_manager_extension'],
1462 }],
[email protected]77a848262013-02-22 11:17:251463 ['image_loader_extension==1', {
1464 'grit_defines': ['-D', 'image_loader_extension'],
1465 }],
[email protected]9a425422011-01-11 00:53:181466 ['remoting==1', {
1467 'grit_defines': ['-D', 'remoting'],
1468 }],
[email protected]bb6aba32011-01-07 19:04:431469 ['use_titlecase_in_grd_files==1', {
1470 'grit_defines': ['-D', 'use_titlecase'],
1471 }],
[email protected]00dc155832011-02-01 18:51:191472 ['use_third_party_translations==1', {
1473 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121474 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161475 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1476 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121477 ],
[email protected]00dc155832011-02-01 18:51:191478 }],
[email protected]da1c8d692011-09-20 20:35:011479 ['OS=="android"', {
[email protected]7dc76812013-03-26 07:31:571480 'grit_defines': ['-D', 'android',
1481 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]da1c8d692011-09-20 20:35:011482 }],
[email protected]d39e3862012-06-26 22:38:231483 ['OS=="mac"', {
1484 'grit_defines': ['-D', 'scale_factors=2x'],
1485 }],
[email protected]ad563d02012-10-03 10:37:031486 ['OS == "ios"', {
1487 'grit_defines': [
1488 # define for iOS specific resources.
1489 '-D', 'ios',
1490 # iOS uses a whitelist to filter resources.
1491 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1492 ],
1493 }],
[email protected]6a3cd37e2012-04-17 17:13:341494 ['enable_extensions==1', {
1495 'grit_defines': ['-D', 'enable_extensions'],
1496 }],
[email protected]658677f2012-06-09 06:04:021497 ['enable_printing==1', {
1498 'grit_defines': ['-D', 'enable_printing'],
1499 }],
[email protected]c2aad542012-07-31 20:40:331500 ['enable_themes==1', {
1501 'grit_defines': ['-D', 'enable_themes'],
1502 }],
[email protected]4ffe78a2012-10-04 20:55:151503 ['use_oem_wallpaper==1', {
1504 'grit_defines': ['-D', 'use_oem_wallpaper'],
1505 }],
[email protected]ef1dd5062012-12-17 06:41:331506 ['enable_app_list==1', {
1507 'grit_defines': ['-D', 'enable_app_list'],
1508 }],
[email protected]dc4e8b82012-11-15 03:58:161509 ['enable_settings_app==1', {
1510 'grit_defines': ['-D', 'enable_settings_app'],
1511 }],
[email protected]5411d8202013-01-30 01:32:151512 ['enable_google_now==1', {
1513 'grit_defines': ['-D', 'enable_google_now'],
1514 }],
[email protected]a3a720f2013-04-25 19:35:421515 ['use_concatenated_impulse_responses==1', {
1516 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1517 }],
[email protected]3bb37e62012-04-19 03:40:081518 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201519 'clang_chrome_plugins_flags': [
1520 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311521 ],
[email protected]5d451ad2011-02-11 16:43:461522 }],
[email protected]cfa2e1102011-04-27 22:30:231523
[email protected]696de4e62012-11-21 21:18:541524 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061525 'clang%': 1,
1526 }],
[email protected]f5d8c222012-08-29 17:47:021527 ['asan==1 and OS=="mac"', {
1528 # See http://crbug.com/145503.
1529 'component': "static_library",
[email protected]93064ee2013-02-11 19:25:091530 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1531 # runtime is fully adopted. See http://crbug.com/170629.
1532 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021533 }],
[email protected]c9a829272012-07-04 07:51:121534 ['tsan==1', {
1535 'clang%': 1,
1536 }],
[email protected]a10ddd2d2013-02-26 20:06:591537 ['msan==1', {
1538 'clang%': 1,
1539 }],
[email protected]c9a829272012-07-04 07:51:121540
[email protected]7ce58b22012-09-26 05:17:251541 ['OS=="linux" and clang_type_profiler==1', {
1542 'clang%': 1,
1543 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321544 'conditions': [
1545 ['host_arch=="x64"', {
1546 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1547 }],
1548 ['host_arch=="ia32"', {
1549 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1550 # Clang in this directory at your own risk if needed for some
1551 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1552 # usage). Any failure by this compiler should not close the tree.
1553 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1554 }],
1555 ],
[email protected]7ce58b22012-09-26 05:17:251556 }],
1557
[email protected]a9318c72012-03-01 01:29:471558 # On valgrind bots, override the optimizer settings so we don't inline too
1559 # much and make the stacks harder to figure out.
1560 #
1561 # TODO(rnk): Kill off variables that no one else uses and just implement
1562 # them under a build_for_tool== condition.
1563 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1564 # gcc flags
1565 'mac_debug_optimization': '1',
1566 'mac_release_optimization': '1',
1567 'release_optimize': '1',
1568 'no_gc_sections': 1,
1569 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1570 '-fno-builtin -fno-optimize-sibling-calls',
1571 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1572 '-fno-builtin -fno-optimize-sibling-calls',
1573
1574 # MSVS flags for TSan on Pin and Windows.
1575 'win_debug_RuntimeChecks': '0',
1576 'win_debug_disable_iterator_debugging': '1',
1577 'win_debug_Optimization': '1',
1578 'win_debug_InlineFunctionExpansion': '0',
1579 'win_release_InlineFunctionExpansion': '0',
1580 'win_release_OmitFramePointers': '0',
1581
1582 'linux_use_tcmalloc': 1,
1583 'release_valgrind_build': 1,
1584 'werror': '',
1585 'component': 'static_library',
1586 'use_system_zlib': 0,
1587 }],
1588
1589 # Build tweaks for DrMemory.
1590 # TODO(rnk): Combine with tsan config to share the builder.
1591 # http://crbug.com/108155
1592 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471593 # These runtime checks force initialization of stack vars which blocks
1594 # DrMemory's uninit detection.
1595 'win_debug_RuntimeChecks': '0',
1596 # Iterator debugging is slow.
1597 'win_debug_disable_iterator_debugging': '1',
1598 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161599 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1600 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1601 # compiler bug, so we use /Ob1 instead.
1602 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471603 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501604 # Ditto for debug, to support bumping win_debug_Optimization.
1605 'win_debug_InlineFunctionExpansion': 0,
1606 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471607 # Keep the code under #ifndef NVALGRIND.
1608 'release_valgrind_build': 1,
1609 }],
[email protected]b6a5ac92012-10-29 18:17:221610
[email protected]f40a6912012-12-10 21:52:411611 # Enable RLZ on Win, Mac and ChromeOS.
1612 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221613 'enable_rlz%': 1,
1614 }],
[email protected]7d6763422013-04-26 12:06:541615
1616 # Set default compiler flags depending on ARM version.
1617 ['arm_version==5 and android_webview_build==0', {
1618 # Flags suitable for Android emulator
1619 'arm_arch%': 'armv5te',
1620 'arm_tune%': 'xscale',
1621 'arm_fpu%': '',
1622 'arm_float_abi%': 'soft',
1623 'arm_thumb%': 0,
1624 }],
1625 ['arm_version==6 and android_webview_build==0', {
1626 'arm_arch%': 'armv6',
1627 'arm_tune%': '',
1628 'arm_fpu%': '',
1629 'arm_float_abi%': 'soft',
1630 'arm_thumb%': 0,
1631 }],
1632 ['arm_version==7 and android_webview_build==0', {
1633 'arm_arch%': 'armv7-a',
1634 'arm_tune%': 'cortex-a8',
1635 'conditions': [
1636 ['arm_neon==1', {
1637 'arm_fpu%': 'neon',
1638 }, {
1639 'arm_fpu%': 'vfpv3-d16',
1640 }],
1641 ],
1642 'arm_float_abi%': 'softfp',
1643 'arm_thumb%': 1,
1644 }],
1645
1646 ['android_webview_build==1', {
1647 # The WebView build gets its cpu-specific flags from the Android build system.
1648 'arm_arch%': '',
1649 'arm_tune%': '',
1650 'arm_fpu%': '',
1651 'arm_float_abi%': '',
1652 'arm_thumb%': 0,
1653 }],
[email protected]912c55c2009-07-31 23:33:551654 ],
[email protected]a9318c72012-03-01 01:29:471655
[email protected]35958422011-09-28 02:03:591656 # List of default apps to install in new profiles. The first list contains
1657 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061658 # contains the destination location for each of the files. When a crx
1659 # is added or removed from the list, the chrome/browser/resources/
1660 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591661 'default_apps_list': [
1662 'browser/resources/default_apps/external_extensions.json',
1663 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061664 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591665 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001666 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231667 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591668 ],
1669 'default_apps_list_linux_dest': [
1670 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1671 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061672 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591673 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001674 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231675 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591676 ],
[email protected]2f80c312009-02-25 21:26:551677 },
1678 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261679 'variables': {
[email protected]a6e22132010-02-10 20:43:181680 # The condition that operates on chromium_code is in a target_conditions
1681 # section, and will not have access to the default fallback value of
1682 # chromium_code at the top of this file, or to the chromium_code
1683 # variable placed at the root variables scope of .gyp files, because
1684 # those variables are not set at target scope. As a workaround,
1685 # if chromium_code is not set at target scope, define it in target scope
1686 # to contain whatever value it has during early variable expansion.
1687 # That's enough to make it available during target conditional
1688 # processing.
1689 'chromium_code%': '<(chromium_code)',
1690
[email protected]7e0d664a2009-12-03 21:07:471691 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1692 'win_release_Optimization%': '2', # 2 = /Os
1693 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331694
1695 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241696 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111697 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241698 # Tri-state: blank is default, 1 on, 0 off
1699 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331700
[email protected]6b0507b2010-05-07 07:41:211701 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1702 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331703
[email protected]6b0507b2010-05-07 07:41:211704 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151705 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1706 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331707
[email protected]fac10d12010-11-08 16:00:311708 # VS inserts quite a lot of extra checks to algorithms like
1709 # std::partial_sort in Debug build which make them O(N^2)
1710 # instead of O(N*logN). This is particularly slow under memory
1711 # tools like ThreadSanitizer so we want it to be disablable.
1712 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1713 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471714
[email protected]ffd984b12009-09-11 19:37:001715 'release_extra_cflags%': '',
1716 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001717
1718 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521719
[email protected]ef5c5f1b2011-12-17 02:16:241720 # the non-qualified versions are widely assumed to be *nix-only
1721 'win_release_extra_cflags%': '',
1722 'win_debug_extra_cflags%': '',
1723
[email protected]b1eb341c2011-11-09 18:46:071724 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1725 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1726
[email protected]ef3326702011-10-06 18:06:441727 # Only used by Windows build for now. Can be used to build into a
1728 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1729 # output files in src/build/VS2010_{Debug,Release}.
1730 'build_dir_prefix%': '',
1731
[email protected]9ac2db692012-06-08 01:01:571732 # Targets are by default not nacl untrusted code.
1733 'nacl_untrusted_build%': 0,
1734
[email protected]9c55d9d2012-11-15 23:28:441735 'pnacl_compile_flags': [
1736 # pnacl uses the clang compiler so we need to supress all the
1737 # same warnings as we do for clang.
1738 # TODO(sbc): Remove these if/when they are removed from the clang
1739 # build.
1740 '-Wno-unused-function',
1741 '-Wno-char-subscripts',
1742 '-Wno-c++11-extensions',
1743 '-Wno-unnamed-type-template-args',
1744 ],
1745
[email protected]8974e042010-06-21 18:06:521746 'conditions': [
1747 ['OS=="win" and component=="shared_library"', {
1748 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161749 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1750 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521751 }, {
1752 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1753 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1754 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1755 }],
[email protected]1e013672012-06-29 22:12:201756 ['OS=="ios"', {
1757 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1758 'mac_release_optimization%': 's', # Use -Os unless overridden
1759 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1760 }, {
1761 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1762 'mac_release_optimization%': '3', # Use -O3 unless overridden
1763 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1764 }],
[email protected]8974e042010-06-21 18:06:521765 ],
[email protected]1c966092009-08-20 21:19:261766 },
[email protected]32aa8cc2009-03-04 21:36:391767 'conditions': [
[email protected]d808e212013-03-12 14:06:161768 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311769 'dependencies': [
1770 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1771 ],
1772 }],
[email protected]7ce58b22012-09-26 05:17:251773 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1774 'cflags_cc!': ['-fno-rtti'],
1775 'cflags_cc+': [
1776 '-frtti',
1777 '-gline-tables-only',
1778 '-fintercept-allocation-functions',
1779 ],
1780 'defines': ['TYPE_PROFILING'],
1781 'dependencies': [
1782 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1783 ],
1784 }],
[email protected]b0c45722013-01-23 04:47:321785 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1786 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1787 # See http://crbug.com/162818.
1788 'cflags+': ['-Wno-sentinel'],
1789 }],
[email protected]ff10b132012-02-29 22:53:301790 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1791 'msbuild_toolset': '<(msbuild_toolset)',
1792 }],
[email protected]32aa8cc2009-03-04 21:36:391793 ['branding=="Chrome"', {
1794 'defines': ['GOOGLE_CHROME_BUILD'],
1795 }, { # else: branding!="Chrome"
1796 'defines': ['CHROMIUM_BUILD'],
1797 }],
[email protected]286d9a12012-05-30 16:20:381798 ['OS=="mac" and component=="shared_library"', {
1799 'xcode_settings': {
1800 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1801 'LD_RUNPATH_SEARCH_PATHS': [
1802 # For unbundled binaries.
1803 '@loader_path/.',
1804 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1805 '@loader_path/../../..',
1806 ],
1807 },
1808 }],
[email protected]b6a5ac92012-10-29 18:17:221809 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171810 'defines': ['ENABLE_RLZ'],
1811 }],
[email protected]63e39a282011-07-13 20:41:281812 ['component=="shared_library"', {
1813 'defines': ['COMPONENT_BUILD'],
1814 }],
[email protected]06c756182010-04-27 18:31:311815 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171816 'defines': ['TOOLKIT_VIEWS=1'],
1817 }],
[email protected]1ee7c56c2011-10-19 14:51:331818 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111819 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1820 }],
[email protected]41423092011-08-25 15:39:581821 ['use_aura==1', {
1822 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351823 }],
[email protected]ed329be2012-01-03 22:02:161824 ['use_ash==1', {
1825 'defines': ['USE_ASH=1'],
1826 }],
[email protected]c335f4802013-04-06 04:51:211827 ['use_messagepump_linux==1', {
1828 'defines': ['USE_MESSAGEPUMP_LINUX=1'],
1829 }],
[email protected]cb800562012-11-20 22:36:071830 ['use_default_render_theme==1', {
1831 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1832 }],
[email protected]e190d272012-08-30 17:36:441833 ['use_libjpeg_turbo==1', {
1834 'defines': ['USE_LIBJPEG_TURBO=1'],
1835 }],
[email protected]c329adf82011-10-05 14:34:571836 ['use_nss==1', {
1837 'defines': ['USE_NSS=1'],
1838 }],
[email protected]bd7b6fe2012-03-05 21:02:401839 ['enable_one_click_signin==1', {
1840 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1841 }],
[email protected]a47aa892011-11-22 03:12:311842 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1843 # TODO(erg): We are progressively sealing up use of deprecated features
1844 # in gtk in preparation for an eventual porting to gtk3.
1845 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1846 }],
[email protected]fdc5bed2010-01-09 01:16:571847 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291848 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501849 }],
[email protected]55d92492013-01-31 05:03:391850 ['google_tv==1', {
1851 'defines': ['GOOGLE_TV=1'],
1852 }],
[email protected]f56797b2011-09-25 00:04:351853 ['use_xi2_mt!=0', {
1854 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1855 }],
[email protected]e47c32032011-03-01 19:26:201856 ['file_manager_extension==1', {
1857 'defines': ['FILE_MANAGER_EXTENSION=1'],
1858 }],
[email protected]77a848262013-02-22 11:17:251859 ['image_loader_extension==1', {
1860 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1861 }],
[email protected]7664ab32011-02-01 23:35:251862 ['profiling==1', {
1863 'defines': ['ENABLE_PROFILING=1'],
1864 }],
[email protected]93b373502011-08-16 19:06:221865 ['OS=="linux" and glibcxx_debug==1', {
1866 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591867 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221868 }],
[email protected]542bf24a2010-06-11 23:08:171869 ['remoting==1', {
1870 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001871 }],
[email protected]5b87e782012-02-09 18:19:321872 ['enable_webrtc==1', {
1873 'defines': ['ENABLE_WEBRTC=1'],
1874 }],
[email protected]d01120e62010-05-10 17:04:481875 ['proprietary_codecs==1', {
1876 'defines': ['USE_PROPRIETARY_CODECS'],
1877 }],
[email protected]7ddea9802012-02-22 23:08:051878 ['enable_viewport==1', {
1879 'defines': ['ENABLE_VIEWPORT'],
1880 }],
[email protected]f31e2e52011-07-14 16:01:191881 ['configuration_policy==1', {
1882 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1883 }],
[email protected]9eb100e2011-10-14 05:08:221884 ['input_speech==1', {
1885 'defines': ['ENABLE_INPUT_SPEECH'],
1886 }],
[email protected]7cce3232011-10-28 10:41:571887 ['notifications==1', {
1888 'defines': ['ENABLE_NOTIFICATIONS'],
1889 }],
[email protected]1efbaaa2012-04-24 02:43:241890 ['enable_hidpi==1', {
1891 'defines': ['ENABLE_HIDPI=1'],
1892 }],
[email protected]9c1949e2009-10-02 19:59:541893 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:311894 'xcode_settings': {
1895 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1896 },
[email protected]9c1949e2009-10-02 19:59:541897 'conditions': [
[email protected]7df38122012-11-05 23:54:431898 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:301899 # Clang creates chubby debug information, which makes linking very
1900 # slow. For now, don't create debug information with clang. See
1901 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:431902 'conditions': [
1903 ['OS=="linux"', {
1904 'variables': {
1905 'debug_extra_cflags': '-g0',
1906 },
1907 }],
1908 # Android builds symbols on release by default, disable them.
1909 ['OS=="android"', {
1910 'variables': {
1911 'debug_extra_cflags': '-g0',
1912 'release_extra_cflags': '-g0',
1913 },
1914 }],
1915 ],
1916 }, { # else clang!=1
1917 'conditions': [
[email protected]c86fd472013-04-02 19:42:301918 ['OS=="win" and fastbuild==2', {
1919 # Completely disable debug information.
1920 'msvs_settings': {
1921 'VCLinkerTool': {
1922 'GenerateDebugInformation': 'false',
1923 },
1924 'VCCLCompilerTool': {
1925 'DebugInformationFormat': '0',
1926 },
1927 },
1928 }],
1929 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431930 'msvs_settings': {
1931 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:311932 # This tells the linker to generate .pdbs, so that
1933 # we can get meaningful stack traces.
1934 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:431935 },
1936 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:311937 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:431938 'DebugInformationFormat': '0',
1939 },
1940 },
1941 }],
[email protected]c86fd472013-04-02 19:42:301942 ['OS=="linux" and fastbuild==2', {
1943 'variables': {
1944 'debug_extra_cflags': '-g0',
1945 },
1946 }],
1947 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431948 'variables': {
1949 'debug_extra_cflags': '-g1',
1950 },
1951 }],
[email protected]c86fd472013-04-02 19:42:301952 ['OS=="android" and fastbuild==2', {
1953 'variables': {
1954 'debug_extra_cflags': '-g0',
1955 'release_extra_cflags': '-g0',
1956 },
1957 }],
1958 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431959 'variables': {
1960 'debug_extra_cflags': '-g1',
1961 'release_extra_cflags': '-g1',
1962 },
1963 }],
1964 ],
1965 }], # clang!=1
1966 ],
[email protected]9c1949e2009-10-02 19:59:541967 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011968 ['dcheck_always_on!=0', {
1969 'defines': ['DCHECK_ALWAYS_ON=1'],
1970 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381971 ['selinux==1', {
1972 'defines': ['CHROMIUM_SELINUX=1'],
1973 }],
[email protected]7e0d664a2009-12-03 21:07:471974 ['win_use_allocator_shim==0', {
1975 'conditions': [
1976 ['OS=="win"', {
1977 'defines': ['NO_TCMALLOC'],
1978 }],
1979 ],
1980 }],
[email protected]43f28f832010-02-03 02:28:481981 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151982 'defines': [
1983 'ENABLE_GPU=1',
1984 ],
1985 }],
[email protected]b1c2a5542010-10-08 12:44:401986 ['use_openssl==1', {
1987 'defines': [
1988 'USE_OPENSSL=1',
1989 ],
1990 }],
[email protected]ed154592010-04-29 00:18:501991 ['enable_eglimage==1', {
1992 'defines': [
1993 'ENABLE_EGLIMAGE=1',
1994 ],
1995 }],
[email protected]696de4e62012-11-21 21:18:541996 ['asan==1 and OS=="win"', {
1997 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1998 # produce appropriate pdbs.
1999 'msvs_settings': {
2000 'VCLinkerTool': {
2001 'Profile': 'true',
2002 },
2003 },
[email protected]2ff7ef5f2012-12-14 00:40:252004 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:542005 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:182006 ['coverage!=0', {
2007 'conditions': [
[email protected]fc642ec2012-10-12 19:07:032008 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:182009 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:042010 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2011 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:472012 },
[email protected]fc642ec2012-10-12 19:07:032013 }],
2014 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:432015 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:102016 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:432017 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:182018 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:432019 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:182020 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:472021 }],
2022 ],
2023 }],
[email protected]da1c8d692011-09-20 20:35:012024 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:182025 'cflags': [ '-ftest-coverage',
2026 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:002027 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:182028 }],
[email protected]e8f6ff42009-07-07 18:20:532029 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:072030 'variables': {
2031 # Disable incremental linking for all modules.
2032 # 0: inherit, 1: disabled, 2: enabled.
2033 'msvs_debug_link_incremental': '1',
2034 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:292035 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2036 # binaries for now.
2037 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:072038 },
2039 'defines': [
2040 # Disable iterator debugging (huge speed boost without any
2041 # change in coverage results).
2042 '_HAS_ITERATOR_DEBUGGING=0',
2043 ],
[email protected]e8f6ff42009-07-07 18:20:532044 'msvs_settings': {
2045 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:072046 # Enable profile information (necessary for coverage
2047 # instrumentation). This is incompatible with incremental
2048 # linking.
[email protected]e8f6ff42009-07-07 18:20:532049 'Profile': 'true',
2050 },
[email protected]e8f6ff42009-07-07 18:20:532051 }
2052 }], # OS==win
2053 ], # conditions for coverage
2054 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382055 ['OS=="win"', {
2056 'defines': [
2057 '__STD_C',
2058 '_CRT_SECURE_NO_DEPRECATE',
2059 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102060 # This define is required to pull in the new Win8 interfaces from
2061 # system headers like ShObjIdl.h.
2062 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382063 ],
2064 'include_dirs': [
2065 '<(DEPTH)/third_party/wtl/include',
2066 ],
[email protected]9619e65d2012-05-23 19:06:522067 'conditions': [
2068 ['win_z7!=0', {
2069 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092070 # Generates debug info when win_z7=1
2071 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2072 'VCLinkerTool': {
2073 'GenerateDebugInformation': 'true',
2074 },
[email protected]9619e65d2012-05-23 19:06:522075 'VCCLCompilerTool': {
2076 'DebugInformationFormat': '1',
2077 }
2078 }
2079 }],
[email protected]45a77072012-11-17 00:28:422080 ['"<(GENERATOR)"=="msvs"', {
2081 'msvs_settings': {
2082 'VCLinkerTool': {
2083 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2084 # have foo.pdb. The ninja generator already defaults to this and
2085 # can't handle the $(TargetPath) macro.
2086 'ProgramDatabaseFile': '$(TargetPath).pdb',
2087 }
2088 },
2089 }],
[email protected]9619e65d2012-05-23 19:06:522090 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382091 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022092 ['enable_task_manager==1', {
2093 'defines': [
2094 'ENABLE_TASK_MANAGER=1',
2095 ],
2096 }],
[email protected]6a3cd37e2012-04-17 17:13:342097 ['enable_extensions==1', {
2098 'defines': [
2099 'ENABLE_EXTENSIONS=1',
2100 ],
2101 }],
[email protected]13eb97d2012-01-05 01:07:122102 ['OS=="win" and branding=="Chrome"', {
2103 'defines': ['ENABLE_SWIFTSHADER'],
2104 }],
[email protected]407dfa632011-12-23 11:59:352105 ['enable_dart==1', {
2106 'defines': ['WEBKIT_USING_DART=1'],
2107 }],
[email protected]18e0f39b2012-01-17 16:47:342108 ['enable_plugin_installation==1', {
2109 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2110 }],
[email protected]6d17f6392012-12-05 05:24:542111 ['enable_plugins==1', {
2112 'defines': ['ENABLE_PLUGINS=1'],
2113 }],
[email protected]cdb756ef2012-04-05 18:34:532114 ['enable_session_service==1', {
2115 'defines': ['ENABLE_SESSION_SERVICE=1'],
2116 }],
[email protected]6b40bb582012-03-15 20:50:382117 ['enable_themes==1', {
2118 'defines': ['ENABLE_THEMES=1'],
2119 }],
[email protected]57e67ac2013-02-22 03:37:222120 ['enable_autofill_dialog==1', {
2121 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2122 }],
[email protected]0acdd772012-04-05 22:53:002123 ['enable_background==1', {
2124 'defines': ['ENABLE_BACKGROUND=1'],
2125 }],
[email protected]2e22e2f2012-03-15 21:53:102126 ['enable_automation==1', {
2127 'defines': ['ENABLE_AUTOMATION=1'],
2128 }],
[email protected]6ee43a72012-12-07 22:44:402129 ['enable_google_now==1', {
2130 'defines': ['ENABLE_GOOGLE_NOW=1'],
2131 }],
[email protected]703369a2012-11-05 20:40:312132 ['enable_language_detection==1', {
2133 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
2134 }],
[email protected]658677f2012-06-09 06:04:022135 ['enable_printing==1', {
2136 'defines': ['ENABLE_PRINTING=1'],
2137 }],
[email protected]e6026962012-06-14 21:28:322138 ['enable_captive_portal_detection==1', {
2139 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2140 }],
[email protected]dc4e8b82012-11-15 03:58:162141 ['enable_app_list==1', {
2142 'defines': ['ENABLE_APP_LIST=1'],
2143 }],
[email protected]9b5dbf72013-01-09 20:29:152144 ['enable_message_center==1', {
2145 'defines': ['ENABLE_MESSAGE_CENTER=1'],
2146 }],
[email protected]dc4e8b82012-11-15 03:58:162147 ['enable_settings_app==1', {
2148 'defines': ['ENABLE_SETTINGS_APP=1'],
2149 }],
[email protected]9bfe0ab2012-08-30 13:18:112150 ['disable_ftp_support==1', {
2151 'defines': ['DISABLE_FTP_SUPPORT=1'],
2152 }],
[email protected]0850e842013-01-19 03:44:312153 ['enable_managed_users==1', {
2154 'defines': ['ENABLE_MANAGED_USERS=1'],
2155 }],
[email protected]199def22013-02-21 17:52:292156 ['spdy_proxy_auth_origin != ""', {
2157 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2158 }],
2159 ['spdy_proxy_auth_property != ""', {
2160 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2161 }],
[email protected]5cbeb502013-04-23 19:25:272162 ['enable_mdns==1', {
2163 'defines': ['ENABLE_MDNS=1'],
2164 }]
[email protected]a6e22132010-02-10 20:43:182165 ], # conditions for 'target_defaults'
2166 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072167 ['enable_wexit_time_destructors==1', {
2168 'conditions': [
2169 [ 'clang==1', {
2170 'cflags': [
2171 '-Wexit-time-destructors',
2172 ],
2173 'xcode_settings': {
2174 'WARNING_CFLAGS': [
2175 '-Wexit-time-destructors',
2176 ],
2177 },
2178 }],
2179 ],
2180 }],
[email protected]c14d8e772010-02-09 22:06:152181 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282182 'conditions': [
[email protected]1e013672012-06-29 22:12:202183 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332184 # We don't want to get warnings from third-party code,
2185 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282186 'cflags!': [
2187 '-Wall',
2188 '-Wextra',
[email protected]d8543312010-02-10 17:43:282189 ],
[email protected]167ec822011-10-24 22:05:272190 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002191 # Don't warn about hash_map in third-party code.
2192 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272193 ],
2194 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332195 # Don't warn about printf format problems.
2196 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222197 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002198 ],
[email protected]d16bd642011-07-25 23:59:182199 'cflags_cc!': [
2200 # TODO(fischman): remove this.
2201 # http://code.google.com/p/chromium/issues/detail?id=90453
2202 '-Wsign-compare',
2203 ]
[email protected]d8543312010-02-10 17:43:282204 }],
[email protected]82dd5eb32012-08-18 04:24:322205 # TODO: Fix all warnings on chromeos too.
2206 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2207 'cflags!': [
2208 '-Werror',
2209 ],
2210 }],
[email protected]bc073c062012-01-13 06:28:032211 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112212 'cflags': [
2213 # Don't warn about ignoring the return value from e.g. close().
2214 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032215 # BSD systems do not support this option, since they are usually
2216 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112217 '-Wno-unused-result',
2218 ],
2219 }],
[email protected]d8543312010-02-10 17:43:282220 [ 'OS=="win"', {
2221 'defines': [
2222 '_CRT_SECURE_NO_DEPRECATE',
2223 '_CRT_NONSTDC_NO_WARNINGS',
2224 '_CRT_NONSTDC_NO_DEPRECATE',
2225 '_SCL_SECURE_NO_DEPRECATE',
2226 ],
2227 'msvs_disabled_warnings': [4800],
2228 'msvs_settings': {
2229 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112230 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242231 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282232 'Detect64BitPortabilityProblems': 'false',
2233 },
2234 },
[email protected]c54b41cb2012-08-24 20:58:242235 'conditions': [
2236 ['buildtype=="Official"', {
2237 'msvs_settings': {
2238 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2239 }
2240 }],
2241 ],
[email protected]d8543312010-02-10 17:43:282242 }],
[email protected]0915c3b2012-11-22 17:24:072243 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422244 [ 'OS=="win" and component=="shared_library"', {
2245 'msvs_disabled_warnings': [
2246 4251, # class 'std::xx' needs to have dll-interface.
2247 ],
2248 }],
[email protected]1e013672012-06-29 22:12:202249 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282250 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062251 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282252 },
[email protected]3a352c362012-05-08 19:45:492253 'conditions': [
2254 ['buildtype=="Official"', {
2255 'xcode_settings': {
2256 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2257 },
2258 }],
2259 ],
[email protected]d8543312010-02-10 17:43:282260 }],
[email protected]1e013672012-06-29 22:12:202261 [ 'OS=="ios"', {
2262 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222263 # TODO(ios): Fix remaining warnings in third-party code, then
2264 # remove this; the Mac cleanup didn't get everything that's
2265 # flagged in an iOS build.
2266 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202267 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2268 },
2269 }],
[email protected]c14d8e772010-02-09 22:06:152270 ],
2271 }, {
[email protected]a5c598152012-01-27 04:55:132272 'includes': [
2273 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2274 'filename_rules.gypi',
2275 ],
[email protected]41af4f82012-11-08 00:09:312276 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152277 # C99 macros on Mac and Linux.
2278 'defines': [
[email protected]41af4f82012-11-08 00:09:312279 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152280 '__STDC_FORMAT_MACROS',
2281 ],
2282 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152283 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072284 # turn on warnings for signed/unsigned mismatch on chromium code.
2285 'msvs_settings': {
2286 'VCCLCompilerTool': {
2287 'AdditionalOptions': ['/we4389'],
2288 },
2289 },
[email protected]c14d8e772010-02-09 22:06:152290 }],
[email protected]63e39a282011-07-13 20:41:282291 ['OS=="win" and component=="shared_library"', {
2292 'msvs_disabled_warnings': [
2293 4251, # class 'std::xx' needs to have dll-interface.
2294 ],
2295 }],
[email protected]c14d8e772010-02-09 22:06:152296 ],
2297 }],
[email protected]a6e22132010-02-10 20:43:182298 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552299 'default_configuration': 'Debug',
2300 'configurations': {
[email protected]5153767c2009-12-22 01:52:502301 # VCLinkerTool LinkIncremental values below:
2302 # 0 == default
2303 # 1 == /INCREMENTAL:NO
2304 # 2 == /INCREMENTAL
2305 # Debug links incremental, Release does not.
2306 #
[email protected]7b99801e2010-11-03 17:26:232307 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502308 #
2309 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562310 'abstract': 1,
2311 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512312 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562313 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2314 'CharacterSet': '1',
2315 },
[email protected]f59e1302013-02-15 13:48:402316 # Add the default import libs.
2317 'msvs_settings':{
2318 'VCLinkerTool': {
2319 'AdditionalDependencies': [
2320 'kernel32.lib',
2321 'gdi32.lib',
2322 'winspool.lib',
2323 'comdlg32.lib',
2324 'advapi32.lib',
2325 'shell32.lib',
2326 'ole32.lib',
2327 'oleaut32.lib',
2328 'user32.lib',
2329 'uuid.lib',
2330 'odbc32.lib',
2331 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392332 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402333 ],
2334 },
2335 },
[email protected]5153767c2009-12-22 01:52:502336 },
2337 'x86_Base': {
2338 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502339 'msvs_settings': {
2340 'VCLinkerTool': {
2341 'TargetMachine': '1',
2342 },
2343 },
[email protected]2fa40782009-11-01 21:17:342344 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562345 },
[email protected]5153767c2009-12-22 01:52:502346 'x64_Base': {
2347 'abstract': 1,
2348 'msvs_configuration_platform': 'x64',
2349 'msvs_settings': {
2350 'VCLinkerTool': {
2351 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502352 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052353 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502354 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052355 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362356 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2357 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502358 },
[email protected]d26b4418ab2010-03-24 22:06:352359 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502360 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052361 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502362 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052363 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502364 },
2365 },
[email protected]5153767c2009-12-22 01:52:502366 },
2367 'Debug_Base': {
2368 'abstract': 1,
[email protected]14339762011-04-05 07:36:582369 'defines': [
2370 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2371 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2372 ],
[email protected]1c966092009-08-20 21:19:262373 'xcode_settings': {
2374 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292375 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492376 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492377 '<@(debug_extra_cflags)',
2378 ],
[email protected]1c966092009-08-20 21:19:262379 },
[email protected]bb05e452009-10-29 21:24:562380 'msvs_settings': {
2381 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472382 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562383 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212384 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472385 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152386 'conditions': [
2387 # According to MSVS, InlineFunctionExpansion=0 means
2388 # "default inlining", not "/Ob0".
2389 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2390 ['win_debug_InlineFunctionExpansion==0', {
2391 'AdditionalOptions': ['/Ob0'],
2392 }],
2393 ['win_debug_InlineFunctionExpansion!=""', {
2394 'InlineFunctionExpansion':
2395 '<(win_debug_InlineFunctionExpansion)',
2396 }],
[email protected]fac10d12010-11-08 16:00:312397 ['win_debug_disable_iterator_debugging==1', {
2398 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2399 }],
[email protected]ef5c5f1b2011-12-17 02:16:242400
2401 # if win_debug_OmitFramePointers is blank, leave as default
2402 ['win_debug_OmitFramePointers==1', {
2403 'OmitFramePointers': 'true',
2404 }],
2405 ['win_debug_OmitFramePointers==0', {
2406 'OmitFramePointers': 'false',
2407 # The above is not sufficient (http://crbug.com/106711): it
2408 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2409 # perform FPO regardless, so we must explicitly disable.
2410 # We still want the false setting above to avoid having
2411 # "/Oy /Oy-" and warnings about overriding.
2412 'AdditionalOptions': ['/Oy-'],
2413 }],
[email protected]2ae6e022010-05-07 13:19:152414 ],
[email protected]ef5c5f1b2011-12-17 02:16:242415 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562416 },
2417 'VCLinkerTool': {
2418 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332419 # ASLR makes debugging with windbg difficult because Chrome.exe and
2420 # Chrome.dll share the same base name. As result, windbg will
2421 # name the Chrome.dll module like chrome_<base address>, where
2422 # <base address> typically changes with each launch. This in turn
2423 # means that breakpoints in Chrome.dll don't stick from one launch
2424 # to the next. For this reason, we turn ASLR off in debug builds.
2425 # Note that this is a three-way bool, where 0 means to pick up
2426 # the default setting, 1 is off and 2 is on.
2427 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562428 },
2429 'VCResourceCompilerTool': {
2430 'PreprocessorDefinitions': ['_DEBUG'],
2431 },
2432 },
[email protected]2f80c312009-02-25 21:26:552433 'conditions': [
[email protected]78204c92012-09-14 04:42:552434 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542435 'target_conditions': [
2436 ['_toolset=="target"', {
2437 'cflags': [
2438 '<@(debug_extra_cflags)',
2439 ],
2440 }],
[email protected]bb05e452009-10-29 21:24:562441 ],
[email protected]2f80c312009-02-25 21:26:552442 }],
[email protected]1e013672012-06-29 22:12:202443 # Disabled on iOS because it was causing a crash on startup.
2444 # TODO(michelea): investigate, create a reduced test and possibly
2445 # submit a radar.
2446 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352447 'xcode_settings': {
2448 'OTHER_CFLAGS': [
2449 '-fstack-protector-all', # Implies -fstack-protector
2450 ],
2451 },
2452 }],
[email protected]2f80c312009-02-25 21:26:552453 ],
2454 },
[email protected]5153767c2009-12-22 01:52:502455 'Release_Base': {
2456 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552457 'defines': [
2458 'NDEBUG',
2459 ],
[email protected]1c966092009-08-20 21:19:262460 'xcode_settings': {
2461 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2462 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002463 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262464 },
[email protected]bb05e452009-10-29 21:24:562465 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472466 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472467 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152468 'conditions': [
[email protected]2212d272011-12-20 21:37:372469 # In official builds, each target will self-select
2470 # an optimization level.
2471 ['buildtype!="Official"', {
2472 'Optimization': '<(win_release_Optimization)',
2473 },
2474 ],
[email protected]2ae6e022010-05-07 13:19:152475 # According to MSVS, InlineFunctionExpansion=0 means
2476 # "default inlining", not "/Ob0".
2477 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2478 ['win_release_InlineFunctionExpansion==0', {
2479 'AdditionalOptions': ['/Ob0'],
2480 }],
2481 ['win_release_InlineFunctionExpansion!=""', {
2482 'InlineFunctionExpansion':
2483 '<(win_release_InlineFunctionExpansion)',
2484 }],
[email protected]626d2d22011-10-11 15:47:332485
[email protected]ef5c5f1b2011-12-17 02:16:242486 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332487 ['win_release_OmitFramePointers==1', {
2488 'OmitFramePointers': 'true',
2489 }],
2490 ['win_release_OmitFramePointers==0', {
2491 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242492 # The above is not sufficient (http://crbug.com/106711): it
2493 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2494 # perform FPO regardless, so we must explicitly disable.
2495 # We still want the false setting above to avoid having
2496 # "/Oy /Oy-" and warnings about overriding.
2497 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332498 }],
[email protected]2ae6e022010-05-07 13:19:152499 ],
[email protected]ef5c5f1b2011-12-17 02:16:242500 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472501 },
[email protected]bb05e452009-10-29 21:24:562502 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342503 # LinkIncremental is a tri-state boolean, where 0 means default
2504 # (i.e., inherit from parent solution), 1 means false, and
2505 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562506 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342507 # This corresponds to the /PROFILE flag which ensures the PDB
2508 # file contains FIXUP information (growing the PDB file by about
2509 # 5%) but does not otherwise alter the output binary. This
2510 # information is used by the Syzygy optimization tool when
2511 # decomposing the release image.
2512 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562513 },
2514 },
[email protected]2f80c312009-02-25 21:26:552515 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162516 ['msvs_use_common_release', {
2517 'includes': ['release.gypi'],
2518 }],
[email protected]7bdd7d7c2012-11-01 10:36:162519 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582520 'defines': [
2521 'NVALGRIND',
2522 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2523 ],
[email protected]ee857512010-05-14 08:24:422524 }, {
[email protected]14339762011-04-05 07:36:582525 'defines': [
2526 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2527 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2528 ],
[email protected]92822e82009-09-18 14:26:562529 }],
[email protected]7e0d664a2009-12-03 21:07:472530 ['win_use_allocator_shim==0', {
2531 'defines': ['NO_TCMALLOC'],
2532 }],
[email protected]37305ae2012-12-11 01:54:582533 ['os_posix==1 and chromium_code==1', {
2534 # Non-chromium code is not guaranteed to compile cleanly
2535 # with _FORTIFY_SOURCE. Also, fortified build may fail
2536 # when optimizations are disabled, so only do that for Release
2537 # build.
2538 'defines': [
2539 '_FORTIFY_SOURCE=2',
2540 ],
2541 }],
[email protected]7df38122012-11-05 23:54:432542 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542543 'target_conditions': [
2544 ['_toolset=="target"', {
2545 'cflags': [
2546 '<@(release_extra_cflags)',
2547 ],
2548 }],
[email protected]bb05e452009-10-29 21:24:562549 ],
2550 }],
[email protected]2f80c312009-02-25 21:26:552551 ],
2552 },
[email protected]5153767c2009-12-22 01:52:502553 #
2554 # Concrete configurations
2555 #
2556 'Debug': {
2557 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2558 },
2559 'Release': {
2560 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502561 },
[email protected]f926fa0a2009-08-04 22:50:132562 'conditions': [
2563 [ 'OS=="win"', {
2564 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502565 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502566 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302567 },
2568 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502569 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302570 },
[email protected]f926fa0a2009-08-04 22:50:132571 }],
2572 ],
[email protected]2f80c312009-02-25 21:26:552573 },
2574 },
2575 'conditions': [
[email protected]43539ec2012-11-20 22:35:252576 ['os_posix==1', {
2577 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252578 'ldflags': [
2579 '-Wl,-z,now',
2580 '-Wl,-z,relro',
2581 ],
[email protected]43539ec2012-11-20 22:35:252582 },
2583 }],
[email protected]d2ca75c2013-02-01 05:47:172584 ['os_posix==1 and chromeos==0', {
2585 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2586 # and we want to avoid overriding this, so stack-protector is only
2587 # enabled when not building on Chrome OS.
2588 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2589 # supports it.
2590 'target_defaults': {
2591 'cflags': [
2592 '-fstack-protector',
2593 '--param=ssp-buffer-size=4',
2594 ],
2595 },
2596 }],
[email protected]1e013672012-06-29 22:12:202597 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262598 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272599 # Enable -Werror by default, but put it in a variable so it can
2600 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2601 'variables': {
[email protected]cbbb3472012-01-25 18:32:312602 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202603 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272604 },
[email protected]6863896f2012-01-25 17:51:362605 'defines': [
2606 '_FILE_OFFSET_BITS=64',
2607 ],
[email protected]9d384032009-03-20 23:13:262608 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162609 '<(werror)', # See note above about the werror variable.
2610 '-pthread',
2611 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292612 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162613 '-Wall',
[email protected]0fa17082010-03-26 00:48:052614 # TODO(evan): turn this back on once all the builds work.
2615 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202616 # Don't warn about unused function params. We use those everywhere.
2617 '-Wno-unused-parameter',
2618 # Don't warn about the "struct foo f = {0};" initialization pattern.
2619 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122620 # Don't export any symbols (for example, to plugins we dlopen()).
2621 # Note: this is *required* to make some plugins work.
2622 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352623 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242624 ],
2625 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222626 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242627 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362628 # Make inline functions have hidden visiblity by default.
2629 # Surprisingly, not covered by -fvisibility=hidden.
2630 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172631 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2632 # so we specify it explicitly.
2633 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182634 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172635 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262636 ],
[email protected]a6cf87e2009-04-03 04:07:382637 'ldflags': [
[email protected]138241f2010-03-30 23:53:102638 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262639 ],
[email protected]1e013672012-06-29 22:12:202640 'libraries' : [
2641 '<(libraries_for_target)',
2642 ],
[email protected]3aacaf952009-04-02 15:34:092643 'configurations': {
[email protected]5153767c2009-12-22 01:52:502644 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312645 'variables': {
2646 'debug_optimize%': '0',
2647 },
[email protected]3aacaf952009-04-02 15:34:092648 'defines': [
2649 '_DEBUG',
2650 ],
2651 'cflags': [
[email protected]95ad2032012-08-24 00:49:252652 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092653 '-g',
2654 ],
[email protected]da1c8d692011-09-20 20:35:012655 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342656 ['OS=="android"', {
2657 # Only link with needed input sections. This is to avoid getting
2658 # undefined reference to __cxa_bad_typeid in the CDU library.
2659 'ldflags': [
2660 '-Wl,--gc-sections',
2661 ],
2662 }],
[email protected]fa9d4e262012-08-21 04:39:002663 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552664 # Some configurations are copied from Release_Base to reduce
2665 # the binary size.
2666 'variables': {
2667 'debug_optimize%': 's',
2668 },
[email protected]da1c8d692011-09-20 20:35:012669 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552670 '-fomit-frame-pointer',
2671 '-fdata-sections',
2672 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012673 ],
[email protected]8a37e4502012-08-14 22:42:552674 'ldflags': [
2675 '-Wl,-O1',
2676 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552677 ],
[email protected]da1c8d692011-09-20 20:35:012678 }],
[email protected]d4c0ec5b2013-03-10 03:07:452679 ['OS=="linux" and target_arch=="ia32"', {
2680 'ldflags': [
2681 '-Wl,--no-as-needed',
2682 ],
2683 }],
[email protected]da1c8d692011-09-20 20:35:012684 ],
[email protected]5315f2842009-04-28 00:43:272685 },
[email protected]5153767c2009-12-22 01:52:502686 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012687 'variables': {
2688 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512689 # Binaries become big and gold is unable to perform GC
2690 # and remove unused sections for some of test targets
2691 # on 32 bit platform.
2692 # (This is currently observed only in chromeos valgrind bots)
2693 # The following flag is to disable --gc-sections linker
2694 # option for these bots.
2695 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122696
2697 # TODO(bradnelson): reexamine how this is done if we change the
2698 # expansion of configurations
2699 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012700 },
[email protected]3aacaf952009-04-02 15:34:092701 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182702 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532703 # Don't emit the GCC version ident directives, they just end up
2704 # in the .comment section taking up binary size.
2705 '-fno-ident',
2706 # Put data and code in their own sections, so that unused symbols
2707 # can be removed at link time with --gc-sections.
2708 '-fdata-sections',
2709 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092710 ],
[email protected]c902f2c2010-08-06 20:04:182711 'ldflags': [
2712 # Specifically tell the linker to perform optimizations.
2713 # See http://lwn.net/Articles/192624/ .
2714 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222715 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182716 ],
[email protected]1dd529642010-05-15 01:02:512717 'conditions' : [
2718 ['no_gc_sections==0', {
2719 'ldflags': [
2720 '-Wl,--gc-sections',
2721 ],
2722 }],
[email protected]da1c8d692011-09-20 20:35:012723 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582724 'variables': {
2725 'release_optimize%': 's',
2726 },
[email protected]da1c8d692011-09-20 20:35:012727 'cflags': [
2728 '-fomit-frame-pointer',
2729 ],
2730 }],
[email protected]ecf7b6482010-10-13 09:15:202731 ['clang==1', {
2732 'cflags!': [
2733 '-fno-ident',
2734 ],
2735 }],
[email protected]7664ab32011-02-01 23:35:252736 ['profiling==1', {
2737 'cflags': [
2738 '-fno-omit-frame-pointer',
2739 '-g',
2740 ],
2741 }],
[email protected]bdbe3d22013-02-22 04:10:352742 # Can be omitted to reduce output size. Does not seem to affect
2743 # crash reporting.
2744 ['target_arch=="ia32"', {
2745 'cflags': [
2746 '-fno-unwind-tables',
2747 '-fno-asynchronous-unwind-tables',
2748 ],
2749 }],
[email protected]8d726a42012-02-09 03:49:002750 ],
[email protected]3aacaf952009-04-02 15:34:092751 },
2752 },
[email protected]601b540222009-04-03 21:32:042753 'variants': {
2754 'coverage': {
2755 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2756 'ldflags': ['-fprofile-arcs'],
2757 },
2758 'profile': {
2759 'cflags': ['-pg', '-g'],
2760 'ldflags': ['-pg'],
2761 },
2762 'symbols': {
2763 'cflags': ['-g'],
2764 },
2765 },
[email protected]606116d22009-05-06 22:38:232766 'conditions': [
[email protected]147938bf2013-04-18 05:31:082767 # Don't warn about the "typedef 'foo' locally defined but not used"
2768 # for gcc 4.8.
2769 # TODO: remove this flag once all builds work. See crbug.com/227506
2770 [ 'gcc_version>=48', {
2771 'cflags': [
2772 '-Wno-unused-local-typedefs',
2773 ],
2774 }],
[email protected]04b482602011-09-14 02:36:212775 ['target_arch=="ia32"', {
2776 'target_conditions': [
2777 ['_toolset=="target"', {
2778 'asflags': [
2779 # Needed so that libs with .s files (e.g. libicudata.a)
2780 # are compatible with the general 32-bit-ness.
2781 '-32',
2782 ],
2783 # All floating-point computations on x87 happens in 80-bit
2784 # precision. Because the C and C++ language standards allow
2785 # the compiler to keep the floating-point values in higher
2786 # precision than what's specified in the source and doing so
2787 # is more efficient than constantly rounding up to 64-bit or
2788 # 32-bit precision as specified in the source, the compiler,
2789 # especially in the optimized mode, tries very hard to keep
2790 # values in x87 floating-point stack (in 80-bit precision)
2791 # as long as possible. This has important side effects, that
2792 # the real value used in computation may change depending on
2793 # how the compiler did the optimization - that is, the value
2794 # kept in 80-bit is different than the value rounded down to
2795 # 64-bit or 32-bit. There are possible compiler options to
2796 # make this behavior consistent (e.g. -ffloat-store would keep
2797 # all floating-values in the memory, thus force them to be
2798 # rounded to its original precision) but they have significant
2799 # runtime performance penalty.
2800 #
2801 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2802 # which keep floating-point values in SSE registers in its
2803 # native precision (32-bit for single precision, and 64-bit
2804 # for double precision values). This means the floating-point
2805 # value used during computation does not change depending on
2806 # how the compiler optimized the code, since the value is
2807 # always kept in its specified precision.
2808 'conditions': [
2809 ['branding=="Chromium" and disable_sse2==0', {
2810 'cflags': [
2811 '-march=pentium4',
2812 '-msse2',
2813 '-mfpmath=sse',
2814 ],
2815 }],
2816 # ChromeOS targets Pinetrail, which is sse3, but most of the
2817 # benefit comes from sse2 so this setting allows ChromeOS
2818 # to build on other CPUs. In the future -march=atom would
2819 # help but requires a newer compiler.
2820 ['chromeos==1 and disable_sse2==0', {
2821 'cflags': [
2822 '-msse2',
2823 ],
2824 }],
[email protected]0a0063c52013-03-29 06:36:212825 # Use gold linker for Android ia32 target.
2826 ['OS=="android"', {
2827 'cflags': [
2828 '-fuse-ld=gold',
2829 ],
2830 'ldflags': [
2831 '-fuse-ld=gold',
2832 ],
2833 }],
[email protected]04b482602011-09-14 02:36:212834 # Install packages have started cropping up with
2835 # different headers between the 32-bit and 64-bit
2836 # versions, so we have to shadow those differences off
2837 # and make sure a 32-bit-on-64-bit build picks up the
2838 # right files.
[email protected]32594022012-05-10 03:22:282839 # For android build, use NDK headers instead of host headers
2840 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212841 'include_dirs+': [
2842 '/usr/include32',
2843 ],
2844 }],
2845 ],
2846 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2847 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062848 'cflags': [
[email protected]04b482602011-09-14 02:36:212849 '-m32',
2850 '-mmmx',
2851 ],
2852 'ldflags': [
2853 '-m32',
[email protected]ffde7932009-05-29 00:39:062854 ],
2855 }],
[email protected]606116d22009-05-06 22:38:232856 ],
2857 }],
[email protected]3dda8a962009-08-10 18:58:072858 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292859 'target_conditions': [
2860 ['_toolset=="target"', {
2861 'cflags_cc': [
2862 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2863 # has changed whenever it encounters a varargs function. This
2864 # silences those warnings, as they are not helpful and
2865 # clutter legitimate warnings.
2866 '-Wno-abi',
2867 ],
2868 'conditions': [
[email protected]7d6763422013-04-26 12:06:542869 ['arm_arch!=""', {
2870 'cflags': [
2871 '-march=<(arm_arch)',
2872 ],
2873 }],
2874 ['arm_tune!=""', {
2875 'cflags': [
2876 '-mtune=<(arm_tune)',
2877 ],
2878 }],
2879 ['arm_fpu!=""', {
2880 'cflags': [
2881 '-mfpu=<(arm_fpu)',
2882 ],
2883 }],
2884 ['arm_float_abi!=""', {
2885 'cflags': [
2886 '-mfloat-abi=<(arm_float_abi)',
2887 ],
2888 }],
2889 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292890 'cflags': [
2891 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292892 ]
2893 }],
[email protected]da1c8d692011-09-20 20:35:012894 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532895 # Most of the following flags are derived from what Android
2896 # uses by default when building for arm, reference for which
2897 # can be found in the following file in the Android NDK:
2898 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2899 'cflags': [
2900 # The tree-sra optimization (scalar replacement for
2901 # aggregates enabling subsequent optimizations) leads to
2902 # invalid code generation when using the Android NDK's
2903 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:432904 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:532905 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482906 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532907 '-Wno-psabi',
2908 ],
[email protected]ad17e342012-07-17 20:45:482909 # Android now supports .relro sections properly.
2910 # NOTE: While these flags enable the generation of .relro
2911 # sections, the generated libraries can still be loaded on
2912 # older Android platform versions.
2913 'ldflags': [
2914 '-Wl,-z,relro',
2915 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482916 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482917 ],
[email protected]da1c8d692011-09-20 20:35:012918 'conditions': [
[email protected]7d6763422013-04-26 12:06:542919 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:222920 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012921 }],
[email protected]4c48ef102012-11-29 22:00:382922 ['profiling==1', {
2923 'cflags': [
2924 '-marm', # Probably reduntant, but recommend by "perf" docs.
2925 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2926 ],
2927 }],
[email protected]220ea5932012-08-09 10:44:072928 ['clang==1', {
2929 'cflags!': [
2930 # Clang does not support the following options.
2931 '-mthumb-interwork',
2932 '-finline-limit=64',
2933 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482934 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072935 '-Wno-psabi',
2936 ],
2937 }],
[email protected]da1c8d692011-09-20 20:35:012938 ],
[email protected]3cf73842012-11-24 03:35:252939 'target_conditions': [
2940 # ndk-build copies .a's around the filesystem, breaking
2941 # relative paths in thin archives. Disable using thin
2942 # archives to avoid problems until one of these is fixed:
2943 # http://code.google.com/p/android/issues/detail?id=40302
2944 # http://code.google.com/p/android/issues/detail?id=40303
2945 ['_type=="static_library"', {
2946 'standalone_static_library': 1,
2947 }],
2948 ],
[email protected]da1c8d692011-09-20 20:35:012949 }],
[email protected]3dda8a962009-08-10 18:58:072950 ],
2951 }],
2952 ],
2953 }],
[email protected]2fb843b2010-08-12 02:11:082954 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582955 'cflags': [
2956 '-fPIC',
2957 ],
[email protected]d3f692b32011-12-14 19:04:352958 'ldflags': [
2959 '-fPIC',
2960 ],
[email protected]c76723a2010-01-25 23:10:582961 }],
[email protected]ee28c9f2009-09-04 01:53:012962 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572963 'target_conditions': [
2964 ['_toolset=="target"', {
2965 'cflags': [
2966 '--sysroot=<(sysroot)',
2967 ],
2968 'ldflags': [
2969 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:152970 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:572971 ],
2972 }]]
[email protected]ee28c9f2009-09-04 01:53:012973 }],
[email protected]58680ce2010-09-18 00:09:152974 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122975 'cflags': [
2976 '-Wheader-hygiene',
[email protected]cc8f8602013-04-19 04:26:252977 # Clang spots more unused functions.
2978 '-Wno-unused-function',
[email protected]7ddcb1d2013-04-19 04:52:532979 # Don't die on dtoa code that uses a char as an array index.
2980 '-Wno-char-subscripts',
2981 # Especially needed for gtest macros using enum values from Mac
2982 # system headers.
2983 # TODO(pkasting): In C++11 this is legal, so this should be
2984 # removed when we change to that. (This is also why we don't
2985 # bother fixing all these cases today.)
2986 '-Wno-unnamed-type-template-args',
2987 # This (rightfully) complains about 'override', which we use
2988 # heavily.
2989 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102990
2991 # Warns on switches on enums that cover all enum values but
2992 # also contain a default: branch. Chrome is full of that.
2993 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:512994
2995 # Warns when a const char[] is converted to bool.
2996 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:122997 ],
2998 'cflags!': [
2999 # Clang doesn't seem to know know this flag.
3000 '-mfpmath=sse',
3001 ],
[email protected]58680ce2010-09-18 00:09:153002 }],
[email protected]5d451ad2011-02-11 16:43:463003 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263004 'cflags': [
[email protected]c872dc52012-05-19 06:36:313005 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263006 ],
[email protected]5d451ad2011-02-11 16:43:463007 }],
[email protected]4a9ac22e2011-12-02 03:41:533008 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263009 'cflags': [
3010 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533011 ],
3012 }],
3013 ['clang==1 and clang_add_plugin!=""', {
3014 'cflags': [
[email protected]d23720682011-08-11 00:16:263015 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3016 ],
[email protected]5e781232011-01-28 02:57:593017 }],
[email protected]49110f02013-04-22 22:51:343018 ['clang==1 and target_arch=="ia32"', {
3019 'cflags': [
3020 # Else building libyuv gives clang's register allocator issues,
3021 # see llvm.org/PR15798 / crbug.com/233709
3022 '-momit-leaf-frame-pointer',
3023 ],
3024 }],
[email protected]2616d45d2012-01-19 03:15:483025 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3026 'cflags': [
3027 # See http://crbug.com/110262
3028 '-fcolor-diagnostics',
3029 ],
3030 }],
[email protected]cf351c22013-04-19 13:00:543031 # Common options for AddressSanitizer, ThreadSanitizer and
3032 # MemorySanitizer.
3033 ['asan==1 or tsan==1 or msan==1', {
3034 'target_conditions': [
3035 ['_toolset=="target"', {
3036 'cflags': [
3037 '-fno-omit-frame-pointer',
3038 '-gline-tables-only',
3039 ],
[email protected]49110f02013-04-22 22:51:343040 'ldflags!': [
3041 # Functions interposed by the sanitizers can make ld think
3042 # that some libraries aren't needed when they actually are,
3043 # http://crbug.com/234010. As workaround, disable --as-needed.
3044 '-Wl,--as-needed',
3045 ],
[email protected]cf351c22013-04-19 13:00:543046 }],
3047 ],
3048 }],
[email protected]92799b632011-08-15 14:33:063049 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423050 'target_conditions': [
3051 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453052 'cflags': [
[email protected]48688df02012-11-27 21:04:563053 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563054 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453055 ],
3056 'ldflags': [
[email protected]48688df02012-11-27 21:04:563057 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453058 ],
3059 'defines': [
3060 'ADDRESS_SANITIZER',
3061 ],
[email protected]1ffc3b3962012-05-16 14:08:423062 }],
[email protected]921c7b52011-11-25 10:34:353063 ],
[email protected]1d3bc322013-04-12 14:26:373064 'conditions': [
3065 ['OS=="mac"', {
3066 'cflags': [
3067 '-mllvm -asan-globals=0', # http://crbug.com/196561
3068 ],
3069 }],
3070 ],
[email protected]92799b632011-08-15 14:33:063071 }],
[email protected]c9a829272012-07-04 07:51:123072 ['tsan==1', {
3073 'target_conditions': [
3074 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453075 'cflags': [
[email protected]927a9d672012-11-09 11:28:203076 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293077 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203078 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453079 ],
3080 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203081 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453082 ],
3083 'defines': [
3084 'THREAD_SANITIZER',
3085 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163086 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453087 ],
3088 'target_conditions': [
3089 ['_type=="executable"', {
3090 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123091 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453092 ],
3093 }],
3094 ],
[email protected]c9a829272012-07-04 07:51:123095 }],
3096 ],
3097 }],
[email protected]a10ddd2d2013-02-26 20:06:593098 ['msan==1', {
3099 'target_conditions': [
3100 ['_toolset=="target"', {
3101 'cflags': [
3102 '-fsanitize=memory',
3103 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593104 '-fPIC',
3105 ],
3106 'ldflags': [
3107 '-fsanitize=memory',
3108 ],
3109 'defines': [
3110 'MEMORY_SANITIZER',
3111 ],
3112 'target_conditions': [
3113 ['_type=="executable"', {
3114 'ldflags': [
3115 '-pie',
3116 ],
3117 }],
3118 ],
3119 }],
3120 ],
3121 }],
[email protected]8a48f3f2012-12-04 20:14:043122 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443123 'target_conditions' : [
3124 ['_toolset=="target"', {
3125 'cflags': [
3126 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453127 # Allow mmx intrinsics to inline, so that the
3128 # compiler can expand the intrinsics.
3129 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443130 ],
3131 }],
3132 ],
3133 }],
[email protected]cbd5fd52009-08-26 00:14:273134 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:273135 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:103136 }],
3137 ['linux_dump_symbols==1', {
3138 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253139 'conditions': [
[email protected]791262fe2013-02-21 17:20:153140 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253141 'target_conditions': [
3142 ['_toolset=="target"', {
3143 'ldflags': [
[email protected]567370a32013-03-01 00:11:233144 # Workaround for linker OOM.
3145 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253146 ],
3147 }],
3148 ],
3149 }],
3150 ],
[email protected]cbd5fd52009-08-26 00:14:273151 }],
[email protected]d8b60602010-03-26 09:41:223152 ['linux_use_heapchecker==1', {
3153 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:403154 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:223155 }],
[email protected]61a9b2d82010-02-26 00:31:083156 ['linux_use_tcmalloc==0', {
3157 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243158 }],
[email protected]64e2d4a42010-08-27 10:13:213159 ['linux_keep_shadow_stacks==1', {
3160 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513161 'cflags': [
3162 '-finstrument-functions',
3163 # Allow mmx intrinsics to inline, so that the compiler can expand
3164 # the intrinsics.
3165 '-finstrument-functions-exclude-file-list=mmintrin.h',
3166 ],
[email protected]64e2d4a42010-08-27 10:13:213167 }],
[email protected]8d726a42012-02-09 03:49:003168 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:323169 'ldflags': [
3170 # Experimentation found that using four linking threads
3171 # saved ~20% of link time.
3172 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3173 '-Wl,--threads',
3174 '-Wl,--thread-count=4',
3175 ],
[email protected]8d726a42012-02-09 03:49:003176 'conditions': [
3177 ['release_valgrind_build==0', {
3178 'target_conditions': [
3179 ['_toolset=="target"', {
3180 'ldflags': [
3181 # There seems to be a conflict of --icf and -pie
3182 # in gold which can generate crashy binaries. As
3183 # a security measure, -pie takes precendence for
3184 # now.
3185 #'-Wl,--icf=safe',
3186 '-Wl,--icf=none',
3187 ],
3188 }],
3189 ],
3190 }],
3191 ],
3192 }],
[email protected]b07806c12012-02-03 22:44:593193 ['linux_use_gold_binary==1', {
3194 'variables': {
[email protected]516312d2012-02-28 05:17:263195 'conditions': [
3196 ['inside_chromium_build==1', {
3197 # We pass the path to gold to the compiler. gyp leaves
3198 # unspecified what the cwd is when running the compiler,
3199 # so the normal gyp path-munging fails us. This hack
3200 # gets the right path.
3201 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
3202 }, {
3203 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
3204 }]
3205 ]
[email protected]b07806c12012-02-03 22:44:593206 },
3207 'ldflags': [
3208 # Put our gold binary in the search path for the linker.
3209 '-B<(gold_path)',
3210 ],
3211 }],
[email protected]606116d22009-05-06 22:38:233212 ],
[email protected]9d384032009-03-20 23:13:263213 },
3214 }],
[email protected]c51e8d52009-12-11 20:04:063215 # FreeBSD-specific options; note that most FreeBSD options are set above,
3216 # with Linux.
3217 ['OS=="freebsd"', {
3218 'target_defaults': {
3219 'ldflags': [
3220 '-Wl,--no-keep-memory',
3221 ],
3222 },
3223 }],
[email protected]da1c8d692011-09-20 20:35:013224 # Android-specific options; note that most are set above with Linux.
3225 ['OS=="android"', {
3226 'variables': {
[email protected]25036722012-12-11 10:36:173227 # This is a unique identifier for a given build. It's used for
3228 # identifying various build artifacts corresponding to a particular
3229 # build of chrome (e.g. where to find archived symbols).
3230 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013231 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013232 # Use shared stlport library when system one used.
3233 # Figure this out early since it needs symbols from libgcc.a, so it
3234 # has to be before that in the set of libraries.
3235 ['use_system_stlport==1', {
3236 'android_stlport_library': 'stlport',
3237 }, {
[email protected]806b5232012-11-19 21:19:043238 'conditions': [
3239 ['component=="shared_library"', {
3240 'android_stlport_library': 'stlport_shared',
3241 }, {
3242 'android_stlport_library': 'stlport_static',
3243 }],
3244 ],
[email protected]da1c8d692011-09-20 20:35:013245 }],
3246 ],
3247
3248 # Placing this variable here prevents from forking libvpx, used
3249 # by remoting. Remoting is off, so it needn't built,
3250 # so forking it's deps seems like overkill.
3251 # But this variable need defined to properly run gyp.
3252 # A proper solution is to have an OS==android conditional
3253 # in third_party/libvpx/libvpx.gyp to define it.
3254 'libvpx_path': 'lib/linux/arm',
3255 },
3256 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013257 'variables': {
3258 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593259 'conditions': [
3260 # If we're using the components build, append "cr" to all shared
3261 # libraries to avoid naming collisions with android system library
3262 # versions with the same name (e.g. skia, icu).
3263 ['component=="shared_library"', {
3264 'android_product_extension': 'cr.so',
3265 }, {
3266 'android_product_extension': 'so',
3267 } ],
3268 ],
[email protected]8a37e4502012-08-14 22:42:553269 },
[email protected]da1c8d692011-09-20 20:35:013270 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593271 ['_type=="shared_library"', {
3272 'product_extension': '<(android_product_extension)',
3273 }],
3274
[email protected]da1c8d692011-09-20 20:35:013275 # Settings for building device targets using Android's toolchain.
3276 # These are based on the setup.mk file from the Android NDK.
3277 #
3278 # The NDK Android executable link step looks as follows:
3279 # $LDFLAGS
3280 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3281 # $(PRIVATE_OBJECTS) <-- The .o that we built
3282 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3283 # $(TARGET_LIBGCC) <-- libgcc.a
3284 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3285 # $(PRIVATE_LDLIBS) <-- System .so
3286 # $(TARGET_CRTEND_O) <-- crtend.o
3287 #
3288 # For now the above are approximated for executables by adding
3289 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3290 # of 'libraries'.
3291 #
3292 # The NDK Android shared library link step looks as follows:
3293 # $LDFLAGS
3294 # $(PRIVATE_OBJECTS) <-- The .o that we built
3295 # -l,--whole-archive
3296 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3297 # -l,--no-whole-archive
3298 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3299 # $(TARGET_LIBGCC) <-- libgcc.a
3300 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3301 # $(PRIVATE_LDLIBS) <-- System .so
3302 #
[email protected]ad17e342012-07-17 20:45:483303 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013304 #
3305 # For both executables and shared libraries, add the proper
3306 # libgcc.a to the start of libraries which puts it in the
3307 # proper spot after .o and .a files get linked in.
3308 #
3309 # TODO: The proper thing to do longer-tem would be proper gyp
3310 # support for a custom link command line.
3311 ['_toolset=="target"', {
3312 'cflags!': [
3313 '-pthread', # Not supported by Android toolchain.
3314 ],
3315 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013316 '-ffunction-sections',
3317 '-funwind-tables',
3318 '-g',
3319 '-fstack-protector',
3320 '-fno-short-enums',
3321 '-finline-limit=64',
3322 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013323 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013324 ],
3325 'defines': [
3326 'ANDROID',
3327 '__GNU_SOURCE=1', # Necessary for clone()
3328 'USE_STLPORT=1',
3329 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173330 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013331 ],
3332 'ldflags!': [
3333 '-pthread', # Not supported by Android toolchain.
3334 ],
3335 'ldflags': [
3336 '-nostdlib',
3337 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013338 # Don't export symbols from statically linked libraries.
3339 '-Wl,--exclude-libs=ALL',
3340 ],
[email protected]a0e48b02011-11-22 07:53:013341 'libraries': [
3342 '-l<(android_stlport_library)',
3343 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043344 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013345 '-lc',
3346 '-ldl',
3347 '-lstdc++',
3348 '-lm',
[email protected]da1c8d692011-09-20 20:35:013349 ],
3350 'conditions': [
[email protected]806b5232012-11-19 21:19:043351 ['component=="shared_library"', {
3352 'libraries': [
3353 '-lgnustl_shared',
3354 ],
[email protected]4d6f9d7db2012-11-21 16:27:473355 'ldflags!': [
3356 '-Wl,--exclude-libs=ALL',
3357 ],
[email protected]806b5232012-11-19 21:19:043358 }],
[email protected]220ea5932012-08-09 10:44:073359 ['clang==1', {
3360 'cflags': [
3361 # Work around incompatibilities between bionic and clang
3362 # headers.
3363 '-D__compiler_offsetof=__builtin_offsetof',
3364 '-Dnan=__builtin_nan',
3365 ],
3366 'conditions': [
3367 ['target_arch=="arm"', {
3368 'cflags': [
3369 '-target arm-linux-androideabi',
3370 '-mllvm -arm-enable-ehabi',
3371 ],
3372 'ldflags': [
3373 '-target arm-linux-androideabi',
3374 ],
3375 }],
3376 ['target_arch=="ia32"', {
3377 'cflags': [
3378 '-target x86-linux-androideabi',
3379 ],
3380 'ldflags': [
3381 '-target x86-linux-androideabi',
3382 ],
3383 }],
3384 ],
3385 }],
[email protected]ed70ed1862012-11-07 12:11:253386 ['asan==1', {
3387 'cflags': [
3388 # Android build relies on -Wl,--gc-sections removing
3389 # unreachable code. ASan instrumentation for globals inhibits
3390 # this and results in a library with unresolvable relocations.
3391 # TODO(eugenis): find a way to reenable this.
3392 '-mllvm -asan-globals=0',
3393 ],
3394 }],
[email protected]d999c3cb2013-03-12 10:22:363395 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463396 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573397 # The NDK has these things, but doesn't define the constants
3398 # to say that it does. Define them here instead.
3399 'HAVE_SYS_UIO_H',
3400 ],
3401 'cflags': [
3402 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463403 ],
[email protected]da1c8d692011-09-20 20:35:013404 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523405 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013406 ],
3407 }],
[email protected]d999c3cb2013-03-12 10:22:363408 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083409 'include_dirs': [
3410 # OpenAL headers from the Android tree.
3411 '<(android_src)/frameworks/wilhelm/include',
3412 ],
3413 'cflags': [
[email protected]04882132012-11-21 12:40:453414 # Android predefines this as 1; undefine it here so Chromium
3415 # can redefine it later to be 2 for chromium code and unset
3416 # for third party code. This works because cflags are added
3417 # before defines.
3418 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553419 # Disable any additional warnings enabled by the Android build system but which
3420 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083421 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553422 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3423 '-Wno-ignored-qualifiers',
3424 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083425 ],
3426 'cflags_cc': [
3427 # Disabling c++0x-compat should be handled in WebKit, but
3428 # this currently doesn't work because gcc_version is not set
3429 # correctly when building with the Android build system.
3430 # TODO(torne): Fix this in WebKit.
3431 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163432 # Other things unrelated to -Wextra:
3433 '-Wno-non-virtual-dtor',
3434 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083435 ],
3436 }],
[email protected]d999c3cb2013-03-12 10:22:363437 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083438 'cflags': [
3439 # There is a class of warning which:
3440 # 1) Android always enables and also treats as errors
3441 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163442 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553443 '-Wno-address',
3444 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553445 '-Wno-return-type',
3446 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083447 ],
[email protected]2f34a202013-03-11 13:59:163448 'cflags_cc': [
3449 '-Wno-non-virtual-dtor',
3450 ]
[email protected]0d7291e2012-10-04 19:16:083451 }],
[email protected]febd3572012-05-03 09:17:453452 ['target_arch == "arm"', {
3453 'ldflags': [
3454 # Enable identical code folding to reduce size.
3455 '-Wl,--icf=safe',
3456 ],
3457 }],
[email protected]da1c8d692011-09-20 20:35:013458 # NOTE: The stlport header include paths below are specified in
3459 # cflags rather than include_dirs because they need to come
3460 # after include_dirs. Think of them like system headers, but
3461 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3462 # toolchain (circa Gingerbread) will exhibit strange errors.
3463 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513464 ['use_system_stlport==1', {
3465 'cflags': [
3466 # For libstdc++/include, which is used by stlport.
3467 '-I<(android_src)/bionic',
3468 '-I<(android_src)/external/stlport/stlport',
3469 ],
3470 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013471 'cflags': [
[email protected]225ec632013-04-03 18:20:223472 '-I<(android_stlport_include)',
3473 '-I<(android_libstdcpp_include)',
[email protected]da1c8d692011-09-20 20:35:013474 ],
[email protected]225ec632013-04-03 18:20:223475 'ldflags': [
3476 '-L<(android_stlport_libs_dir)',
3477 '-L<(android_libstdcpp_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013478 ],
3479 }],
3480 ['target_arch=="ia32"', {
3481 # The x86 toolchain currently has problems with stack-protector.
3482 'cflags!': [
3483 '-fstack-protector',
3484 ],
3485 'cflags': [
3486 '-fno-stack-protector',
3487 ],
3488 }],
3489 ],
3490 'target_conditions': [
3491 ['_type=="executable"', {
3492 'ldflags': [
3493 '-Bdynamic',
3494 '-Wl,-dynamic-linker,/system/bin/linker',
3495 '-Wl,--gc-sections',
3496 '-Wl,-z,nocopyreloc',
3497 # crtbegin_dynamic.o should be the last item in ldflags.
3498 '<(android_ndk_lib)/crtbegin_dynamic.o',
3499 ],
3500 'libraries': [
3501 # crtend_android.o needs to be the last item in libraries.
3502 # Do not add any libraries after this!
3503 '<(android_ndk_lib)/crtend_android.o',
3504 ],
[email protected]63a131fd2012-11-06 16:01:213505 'conditions': [
3506 ['asan==1', {
3507 'cflags': [
3508 '-fPIE',
3509 ],
3510 'ldflags': [
3511 '-pie',
3512 ],
3513 }],
3514 ],
[email protected]da1c8d692011-09-20 20:35:013515 }],
[email protected]f5c7758a2012-07-25 16:17:573516 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013517 'ldflags': [
3518 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:463519 # crtbegin_so.o should be the last item in ldflags.
3520 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:013521 ],
[email protected]a08029b42012-04-25 03:18:463522 'libraries': [
3523 # crtend_so.o needs to be the last item in libraries.
3524 # Do not add any libraries after this!
3525 '<(android_ndk_lib)/crtend_so.o',
3526 ],
[email protected]da1c8d692011-09-20 20:35:013527 }],
3528 ],
3529 }],
3530 # Settings for building host targets using the system toolchain.
3531 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123532 'cflags!': [
3533 # Due to issues in Clang build system, using ASan on 32-bit
3534 # binaries on x86_64 host is problematic.
3535 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563536 '-fsanitize=address',
3537 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123538 ],
[email protected]da1c8d692011-09-20 20:35:013539 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443540 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013541 '-Wl,-z,noexecstack',
3542 '-Wl,--gc-sections',
3543 '-Wl,-O1',
3544 '-Wl,--as-needed',
3545 ],
[email protected]965b6b22011-09-29 16:07:283546 'sources/': [
3547 ['exclude', '_android(_unittest)?\\.cc$'],
3548 ['exclude', '(^|/)android/']
3549 ],
[email protected]da1c8d692011-09-20 20:35:013550 }],
[email protected]0ccf578f2013-03-13 11:13:393551 # Settings for building host targets on mac.
3552 ['_toolset=="host" and host_os=="mac"', {
3553 'ldflags!': [
3554 '-Wl,-z,now',
3555 '-Wl,-z,relro',
3556 ],
3557 }],
[email protected]da1c8d692011-09-20 20:35:013558 ],
3559 },
3560 }],
[email protected]93f21e42010-04-01 00:35:153561 ['OS=="solaris"', {
3562 'cflags!': ['-fvisibility=hidden'],
3563 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3564 }],
[email protected]1e013672012-06-29 22:12:203565 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553566 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423567 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553568 'xcode_settings': {
3569 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243570 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3571 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043572 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3573 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043574 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3575 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3576 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253577 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3578 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043579 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3580 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3581 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3582 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553583 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043584 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553585 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043586 'WARNING_CFLAGS': [
3587 '-Wall',
3588 '-Wendif-labels',
3589 '-Wextra',
3590 # Don't warn about unused function parameters.
3591 '-Wno-unused-parameter',
3592 # Don't warn about the "struct foo f = {0};" initialization
3593 # pattern.
3594 '-Wno-missing-field-initializers',
3595 ],
[email protected]b3fb8092009-03-12 19:09:243596 'conditions': [
3597 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593598 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3599 ],
[email protected]2936b8c2012-10-29 10:57:313600 # Note that the prebuilt Clang binaries should not be used for iOS
3601 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283602 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303603 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3604 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383605
[email protected]6c648f12011-12-24 07:50:433606 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533607 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433608 # override keyword is used via the OVERRIDE macro from
3609 # base/compiler_specific.h.
3610 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443611 # Warn if automatic synthesis is triggered with
3612 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533613 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303614 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283615 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073616 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523617
3618 # This warns on using ints as initializers for floats in
3619 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3620 # which happens in several places in chrome code. Not sure if
3621 # this is worth fixing.
3622 '-Wno-c++11-narrowing',
3623
3624 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3625 # user-defined literals, this is now a string literal with a UD
3626 # suffix. However, this is used heavily in NaCl code, so disable
3627 # the warning for now.
3628 '-Wno-reserved-user-defined-literal',
3629
[email protected]66733172010-09-22 00:09:283630 # Don't die on dtoa code that uses a char as an array index.
3631 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3632 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453633 # Clang spots more unused functions.
3634 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103635
3636 # Warns on switches on enums that cover all enum values but
3637 # also contain a default: branch. Chrome is full of that.
3638 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513639
3640 # Warns when a const char[] is converted to bool.
3641 '-Wstring-conversion',
[email protected]66733172010-09-22 00:09:283642 ],
[email protected]c67e8ca2012-12-04 16:01:523643 'OTHER_CPLUSPLUSFLAGS': [
3644 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3645 # defined. (Else e.g. finite() in base/float_util.h needs to
3646 # be isfinite() which doesn't exist on the android bots.)
3647 # typeof() is also disabled in c++11 (but we could use
3648 # decltype() instead).
3649 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3650 # bots use xcode 4 -- http://crbug.com/147515).
3651 # TODO(thakis): Eventually switch this to c++11 instead of
3652 # gnu++11 (once typeof can be removed, which is blocked on c++11
3653 # being available everywhere).
3654 '$(inherited)', '-std=gnu++11',
3655 ],
[email protected]66733172010-09-22 00:09:283656 }],
[email protected]a996cd812013-04-22 09:57:243657 # TODO(thakis): Reenable plugins with once
3658 # tools/clang/scripts/update.sh no longer pins clang to an ancient
3659 # version for asan (http://crbug.com/170629)
3660 ['clang==1 and clang_use_chrome_plugins==1 and asan!=1', {
[email protected]5d451ad2011-02-11 16:43:463661 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313662 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463663 ],
3664 }],
[email protected]4a9ac22e2011-12-02 03:41:533665 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593666 'OTHER_CFLAGS': [
3667 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533668 ],
3669 }],
3670 ['clang==1 and clang_add_plugin!=""', {
3671 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593672 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3673 ],
3674 }],
[email protected]2616d45d2012-01-19 03:15:483675 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3676 'OTHER_CFLAGS': [
3677 # See http://crbug.com/110262
3678 '-fcolor-diagnostics',
3679 ],
3680 }],
[email protected]b3fb8092009-03-12 19:09:243681 ],
[email protected]2f80c312009-02-25 21:26:553682 },
[email protected]34f40892011-09-06 21:53:303683 'conditions': [
3684 ['clang==1', {
3685 'variables': {
3686 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3687 },
3688 }],
[email protected]921c7b52011-11-25 10:34:353689 ['asan==1', {
3690 'xcode_settings': {
3691 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563692 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373693 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563694 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353695 ],
[email protected]921c7b52011-11-25 10:34:353696 },
3697 'defines': [
3698 'ADDRESS_SANITIZER',
3699 ],
3700 }],
[email protected]34f40892011-09-06 21:53:303701 ],
[email protected]2f80c312009-02-25 21:26:553702 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553703 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463704 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083705 'conditions': [
3706 ['asan==1', {
3707 'xcode_settings': {
3708 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443709 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083710 ],
3711 },
3712 }],
3713 ],
[email protected]5d7dc972009-04-16 15:30:463714 }],
3715 ['_mac_bundle', {
3716 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313717 'target_conditions': [
3718 ['_type=="executable"', {
3719 'conditions': [
3720 ['asan==1', {
3721 'postbuilds': [
3722 {
3723 'variables': {
3724 # Define copy_asan_dylib_path in a variable ending in
3725 # _path so that gyp understands it's a path and
3726 # performs proper relativization during dict merging.
3727 'copy_asan_dylib_path':
3728 'mac/copy_asan_runtime_dylib.sh',
3729 },
3730 'postbuild_name': 'Copy ASan runtime dylib',
3731 'action': [
3732 '<(copy_asan_dylib_path)',
3733 ],
3734 },
3735 ],
3736 }],
3737 ],
3738 }],
3739 ],
[email protected]87fde4a2009-02-28 00:50:083740 }],
[email protected]2936b8c2012-10-29 10:57:313741 ], # target_conditions
3742 }, # target_defaults
3743 }], # OS=="mac" or OS=="ios"
3744 ['OS=="mac"', {
3745 'target_defaults': {
3746 'variables': {
3747 # These should end with %, but there seems to be a bug with % in
3748 # variables that are intended to be set to different values in
3749 # different targets, like these.
3750 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313751 # Strip debugging symbols from the target.
3752 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373753 'conditions': [
3754 ['asan==1', {
3755 'conditions': [
3756 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353757 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373758 }, {
3759 'mac_real_dsym': '<(mac_want_real_dsym)'
3760 }],
3761 ],
3762 }, {
3763 'conditions': [
3764 ['mac_want_real_dsym=="default"', {
3765 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3766 }, {
3767 'mac_real_dsym': '<(mac_want_real_dsym)'
3768 }],
3769 ],
3770 }],
3771 ],
[email protected]2936b8c2012-10-29 10:57:313772 },
3773 'xcode_settings': {
3774 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3775 # (Equivalent to -fPIC)
3776 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3777 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3778 # Keep pch files below xcodebuild/.
3779 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3780 'OTHER_CFLAGS': [
3781 '-fno-strict-aliasing', # See http://crbug.com/32204
3782 ],
3783 },
3784 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103785 ['_type=="executable"', {
3786 'postbuilds': [
3787 {
3788 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363789 # code execution when running on Mac OS X 10.7 ("Lion"), and
3790 # ensures that the position-independent executable (PIE) bit
3791 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103792 'variables': {
[email protected]8c40f322011-08-24 03:33:363793 # Define change_mach_o_flags in a variable ending in _path
3794 # so that GYP understands it's a path and performs proper
3795 # relativization during dict merging.
3796 'change_mach_o_flags_path':
3797 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173798 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133799 ],
3800 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173801 ['mac_pie==0 or release_valgrind_build==1', {
3802 # Don't enable PIE if it's unwanted. It's unwanted if
3803 # the target specifies mac_pie=0 or if building for
3804 # Valgrind, because Valgrind doesn't understand slide.
3805 # See the similar mac_pie/release_valgrind_build check
3806 # below.
[email protected]081c0342011-08-24 14:59:133807 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133808 '--no-pie',
3809 ],
3810 }],
3811 ],
[email protected]6303fed2011-08-11 01:12:103812 },
[email protected]8c40f322011-08-24 03:33:363813 'postbuild_name': 'Change Mach-O Flags',
3814 'action': [
3815 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133816 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363817 ],
[email protected]6303fed2011-08-11 01:12:103818 },
3819 ],
[email protected]5a5d97aa2011-09-02 15:34:003820 'conditions': [
3821 ['asan==1', {
3822 'variables': {
3823 'asan_saves_file': 'asan.saves',
3824 },
3825 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563826 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003827 },
3828 }],
3829 ],
[email protected]162407f2011-09-08 15:33:173830 'target_conditions': [
3831 ['mac_pie==1 and release_valgrind_build==0', {
3832 # Turn on position-independence (ASLR) for executables. When
3833 # PIE is on for the Chrome executables, the framework will
3834 # also be subject to ASLR.
3835 # Don't do this when building for Valgrind, because Valgrind
3836 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3837 # understand slide, and get rid of the Valgrind check.
3838 'xcode_settings': {
3839 'OTHER_LDFLAGS': [
3840 '-Wl,-pie', # Position-independent executable (MH_PIE)
3841 ],
3842 },
3843 }],
3844 ],
[email protected]6a0242bc2011-07-01 00:34:463845 }],
[email protected]9a5e72862010-09-02 16:16:583846 ['(_type=="executable" or _type=="shared_library" or \
3847 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203848 'target_conditions': [
3849 ['mac_real_dsym == 1', {
3850 # To get a real .dSYM bundle produced by dsymutil, set the
3851 # debug information format to dwarf-with-dsym. Since
3852 # strip_from_xcode will not be used, set Xcode to do the
3853 # stripping as well.
3854 'configurations': {
[email protected]5153767c2009-12-22 01:52:503855 'Release_Base': {
[email protected]24700642009-06-01 16:01:203856 'xcode_settings': {
3857 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3858 'DEPLOYMENT_POSTPROCESSING': 'YES',
3859 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073860 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253861 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073862 # The Xcode default is to strip debugging symbols
3863 # only (-S). Local symbols should be stripped as
3864 # well, which will be handled by -x. Xcode will
3865 # continue to insert -S when stripping even when
3866 # additional flags are added with STRIPFLAGS.
3867 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:403868 }], # _type=="shared_library" or _type=="loadable_module"
3869 ['_type=="executable"', {
3870 'conditions': [
3871 ['asan==1', {
3872 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3873 }]
3874 ],
3875 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:073876 ], # target_conditions
3877 }, # xcode_settings
3878 }, # configuration "Release"
3879 }, # configurations
[email protected]24700642009-06-01 16:01:203880 }, { # mac_real_dsym != 1
3881 # To get a fast fake .dSYM bundle, use a post-build step to
3882 # produce the .dSYM and strip the executable. strip_from_xcode
3883 # only operates in the Release configuration.
3884 'postbuilds': [
3885 {
3886 'variables': {
3887 # Define strip_from_xcode in a variable ending in _path
3888 # so that gyp understands it's a path and performs proper
3889 # relativization during dict merging.
3890 'strip_from_xcode_path': 'mac/strip_from_xcode',
3891 },
3892 'postbuild_name': 'Strip If Needed',
3893 'action': ['<(strip_from_xcode_path)'],
3894 },
[email protected]e14a9f92009-08-05 19:26:073895 ], # postbuilds
3896 }], # mac_real_dsym
3897 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583898 }], # (_type=="executable" or _type=="shared_library" or
3899 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073900 ], # target_conditions
3901 }, # target_defaults
3902 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203903 ['OS=="ios"', {
3904 'target_defaults': {
3905 'xcode_settings' : {
3906 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3907
3908 # This next block is mostly common with the 'mac' section above,
3909 # but keying off (or setting) 'clang' isn't valid for iOS as it
3910 # also seems to mean using the custom build of clang.
3911
3912 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533913 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203914 # override keyword is used via the OVERRIDE macro from
3915 # base/compiler_specific.h.
3916 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443917 # Warn if automatic synthesis is triggered with
3918 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533919 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:203920 'WARNING_CFLAGS': [
3921 '-Wheader-hygiene',
3922 # Don't die on dtoa code that uses a char as an array index.
3923 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3924 '-Wno-char-subscripts',
3925 # Clang spots more unused functions.
3926 '-Wno-unused-function',
3927 # See comments on this flag higher up in this file.
3928 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:533929 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:203930 # heavily.
3931 '-Wno-c++11-extensions',
3932 ],
3933 },
3934 'target_conditions': [
3935 ['_type=="executable"', {
3936 'configurations': {
3937 'Release_Base': {
3938 'xcode_settings': {
3939 'DEPLOYMENT_POSTPROCESSING': 'YES',
3940 'STRIP_INSTALLED_PRODUCT': 'YES',
3941 },
3942 },
[email protected]3c6aa862012-11-05 17:11:443943 'Debug_Base': {
3944 'xcode_settings': {
3945 # Remove dSYM to reduce build time.
3946 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3947 },
3948 },
[email protected]1e013672012-06-29 22:12:203949 },
3950 'xcode_settings': {
3951 'conditions': [
3952 ['chromium_ios_signing', {
3953 # iOS SDK wants everything for device signed.
3954 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3955 }, {
3956 'CODE_SIGNING_REQUIRED': 'NO',
3957 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3958 }],
3959 ],
3960 },
3961 }],
3962 ], # target_conditions
3963 }, # target_defaults
3964 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553965 ['OS=="win"', {
3966 'target_defaults': {
3967 'defines': [
[email protected]8e345da2012-07-01 22:10:303968 '_WIN32_WINNT=0x0602',
3969 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553970 'WIN32',
3971 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553972 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283973 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553974 '_CRT_RAND_S',
3975 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3976 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273977 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553978 ],
[email protected]8974e042010-06-21 18:06:523979 'conditions': [
[email protected]2212d272011-12-20 21:37:373980 ['buildtype=="Official"', {
3981 # In official builds, targets can self-select an optimization
3982 # level by defining a variable named 'optimize', and setting it
3983 # to one of
3984 # - "size", optimizes for minimal code size - the default.
3985 # - "speed", optimizes for speed over code size.
3986 # - "max", whole program optimization and link-time code
3987 # generation. This is very expensive and should be used
3988 # sparingly.
3989 'variables': {
3990 'optimize%': 'size',
3991 },
3992 'target_conditions': [
3993 ['optimize=="size"', {
3994 'msvs_settings': {
3995 'VCCLCompilerTool': {
3996 # 1, optimizeMinSpace, Minimize Size (/O1)
3997 'Optimization': '1',
3998 # 2, favorSize - Favor small code (/Os)
3999 'FavorSizeOrSpeed': '2',
4000 },
4001 },
4002 },
4003 ],
4004 ['optimize=="speed"', {
4005 'msvs_settings': {
4006 'VCCLCompilerTool': {
4007 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4008 'Optimization': '2',
4009 # 1, favorSpeed - Favor fast code (/Ot)
4010 'FavorSizeOrSpeed': '1',
4011 },
4012 },
4013 },
4014 ],
4015 ['optimize=="max"', {
4016 'msvs_settings': {
4017 'VCCLCompilerTool': {
4018 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4019 'Optimization': '2',
4020 # 1, favorSpeed - Favor fast code (/Ot)
4021 'FavorSizeOrSpeed': '1',
4022 # This implies link time code generation.
4023 'WholeProgramOptimization': 'true',
4024 },
4025 },
4026 },
4027 ],
4028 ],
4029 },
4030 ],
[email protected]8974e042010-06-21 18:06:524031 ['component=="static_library"', {
4032 'defines': [
4033 '_HAS_EXCEPTIONS=0',
4034 ],
4035 }],
[email protected]3e2648a2011-03-21 20:58:504036 ['secure_atl', {
4037 'defines': [
4038 '_SECURE_ATL',
4039 ],
4040 }],
[email protected]54184ce72012-10-18 07:11:264041 ['msvs_express', {
4042 'configurations': {
4043 'x86_Base': {
4044 'msvs_settings': {
4045 'VCLinkerTool': {
4046 'AdditionalLibraryDirectories':
4047 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4048 },
4049 'VCLibrarianTool': {
4050 'AdditionalLibraryDirectories':
4051 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4052 },
4053 },
4054 },
4055 'x64_Base': {
4056 'msvs_settings': {
4057 'VCLibrarianTool': {
4058 'AdditionalLibraryDirectories':
4059 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4060 },
4061 'VCLinkerTool': {
4062 'AdditionalLibraryDirectories':
4063 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4064 },
4065 },
4066 },
4067 },
4068 'msvs_settings': {
4069 'VCLinkerTool': {
4070 # Explicitly required when using the ATL with express
4071 'AdditionalDependencies': ['atlthunk.lib'],
4072
4073 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4074 # almost eight hundred LNK4254 and LNK4078 warnings:
4075 # - warning LNK4254: section 'ATL' (50000040) merged into
4076 # '.rdata' (40000040) with different attributes
4077 # - warning LNK4078: multiple 'ATL' sections found with
4078 # different attributes
4079 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4080 },
4081 },
4082 'msvs_system_include_dirs': [
4083 '<(windows_driver_kit_path)/inc/atl71',
4084 '<(windows_driver_kit_path)/inc/mfc42',
4085 ],
4086 }],
[email protected]8974e042010-06-21 18:06:524087 ],
[email protected]5b5ca7cb2009-07-20 23:00:204088 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054089 '<(windows_sdk_path)/Include/shared',
4090 '<(windows_sdk_path)/Include/um',
4091 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554092 '$(VSInstallDir)/VC/atlmfc/include',
4093 ],
[email protected]a8d99cef2009-08-26 20:47:494094 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004095 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114096 # TODO(maruel): These warnings are level 4. They will be slowly
4097 # removed as code is fixed.
4098 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004099 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4100 4706,
[email protected]942c3a60f2011-05-03 02:04:114101 ],
[email protected]2f80c312009-02-25 21:26:554102 'msvs_settings': {
4103 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444104 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554105 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554106 'BufferSecurityCheck': 'true',
4107 'EnableFunctionLevelLinking': 'true',
4108 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114109 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554110 'WarnAsError': 'true',
4111 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584112 'conditions': [
[email protected]8974e042010-06-21 18:06:524113 ['component=="shared_library"', {
4114 'ExceptionHandling': '1', # /EHsc
4115 }, {
4116 'ExceptionHandling': '0',
4117 }],
[email protected]3fef6e62009-07-31 19:58:584118 ],
[email protected]2f80c312009-02-25 21:26:554119 },
4120 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164121 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374122 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054123 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374124 ],
[email protected]2f80c312009-02-25 21:26:554125 },
4126 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554127 'AdditionalDependencies': [
4128 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504129 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554130 'version.lib',
4131 'msimg32.lib',
4132 'ws2_32.lib',
4133 'usp10.lib',
4134 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084135 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484136 'winmm.lib',
4137 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554138 ],
[email protected]a78da50e2010-06-09 21:31:374139 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054140 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374141 ],
[email protected]2f80c312009-02-25 21:26:554142 'GenerateDebugInformation': 'true',
4143 'MapFileName': '$(OutDir)\\$(TargetName).map',
4144 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554145 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484146 # SubSystem values:
4147 # 0 == not set
4148 # 1 == /SUBSYSTEM:CONSOLE
4149 # 2 == /SUBSYSTEM:WINDOWS
4150 # Most of the executables we'll ever create are tests
4151 # and utilities with console output.
4152 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554153 },
4154 'VCMIDLTool': {
4155 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094156 'TypeLibraryName': '$(InputName).tlb',
4157 'OutputDirectory': '$(IntDir)',
4158 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334159 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094160 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4161 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554162 },
4163 'VCResourceCompilerTool': {
4164 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384165 'AdditionalIncludeDirectories': [
4166 '<(DEPTH)',
4167 '<(SHARED_INTERMEDIATE_DIR)',
4168 ],
[email protected]2f80c312009-02-25 21:26:554169 },
4170 },
4171 },
4172 }],
[email protected]79e2336c2011-05-12 18:18:344173 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314174 'target_defaults': {
4175 'defines': [
4176 'DISABLE_NACL',
4177 ],
4178 },
4179 }],
[email protected]cfbf9bc2009-12-07 22:07:564180 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194181 'target_defaults': {
4182 'msvs_settings': {
4183 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194184 'DelayLoadDLLs': [
4185 'dbghelp.dll',
4186 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014187 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194188 'uxtheme.dll',
4189 ],
4190 },
4191 },
[email protected]ef4fa4072009-12-04 22:46:504192 'configurations': {
[email protected]5153767c2009-12-22 01:52:504193 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504194 'msvs_settings': {
4195 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164196 'AdditionalOptions': [
4197 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334198 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164199 '/ignore:4199',
4200 '/ignore:4221',
4201 '/nxcompat',
4202 ],
[email protected]ef4fa4072009-12-04 22:46:504203 },
4204 },
4205 },
[email protected]5153767c2009-12-22 01:52:504206 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504207 'msvs_settings': {
4208 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164209 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504210 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334211 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164212 '/ignore:4199',
4213 '/ignore:4221',
4214 '/nxcompat',
4215 ],
[email protected]ef4fa4072009-12-04 22:46:504216 },
4217 },
4218 },
4219 },
[email protected]48c7af72009-07-03 22:00:194220 },
4221 }],
[email protected]9821d0d2010-04-16 22:40:374222 ['enable_new_npdevice_api==1', {
4223 'target_defaults': {
4224 'defines': [
4225 'ENABLE_NEW_NPDEVICE_API',
4226 ],
4227 },
4228 }],
[email protected]220ea5932012-08-09 10:44:074229 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234230 'conditions': [
4231 ['OS=="android"', {
4232 # Android could use the goma with clang.
4233 'make_global_settings': [
4234 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4235 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4236 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4237 ['CC.host', '$(CC)'],
4238 ['CXX.host', '$(CXX)'],
4239 ['LINK.host', '$(LINK)'],
4240 ],
4241 }, {
4242 'make_global_settings': [
4243 ['CC', '<(make_clang_dir)/bin/clang'],
4244 ['CXX', '<(make_clang_dir)/bin/clang++'],
4245 ['LINK', '$(CXX)'],
4246 ['CC.host', '$(CC)'],
4247 ['CXX.host', '$(CXX)'],
4248 ['LINK.host', '$(LINK)'],
4249 ],
4250 }],
[email protected]34f40892011-09-06 21:53:304251 ],
4252 }],
[email protected]615fa6642012-08-14 19:17:074253 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274254 # Hardcode the compiler names in the Makefile so that
4255 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114256 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044257 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4258 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4259 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074260 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4261 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4262 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274263 ],
4264 }],
[email protected]eb5f1672013-01-31 07:56:464265 ['target_arch=="mipsel"', {
4266 'make_global_settings': [
4267 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4268 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4269 ['LINK', '$(CXX)'],
4270 ['CC.host', '<!(which gcc)'],
4271 ['CXX.host', '<!(which g++)'],
4272 ['LINK.host', '<!(which g++)'],
4273 ],
4274 }],
[email protected]2f80c312009-02-25 21:26:554275 ],
4276 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504277 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4278 # This block adds *project-wide* configuration settings to each project
4279 # file. It's almost always wrong to put things here. Specify your
4280 # custom xcode_settings in target_defaults to add them to targets instead.
4281
[email protected]1e013672012-06-29 22:12:204282 'conditions': [
[email protected]fca3d812012-07-27 00:55:364283 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4284 # setting sets the SDK on a project-wide basis. In order to get the
4285 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4286 # here at the project level.
[email protected]2c261532012-10-06 00:46:294287 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364288 'conditions': [
[email protected]2c261532012-10-06 00:46:294289 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364290 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294291 }, {
4292 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364293 }],
4294 ],
[email protected]2c261532012-10-06 00:46:294295 }],
4296 ['OS=="ios"', {
4297 'conditions': [
4298 ['ios_sdk_path==""', {
4299 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4300 }, {
4301 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4302 }],
4303 ],
[email protected]1e013672012-06-29 22:12:204304 }],
4305 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204306 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:444307 # Just build armv7, until armv7s is correctly tested.
4308 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204309 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:204310 # Target both iPhone and iPad.
4311 'TARGETED_DEVICE_FAMILY': '1,2',
4312 }],
[email protected]f9335b42013-01-24 21:00:234313 ['target_arch=="x64"', {
4314 'ARCHS': [
4315 'x86_64'
4316 ],
4317 }],
[email protected]1e013672012-06-29 22:12:204318 ],
[email protected]0c8ab452009-11-06 21:57:504319
[email protected]2f80c312009-02-25 21:26:554320 # The Xcode generator will look for an xcode_settings section at the root
4321 # of each dict and use it to apply settings on a file-wide basis. Most
4322 # settings should not be here, they should be in target-specific
4323 # xcode_settings sections, or better yet, should use non-Xcode-specific
4324 # settings in target dicts. SYMROOT is a special case, because many other
4325 # Xcode variables depend on it, including variables such as
4326 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4327 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4328 # files to appear (when present) in the UI as actual files and not red
4329 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4330 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164331 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554332 },
[email protected]ee28c9f2009-09-04 01:53:014333}