blob: a829d213dfa447905ceb3d46a71f8250186ccabf [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.
[email protected]2fa2f2d82013-04-29 18:13:12138 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_messagepump_linux==0', {
[email protected]8796d922012-08-07 01:23:11139 '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.
[email protected]508afb72013-05-02 22:37:26670 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42671
[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]23eea4a42013-04-27 04:10:26959 # Default arch variant for MIPS.
960 'mips_arch_variant%': 'mips32r2',
961
[email protected]a63e8d22013-03-23 16:17:08962 # Enable use of OpenMAX DL FFT routines.
963 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:34964
[email protected]9821d0d2010-04-16 22:40:37965 # Enable new NPDevice API.
966 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50967
968 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14969 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50970
[email protected]6f51b27e2010-06-22 20:43:53971 # Enable a variable used elsewhere throughout the GYP files to determine
972 # whether to compile in the sources for the GPU plugin / process.
973 'enable_gpu%': 1,
974
[email protected]e72e55b2011-01-06 22:19:30975 # .gyp files or targets should set chromium_code to 1 if they build
976 # Chromium-specific code, as opposed to external code. This variable is
977 # used to control such things as the set of warnings to enable, and
978 # whether warnings are treated as errors.
979 'chromium_code%': 0,
980
[email protected]8d726a42012-02-09 03:49:00981 'release_valgrind_build%': 0,
982
[email protected]b1eb341c2011-11-09 18:46:07983 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
984 'enable_wexit_time_destructors%': 0,
985
[email protected]e72e55b2011-01-06 22:19:30986 # Set to 1 to compile with the built in pdf viewer.
987 'internal_pdf%': 0,
988
[email protected]9e1149d72012-07-24 01:27:17989 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
990 'internal_gles2_conform_tests%': 0,
991
[email protected]e72e55b2011-01-06 22:19:30992 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
993 # so Cocoa is happy (http://crbug.com/20441).
994 'locales': [
995 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
996 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
997 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:41998 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30999 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1000 'vi', 'zh-CN', 'zh-TW',
1001 ],
1002
[email protected]cc0322d2011-07-24 09:29:191003 # Pseudo locales are special locales which are used for testing and
1004 # debugging. They don't get copied to the final app. For more info,
1005 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1006 'pseudo_locales': [
1007 'fake-bidi',
1008 ],
1009
[email protected]bb6aba32011-01-07 19:04:431010 'grit_defines': [],
1011
[email protected]bd3bd442011-03-28 07:58:511012 # If debug_devtools is set to 1, JavaScript files for DevTools are
1013 # stored as is and loaded from disk. Otherwise, a concatenated file
1014 # is stored in resources.pak. It is still possible to load JS files
1015 # from disk by passing --debug-devtools cmdline switch.
1016 'debug_devtools%': 0,
1017
[email protected]464750f2011-10-24 23:16:181018 # The Java Bridge is not compiled in by default.
1019 'java_bridge%': 0,
1020
[email protected]1e013672012-06-29 22:12:201021 # Code signing for iOS binaries. The bots need to be able to disable this.
1022 'chromium_ios_signing%': 1,
1023
[email protected]33e1c372011-12-14 16:32:071024 # This flag is only used when disable_nacl==0 and disables all those
1025 # subcomponents which would require the installation of a native_client
1026 # untrusted toolchain.
1027 'disable_nacl_untrusted%': 0,
1028
[email protected]407dfa632011-12-23 11:59:351029 # Disable Dart by default.
1030 'enable_dart%': 0,
1031
[email protected]ff10b132012-02-29 22:53:301032 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1033 'msbuild_toolset%': '',
1034
[email protected]836285f22012-04-03 16:19:261035 # Native Client is enabled by default.
1036 'disable_nacl%': 0,
1037
[email protected]1e40ba002013-03-07 22:07:331038 # Portable Native Client is enabled by default.
1039 'disable_pnacl%': 0,
1040
[email protected]fa9d4e262012-08-21 04:39:001041 # Whether to build full debug version for Debug configuration on Android.
1042 # Compared to full debug version, the default Debug configuration on Android
1043 # has no full v8 debug, has size optimization and linker gc section, so that
1044 # we can build a debug version with acceptable size and performance.
1045 'android_full_debug%': 0,
1046
[email protected]65885272012-10-05 23:55:501047 # Sets the default version name and code for Android app, by default we
1048 # do a developer build.
1049 'android_app_version_name%': 'Developer Build',
1050 'android_app_version_code%': 0,
1051
[email protected]740ebed2012-06-27 19:14:061052 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121053 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1054
[email protected]1f8d9402012-07-06 22:47:561055 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1056 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051057
[email protected]fd6d8822012-12-08 06:56:111058 # Whether we are using the rlz library or not. Platforms like Android send
1059 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221060 'enable_rlz%': 0,
1061
[email protected]5cbeb502013-04-23 19:25:271062 # MDNS is disabled by default.
1063 'enable_mdns%' : 0,
1064
[email protected]912c55c2009-07-31 23:33:551065 'conditions': [
[email protected]5f683172013-04-27 01:53:191066 # The version of GCC in use, set later in platforms that use GCC and have
1067 # not explicitly chosen to build with clang. Currently, this means all
1068 # platforms except Windows, Mac and iOS.
1069 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1070 # it takes effect here.
1071 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and tsan==0 and msan==0', {
1072 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1073 }, {
1074 'gcc_version%': 0,
1075 }],
[email protected]1f8d9402012-07-06 22:47:561076 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1077 'windows_sdk_path%': '<(windows_sdk_default_path)',
1078 }, {
1079 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1080 }],
1081 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1082 'directx_sdk_path%': '<(directx_sdk_default_path)',
1083 }, {
1084 'directx_sdk_path%': '$(DXSDK_DIR)',
1085 }],
[email protected]54184ce72012-10-18 07:11:261086 ['OS=="win"', {
1087 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071088 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1089 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1090 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261091 }],
[email protected]2b113652012-09-17 17:01:391092 # If use_official_google_api_keys is already set (to 0 or 1), we
1093 # do none of the implicit checking. If it is set to 1 and the
1094 # internal keys file is missing, the build will fail at compile
1095 # time. If it is set to 0 and keys are not provided by other
1096 # means, a warning will be printed at compile time.
1097 ['use_official_google_api_keys==2', {
1098 'use_official_google_api_keys%':
1099 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1100 }],
[email protected]1e013672012-06-29 22:12:201101 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231102 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431103 '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:271104 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461105 ['target_arch=="mipsel"', {
1106 'werror%': '',
1107 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461108 'nacl_untrusted_build%': 0,
1109 'linux_use_tcmalloc%': 0,
1110 'linux_breakpad%': 0,
1111 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281112 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461113 }],
[email protected]4c9cc6c2009-10-01 18:54:571114 # All Chrome builds have breakpad symbols, but only process the
1115 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081116 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571117 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571118 }],
[email protected]cbd5fd52009-08-26 00:14:271119 ],
[email protected]1e013672012-06-29 22:12:201120 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481121 ['OS=="ios"', {
1122 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191123 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151124 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071125 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351126 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151127 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131128 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471129 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411130 'locales==': [
1131 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
1132 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nl', 'pl',
1133 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
1134 'zh-CN', 'zh-TW',
1135 ],
[email protected]57871bc2012-08-20 16:28:121136
1137 # The Mac SDK is set for iOS builds and passed through to Mac
1138 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1139 # overridden from the command line the same way it is for a Mac build.
1140 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291141
1142 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1143 # what is required, but the value is left blank so when it is set in
1144 # the project files it will be the "current" iOS SDK. Forcing 5.0
1145 # even though it is "current" causes Xcode to spit out a warning for
1146 # every single project file for not using the "current" SDK.
1147 'ios_sdk%': '',
1148 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181149 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321150
1151 'conditions': [
1152 # ios_product_name is set to the name of the .app bundle as it should
1153 # appear on disk.
1154 ['branding=="Chrome"', {
1155 'ios_product_name%': 'Chrome',
1156 }, { # else: branding!="Chrome"
1157 'ios_product_name%': 'Chromium',
1158 }],
1159 ['branding=="Chrome" and buildtype=="Official"', {
1160 'ios_breakpad%': 1,
1161 }, { # else: branding!="Chrome" or buildtype!="Official"
1162 'ios_breakpad%': 0,
1163 }],
1164 ],
1165 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011166 ['OS=="android"', {
1167 # Location of Android NDK.
1168 'variables': {
1169 'variables': {
[email protected]5061d152013-01-16 17:45:571170 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1171 # they're passed to ant which uses a different relative path from
1172 # gyp.
1173 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1174 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1175 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041176 # Android API-level of the SDK used for compilation.
1177 'android_sdk_version%': '17',
[email protected]da1c8d692011-09-20 20:35:011178 },
[email protected]5061d152013-01-16 17:45:571179 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011180 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571181 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041182 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221183 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
1184 'android_libstdcpp_root': '<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6',
[email protected]5061d152013-01-16 17:45:571185
[email protected]e20a8ad2013-03-18 15:05:041186 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571187
[email protected]5cfec2b2013-03-05 20:54:331188 # Android API level 14 is ICS (Android 4.0) which is the minimum
1189 # platform requirement for Chrome on Android, we use it for native
1190 # code compilation.
[email protected]5061d152013-01-16 17:45:571191 'conditions': [
1192 ['target_arch == "ia32"', {
1193 'android_app_abi%': 'x86',
1194 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331195 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571196 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1197 }],
1198 ['target_arch=="arm"', {
1199 'conditions': [
[email protected]7d6763422013-04-26 12:06:541200 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571201 'android_app_abi%': 'armeabi',
1202 }, {
1203 'android_app_abi%': 'armeabi-v7a',
1204 }],
1205 ],
1206 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331207 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571208 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1209 }],
[email protected]23eea4a42013-04-27 04:10:261210 ['target_arch == "mipsel"', {
1211 'android_app_abi%': 'mips',
1212 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1213 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
1214 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-x86/bin',
1215 }],
[email protected]5061d152013-01-16 17:45:571216 ],
[email protected]da1c8d692011-09-20 20:35:011217 },
[email protected]5061d152013-01-16 17:45:571218 # Copy conditionally-set variables out one scope.
1219 'android_app_abi%': '<(android_app_abi)',
1220 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011221 'android_ndk_root%': '<(android_ndk_root)',
1222 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571223 'android_sdk_root%': '<(android_sdk_root)',
1224 'android_sdk_version%': '<(android_sdk_version)',
1225 'android_toolchain%': '<(android_toolchain)',
1226
[email protected]da1c8d692011-09-20 20:35:011227 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1228 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571229 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
[email protected]e20a8ad2013-03-18 15:05:041230 'android_sdk%': '<(android_sdk)',
1231 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011232
[email protected]225ec632013-04-03 18:20:221233 'android_stlport_root': '<(android_stlport_root)',
1234 'android_libstdcpp_root': '<(android_libstdcpp_root)',
1235 'android_stlport_include': '<(android_stlport_root)/stlport',
1236 'android_libstdcpp_include': '<(android_libstdcpp_root)/include',
1237 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
1238 'android_libstdcpp_libs_dir': '<(android_libstdcpp_root)/libs/<(android_app_abi)',
1239
[email protected]c0f76312012-08-16 13:52:041240 # Location of the "strip" binary, used by both gyp and scripts.
1241 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1242
[email protected]225ec632013-04-03 18:20:221243 # Location of the "readelf" binary.
1244 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1245
[email protected]ef7ed7a2012-05-29 23:19:131246 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1247 # to specify the output directory for Ant in the Android build.
1248 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1249
[email protected]d8621ce2013-02-22 00:37:331250 # Determines whether we should optimize JNI generation at the cost of
1251 # breaking assumptions in the build system that when inputs have changed
1252 # the outputs should always change as well. This is meant purely for
1253 # developer builds, to avoid spurious re-linking of native files.
1254 'optimize_jni_generation%': 0,
1255
[email protected]da1c8d692011-09-20 20:35:011256 # Always uses openssl.
1257 'use_openssl%': 1,
1258
1259 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021260 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071261 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011262 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221263 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021264 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181265 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581266 'build_ffmpegsumo%': 0,
1267 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021268
[email protected]ad17e342012-07-17 20:45:481269 # Disable Native Client.
1270 'disable_nacl%': 1,
1271
[email protected]58242012012-04-12 16:14:311272 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001273 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111274
[email protected]cdb756ef2012-04-05 18:34:531275 # Sessions are store separately in the Java side.
1276 'enable_session_service%': 0,
1277
[email protected]5fd2e842012-03-01 00:29:111278 # Set to 1 once we have a notification system for Android.
1279 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571280 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011281
[email protected]ad17e342012-07-17 20:45:481282 'p2p_apis%' : 0,
1283
[email protected]48de0fc2012-08-02 11:03:581284 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011285
1286 # Uses system APIs for decoding audio and video.
1287 'use_libffmpeg%': '0',
1288
[email protected]f1dc1e52012-12-12 21:39:001289 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011290 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011291
[email protected]adb44342012-07-23 13:36:121292 # When building as part of the Android system, use system libraries
1293 # where possible to reduce ROM size.
1294 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361295 'use_system_sqlite%': 0, # '<(android_webview_build)',
1296 'use_system_expat%': '<(android_webview_build)',
1297 'use_system_icu%': '<(android_webview_build)',
1298 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121299
[email protected]0850e842013-01-19 03:44:311300 'enable_managed_users%': 0,
1301
[email protected]da1c8d692011-09-20 20:35:011302 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361303 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011304 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071305 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291306 'variables': {
1307 # Mac OS X SDK and deployment target support. The SDK identifies
1308 # the version of the system headers that will be used, and
1309 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1310 # macro. "Maximum allowed" refers to the operating system version
1311 # whose APIs are available in the headers. The deployment target
1312 # identifies the minimum system version that the built products are
1313 # expected to function on. It corresponds to the
1314 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1315 # macros are available, #include <AvailabilityMacros.h>. Additional
1316 # documentation on these macros is available at
1317 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1318 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1319 # deployment target to 10.6. Other projects, such as O3D, may
1320 # override these defaults.
1321
1322 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1323 # about that is at least the specified version. In official builds,
1324 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1325 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1326 # path to the SDK; when set to a non-empty string, SDK detection
1327 # based on mac_sdk_min will be bypassed entirely.
1328 'mac_sdk_min%': '10.6',
1329 'mac_sdk_path%': '',
1330
1331 'mac_deployment_target%': '10.6',
1332 },
1333
1334 'mac_sdk_min': '<(mac_sdk_min)',
1335 'mac_sdk_path': '<(mac_sdk_path)',
1336 'mac_deployment_target': '<(mac_deployment_target)',
1337
[email protected]e1ece302011-09-15 03:58:111338 # Enable clang on mac by default!
1339 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291340
[email protected]794fb4782011-12-14 19:10:561341 # Compile in Breakpad support by default so that it can be
1342 # tested, even if it is not enabled by default at runtime.
1343 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071344 'conditions': [
1345 # mac_product_name is set to the name of the .app bundle as it should
1346 # appear on disk. This duplicates data from
1347 # chrome/app/theme/chromium/BRANDING and
1348 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1349 # these names into the build system.
1350 ['branding=="Chrome"', {
1351 'mac_product_name%': 'Google Chrome',
1352 }, { # else: branding!="Chrome"
1353 'mac_product_name%': 'Chromium',
1354 }],
1355
[email protected]e14a9f92009-08-05 19:26:071356 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291357 '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:561358 # Enable uploading crash dumps.
1359 'mac_breakpad_uploads%': 1,
1360 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071361 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561362 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071363 'mac_keystone%': 1,
1364 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291365 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561366 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071367 'mac_breakpad%': 0,
1368 'mac_keystone%': 0,
1369 }],
1370 ],
1371 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551372 ['OS=="win"', {
1373 'conditions': [
[email protected]8974e042010-06-21 18:06:521374 ['component=="shared_library"', {
1375 'win_use_allocator_shim%': 0,
1376 }],
[email protected]fa0f16e2012-08-20 22:30:041377 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101378 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041379 # Not enabled for component=static_library because some targets
1380 # are too large and the toolchain fails due to the size of the
1381 # .obj files.
[email protected]6f390be2012-08-16 18:57:101382 'incremental_chrome_dll%': 1,
1383 }],
[email protected]10bb8c92009-08-07 21:16:031384 # Don't do incremental linking for large modules on 32-bit.
1385 ['MSVS_OS_BITS==32', {
1386 'msvs_large_module_debug_link_mode%': '1', # No
1387 },{
1388 'msvs_large_module_debug_link_mode%': '2', # Yes
1389 }],
[email protected]78764182013-01-23 20:32:511390 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501391 'msvs_express%': 1,
1392 'secure_atl%': 0,
1393 },{
1394 'msvs_express%': 0,
1395 'secure_atl%': 1,
1396 }],
[email protected]912c55c2009-07-31 23:33:551397 ],
[email protected]ef4fa4072009-12-04 22:46:501398 'nacl_win64_defines': [
1399 # This flag is used to minimize dependencies when building
1400 # Native Client loader for 64-bit Windows.
1401 'NACL_WIN64',
1402 ],
[email protected]912c55c2009-07-31 23:33:551403 }],
[email protected]bb6aba32011-01-07 19:04:431404
[email protected]a35aa362012-10-30 13:55:071405 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441406 'use_cups%': 1,
1407 }, {
1408 'use_cups%': 0,
1409 }],
[email protected]bb6aba32011-01-07 19:04:431410
[email protected]eb5f1672013-01-31 07:56:461411 # Native Client glibc toolchain is enabled
1412 # by default except on arm and mips.
1413 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321414 'disable_glibc%': 1,
1415 }, {
1416 'disable_glibc%': 0,
1417 }],
1418
[email protected]712c3da2012-09-24 21:31:241419 # Disable SSE2 when building for ARM or MIPS.
1420 ['target_arch=="arm" or target_arch=="mipsel"', {
1421 'disable_sse2%': 1,
1422 }, {
1423 'disable_sse2%': '<(disable_sse2)',
1424 }],
1425
[email protected]19fe8f0b2010-12-07 07:27:271426 # Set the relative path from this file to the GYP file of the JPEG
1427 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281428 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1429 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271430 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281431 }, {
1432 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1433 }],
[email protected]bb6aba32011-01-07 19:04:431434
[email protected]abcc9ac2011-05-16 20:04:351435 # Options controlling the use of GConf (the classic GNOME configuration
1436 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311437 ['chromeos==1', {
1438 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351439 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311440 }, {
1441 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351442 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311443 }],
1444
[email protected]4de39f82011-03-28 12:01:291445 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291446 ['branding=="Chrome"', {
1447 # TODO(mmoss) The .grd files look for _google_chrome, but for
1448 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291449 'grit_defines': ['-D', '_google_chrome',
1450 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291451 }, {
[email protected]4de39f82011-03-28 12:01:291452 'grit_defines': ['-D', '_chromium',
1453 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291454 }],
[email protected]bb6aba32011-01-07 19:04:431455 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131456 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431457 }],
1458 ['toolkit_views==1', {
1459 'grit_defines': ['-D', 'toolkit_views'],
1460 }],
[email protected]8dd791d2011-09-16 16:37:301461 ['use_aura==1', {
1462 'grit_defines': ['-D', 'use_aura'],
1463 }],
[email protected]ed329be2012-01-03 22:02:161464 ['use_ash==1', {
1465 'grit_defines': ['-D', 'use_ash'],
1466 }],
[email protected]c329adf82011-10-05 14:34:571467 ['use_nss==1', {
1468 'grit_defines': ['-D', 'use_nss'],
1469 }],
[email protected]e47c32032011-03-01 19:26:201470 ['file_manager_extension==1', {
1471 'grit_defines': ['-D', 'file_manager_extension'],
1472 }],
[email protected]77a848262013-02-22 11:17:251473 ['image_loader_extension==1', {
1474 'grit_defines': ['-D', 'image_loader_extension'],
1475 }],
[email protected]9a425422011-01-11 00:53:181476 ['remoting==1', {
1477 'grit_defines': ['-D', 'remoting'],
1478 }],
[email protected]bb6aba32011-01-07 19:04:431479 ['use_titlecase_in_grd_files==1', {
1480 'grit_defines': ['-D', 'use_titlecase'],
1481 }],
[email protected]00dc155832011-02-01 18:51:191482 ['use_third_party_translations==1', {
1483 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121484 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161485 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1486 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121487 ],
[email protected]00dc155832011-02-01 18:51:191488 }],
[email protected]da1c8d692011-09-20 20:35:011489 ['OS=="android"', {
[email protected]7dc76812013-03-26 07:31:571490 'grit_defines': ['-D', 'android',
1491 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]da1c8d692011-09-20 20:35:011492 }],
[email protected]d39e3862012-06-26 22:38:231493 ['OS=="mac"', {
1494 'grit_defines': ['-D', 'scale_factors=2x'],
1495 }],
[email protected]ad563d02012-10-03 10:37:031496 ['OS == "ios"', {
1497 'grit_defines': [
1498 # define for iOS specific resources.
1499 '-D', 'ios',
1500 # iOS uses a whitelist to filter resources.
1501 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1502 ],
1503 }],
[email protected]6a3cd37e2012-04-17 17:13:341504 ['enable_extensions==1', {
1505 'grit_defines': ['-D', 'enable_extensions'],
1506 }],
[email protected]658677f2012-06-09 06:04:021507 ['enable_printing==1', {
1508 'grit_defines': ['-D', 'enable_printing'],
1509 }],
[email protected]c2aad542012-07-31 20:40:331510 ['enable_themes==1', {
1511 'grit_defines': ['-D', 'enable_themes'],
1512 }],
[email protected]4ffe78a2012-10-04 20:55:151513 ['use_oem_wallpaper==1', {
1514 'grit_defines': ['-D', 'use_oem_wallpaper'],
1515 }],
[email protected]ef1dd5062012-12-17 06:41:331516 ['enable_app_list==1', {
1517 'grit_defines': ['-D', 'enable_app_list'],
1518 }],
[email protected]dc4e8b82012-11-15 03:58:161519 ['enable_settings_app==1', {
1520 'grit_defines': ['-D', 'enable_settings_app'],
1521 }],
[email protected]5411d8202013-01-30 01:32:151522 ['enable_google_now==1', {
1523 'grit_defines': ['-D', 'enable_google_now'],
1524 }],
[email protected]a3a720f2013-04-25 19:35:421525 ['use_concatenated_impulse_responses==1', {
1526 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1527 }],
[email protected]3bb37e62012-04-19 03:40:081528 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]42091902013-05-02 02:24:121529 'variables': {
1530 'clang_chrome_plugins_flags': [
1531 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
1532 ],
1533 },
1534 'conditions': [
[email protected]b5d378de2013-05-02 18:20:191535 ['OS=="linux" and chromeos==0 and use_aura==0', {
[email protected]42091902013-05-02 02:24:121536 'clang_chrome_plugins_flags': [
1537 '<@(clang_chrome_plugins_flags)'
1538 ],
1539 }, {
1540 # TODO(rsleevi): http://crbug.com/115047 - This warning is only
1541 # enabled for Linux for now. Disable everywhere else.
1542 'clang_chrome_plugins_flags': [
1543 '<@(clang_chrome_plugins_flags)',
1544 '-Xclang',
1545 '-plugin-arg-find-bad-constructs',
1546 '-Xclang',
1547 'skip-virtuals-in-implementations',
1548 ],
1549 }]
[email protected]c872dc52012-05-19 06:36:311550 ],
[email protected]5d451ad2011-02-11 16:43:461551 }],
[email protected]cfa2e1102011-04-27 22:30:231552
[email protected]696de4e62012-11-21 21:18:541553 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061554 'clang%': 1,
1555 }],
[email protected]f5d8c222012-08-29 17:47:021556 ['asan==1 and OS=="mac"', {
1557 # See http://crbug.com/145503.
1558 'component': "static_library",
[email protected]93064ee2013-02-11 19:25:091559 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1560 # runtime is fully adopted. See http://crbug.com/170629.
1561 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021562 }],
[email protected]c9a829272012-07-04 07:51:121563 ['tsan==1', {
1564 'clang%': 1,
1565 }],
[email protected]a10ddd2d2013-02-26 20:06:591566 ['msan==1', {
1567 'clang%': 1,
1568 }],
[email protected]c9a829272012-07-04 07:51:121569
[email protected]7ce58b22012-09-26 05:17:251570 ['OS=="linux" and clang_type_profiler==1', {
1571 'clang%': 1,
1572 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321573 'conditions': [
1574 ['host_arch=="x64"', {
1575 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1576 }],
1577 ['host_arch=="ia32"', {
1578 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1579 # Clang in this directory at your own risk if needed for some
1580 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1581 # usage). Any failure by this compiler should not close the tree.
1582 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1583 }],
1584 ],
[email protected]7ce58b22012-09-26 05:17:251585 }],
1586
[email protected]a9318c72012-03-01 01:29:471587 # On valgrind bots, override the optimizer settings so we don't inline too
1588 # much and make the stacks harder to figure out.
1589 #
1590 # TODO(rnk): Kill off variables that no one else uses and just implement
1591 # them under a build_for_tool== condition.
1592 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1593 # gcc flags
1594 'mac_debug_optimization': '1',
1595 'mac_release_optimization': '1',
1596 'release_optimize': '1',
1597 'no_gc_sections': 1,
1598 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1599 '-fno-builtin -fno-optimize-sibling-calls',
1600 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1601 '-fno-builtin -fno-optimize-sibling-calls',
1602
1603 # MSVS flags for TSan on Pin and Windows.
1604 'win_debug_RuntimeChecks': '0',
1605 'win_debug_disable_iterator_debugging': '1',
1606 'win_debug_Optimization': '1',
1607 'win_debug_InlineFunctionExpansion': '0',
1608 'win_release_InlineFunctionExpansion': '0',
1609 'win_release_OmitFramePointers': '0',
1610
1611 'linux_use_tcmalloc': 1,
1612 'release_valgrind_build': 1,
1613 'werror': '',
1614 'component': 'static_library',
1615 'use_system_zlib': 0,
1616 }],
1617
1618 # Build tweaks for DrMemory.
1619 # TODO(rnk): Combine with tsan config to share the builder.
1620 # http://crbug.com/108155
1621 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471622 # These runtime checks force initialization of stack vars which blocks
1623 # DrMemory's uninit detection.
1624 'win_debug_RuntimeChecks': '0',
1625 # Iterator debugging is slow.
1626 'win_debug_disable_iterator_debugging': '1',
1627 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161628 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1629 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1630 # compiler bug, so we use /Ob1 instead.
1631 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471632 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501633 # Ditto for debug, to support bumping win_debug_Optimization.
1634 'win_debug_InlineFunctionExpansion': 0,
1635 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471636 # Keep the code under #ifndef NVALGRIND.
1637 'release_valgrind_build': 1,
1638 }],
[email protected]b6a5ac92012-10-29 18:17:221639
[email protected]f40a6912012-12-10 21:52:411640 # Enable RLZ on Win, Mac and ChromeOS.
1641 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221642 'enable_rlz%': 1,
1643 }],
[email protected]7d6763422013-04-26 12:06:541644
1645 # Set default compiler flags depending on ARM version.
1646 ['arm_version==5 and android_webview_build==0', {
1647 # Flags suitable for Android emulator
1648 'arm_arch%': 'armv5te',
1649 'arm_tune%': 'xscale',
1650 'arm_fpu%': '',
1651 'arm_float_abi%': 'soft',
1652 'arm_thumb%': 0,
1653 }],
1654 ['arm_version==6 and android_webview_build==0', {
1655 'arm_arch%': 'armv6',
1656 'arm_tune%': '',
1657 'arm_fpu%': '',
1658 'arm_float_abi%': 'soft',
1659 'arm_thumb%': 0,
1660 }],
1661 ['arm_version==7 and android_webview_build==0', {
1662 'arm_arch%': 'armv7-a',
1663 'arm_tune%': 'cortex-a8',
1664 'conditions': [
1665 ['arm_neon==1', {
1666 'arm_fpu%': 'neon',
1667 }, {
1668 'arm_fpu%': 'vfpv3-d16',
1669 }],
1670 ],
1671 'arm_float_abi%': 'softfp',
1672 'arm_thumb%': 1,
1673 }],
1674
1675 ['android_webview_build==1', {
1676 # The WebView build gets its cpu-specific flags from the Android build system.
1677 'arm_arch%': '',
1678 'arm_tune%': '',
1679 'arm_fpu%': '',
1680 'arm_float_abi%': '',
1681 'arm_thumb%': 0,
1682 }],
[email protected]912c55c2009-07-31 23:33:551683 ],
[email protected]a9318c72012-03-01 01:29:471684
[email protected]35958422011-09-28 02:03:591685 # List of default apps to install in new profiles. The first list contains
1686 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061687 # contains the destination location for each of the files. When a crx
1688 # is added or removed from the list, the chrome/browser/resources/
1689 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591690 'default_apps_list': [
1691 'browser/resources/default_apps/external_extensions.json',
1692 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061693 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591694 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001695 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231696 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591697 ],
1698 'default_apps_list_linux_dest': [
1699 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1700 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061701 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591702 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001703 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231704 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591705 ],
[email protected]2f80c312009-02-25 21:26:551706 },
1707 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261708 'variables': {
[email protected]a6e22132010-02-10 20:43:181709 # The condition that operates on chromium_code is in a target_conditions
1710 # section, and will not have access to the default fallback value of
1711 # chromium_code at the top of this file, or to the chromium_code
1712 # variable placed at the root variables scope of .gyp files, because
1713 # those variables are not set at target scope. As a workaround,
1714 # if chromium_code is not set at target scope, define it in target scope
1715 # to contain whatever value it has during early variable expansion.
1716 # That's enough to make it available during target conditional
1717 # processing.
1718 'chromium_code%': '<(chromium_code)',
1719
[email protected]7e0d664a2009-12-03 21:07:471720 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1721 'win_release_Optimization%': '2', # 2 = /Os
1722 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331723
1724 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241725 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111726 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241727 # Tri-state: blank is default, 1 on, 0 off
1728 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331729
[email protected]6b0507b2010-05-07 07:41:211730 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1731 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331732
[email protected]6b0507b2010-05-07 07:41:211733 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151734 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1735 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331736
[email protected]fac10d12010-11-08 16:00:311737 # VS inserts quite a lot of extra checks to algorithms like
1738 # std::partial_sort in Debug build which make them O(N^2)
1739 # instead of O(N*logN). This is particularly slow under memory
1740 # tools like ThreadSanitizer so we want it to be disablable.
1741 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1742 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471743
[email protected]ffd984b12009-09-11 19:37:001744 'release_extra_cflags%': '',
1745 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001746
1747 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521748
[email protected]ef5c5f1b2011-12-17 02:16:241749 # the non-qualified versions are widely assumed to be *nix-only
1750 'win_release_extra_cflags%': '',
1751 'win_debug_extra_cflags%': '',
1752
[email protected]b1eb341c2011-11-09 18:46:071753 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1754 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1755
[email protected]ef3326702011-10-06 18:06:441756 # Only used by Windows build for now. Can be used to build into a
1757 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1758 # output files in src/build/VS2010_{Debug,Release}.
1759 'build_dir_prefix%': '',
1760
[email protected]9ac2db692012-06-08 01:01:571761 # Targets are by default not nacl untrusted code.
1762 'nacl_untrusted_build%': 0,
1763
[email protected]9c55d9d2012-11-15 23:28:441764 'pnacl_compile_flags': [
1765 # pnacl uses the clang compiler so we need to supress all the
1766 # same warnings as we do for clang.
1767 # TODO(sbc): Remove these if/when they are removed from the clang
1768 # build.
1769 '-Wno-unused-function',
1770 '-Wno-char-subscripts',
1771 '-Wno-c++11-extensions',
1772 '-Wno-unnamed-type-template-args',
1773 ],
1774
[email protected]8974e042010-06-21 18:06:521775 'conditions': [
1776 ['OS=="win" and component=="shared_library"', {
1777 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161778 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1779 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521780 }, {
1781 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1782 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1783 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1784 }],
[email protected]1e013672012-06-29 22:12:201785 ['OS=="ios"', {
1786 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1787 'mac_release_optimization%': 's', # Use -Os unless overridden
1788 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1789 }, {
1790 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1791 'mac_release_optimization%': '3', # Use -O3 unless overridden
1792 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1793 }],
[email protected]8974e042010-06-21 18:06:521794 ],
[email protected]1c966092009-08-20 21:19:261795 },
[email protected]32aa8cc2009-03-04 21:36:391796 'conditions': [
[email protected]d808e212013-03-12 14:06:161797 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311798 'dependencies': [
1799 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1800 ],
1801 }],
[email protected]7ce58b22012-09-26 05:17:251802 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1803 'cflags_cc!': ['-fno-rtti'],
1804 'cflags_cc+': [
1805 '-frtti',
1806 '-gline-tables-only',
1807 '-fintercept-allocation-functions',
1808 ],
1809 'defines': ['TYPE_PROFILING'],
1810 'dependencies': [
1811 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1812 ],
1813 }],
[email protected]b0c45722013-01-23 04:47:321814 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1815 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1816 # See http://crbug.com/162818.
1817 'cflags+': ['-Wno-sentinel'],
1818 }],
[email protected]ff10b132012-02-29 22:53:301819 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1820 'msbuild_toolset': '<(msbuild_toolset)',
1821 }],
[email protected]32aa8cc2009-03-04 21:36:391822 ['branding=="Chrome"', {
1823 'defines': ['GOOGLE_CHROME_BUILD'],
1824 }, { # else: branding!="Chrome"
1825 'defines': ['CHROMIUM_BUILD'],
1826 }],
[email protected]286d9a12012-05-30 16:20:381827 ['OS=="mac" and component=="shared_library"', {
1828 'xcode_settings': {
1829 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1830 'LD_RUNPATH_SEARCH_PATHS': [
1831 # For unbundled binaries.
1832 '@loader_path/.',
1833 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1834 '@loader_path/../../..',
1835 ],
1836 },
1837 }],
[email protected]b6a5ac92012-10-29 18:17:221838 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171839 'defines': ['ENABLE_RLZ'],
1840 }],
[email protected]63e39a282011-07-13 20:41:281841 ['component=="shared_library"', {
1842 'defines': ['COMPONENT_BUILD'],
1843 }],
[email protected]06c756182010-04-27 18:31:311844 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171845 'defines': ['TOOLKIT_VIEWS=1'],
1846 }],
[email protected]1ee7c56c2011-10-19 14:51:331847 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111848 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1849 }],
[email protected]41423092011-08-25 15:39:581850 ['use_aura==1', {
1851 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351852 }],
[email protected]ed329be2012-01-03 22:02:161853 ['use_ash==1', {
1854 'defines': ['USE_ASH=1'],
1855 }],
[email protected]c335f4802013-04-06 04:51:211856 ['use_messagepump_linux==1', {
1857 'defines': ['USE_MESSAGEPUMP_LINUX=1'],
1858 }],
[email protected]cb800562012-11-20 22:36:071859 ['use_default_render_theme==1', {
1860 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1861 }],
[email protected]e190d272012-08-30 17:36:441862 ['use_libjpeg_turbo==1', {
1863 'defines': ['USE_LIBJPEG_TURBO=1'],
1864 }],
[email protected]c329adf82011-10-05 14:34:571865 ['use_nss==1', {
1866 'defines': ['USE_NSS=1'],
1867 }],
[email protected]2fa2f2d82013-04-29 18:13:121868 ['use_x11==1', {
1869 'defines': ['USE_X11=1'],
1870 }],
[email protected]bd7b6fe2012-03-05 21:02:401871 ['enable_one_click_signin==1', {
1872 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1873 }],
[email protected]a47aa892011-11-22 03:12:311874 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1875 # TODO(erg): We are progressively sealing up use of deprecated features
1876 # in gtk in preparation for an eventual porting to gtk3.
1877 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1878 }],
[email protected]fdc5bed2010-01-09 01:16:571879 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291880 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501881 }],
[email protected]55d92492013-01-31 05:03:391882 ['google_tv==1', {
1883 'defines': ['GOOGLE_TV=1'],
1884 }],
[email protected]f56797b2011-09-25 00:04:351885 ['use_xi2_mt!=0', {
1886 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1887 }],
[email protected]e47c32032011-03-01 19:26:201888 ['file_manager_extension==1', {
1889 'defines': ['FILE_MANAGER_EXTENSION=1'],
1890 }],
[email protected]77a848262013-02-22 11:17:251891 ['image_loader_extension==1', {
1892 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1893 }],
[email protected]7664ab32011-02-01 23:35:251894 ['profiling==1', {
1895 'defines': ['ENABLE_PROFILING=1'],
1896 }],
[email protected]93b373502011-08-16 19:06:221897 ['OS=="linux" and glibcxx_debug==1', {
1898 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591899 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221900 }],
[email protected]542bf24a2010-06-11 23:08:171901 ['remoting==1', {
1902 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001903 }],
[email protected]5b87e782012-02-09 18:19:321904 ['enable_webrtc==1', {
1905 'defines': ['ENABLE_WEBRTC=1'],
1906 }],
[email protected]d01120e62010-05-10 17:04:481907 ['proprietary_codecs==1', {
1908 'defines': ['USE_PROPRIETARY_CODECS'],
1909 }],
[email protected]7ddea9802012-02-22 23:08:051910 ['enable_viewport==1', {
1911 'defines': ['ENABLE_VIEWPORT'],
1912 }],
[email protected]f31e2e52011-07-14 16:01:191913 ['configuration_policy==1', {
1914 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1915 }],
[email protected]9eb100e2011-10-14 05:08:221916 ['input_speech==1', {
1917 'defines': ['ENABLE_INPUT_SPEECH'],
1918 }],
[email protected]7cce3232011-10-28 10:41:571919 ['notifications==1', {
1920 'defines': ['ENABLE_NOTIFICATIONS'],
1921 }],
[email protected]1efbaaa2012-04-24 02:43:241922 ['enable_hidpi==1', {
1923 'defines': ['ENABLE_HIDPI=1'],
1924 }],
[email protected]9c1949e2009-10-02 19:59:541925 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:311926 'xcode_settings': {
1927 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1928 },
[email protected]9c1949e2009-10-02 19:59:541929 'conditions': [
[email protected]7df38122012-11-05 23:54:431930 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:301931 # Clang creates chubby debug information, which makes linking very
1932 # slow. For now, don't create debug information with clang. See
1933 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:431934 'conditions': [
1935 ['OS=="linux"', {
1936 'variables': {
1937 'debug_extra_cflags': '-g0',
1938 },
1939 }],
1940 # Android builds symbols on release by default, disable them.
1941 ['OS=="android"', {
1942 'variables': {
1943 'debug_extra_cflags': '-g0',
1944 'release_extra_cflags': '-g0',
1945 },
1946 }],
1947 ],
1948 }, { # else clang!=1
1949 'conditions': [
[email protected]c86fd472013-04-02 19:42:301950 ['OS=="win" and fastbuild==2', {
1951 # Completely disable debug information.
1952 'msvs_settings': {
1953 'VCLinkerTool': {
1954 'GenerateDebugInformation': 'false',
1955 },
1956 'VCCLCompilerTool': {
1957 'DebugInformationFormat': '0',
1958 },
1959 },
1960 }],
1961 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431962 'msvs_settings': {
1963 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:311964 # This tells the linker to generate .pdbs, so that
1965 # we can get meaningful stack traces.
1966 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:431967 },
1968 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:311969 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:431970 'DebugInformationFormat': '0',
1971 },
1972 },
1973 }],
[email protected]c86fd472013-04-02 19:42:301974 ['OS=="linux" and fastbuild==2', {
1975 'variables': {
1976 'debug_extra_cflags': '-g0',
1977 },
1978 }],
1979 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431980 'variables': {
1981 'debug_extra_cflags': '-g1',
1982 },
1983 }],
[email protected]c86fd472013-04-02 19:42:301984 ['OS=="android" and fastbuild==2', {
1985 'variables': {
1986 'debug_extra_cflags': '-g0',
1987 'release_extra_cflags': '-g0',
1988 },
1989 }],
1990 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:431991 'variables': {
1992 'debug_extra_cflags': '-g1',
1993 'release_extra_cflags': '-g1',
1994 },
1995 }],
1996 ],
1997 }], # clang!=1
1998 ],
[email protected]9c1949e2009-10-02 19:59:541999 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012000 ['dcheck_always_on!=0', {
2001 'defines': ['DCHECK_ALWAYS_ON=1'],
2002 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:382003 ['selinux==1', {
2004 'defines': ['CHROMIUM_SELINUX=1'],
2005 }],
[email protected]7e0d664a2009-12-03 21:07:472006 ['win_use_allocator_shim==0', {
2007 'conditions': [
2008 ['OS=="win"', {
2009 'defines': ['NO_TCMALLOC'],
2010 }],
2011 ],
2012 }],
[email protected]43f28f832010-02-03 02:28:482013 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:152014 'defines': [
2015 'ENABLE_GPU=1',
2016 ],
2017 }],
[email protected]b1c2a5542010-10-08 12:44:402018 ['use_openssl==1', {
2019 'defines': [
2020 'USE_OPENSSL=1',
2021 ],
2022 }],
[email protected]ed154592010-04-29 00:18:502023 ['enable_eglimage==1', {
2024 'defines': [
2025 'ENABLE_EGLIMAGE=1',
2026 ],
2027 }],
[email protected]696de4e62012-11-21 21:18:542028 ['asan==1 and OS=="win"', {
2029 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2030 # produce appropriate pdbs.
2031 'msvs_settings': {
2032 'VCLinkerTool': {
2033 'Profile': 'true',
2034 },
2035 },
[email protected]2ff7ef5f2012-12-14 00:40:252036 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:542037 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:182038 ['coverage!=0', {
2039 'conditions': [
[email protected]fc642ec2012-10-12 19:07:032040 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:182041 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:042042 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2043 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:472044 },
[email protected]fc642ec2012-10-12 19:07:032045 }],
2046 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:432047 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:102048 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:432049 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:182050 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:432051 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:182052 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:472053 }],
2054 ],
2055 }],
[email protected]da1c8d692011-09-20 20:35:012056 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:182057 'cflags': [ '-ftest-coverage',
2058 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:002059 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:182060 }],
[email protected]e8f6ff42009-07-07 18:20:532061 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:072062 'variables': {
2063 # Disable incremental linking for all modules.
2064 # 0: inherit, 1: disabled, 2: enabled.
2065 'msvs_debug_link_incremental': '1',
2066 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:292067 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2068 # binaries for now.
2069 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:072070 },
2071 'defines': [
2072 # Disable iterator debugging (huge speed boost without any
2073 # change in coverage results).
2074 '_HAS_ITERATOR_DEBUGGING=0',
2075 ],
[email protected]e8f6ff42009-07-07 18:20:532076 'msvs_settings': {
2077 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:072078 # Enable profile information (necessary for coverage
2079 # instrumentation). This is incompatible with incremental
2080 # linking.
[email protected]e8f6ff42009-07-07 18:20:532081 'Profile': 'true',
2082 },
[email protected]e8f6ff42009-07-07 18:20:532083 }
2084 }], # OS==win
2085 ], # conditions for coverage
2086 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382087 ['OS=="win"', {
2088 'defines': [
2089 '__STD_C',
2090 '_CRT_SECURE_NO_DEPRECATE',
2091 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102092 # This define is required to pull in the new Win8 interfaces from
2093 # system headers like ShObjIdl.h.
2094 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382095 ],
2096 'include_dirs': [
2097 '<(DEPTH)/third_party/wtl/include',
2098 ],
[email protected]9619e65d2012-05-23 19:06:522099 'conditions': [
2100 ['win_z7!=0', {
2101 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092102 # Generates debug info when win_z7=1
2103 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2104 'VCLinkerTool': {
2105 'GenerateDebugInformation': 'true',
2106 },
[email protected]9619e65d2012-05-23 19:06:522107 'VCCLCompilerTool': {
2108 'DebugInformationFormat': '1',
2109 }
2110 }
2111 }],
[email protected]45a77072012-11-17 00:28:422112 ['"<(GENERATOR)"=="msvs"', {
2113 'msvs_settings': {
2114 'VCLinkerTool': {
2115 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2116 # have foo.pdb. The ninja generator already defaults to this and
2117 # can't handle the $(TargetPath) macro.
2118 'ProgramDatabaseFile': '$(TargetPath).pdb',
2119 }
2120 },
2121 }],
[email protected]9619e65d2012-05-23 19:06:522122 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382123 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022124 ['enable_task_manager==1', {
2125 'defines': [
2126 'ENABLE_TASK_MANAGER=1',
2127 ],
2128 }],
[email protected]6a3cd37e2012-04-17 17:13:342129 ['enable_extensions==1', {
2130 'defines': [
2131 'ENABLE_EXTENSIONS=1',
2132 ],
2133 }],
[email protected]13eb97d2012-01-05 01:07:122134 ['OS=="win" and branding=="Chrome"', {
2135 'defines': ['ENABLE_SWIFTSHADER'],
2136 }],
[email protected]407dfa632011-12-23 11:59:352137 ['enable_dart==1', {
2138 'defines': ['WEBKIT_USING_DART=1'],
2139 }],
[email protected]18e0f39b2012-01-17 16:47:342140 ['enable_plugin_installation==1', {
2141 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2142 }],
[email protected]6d17f6392012-12-05 05:24:542143 ['enable_plugins==1', {
2144 'defines': ['ENABLE_PLUGINS=1'],
2145 }],
[email protected]cdb756ef2012-04-05 18:34:532146 ['enable_session_service==1', {
2147 'defines': ['ENABLE_SESSION_SERVICE=1'],
2148 }],
[email protected]6b40bb582012-03-15 20:50:382149 ['enable_themes==1', {
2150 'defines': ['ENABLE_THEMES=1'],
2151 }],
[email protected]57e67ac2013-02-22 03:37:222152 ['enable_autofill_dialog==1', {
2153 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2154 }],
[email protected]0acdd772012-04-05 22:53:002155 ['enable_background==1', {
2156 'defines': ['ENABLE_BACKGROUND=1'],
2157 }],
[email protected]2e22e2f2012-03-15 21:53:102158 ['enable_automation==1', {
2159 'defines': ['ENABLE_AUTOMATION=1'],
2160 }],
[email protected]6ee43a72012-12-07 22:44:402161 ['enable_google_now==1', {
2162 'defines': ['ENABLE_GOOGLE_NOW=1'],
2163 }],
[email protected]703369a2012-11-05 20:40:312164 ['enable_language_detection==1', {
2165 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
2166 }],
[email protected]658677f2012-06-09 06:04:022167 ['enable_printing==1', {
2168 'defines': ['ENABLE_PRINTING=1'],
2169 }],
[email protected]e6026962012-06-14 21:28:322170 ['enable_captive_portal_detection==1', {
2171 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2172 }],
[email protected]dc4e8b82012-11-15 03:58:162173 ['enable_app_list==1', {
2174 'defines': ['ENABLE_APP_LIST=1'],
2175 }],
[email protected]9b5dbf72013-01-09 20:29:152176 ['enable_message_center==1', {
2177 'defines': ['ENABLE_MESSAGE_CENTER=1'],
2178 }],
[email protected]dc4e8b82012-11-15 03:58:162179 ['enable_settings_app==1', {
2180 'defines': ['ENABLE_SETTINGS_APP=1'],
2181 }],
[email protected]9bfe0ab2012-08-30 13:18:112182 ['disable_ftp_support==1', {
2183 'defines': ['DISABLE_FTP_SUPPORT=1'],
2184 }],
[email protected]0850e842013-01-19 03:44:312185 ['enable_managed_users==1', {
2186 'defines': ['ENABLE_MANAGED_USERS=1'],
2187 }],
[email protected]199def22013-02-21 17:52:292188 ['spdy_proxy_auth_origin != ""', {
2189 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2190 }],
2191 ['spdy_proxy_auth_property != ""', {
2192 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2193 }],
[email protected]5cbeb502013-04-23 19:25:272194 ['enable_mdns==1', {
2195 'defines': ['ENABLE_MDNS=1'],
2196 }]
[email protected]a6e22132010-02-10 20:43:182197 ], # conditions for 'target_defaults'
2198 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072199 ['enable_wexit_time_destructors==1', {
2200 'conditions': [
2201 [ 'clang==1', {
2202 'cflags': [
2203 '-Wexit-time-destructors',
2204 ],
2205 'xcode_settings': {
2206 'WARNING_CFLAGS': [
2207 '-Wexit-time-destructors',
2208 ],
2209 },
2210 }],
2211 ],
2212 }],
[email protected]c14d8e772010-02-09 22:06:152213 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282214 'conditions': [
[email protected]1e013672012-06-29 22:12:202215 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332216 # We don't want to get warnings from third-party code,
2217 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282218 'cflags!': [
2219 '-Wall',
2220 '-Wextra',
[email protected]d8543312010-02-10 17:43:282221 ],
[email protected]167ec822011-10-24 22:05:272222 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002223 # Don't warn about hash_map in third-party code.
2224 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272225 ],
2226 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332227 # Don't warn about printf format problems.
2228 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222229 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002230 ],
[email protected]d16bd642011-07-25 23:59:182231 'cflags_cc!': [
2232 # TODO(fischman): remove this.
2233 # http://code.google.com/p/chromium/issues/detail?id=90453
2234 '-Wsign-compare',
2235 ]
[email protected]d8543312010-02-10 17:43:282236 }],
[email protected]82dd5eb32012-08-18 04:24:322237 # TODO: Fix all warnings on chromeos too.
2238 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2239 'cflags!': [
2240 '-Werror',
2241 ],
2242 }],
[email protected]bc073c062012-01-13 06:28:032243 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112244 'cflags': [
2245 # Don't warn about ignoring the return value from e.g. close().
2246 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032247 # BSD systems do not support this option, since they are usually
2248 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112249 '-Wno-unused-result',
2250 ],
2251 }],
[email protected]d8543312010-02-10 17:43:282252 [ 'OS=="win"', {
2253 'defines': [
2254 '_CRT_SECURE_NO_DEPRECATE',
2255 '_CRT_NONSTDC_NO_WARNINGS',
2256 '_CRT_NONSTDC_NO_DEPRECATE',
2257 '_SCL_SECURE_NO_DEPRECATE',
2258 ],
2259 'msvs_disabled_warnings': [4800],
2260 'msvs_settings': {
2261 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112262 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242263 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282264 'Detect64BitPortabilityProblems': 'false',
2265 },
2266 },
[email protected]c54b41cb2012-08-24 20:58:242267 'conditions': [
2268 ['buildtype=="Official"', {
2269 'msvs_settings': {
2270 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2271 }
2272 }],
2273 ],
[email protected]d8543312010-02-10 17:43:282274 }],
[email protected]0915c3b2012-11-22 17:24:072275 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422276 [ 'OS=="win" and component=="shared_library"', {
2277 'msvs_disabled_warnings': [
2278 4251, # class 'std::xx' needs to have dll-interface.
2279 ],
2280 }],
[email protected]1e013672012-06-29 22:12:202281 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282282 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062283 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282284 },
[email protected]3a352c362012-05-08 19:45:492285 'conditions': [
2286 ['buildtype=="Official"', {
2287 'xcode_settings': {
2288 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2289 },
2290 }],
2291 ],
[email protected]d8543312010-02-10 17:43:282292 }],
[email protected]1e013672012-06-29 22:12:202293 [ 'OS=="ios"', {
2294 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222295 # TODO(ios): Fix remaining warnings in third-party code, then
2296 # remove this; the Mac cleanup didn't get everything that's
2297 # flagged in an iOS build.
2298 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202299 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2300 },
2301 }],
[email protected]c14d8e772010-02-09 22:06:152302 ],
2303 }, {
[email protected]a5c598152012-01-27 04:55:132304 'includes': [
2305 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2306 'filename_rules.gypi',
2307 ],
[email protected]41af4f82012-11-08 00:09:312308 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152309 # C99 macros on Mac and Linux.
2310 'defines': [
[email protected]41af4f82012-11-08 00:09:312311 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152312 '__STDC_FORMAT_MACROS',
2313 ],
2314 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152315 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072316 # turn on warnings for signed/unsigned mismatch on chromium code.
2317 'msvs_settings': {
2318 'VCCLCompilerTool': {
2319 'AdditionalOptions': ['/we4389'],
2320 },
2321 },
[email protected]c14d8e772010-02-09 22:06:152322 }],
[email protected]63e39a282011-07-13 20:41:282323 ['OS=="win" and component=="shared_library"', {
2324 'msvs_disabled_warnings': [
2325 4251, # class 'std::xx' needs to have dll-interface.
2326 ],
2327 }],
[email protected]c14d8e772010-02-09 22:06:152328 ],
2329 }],
[email protected]a6e22132010-02-10 20:43:182330 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552331 'default_configuration': 'Debug',
2332 'configurations': {
[email protected]5153767c2009-12-22 01:52:502333 # VCLinkerTool LinkIncremental values below:
2334 # 0 == default
2335 # 1 == /INCREMENTAL:NO
2336 # 2 == /INCREMENTAL
2337 # Debug links incremental, Release does not.
2338 #
[email protected]7b99801e2010-11-03 17:26:232339 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502340 #
2341 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562342 'abstract': 1,
2343 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512344 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562345 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2346 'CharacterSet': '1',
2347 },
[email protected]f59e1302013-02-15 13:48:402348 # Add the default import libs.
2349 'msvs_settings':{
2350 'VCLinkerTool': {
2351 'AdditionalDependencies': [
2352 'kernel32.lib',
2353 'gdi32.lib',
2354 'winspool.lib',
2355 'comdlg32.lib',
2356 'advapi32.lib',
2357 'shell32.lib',
2358 'ole32.lib',
2359 'oleaut32.lib',
2360 'user32.lib',
2361 'uuid.lib',
2362 'odbc32.lib',
2363 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392364 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402365 ],
2366 },
2367 },
[email protected]5153767c2009-12-22 01:52:502368 },
2369 'x86_Base': {
2370 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502371 'msvs_settings': {
2372 'VCLinkerTool': {
2373 'TargetMachine': '1',
2374 },
2375 },
[email protected]2fa40782009-11-01 21:17:342376 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562377 },
[email protected]5153767c2009-12-22 01:52:502378 'x64_Base': {
2379 'abstract': 1,
2380 'msvs_configuration_platform': 'x64',
2381 'msvs_settings': {
2382 'VCLinkerTool': {
2383 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502384 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052385 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502386 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052387 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362388 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2389 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502390 },
[email protected]d26b4418ab2010-03-24 22:06:352391 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502392 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052393 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502394 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052395 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502396 },
2397 },
[email protected]5153767c2009-12-22 01:52:502398 },
2399 'Debug_Base': {
2400 'abstract': 1,
[email protected]14339762011-04-05 07:36:582401 'defines': [
2402 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2403 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2404 ],
[email protected]1c966092009-08-20 21:19:262405 'xcode_settings': {
2406 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292407 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492408 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492409 '<@(debug_extra_cflags)',
2410 ],
[email protected]1c966092009-08-20 21:19:262411 },
[email protected]bb05e452009-10-29 21:24:562412 'msvs_settings': {
2413 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472414 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562415 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212416 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472417 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152418 'conditions': [
2419 # According to MSVS, InlineFunctionExpansion=0 means
2420 # "default inlining", not "/Ob0".
2421 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2422 ['win_debug_InlineFunctionExpansion==0', {
2423 'AdditionalOptions': ['/Ob0'],
2424 }],
2425 ['win_debug_InlineFunctionExpansion!=""', {
2426 'InlineFunctionExpansion':
2427 '<(win_debug_InlineFunctionExpansion)',
2428 }],
[email protected]fac10d12010-11-08 16:00:312429 ['win_debug_disable_iterator_debugging==1', {
2430 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2431 }],
[email protected]ef5c5f1b2011-12-17 02:16:242432
2433 # if win_debug_OmitFramePointers is blank, leave as default
2434 ['win_debug_OmitFramePointers==1', {
2435 'OmitFramePointers': 'true',
2436 }],
2437 ['win_debug_OmitFramePointers==0', {
2438 'OmitFramePointers': 'false',
2439 # The above is not sufficient (http://crbug.com/106711): it
2440 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2441 # perform FPO regardless, so we must explicitly disable.
2442 # We still want the false setting above to avoid having
2443 # "/Oy /Oy-" and warnings about overriding.
2444 'AdditionalOptions': ['/Oy-'],
2445 }],
[email protected]2ae6e022010-05-07 13:19:152446 ],
[email protected]ef5c5f1b2011-12-17 02:16:242447 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562448 },
2449 'VCLinkerTool': {
2450 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332451 # ASLR makes debugging with windbg difficult because Chrome.exe and
2452 # Chrome.dll share the same base name. As result, windbg will
2453 # name the Chrome.dll module like chrome_<base address>, where
2454 # <base address> typically changes with each launch. This in turn
2455 # means that breakpoints in Chrome.dll don't stick from one launch
2456 # to the next. For this reason, we turn ASLR off in debug builds.
2457 # Note that this is a three-way bool, where 0 means to pick up
2458 # the default setting, 1 is off and 2 is on.
2459 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562460 },
2461 'VCResourceCompilerTool': {
2462 'PreprocessorDefinitions': ['_DEBUG'],
2463 },
2464 },
[email protected]2f80c312009-02-25 21:26:552465 'conditions': [
[email protected]78204c92012-09-14 04:42:552466 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542467 'target_conditions': [
2468 ['_toolset=="target"', {
2469 'cflags': [
2470 '<@(debug_extra_cflags)',
2471 ],
2472 }],
[email protected]bb05e452009-10-29 21:24:562473 ],
[email protected]2f80c312009-02-25 21:26:552474 }],
[email protected]1e013672012-06-29 22:12:202475 # Disabled on iOS because it was causing a crash on startup.
2476 # TODO(michelea): investigate, create a reduced test and possibly
2477 # submit a radar.
2478 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352479 'xcode_settings': {
2480 'OTHER_CFLAGS': [
2481 '-fstack-protector-all', # Implies -fstack-protector
2482 ],
2483 },
2484 }],
[email protected]2f80c312009-02-25 21:26:552485 ],
2486 },
[email protected]5153767c2009-12-22 01:52:502487 'Release_Base': {
2488 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552489 'defines': [
2490 'NDEBUG',
2491 ],
[email protected]1c966092009-08-20 21:19:262492 'xcode_settings': {
2493 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2494 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002495 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262496 },
[email protected]bb05e452009-10-29 21:24:562497 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472498 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472499 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152500 'conditions': [
[email protected]2212d272011-12-20 21:37:372501 # In official builds, each target will self-select
2502 # an optimization level.
2503 ['buildtype!="Official"', {
2504 'Optimization': '<(win_release_Optimization)',
2505 },
2506 ],
[email protected]2ae6e022010-05-07 13:19:152507 # According to MSVS, InlineFunctionExpansion=0 means
2508 # "default inlining", not "/Ob0".
2509 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2510 ['win_release_InlineFunctionExpansion==0', {
2511 'AdditionalOptions': ['/Ob0'],
2512 }],
2513 ['win_release_InlineFunctionExpansion!=""', {
2514 'InlineFunctionExpansion':
2515 '<(win_release_InlineFunctionExpansion)',
2516 }],
[email protected]626d2d22011-10-11 15:47:332517
[email protected]ef5c5f1b2011-12-17 02:16:242518 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332519 ['win_release_OmitFramePointers==1', {
2520 'OmitFramePointers': 'true',
2521 }],
2522 ['win_release_OmitFramePointers==0', {
2523 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242524 # The above is not sufficient (http://crbug.com/106711): it
2525 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2526 # perform FPO regardless, so we must explicitly disable.
2527 # We still want the false setting above to avoid having
2528 # "/Oy /Oy-" and warnings about overriding.
2529 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332530 }],
[email protected]2ae6e022010-05-07 13:19:152531 ],
[email protected]ef5c5f1b2011-12-17 02:16:242532 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472533 },
[email protected]bb05e452009-10-29 21:24:562534 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342535 # LinkIncremental is a tri-state boolean, where 0 means default
2536 # (i.e., inherit from parent solution), 1 means false, and
2537 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562538 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342539 # This corresponds to the /PROFILE flag which ensures the PDB
2540 # file contains FIXUP information (growing the PDB file by about
2541 # 5%) but does not otherwise alter the output binary. This
2542 # information is used by the Syzygy optimization tool when
2543 # decomposing the release image.
2544 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562545 },
2546 },
[email protected]2f80c312009-02-25 21:26:552547 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162548 ['msvs_use_common_release', {
2549 'includes': ['release.gypi'],
2550 }],
[email protected]7bdd7d7c2012-11-01 10:36:162551 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582552 'defines': [
2553 'NVALGRIND',
2554 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2555 ],
[email protected]ee857512010-05-14 08:24:422556 }, {
[email protected]14339762011-04-05 07:36:582557 'defines': [
2558 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2559 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2560 ],
[email protected]92822e82009-09-18 14:26:562561 }],
[email protected]7e0d664a2009-12-03 21:07:472562 ['win_use_allocator_shim==0', {
2563 'defines': ['NO_TCMALLOC'],
2564 }],
[email protected]37305ae2012-12-11 01:54:582565 ['os_posix==1 and chromium_code==1', {
2566 # Non-chromium code is not guaranteed to compile cleanly
2567 # with _FORTIFY_SOURCE. Also, fortified build may fail
2568 # when optimizations are disabled, so only do that for Release
2569 # build.
2570 'defines': [
2571 '_FORTIFY_SOURCE=2',
2572 ],
2573 }],
[email protected]7df38122012-11-05 23:54:432574 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542575 'target_conditions': [
2576 ['_toolset=="target"', {
2577 'cflags': [
2578 '<@(release_extra_cflags)',
2579 ],
2580 }],
[email protected]bb05e452009-10-29 21:24:562581 ],
2582 }],
[email protected]2f80c312009-02-25 21:26:552583 ],
2584 },
[email protected]5153767c2009-12-22 01:52:502585 #
2586 # Concrete configurations
2587 #
2588 'Debug': {
2589 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2590 },
2591 'Release': {
2592 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502593 },
[email protected]f926fa0a2009-08-04 22:50:132594 'conditions': [
2595 [ 'OS=="win"', {
2596 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502597 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502598 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302599 },
2600 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502601 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302602 },
[email protected]f926fa0a2009-08-04 22:50:132603 }],
2604 ],
[email protected]2f80c312009-02-25 21:26:552605 },
2606 },
2607 'conditions': [
[email protected]43539ec2012-11-20 22:35:252608 ['os_posix==1', {
2609 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252610 'ldflags': [
2611 '-Wl,-z,now',
2612 '-Wl,-z,relro',
2613 ],
[email protected]43539ec2012-11-20 22:35:252614 },
2615 }],
[email protected]d2ca75c2013-02-01 05:47:172616 ['os_posix==1 and chromeos==0', {
2617 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2618 # and we want to avoid overriding this, so stack-protector is only
2619 # enabled when not building on Chrome OS.
2620 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2621 # supports it.
2622 'target_defaults': {
2623 'cflags': [
2624 '-fstack-protector',
2625 '--param=ssp-buffer-size=4',
2626 ],
2627 },
2628 }],
[email protected]1e013672012-06-29 22:12:202629 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262630 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272631 # Enable -Werror by default, but put it in a variable so it can
2632 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2633 'variables': {
[email protected]cbbb3472012-01-25 18:32:312634 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202635 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272636 },
[email protected]6863896f2012-01-25 17:51:362637 'defines': [
2638 '_FILE_OFFSET_BITS=64',
2639 ],
[email protected]9d384032009-03-20 23:13:262640 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162641 '<(werror)', # See note above about the werror variable.
2642 '-pthread',
2643 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292644 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162645 '-Wall',
[email protected]0fa17082010-03-26 00:48:052646 # TODO(evan): turn this back on once all the builds work.
2647 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202648 # Don't warn about unused function params. We use those everywhere.
2649 '-Wno-unused-parameter',
2650 # Don't warn about the "struct foo f = {0};" initialization pattern.
2651 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122652 # Don't export any symbols (for example, to plugins we dlopen()).
2653 # Note: this is *required* to make some plugins work.
2654 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352655 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242656 ],
2657 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222658 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242659 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362660 # Make inline functions have hidden visiblity by default.
2661 # Surprisingly, not covered by -fvisibility=hidden.
2662 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172663 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2664 # so we specify it explicitly.
2665 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182666 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172667 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262668 ],
[email protected]a6cf87e2009-04-03 04:07:382669 'ldflags': [
[email protected]138241f2010-03-30 23:53:102670 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262671 ],
[email protected]1e013672012-06-29 22:12:202672 'libraries' : [
2673 '<(libraries_for_target)',
2674 ],
[email protected]3aacaf952009-04-02 15:34:092675 'configurations': {
[email protected]5153767c2009-12-22 01:52:502676 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312677 'variables': {
2678 'debug_optimize%': '0',
2679 },
[email protected]3aacaf952009-04-02 15:34:092680 'defines': [
2681 '_DEBUG',
2682 ],
2683 'cflags': [
[email protected]95ad2032012-08-24 00:49:252684 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092685 '-g',
2686 ],
[email protected]da1c8d692011-09-20 20:35:012687 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342688 ['OS=="android"', {
2689 # Only link with needed input sections. This is to avoid getting
2690 # undefined reference to __cxa_bad_typeid in the CDU library.
2691 'ldflags': [
2692 '-Wl,--gc-sections',
2693 ],
2694 }],
[email protected]fa9d4e262012-08-21 04:39:002695 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552696 # Some configurations are copied from Release_Base to reduce
2697 # the binary size.
2698 'variables': {
2699 'debug_optimize%': 's',
2700 },
[email protected]da1c8d692011-09-20 20:35:012701 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552702 '-fomit-frame-pointer',
2703 '-fdata-sections',
2704 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012705 ],
[email protected]8a37e4502012-08-14 22:42:552706 'ldflags': [
2707 '-Wl,-O1',
2708 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552709 ],
[email protected]da1c8d692011-09-20 20:35:012710 }],
[email protected]d4c0ec5b2013-03-10 03:07:452711 ['OS=="linux" and target_arch=="ia32"', {
2712 'ldflags': [
2713 '-Wl,--no-as-needed',
2714 ],
2715 }],
[email protected]da1c8d692011-09-20 20:35:012716 ],
[email protected]5315f2842009-04-28 00:43:272717 },
[email protected]5153767c2009-12-22 01:52:502718 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012719 'variables': {
2720 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512721 # Binaries become big and gold is unable to perform GC
2722 # and remove unused sections for some of test targets
2723 # on 32 bit platform.
2724 # (This is currently observed only in chromeos valgrind bots)
2725 # The following flag is to disable --gc-sections linker
2726 # option for these bots.
2727 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122728
2729 # TODO(bradnelson): reexamine how this is done if we change the
2730 # expansion of configurations
2731 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012732 },
[email protected]3aacaf952009-04-02 15:34:092733 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182734 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532735 # Don't emit the GCC version ident directives, they just end up
2736 # in the .comment section taking up binary size.
2737 '-fno-ident',
2738 # Put data and code in their own sections, so that unused symbols
2739 # can be removed at link time with --gc-sections.
2740 '-fdata-sections',
2741 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092742 ],
[email protected]c902f2c2010-08-06 20:04:182743 'ldflags': [
2744 # Specifically tell the linker to perform optimizations.
2745 # See http://lwn.net/Articles/192624/ .
2746 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222747 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182748 ],
[email protected]1dd529642010-05-15 01:02:512749 'conditions' : [
2750 ['no_gc_sections==0', {
2751 'ldflags': [
2752 '-Wl,--gc-sections',
2753 ],
2754 }],
[email protected]da1c8d692011-09-20 20:35:012755 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582756 'variables': {
2757 'release_optimize%': 's',
2758 },
[email protected]da1c8d692011-09-20 20:35:012759 'cflags': [
2760 '-fomit-frame-pointer',
2761 ],
2762 }],
[email protected]ecf7b6482010-10-13 09:15:202763 ['clang==1', {
2764 'cflags!': [
2765 '-fno-ident',
2766 ],
2767 }],
[email protected]7664ab32011-02-01 23:35:252768 ['profiling==1', {
2769 'cflags': [
2770 '-fno-omit-frame-pointer',
2771 '-g',
2772 ],
2773 }],
[email protected]bdbe3d22013-02-22 04:10:352774 # Can be omitted to reduce output size. Does not seem to affect
2775 # crash reporting.
2776 ['target_arch=="ia32"', {
2777 'cflags': [
2778 '-fno-unwind-tables',
2779 '-fno-asynchronous-unwind-tables',
2780 ],
2781 }],
[email protected]8d726a42012-02-09 03:49:002782 ],
[email protected]3aacaf952009-04-02 15:34:092783 },
2784 },
[email protected]601b540222009-04-03 21:32:042785 'variants': {
2786 'coverage': {
2787 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2788 'ldflags': ['-fprofile-arcs'],
2789 },
2790 'profile': {
2791 'cflags': ['-pg', '-g'],
2792 'ldflags': ['-pg'],
2793 },
2794 'symbols': {
2795 'cflags': ['-g'],
2796 },
2797 },
[email protected]606116d22009-05-06 22:38:232798 'conditions': [
[email protected]04b482602011-09-14 02:36:212799 ['target_arch=="ia32"', {
2800 'target_conditions': [
2801 ['_toolset=="target"', {
2802 'asflags': [
2803 # Needed so that libs with .s files (e.g. libicudata.a)
2804 # are compatible with the general 32-bit-ness.
2805 '-32',
2806 ],
2807 # All floating-point computations on x87 happens in 80-bit
2808 # precision. Because the C and C++ language standards allow
2809 # the compiler to keep the floating-point values in higher
2810 # precision than what's specified in the source and doing so
2811 # is more efficient than constantly rounding up to 64-bit or
2812 # 32-bit precision as specified in the source, the compiler,
2813 # especially in the optimized mode, tries very hard to keep
2814 # values in x87 floating-point stack (in 80-bit precision)
2815 # as long as possible. This has important side effects, that
2816 # the real value used in computation may change depending on
2817 # how the compiler did the optimization - that is, the value
2818 # kept in 80-bit is different than the value rounded down to
2819 # 64-bit or 32-bit. There are possible compiler options to
2820 # make this behavior consistent (e.g. -ffloat-store would keep
2821 # all floating-values in the memory, thus force them to be
2822 # rounded to its original precision) but they have significant
2823 # runtime performance penalty.
2824 #
2825 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2826 # which keep floating-point values in SSE registers in its
2827 # native precision (32-bit for single precision, and 64-bit
2828 # for double precision values). This means the floating-point
2829 # value used during computation does not change depending on
2830 # how the compiler optimized the code, since the value is
2831 # always kept in its specified precision.
2832 'conditions': [
2833 ['branding=="Chromium" and disable_sse2==0', {
2834 'cflags': [
2835 '-march=pentium4',
2836 '-msse2',
2837 '-mfpmath=sse',
2838 ],
2839 }],
2840 # ChromeOS targets Pinetrail, which is sse3, but most of the
2841 # benefit comes from sse2 so this setting allows ChromeOS
2842 # to build on other CPUs. In the future -march=atom would
2843 # help but requires a newer compiler.
2844 ['chromeos==1 and disable_sse2==0', {
2845 'cflags': [
2846 '-msse2',
2847 ],
2848 }],
[email protected]0a0063c52013-03-29 06:36:212849 # Use gold linker for Android ia32 target.
2850 ['OS=="android"', {
2851 'cflags': [
2852 '-fuse-ld=gold',
2853 ],
2854 'ldflags': [
2855 '-fuse-ld=gold',
2856 ],
2857 }],
[email protected]04b482602011-09-14 02:36:212858 # Install packages have started cropping up with
2859 # different headers between the 32-bit and 64-bit
2860 # versions, so we have to shadow those differences off
2861 # and make sure a 32-bit-on-64-bit build picks up the
2862 # right files.
[email protected]32594022012-05-10 03:22:282863 # For android build, use NDK headers instead of host headers
2864 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212865 'include_dirs+': [
2866 '/usr/include32',
2867 ],
2868 }],
2869 ],
2870 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2871 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062872 'cflags': [
[email protected]04b482602011-09-14 02:36:212873 '-m32',
2874 '-mmmx',
2875 ],
2876 'ldflags': [
2877 '-m32',
[email protected]ffde7932009-05-29 00:39:062878 ],
2879 }],
[email protected]606116d22009-05-06 22:38:232880 ],
2881 }],
[email protected]3dda8a962009-08-10 18:58:072882 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292883 'target_conditions': [
2884 ['_toolset=="target"', {
2885 'cflags_cc': [
2886 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2887 # has changed whenever it encounters a varargs function. This
2888 # silences those warnings, as they are not helpful and
2889 # clutter legitimate warnings.
2890 '-Wno-abi',
2891 ],
2892 'conditions': [
[email protected]7d6763422013-04-26 12:06:542893 ['arm_arch!=""', {
2894 'cflags': [
2895 '-march=<(arm_arch)',
2896 ],
2897 }],
2898 ['arm_tune!=""', {
2899 'cflags': [
2900 '-mtune=<(arm_tune)',
2901 ],
2902 }],
2903 ['arm_fpu!=""', {
2904 'cflags': [
2905 '-mfpu=<(arm_fpu)',
2906 ],
2907 }],
2908 ['arm_float_abi!=""', {
2909 'cflags': [
2910 '-mfloat-abi=<(arm_float_abi)',
2911 ],
2912 }],
2913 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292914 'cflags': [
2915 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292916 ]
2917 }],
[email protected]da1c8d692011-09-20 20:35:012918 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532919 # Most of the following flags are derived from what Android
2920 # uses by default when building for arm, reference for which
2921 # can be found in the following file in the Android NDK:
2922 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2923 'cflags': [
2924 # The tree-sra optimization (scalar replacement for
2925 # aggregates enabling subsequent optimizations) leads to
2926 # invalid code generation when using the Android NDK's
2927 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:432928 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:532929 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482930 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532931 '-Wno-psabi',
2932 ],
[email protected]ad17e342012-07-17 20:45:482933 # Android now supports .relro sections properly.
2934 # NOTE: While these flags enable the generation of .relro
2935 # sections, the generated libraries can still be loaded on
2936 # older Android platform versions.
2937 'ldflags': [
2938 '-Wl,-z,relro',
2939 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482940 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482941 ],
[email protected]da1c8d692011-09-20 20:35:012942 'conditions': [
[email protected]7d6763422013-04-26 12:06:542943 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:222944 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012945 }],
[email protected]4c48ef102012-11-29 22:00:382946 ['profiling==1', {
2947 'cflags': [
2948 '-marm', # Probably reduntant, but recommend by "perf" docs.
2949 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2950 ],
2951 }],
[email protected]220ea5932012-08-09 10:44:072952 ['clang==1', {
2953 'cflags!': [
2954 # Clang does not support the following options.
2955 '-mthumb-interwork',
2956 '-finline-limit=64',
2957 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482958 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072959 '-Wno-psabi',
2960 ],
2961 }],
[email protected]da1c8d692011-09-20 20:35:012962 ],
[email protected]3cf73842012-11-24 03:35:252963 'target_conditions': [
2964 # ndk-build copies .a's around the filesystem, breaking
2965 # relative paths in thin archives. Disable using thin
2966 # archives to avoid problems until one of these is fixed:
2967 # http://code.google.com/p/android/issues/detail?id=40302
2968 # http://code.google.com/p/android/issues/detail?id=40303
2969 ['_type=="static_library"', {
2970 'standalone_static_library': 1,
2971 }],
2972 ],
[email protected]da1c8d692011-09-20 20:35:012973 }],
[email protected]3dda8a962009-08-10 18:58:072974 ],
2975 }],
2976 ],
2977 }],
[email protected]23eea4a42013-04-27 04:10:262978 ['target_arch=="mipsel"', {
2979 'target_conditions': [
2980 ['_toolset=="target"', {
2981 'conditions': [
2982 ['mips_arch_variant=="mips32r2"', {
2983 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
2984 }, {
2985 'cflags': ['-mips32', '-Wa,-mips32'],
2986 }],
2987 ],
2988 'cflags': [
2989 '-EL',
2990 '-mhard-float',
2991 ],
2992 'ldflags': [
2993 '-EL',
2994 '-Wl,--no-keep-memory'
2995 ],
2996 'cflags_cc': [
2997 '-Wno-uninitialized',
2998 ],
2999 }],
3000 ],
3001 }],
[email protected]2fb843b2010-08-12 02:11:083002 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583003 'cflags': [
3004 '-fPIC',
3005 ],
[email protected]d3f692b32011-12-14 19:04:353006 'ldflags': [
3007 '-fPIC',
3008 ],
[email protected]c76723a2010-01-25 23:10:583009 }],
[email protected]ee28c9f2009-09-04 01:53:013010 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573011 'target_conditions': [
3012 ['_toolset=="target"', {
3013 'cflags': [
3014 '--sysroot=<(sysroot)',
3015 ],
3016 'ldflags': [
3017 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153018 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573019 ],
3020 }]]
[email protected]ee28c9f2009-09-04 01:53:013021 }],
[email protected]58680ce2010-09-18 00:09:153022 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123023 'cflags': [
3024 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073025
[email protected]7ddcb1d2013-04-19 04:52:533026 # Don't die on dtoa code that uses a char as an array index.
3027 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073028
3029 # Clang spots more unused functions.
3030 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103031
3032 # Warns on switches on enums that cover all enum values but
3033 # also contain a default: branch. Chrome is full of that.
3034 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513035
3036 # Warns when a const char[] is converted to bool.
3037 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:123038 ],
3039 'cflags!': [
3040 # Clang doesn't seem to know know this flag.
3041 '-mfpmath=sse',
3042 ],
[email protected]58680ce2010-09-18 00:09:153043 }],
[email protected]8dec02e2013-04-30 21:40:073044 ['clang==1 and (OS!="android" and chromeos!=1)', {
3045 # Turn on C++11.
3046 'cflags': [
3047 # This warns on using ints as initializers for floats in
3048 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3049 # which happens in several places in chrome code. Not sure if
3050 # this is worth fixing.
3051 '-Wno-c++11-narrowing',
3052
3053 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3054 # user-defined literals, this is now a string literal with a UD
3055 # suffix. However, this is used heavily in NaCl code, so disable
3056 # the warning for now.
3057 '-Wno-reserved-user-defined-literal',
3058 ],
3059 'cflags_cc': [
3060 # See the comment in the Mac section for what it takes to move
3061 # this to -std=c++11.
3062 '-std=gnu++11',
3063 ],
3064 }],
3065 ['clang==1 and (OS=="android" or chromeos==1)', {
3066 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
3067 # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
3068 # Doesn't work with asan for some reason either: crbug.com/233464
3069 'cflags': [
3070 # Especially needed for gtest macros using enum values from Mac
3071 # system headers.
3072 # TODO(pkasting): In C++11 this is legal, so this should be
3073 # removed when we change to that. (This is also why we don't
3074 # bother fixing all these cases today.)
3075 '-Wno-unnamed-type-template-args',
3076 # This (rightfully) complains about 'override', which we use
3077 # heavily.
3078 '-Wno-c++11-extensions',
3079 ],
3080 }],
[email protected]5d451ad2011-02-11 16:43:463081 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263082 'cflags': [
[email protected]c872dc52012-05-19 06:36:313083 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263084 ],
[email protected]5d451ad2011-02-11 16:43:463085 }],
[email protected]4a9ac22e2011-12-02 03:41:533086 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263087 'cflags': [
3088 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533089 ],
3090 }],
3091 ['clang==1 and clang_add_plugin!=""', {
3092 'cflags': [
[email protected]d23720682011-08-11 00:16:263093 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3094 ],
[email protected]5e781232011-01-28 02:57:593095 }],
[email protected]49110f02013-04-22 22:51:343096 ['clang==1 and target_arch=="ia32"', {
3097 'cflags': [
3098 # Else building libyuv gives clang's register allocator issues,
3099 # see llvm.org/PR15798 / crbug.com/233709
3100 '-momit-leaf-frame-pointer',
3101 ],
3102 }],
[email protected]2616d45d2012-01-19 03:15:483103 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3104 'cflags': [
3105 # See http://crbug.com/110262
3106 '-fcolor-diagnostics',
3107 ],
3108 }],
[email protected]cf351c22013-04-19 13:00:543109 # Common options for AddressSanitizer, ThreadSanitizer and
3110 # MemorySanitizer.
3111 ['asan==1 or tsan==1 or msan==1', {
3112 'target_conditions': [
3113 ['_toolset=="target"', {
3114 'cflags': [
3115 '-fno-omit-frame-pointer',
3116 '-gline-tables-only',
3117 ],
[email protected]49110f02013-04-22 22:51:343118 'ldflags!': [
3119 # Functions interposed by the sanitizers can make ld think
3120 # that some libraries aren't needed when they actually are,
3121 # http://crbug.com/234010. As workaround, disable --as-needed.
3122 '-Wl,--as-needed',
3123 ],
[email protected]cf351c22013-04-19 13:00:543124 }],
3125 ],
3126 }],
[email protected]92799b632011-08-15 14:33:063127 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423128 'target_conditions': [
3129 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453130 'cflags': [
[email protected]48688df02012-11-27 21:04:563131 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563132 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453133 ],
3134 'ldflags': [
[email protected]48688df02012-11-27 21:04:563135 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453136 ],
3137 'defines': [
3138 'ADDRESS_SANITIZER',
3139 ],
[email protected]1ffc3b3962012-05-16 14:08:423140 }],
[email protected]921c7b52011-11-25 10:34:353141 ],
[email protected]1d3bc322013-04-12 14:26:373142 'conditions': [
3143 ['OS=="mac"', {
3144 'cflags': [
3145 '-mllvm -asan-globals=0', # http://crbug.com/196561
3146 ],
3147 }],
3148 ],
[email protected]92799b632011-08-15 14:33:063149 }],
[email protected]c9a829272012-07-04 07:51:123150 ['tsan==1', {
3151 'target_conditions': [
3152 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453153 'cflags': [
[email protected]927a9d672012-11-09 11:28:203154 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293155 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203156 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453157 ],
3158 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203159 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453160 ],
3161 'defines': [
3162 'THREAD_SANITIZER',
3163 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163164 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453165 ],
3166 'target_conditions': [
3167 ['_type=="executable"', {
3168 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123169 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453170 ],
3171 }],
3172 ],
[email protected]c9a829272012-07-04 07:51:123173 }],
3174 ],
3175 }],
[email protected]a10ddd2d2013-02-26 20:06:593176 ['msan==1', {
3177 'target_conditions': [
3178 ['_toolset=="target"', {
3179 'cflags': [
3180 '-fsanitize=memory',
3181 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593182 '-fPIC',
3183 ],
3184 'ldflags': [
3185 '-fsanitize=memory',
3186 ],
3187 'defines': [
3188 'MEMORY_SANITIZER',
3189 ],
3190 'target_conditions': [
3191 ['_type=="executable"', {
3192 'ldflags': [
3193 '-pie',
3194 ],
3195 }],
3196 ],
3197 }],
3198 ],
3199 }],
[email protected]8a48f3f2012-12-04 20:14:043200 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443201 'target_conditions' : [
3202 ['_toolset=="target"', {
3203 'cflags': [
3204 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453205 # Allow mmx intrinsics to inline, so that the
3206 # compiler can expand the intrinsics.
3207 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443208 ],
3209 }],
3210 ],
3211 }],
[email protected]cbd5fd52009-08-26 00:14:273212 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:273213 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:103214 }],
3215 ['linux_dump_symbols==1', {
3216 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253217 'conditions': [
[email protected]791262fe2013-02-21 17:20:153218 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253219 'target_conditions': [
3220 ['_toolset=="target"', {
3221 'ldflags': [
[email protected]567370a32013-03-01 00:11:233222 # Workaround for linker OOM.
3223 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253224 ],
3225 }],
3226 ],
3227 }],
3228 ],
[email protected]cbd5fd52009-08-26 00:14:273229 }],
[email protected]d8b60602010-03-26 09:41:223230 ['linux_use_heapchecker==1', {
3231 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:403232 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:223233 }],
[email protected]61a9b2d82010-02-26 00:31:083234 ['linux_use_tcmalloc==0', {
3235 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243236 }],
[email protected]64e2d4a42010-08-27 10:13:213237 ['linux_keep_shadow_stacks==1', {
3238 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513239 'cflags': [
3240 '-finstrument-functions',
3241 # Allow mmx intrinsics to inline, so that the compiler can expand
3242 # the intrinsics.
3243 '-finstrument-functions-exclude-file-list=mmintrin.h',
3244 ],
[email protected]64e2d4a42010-08-27 10:13:213245 }],
[email protected]8d726a42012-02-09 03:49:003246 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:323247 'ldflags': [
3248 # Experimentation found that using four linking threads
3249 # saved ~20% of link time.
3250 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3251 '-Wl,--threads',
3252 '-Wl,--thread-count=4',
3253 ],
[email protected]8d726a42012-02-09 03:49:003254 'conditions': [
3255 ['release_valgrind_build==0', {
3256 'target_conditions': [
3257 ['_toolset=="target"', {
3258 'ldflags': [
3259 # There seems to be a conflict of --icf and -pie
3260 # in gold which can generate crashy binaries. As
3261 # a security measure, -pie takes precendence for
3262 # now.
3263 #'-Wl,--icf=safe',
3264 '-Wl,--icf=none',
3265 ],
3266 }],
3267 ],
3268 }],
3269 ],
3270 }],
[email protected]b07806c12012-02-03 22:44:593271 ['linux_use_gold_binary==1', {
3272 'variables': {
[email protected]516312d2012-02-28 05:17:263273 'conditions': [
3274 ['inside_chromium_build==1', {
3275 # We pass the path to gold to the compiler. gyp leaves
3276 # unspecified what the cwd is when running the compiler,
3277 # so the normal gyp path-munging fails us. This hack
3278 # gets the right path.
3279 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
3280 }, {
3281 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
3282 }]
3283 ]
[email protected]b07806c12012-02-03 22:44:593284 },
3285 'ldflags': [
3286 # Put our gold binary in the search path for the linker.
3287 '-B<(gold_path)',
3288 ],
3289 }],
[email protected]606116d22009-05-06 22:38:233290 ],
[email protected]9d384032009-03-20 23:13:263291 },
3292 }],
[email protected]c51e8d52009-12-11 20:04:063293 # FreeBSD-specific options; note that most FreeBSD options are set above,
3294 # with Linux.
3295 ['OS=="freebsd"', {
3296 'target_defaults': {
3297 'ldflags': [
3298 '-Wl,--no-keep-memory',
3299 ],
3300 },
3301 }],
[email protected]da1c8d692011-09-20 20:35:013302 # Android-specific options; note that most are set above with Linux.
3303 ['OS=="android"', {
3304 'variables': {
[email protected]25036722012-12-11 10:36:173305 # This is a unique identifier for a given build. It's used for
3306 # identifying various build artifacts corresponding to a particular
3307 # build of chrome (e.g. where to find archived symbols).
3308 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013309 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013310 # Use shared stlport library when system one used.
3311 # Figure this out early since it needs symbols from libgcc.a, so it
3312 # has to be before that in the set of libraries.
3313 ['use_system_stlport==1', {
3314 'android_stlport_library': 'stlport',
3315 }, {
[email protected]806b5232012-11-19 21:19:043316 'conditions': [
3317 ['component=="shared_library"', {
3318 'android_stlport_library': 'stlport_shared',
3319 }, {
3320 'android_stlport_library': 'stlport_static',
3321 }],
3322 ],
[email protected]da1c8d692011-09-20 20:35:013323 }],
3324 ],
3325
3326 # Placing this variable here prevents from forking libvpx, used
3327 # by remoting. Remoting is off, so it needn't built,
3328 # so forking it's deps seems like overkill.
3329 # But this variable need defined to properly run gyp.
3330 # A proper solution is to have an OS==android conditional
3331 # in third_party/libvpx/libvpx.gyp to define it.
3332 'libvpx_path': 'lib/linux/arm',
3333 },
3334 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013335 'variables': {
3336 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593337 'conditions': [
3338 # If we're using the components build, append "cr" to all shared
3339 # libraries to avoid naming collisions with android system library
3340 # versions with the same name (e.g. skia, icu).
3341 ['component=="shared_library"', {
3342 'android_product_extension': 'cr.so',
3343 }, {
3344 'android_product_extension': 'so',
3345 } ],
3346 ],
[email protected]8a37e4502012-08-14 22:42:553347 },
[email protected]da1c8d692011-09-20 20:35:013348 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593349 ['_type=="shared_library"', {
3350 'product_extension': '<(android_product_extension)',
3351 }],
3352
[email protected]da1c8d692011-09-20 20:35:013353 # Settings for building device targets using Android's toolchain.
3354 # These are based on the setup.mk file from the Android NDK.
3355 #
3356 # The NDK Android executable link step looks as follows:
3357 # $LDFLAGS
3358 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3359 # $(PRIVATE_OBJECTS) <-- The .o that we built
3360 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3361 # $(TARGET_LIBGCC) <-- libgcc.a
3362 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3363 # $(PRIVATE_LDLIBS) <-- System .so
3364 # $(TARGET_CRTEND_O) <-- crtend.o
3365 #
3366 # For now the above are approximated for executables by adding
3367 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3368 # of 'libraries'.
3369 #
3370 # The NDK Android shared library link step looks as follows:
3371 # $LDFLAGS
3372 # $(PRIVATE_OBJECTS) <-- The .o that we built
3373 # -l,--whole-archive
3374 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3375 # -l,--no-whole-archive
3376 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3377 # $(TARGET_LIBGCC) <-- libgcc.a
3378 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3379 # $(PRIVATE_LDLIBS) <-- System .so
3380 #
[email protected]ad17e342012-07-17 20:45:483381 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013382 #
3383 # For both executables and shared libraries, add the proper
3384 # libgcc.a to the start of libraries which puts it in the
3385 # proper spot after .o and .a files get linked in.
3386 #
3387 # TODO: The proper thing to do longer-tem would be proper gyp
3388 # support for a custom link command line.
3389 ['_toolset=="target"', {
3390 'cflags!': [
3391 '-pthread', # Not supported by Android toolchain.
3392 ],
3393 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013394 '-ffunction-sections',
3395 '-funwind-tables',
3396 '-g',
3397 '-fstack-protector',
3398 '-fno-short-enums',
3399 '-finline-limit=64',
3400 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013401 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013402 ],
3403 'defines': [
3404 'ANDROID',
3405 '__GNU_SOURCE=1', # Necessary for clone()
3406 'USE_STLPORT=1',
3407 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173408 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013409 ],
3410 'ldflags!': [
3411 '-pthread', # Not supported by Android toolchain.
3412 ],
3413 'ldflags': [
3414 '-nostdlib',
3415 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013416 # Don't export symbols from statically linked libraries.
3417 '-Wl,--exclude-libs=ALL',
3418 ],
[email protected]a0e48b02011-11-22 07:53:013419 'libraries': [
3420 '-l<(android_stlport_library)',
3421 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043422 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013423 '-lc',
3424 '-ldl',
3425 '-lstdc++',
3426 '-lm',
[email protected]da1c8d692011-09-20 20:35:013427 ],
3428 'conditions': [
[email protected]806b5232012-11-19 21:19:043429 ['component=="shared_library"', {
3430 'libraries': [
3431 '-lgnustl_shared',
3432 ],
[email protected]4d6f9d7db2012-11-21 16:27:473433 'ldflags!': [
3434 '-Wl,--exclude-libs=ALL',
3435 ],
[email protected]806b5232012-11-19 21:19:043436 }],
[email protected]220ea5932012-08-09 10:44:073437 ['clang==1', {
3438 'cflags': [
3439 # Work around incompatibilities between bionic and clang
3440 # headers.
3441 '-D__compiler_offsetof=__builtin_offsetof',
3442 '-Dnan=__builtin_nan',
3443 ],
3444 'conditions': [
3445 ['target_arch=="arm"', {
3446 'cflags': [
3447 '-target arm-linux-androideabi',
3448 '-mllvm -arm-enable-ehabi',
3449 ],
3450 'ldflags': [
3451 '-target arm-linux-androideabi',
3452 ],
3453 }],
3454 ['target_arch=="ia32"', {
3455 'cflags': [
3456 '-target x86-linux-androideabi',
3457 ],
3458 'ldflags': [
3459 '-target x86-linux-androideabi',
3460 ],
3461 }],
3462 ],
3463 }],
[email protected]ed70ed1862012-11-07 12:11:253464 ['asan==1', {
3465 'cflags': [
3466 # Android build relies on -Wl,--gc-sections removing
3467 # unreachable code. ASan instrumentation for globals inhibits
3468 # this and results in a library with unresolvable relocations.
3469 # TODO(eugenis): find a way to reenable this.
3470 '-mllvm -asan-globals=0',
3471 ],
3472 }],
[email protected]d999c3cb2013-03-12 10:22:363473 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463474 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573475 # The NDK has these things, but doesn't define the constants
3476 # to say that it does. Define them here instead.
3477 'HAVE_SYS_UIO_H',
3478 ],
3479 'cflags': [
3480 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463481 ],
[email protected]da1c8d692011-09-20 20:35:013482 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523483 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013484 ],
3485 }],
[email protected]d999c3cb2013-03-12 10:22:363486 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083487 'include_dirs': [
3488 # OpenAL headers from the Android tree.
3489 '<(android_src)/frameworks/wilhelm/include',
3490 ],
3491 'cflags': [
[email protected]04882132012-11-21 12:40:453492 # Android predefines this as 1; undefine it here so Chromium
3493 # can redefine it later to be 2 for chromium code and unset
3494 # for third party code. This works because cflags are added
3495 # before defines.
3496 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553497 # Disable any additional warnings enabled by the Android build system but which
3498 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083499 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553500 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3501 '-Wno-ignored-qualifiers',
3502 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083503 ],
3504 'cflags_cc': [
3505 # Disabling c++0x-compat should be handled in WebKit, but
3506 # this currently doesn't work because gcc_version is not set
3507 # correctly when building with the Android build system.
3508 # TODO(torne): Fix this in WebKit.
3509 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163510 # Other things unrelated to -Wextra:
3511 '-Wno-non-virtual-dtor',
3512 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083513 ],
3514 }],
[email protected]d999c3cb2013-03-12 10:22:363515 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083516 'cflags': [
3517 # There is a class of warning which:
3518 # 1) Android always enables and also treats as errors
3519 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163520 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553521 '-Wno-address',
3522 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553523 '-Wno-return-type',
3524 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083525 ],
[email protected]2f34a202013-03-11 13:59:163526 'cflags_cc': [
3527 '-Wno-non-virtual-dtor',
3528 ]
[email protected]0d7291e2012-10-04 19:16:083529 }],
[email protected]febd3572012-05-03 09:17:453530 ['target_arch == "arm"', {
3531 'ldflags': [
3532 # Enable identical code folding to reduce size.
3533 '-Wl,--icf=safe',
3534 ],
3535 }],
[email protected]da1c8d692011-09-20 20:35:013536 # NOTE: The stlport header include paths below are specified in
3537 # cflags rather than include_dirs because they need to come
3538 # after include_dirs. Think of them like system headers, but
3539 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3540 # toolchain (circa Gingerbread) will exhibit strange errors.
3541 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513542 ['use_system_stlport==1', {
3543 'cflags': [
3544 # For libstdc++/include, which is used by stlport.
3545 '-I<(android_src)/bionic',
3546 '-I<(android_src)/external/stlport/stlport',
3547 ],
3548 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013549 'cflags': [
[email protected]225ec632013-04-03 18:20:223550 '-I<(android_stlport_include)',
3551 '-I<(android_libstdcpp_include)',
[email protected]da1c8d692011-09-20 20:35:013552 ],
[email protected]225ec632013-04-03 18:20:223553 'ldflags': [
3554 '-L<(android_stlport_libs_dir)',
3555 '-L<(android_libstdcpp_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013556 ],
3557 }],
3558 ['target_arch=="ia32"', {
3559 # The x86 toolchain currently has problems with stack-protector.
3560 'cflags!': [
3561 '-fstack-protector',
3562 ],
3563 'cflags': [
3564 '-fno-stack-protector',
3565 ],
3566 }],
3567 ],
3568 'target_conditions': [
3569 ['_type=="executable"', {
3570 'ldflags': [
3571 '-Bdynamic',
3572 '-Wl,-dynamic-linker,/system/bin/linker',
3573 '-Wl,--gc-sections',
3574 '-Wl,-z,nocopyreloc',
3575 # crtbegin_dynamic.o should be the last item in ldflags.
3576 '<(android_ndk_lib)/crtbegin_dynamic.o',
3577 ],
3578 'libraries': [
3579 # crtend_android.o needs to be the last item in libraries.
3580 # Do not add any libraries after this!
3581 '<(android_ndk_lib)/crtend_android.o',
3582 ],
[email protected]63a131fd2012-11-06 16:01:213583 'conditions': [
3584 ['asan==1', {
3585 'cflags': [
3586 '-fPIE',
3587 ],
3588 'ldflags': [
3589 '-pie',
3590 ],
3591 }],
3592 ],
[email protected]da1c8d692011-09-20 20:35:013593 }],
[email protected]f5c7758a2012-07-25 16:17:573594 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013595 'ldflags': [
3596 '-Wl,-shared,-Bsymbolic',
3597 ],
[email protected]d093fe8b2013-04-30 18:00:233598 'conditions': [
3599 ['android_webview_build==0', {
3600 'ldflags': [
3601 # crtbegin_so.o should be the last item in ldflags.
3602 '<(android_ndk_lib)/crtbegin_so.o',
3603 ],
3604 'libraries': [
3605 # crtend_so.o needs to be the last item in libraries.
3606 # Do not add any libraries after this!
3607 '<(android_ndk_lib)/crtend_so.o',
3608 ],
3609 }],
[email protected]a08029b42012-04-25 03:18:463610 ],
[email protected]da1c8d692011-09-20 20:35:013611 }],
3612 ],
3613 }],
3614 # Settings for building host targets using the system toolchain.
3615 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123616 'cflags!': [
3617 # Due to issues in Clang build system, using ASan on 32-bit
3618 # binaries on x86_64 host is problematic.
3619 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563620 '-fsanitize=address',
3621 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123622 ],
[email protected]da1c8d692011-09-20 20:35:013623 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443624 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013625 '-Wl,-z,noexecstack',
3626 '-Wl,--gc-sections',
3627 '-Wl,-O1',
3628 '-Wl,--as-needed',
3629 ],
[email protected]965b6b22011-09-29 16:07:283630 'sources/': [
3631 ['exclude', '_android(_unittest)?\\.cc$'],
3632 ['exclude', '(^|/)android/']
3633 ],
[email protected]da1c8d692011-09-20 20:35:013634 }],
[email protected]0ccf578f2013-03-13 11:13:393635 # Settings for building host targets on mac.
3636 ['_toolset=="host" and host_os=="mac"', {
3637 'ldflags!': [
3638 '-Wl,-z,now',
3639 '-Wl,-z,relro',
3640 ],
3641 }],
[email protected]da1c8d692011-09-20 20:35:013642 ],
3643 },
3644 }],
[email protected]93f21e42010-04-01 00:35:153645 ['OS=="solaris"', {
3646 'cflags!': ['-fvisibility=hidden'],
3647 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3648 }],
[email protected]1e013672012-06-29 22:12:203649 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553650 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423651 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553652 'xcode_settings': {
3653 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243654 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3655 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043656 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3657 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043658 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3659 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3660 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253661 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3662 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043663 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3664 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3665 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3666 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553667 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043668 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553669 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043670 'WARNING_CFLAGS': [
3671 '-Wall',
3672 '-Wendif-labels',
3673 '-Wextra',
3674 # Don't warn about unused function parameters.
3675 '-Wno-unused-parameter',
3676 # Don't warn about the "struct foo f = {0};" initialization
3677 # pattern.
3678 '-Wno-missing-field-initializers',
3679 ],
[email protected]b3fb8092009-03-12 19:09:243680 'conditions': [
3681 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593682 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3683 ],
[email protected]2936b8c2012-10-29 10:57:313684 # Note that the prebuilt Clang binaries should not be used for iOS
3685 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283686 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303687 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3688 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383689
[email protected]6c648f12011-12-24 07:50:433690 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533691 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433692 # override keyword is used via the OVERRIDE macro from
3693 # base/compiler_specific.h.
3694 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443695 # Warn if automatic synthesis is triggered with
3696 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533697 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303698 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283699 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073700 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523701
3702 # This warns on using ints as initializers for floats in
3703 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3704 # which happens in several places in chrome code. Not sure if
3705 # this is worth fixing.
3706 '-Wno-c++11-narrowing',
3707
3708 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3709 # user-defined literals, this is now a string literal with a UD
3710 # suffix. However, this is used heavily in NaCl code, so disable
3711 # the warning for now.
3712 '-Wno-reserved-user-defined-literal',
3713
[email protected]66733172010-09-22 00:09:283714 # Don't die on dtoa code that uses a char as an array index.
3715 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3716 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073717
[email protected]25d3bb722010-11-22 14:31:453718 # Clang spots more unused functions.
3719 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103720
3721 # Warns on switches on enums that cover all enum values but
3722 # also contain a default: branch. Chrome is full of that.
3723 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513724
3725 # Warns when a const char[] is converted to bool.
3726 '-Wstring-conversion',
[email protected]66733172010-09-22 00:09:283727 ],
[email protected]c67e8ca2012-12-04 16:01:523728 'OTHER_CPLUSPLUSFLAGS': [
3729 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3730 # defined. (Else e.g. finite() in base/float_util.h needs to
3731 # be isfinite() which doesn't exist on the android bots.)
3732 # typeof() is also disabled in c++11 (but we could use
3733 # decltype() instead).
3734 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3735 # bots use xcode 4 -- http://crbug.com/147515).
3736 # TODO(thakis): Eventually switch this to c++11 instead of
3737 # gnu++11 (once typeof can be removed, which is blocked on c++11
3738 # being available everywhere).
3739 '$(inherited)', '-std=gnu++11',
3740 ],
[email protected]66733172010-09-22 00:09:283741 }],
[email protected]a996cd812013-04-22 09:57:243742 # TODO(thakis): Reenable plugins with once
3743 # tools/clang/scripts/update.sh no longer pins clang to an ancient
3744 # version for asan (http://crbug.com/170629)
3745 ['clang==1 and clang_use_chrome_plugins==1 and asan!=1', {
[email protected]5d451ad2011-02-11 16:43:463746 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313747 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463748 ],
3749 }],
[email protected]4a9ac22e2011-12-02 03:41:533750 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593751 'OTHER_CFLAGS': [
3752 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533753 ],
3754 }],
3755 ['clang==1 and clang_add_plugin!=""', {
3756 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593757 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3758 ],
3759 }],
[email protected]2616d45d2012-01-19 03:15:483760 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3761 'OTHER_CFLAGS': [
3762 # See http://crbug.com/110262
3763 '-fcolor-diagnostics',
3764 ],
3765 }],
[email protected]b3fb8092009-03-12 19:09:243766 ],
[email protected]2f80c312009-02-25 21:26:553767 },
[email protected]34f40892011-09-06 21:53:303768 'conditions': [
3769 ['clang==1', {
3770 'variables': {
3771 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3772 },
3773 }],
[email protected]921c7b52011-11-25 10:34:353774 ['asan==1', {
3775 'xcode_settings': {
3776 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563777 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373778 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563779 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353780 ],
[email protected]921c7b52011-11-25 10:34:353781 },
3782 'defines': [
3783 'ADDRESS_SANITIZER',
3784 ],
3785 }],
[email protected]34f40892011-09-06 21:53:303786 ],
[email protected]2f80c312009-02-25 21:26:553787 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553788 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463789 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083790 'conditions': [
3791 ['asan==1', {
3792 'xcode_settings': {
3793 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443794 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083795 ],
3796 },
3797 }],
3798 ],
[email protected]5d7dc972009-04-16 15:30:463799 }],
3800 ['_mac_bundle', {
3801 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313802 'target_conditions': [
3803 ['_type=="executable"', {
3804 'conditions': [
3805 ['asan==1', {
3806 'postbuilds': [
3807 {
3808 'variables': {
3809 # Define copy_asan_dylib_path in a variable ending in
3810 # _path so that gyp understands it's a path and
3811 # performs proper relativization during dict merging.
3812 'copy_asan_dylib_path':
3813 'mac/copy_asan_runtime_dylib.sh',
3814 },
3815 'postbuild_name': 'Copy ASan runtime dylib',
3816 'action': [
3817 '<(copy_asan_dylib_path)',
3818 ],
3819 },
3820 ],
3821 }],
3822 ],
3823 }],
3824 ],
[email protected]87fde4a2009-02-28 00:50:083825 }],
[email protected]2936b8c2012-10-29 10:57:313826 ], # target_conditions
3827 }, # target_defaults
3828 }], # OS=="mac" or OS=="ios"
3829 ['OS=="mac"', {
3830 'target_defaults': {
3831 'variables': {
3832 # These should end with %, but there seems to be a bug with % in
3833 # variables that are intended to be set to different values in
3834 # different targets, like these.
3835 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313836 # Strip debugging symbols from the target.
3837 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373838 'conditions': [
3839 ['asan==1', {
3840 'conditions': [
3841 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353842 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373843 }, {
3844 'mac_real_dsym': '<(mac_want_real_dsym)'
3845 }],
3846 ],
3847 }, {
3848 'conditions': [
3849 ['mac_want_real_dsym=="default"', {
3850 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3851 }, {
3852 'mac_real_dsym': '<(mac_want_real_dsym)'
3853 }],
3854 ],
3855 }],
3856 ],
[email protected]2936b8c2012-10-29 10:57:313857 },
3858 'xcode_settings': {
3859 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3860 # (Equivalent to -fPIC)
3861 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3862 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3863 # Keep pch files below xcodebuild/.
3864 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3865 'OTHER_CFLAGS': [
3866 '-fno-strict-aliasing', # See http://crbug.com/32204
3867 ],
3868 },
3869 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103870 ['_type=="executable"', {
3871 'postbuilds': [
3872 {
3873 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363874 # code execution when running on Mac OS X 10.7 ("Lion"), and
3875 # ensures that the position-independent executable (PIE) bit
3876 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103877 'variables': {
[email protected]8c40f322011-08-24 03:33:363878 # Define change_mach_o_flags in a variable ending in _path
3879 # so that GYP understands it's a path and performs proper
3880 # relativization during dict merging.
3881 'change_mach_o_flags_path':
3882 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173883 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133884 ],
3885 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173886 ['mac_pie==0 or release_valgrind_build==1', {
3887 # Don't enable PIE if it's unwanted. It's unwanted if
3888 # the target specifies mac_pie=0 or if building for
3889 # Valgrind, because Valgrind doesn't understand slide.
3890 # See the similar mac_pie/release_valgrind_build check
3891 # below.
[email protected]081c0342011-08-24 14:59:133892 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133893 '--no-pie',
3894 ],
3895 }],
3896 ],
[email protected]6303fed2011-08-11 01:12:103897 },
[email protected]8c40f322011-08-24 03:33:363898 'postbuild_name': 'Change Mach-O Flags',
3899 'action': [
3900 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133901 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363902 ],
[email protected]6303fed2011-08-11 01:12:103903 },
3904 ],
[email protected]5a5d97aa2011-09-02 15:34:003905 'conditions': [
3906 ['asan==1', {
3907 'variables': {
3908 'asan_saves_file': 'asan.saves',
3909 },
3910 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563911 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003912 },
3913 }],
3914 ],
[email protected]162407f2011-09-08 15:33:173915 'target_conditions': [
3916 ['mac_pie==1 and release_valgrind_build==0', {
3917 # Turn on position-independence (ASLR) for executables. When
3918 # PIE is on for the Chrome executables, the framework will
3919 # also be subject to ASLR.
3920 # Don't do this when building for Valgrind, because Valgrind
3921 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3922 # understand slide, and get rid of the Valgrind check.
3923 'xcode_settings': {
3924 'OTHER_LDFLAGS': [
3925 '-Wl,-pie', # Position-independent executable (MH_PIE)
3926 ],
3927 },
3928 }],
3929 ],
[email protected]6a0242bc2011-07-01 00:34:463930 }],
[email protected]9a5e72862010-09-02 16:16:583931 ['(_type=="executable" or _type=="shared_library" or \
3932 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203933 'target_conditions': [
3934 ['mac_real_dsym == 1', {
3935 # To get a real .dSYM bundle produced by dsymutil, set the
3936 # debug information format to dwarf-with-dsym. Since
3937 # strip_from_xcode will not be used, set Xcode to do the
3938 # stripping as well.
3939 'configurations': {
[email protected]5153767c2009-12-22 01:52:503940 'Release_Base': {
[email protected]24700642009-06-01 16:01:203941 'xcode_settings': {
3942 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3943 'DEPLOYMENT_POSTPROCESSING': 'YES',
3944 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073945 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253946 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073947 # The Xcode default is to strip debugging symbols
3948 # only (-S). Local symbols should be stripped as
3949 # well, which will be handled by -x. Xcode will
3950 # continue to insert -S when stripping even when
3951 # additional flags are added with STRIPFLAGS.
3952 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:403953 }], # _type=="shared_library" or _type=="loadable_module"
3954 ['_type=="executable"', {
3955 'conditions': [
3956 ['asan==1', {
3957 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3958 }]
3959 ],
3960 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:073961 ], # target_conditions
3962 }, # xcode_settings
3963 }, # configuration "Release"
3964 }, # configurations
[email protected]24700642009-06-01 16:01:203965 }, { # mac_real_dsym != 1
3966 # To get a fast fake .dSYM bundle, use a post-build step to
3967 # produce the .dSYM and strip the executable. strip_from_xcode
3968 # only operates in the Release configuration.
3969 'postbuilds': [
3970 {
3971 'variables': {
3972 # Define strip_from_xcode in a variable ending in _path
3973 # so that gyp understands it's a path and performs proper
3974 # relativization during dict merging.
3975 'strip_from_xcode_path': 'mac/strip_from_xcode',
3976 },
3977 'postbuild_name': 'Strip If Needed',
3978 'action': ['<(strip_from_xcode_path)'],
3979 },
[email protected]e14a9f92009-08-05 19:26:073980 ], # postbuilds
3981 }], # mac_real_dsym
3982 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583983 }], # (_type=="executable" or _type=="shared_library" or
3984 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073985 ], # target_conditions
3986 }, # target_defaults
3987 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203988 ['OS=="ios"', {
3989 'target_defaults': {
3990 'xcode_settings' : {
3991 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3992
3993 # This next block is mostly common with the 'mac' section above,
3994 # but keying off (or setting) 'clang' isn't valid for iOS as it
3995 # also seems to mean using the custom build of clang.
3996
3997 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533998 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203999 # override keyword is used via the OVERRIDE macro from
4000 # base/compiler_specific.h.
4001 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:444002 # Warn if automatic synthesis is triggered with
4003 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534004 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204005 'WARNING_CFLAGS': [
4006 '-Wheader-hygiene',
4007 # Don't die on dtoa code that uses a char as an array index.
4008 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4009 '-Wno-char-subscripts',
4010 # Clang spots more unused functions.
4011 '-Wno-unused-function',
4012 # See comments on this flag higher up in this file.
4013 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:534014 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:204015 # heavily.
4016 '-Wno-c++11-extensions',
4017 ],
4018 },
4019 'target_conditions': [
4020 ['_type=="executable"', {
4021 'configurations': {
4022 'Release_Base': {
4023 'xcode_settings': {
4024 'DEPLOYMENT_POSTPROCESSING': 'YES',
4025 'STRIP_INSTALLED_PRODUCT': 'YES',
4026 },
4027 },
[email protected]3c6aa862012-11-05 17:11:444028 'Debug_Base': {
4029 'xcode_settings': {
4030 # Remove dSYM to reduce build time.
4031 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4032 },
4033 },
[email protected]1e013672012-06-29 22:12:204034 },
[email protected]0286b6f2013-05-03 11:06:404035 'conditions': [
4036 # TODO(justincohen): ninja builds don't support signing yet.
4037 ['"<(GENERATOR)"!="ninja"', {
4038 'xcode_settings': {
4039 'conditions': [
4040 ['chromium_ios_signing', {
4041 # iOS SDK wants everything for device signed.
4042 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4043 }, {
4044 'CODE_SIGNING_REQUIRED': 'NO',
4045 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4046 }],
4047 ],
4048 },
4049 }],
4050 ],
[email protected]1e013672012-06-29 22:12:204051 }],
4052 ], # target_conditions
4053 }, # target_defaults
4054 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554055 ['OS=="win"', {
4056 'target_defaults': {
4057 'defines': [
[email protected]8e345da2012-07-01 22:10:304058 '_WIN32_WINNT=0x0602',
4059 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554060 'WIN32',
4061 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554062 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284063 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554064 '_CRT_RAND_S',
4065 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4066 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274067 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554068 ],
[email protected]8974e042010-06-21 18:06:524069 'conditions': [
[email protected]2212d272011-12-20 21:37:374070 ['buildtype=="Official"', {
4071 # In official builds, targets can self-select an optimization
4072 # level by defining a variable named 'optimize', and setting it
4073 # to one of
4074 # - "size", optimizes for minimal code size - the default.
4075 # - "speed", optimizes for speed over code size.
4076 # - "max", whole program optimization and link-time code
4077 # generation. This is very expensive and should be used
4078 # sparingly.
4079 'variables': {
4080 'optimize%': 'size',
4081 },
4082 'target_conditions': [
4083 ['optimize=="size"', {
4084 'msvs_settings': {
4085 'VCCLCompilerTool': {
4086 # 1, optimizeMinSpace, Minimize Size (/O1)
4087 'Optimization': '1',
4088 # 2, favorSize - Favor small code (/Os)
4089 'FavorSizeOrSpeed': '2',
4090 },
4091 },
4092 },
4093 ],
4094 ['optimize=="speed"', {
4095 'msvs_settings': {
4096 'VCCLCompilerTool': {
4097 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4098 'Optimization': '2',
4099 # 1, favorSpeed - Favor fast code (/Ot)
4100 'FavorSizeOrSpeed': '1',
4101 },
4102 },
4103 },
4104 ],
4105 ['optimize=="max"', {
4106 'msvs_settings': {
4107 'VCCLCompilerTool': {
4108 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4109 'Optimization': '2',
4110 # 1, favorSpeed - Favor fast code (/Ot)
4111 'FavorSizeOrSpeed': '1',
4112 # This implies link time code generation.
4113 'WholeProgramOptimization': 'true',
4114 },
4115 },
4116 },
4117 ],
4118 ],
4119 },
4120 ],
[email protected]8974e042010-06-21 18:06:524121 ['component=="static_library"', {
4122 'defines': [
4123 '_HAS_EXCEPTIONS=0',
4124 ],
4125 }],
[email protected]3e2648a2011-03-21 20:58:504126 ['secure_atl', {
4127 'defines': [
4128 '_SECURE_ATL',
4129 ],
4130 }],
[email protected]54184ce72012-10-18 07:11:264131 ['msvs_express', {
4132 'configurations': {
4133 'x86_Base': {
4134 'msvs_settings': {
4135 'VCLinkerTool': {
4136 'AdditionalLibraryDirectories':
4137 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4138 },
4139 'VCLibrarianTool': {
4140 'AdditionalLibraryDirectories':
4141 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4142 },
4143 },
4144 },
4145 'x64_Base': {
4146 'msvs_settings': {
4147 'VCLibrarianTool': {
4148 'AdditionalLibraryDirectories':
4149 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4150 },
4151 'VCLinkerTool': {
4152 'AdditionalLibraryDirectories':
4153 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4154 },
4155 },
4156 },
4157 },
4158 'msvs_settings': {
4159 'VCLinkerTool': {
4160 # Explicitly required when using the ATL with express
4161 'AdditionalDependencies': ['atlthunk.lib'],
4162
4163 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4164 # almost eight hundred LNK4254 and LNK4078 warnings:
4165 # - warning LNK4254: section 'ATL' (50000040) merged into
4166 # '.rdata' (40000040) with different attributes
4167 # - warning LNK4078: multiple 'ATL' sections found with
4168 # different attributes
4169 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4170 },
4171 },
4172 'msvs_system_include_dirs': [
4173 '<(windows_driver_kit_path)/inc/atl71',
4174 '<(windows_driver_kit_path)/inc/mfc42',
4175 ],
4176 }],
[email protected]8974e042010-06-21 18:06:524177 ],
[email protected]5b5ca7cb2009-07-20 23:00:204178 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054179 '<(windows_sdk_path)/Include/shared',
4180 '<(windows_sdk_path)/Include/um',
4181 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554182 '$(VSInstallDir)/VC/atlmfc/include',
4183 ],
[email protected]a8d99cef2009-08-26 20:47:494184 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004185 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114186 # TODO(maruel): These warnings are level 4. They will be slowly
4187 # removed as code is fixed.
4188 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004189 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4190 4706,
[email protected]942c3a60f2011-05-03 02:04:114191 ],
[email protected]2f80c312009-02-25 21:26:554192 'msvs_settings': {
4193 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444194 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554195 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554196 'BufferSecurityCheck': 'true',
4197 'EnableFunctionLevelLinking': 'true',
4198 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114199 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554200 'WarnAsError': 'true',
4201 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584202 'conditions': [
[email protected]8974e042010-06-21 18:06:524203 ['component=="shared_library"', {
4204 'ExceptionHandling': '1', # /EHsc
4205 }, {
4206 'ExceptionHandling': '0',
4207 }],
[email protected]3fef6e62009-07-31 19:58:584208 ],
[email protected]2f80c312009-02-25 21:26:554209 },
4210 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164211 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374212 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054213 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374214 ],
[email protected]2f80c312009-02-25 21:26:554215 },
4216 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554217 'AdditionalDependencies': [
4218 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504219 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554220 'version.lib',
4221 'msimg32.lib',
4222 'ws2_32.lib',
4223 'usp10.lib',
4224 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084225 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484226 'winmm.lib',
4227 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554228 ],
[email protected]a78da50e2010-06-09 21:31:374229 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054230 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374231 ],
[email protected]2f80c312009-02-25 21:26:554232 'GenerateDebugInformation': 'true',
4233 'MapFileName': '$(OutDir)\\$(TargetName).map',
4234 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554235 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484236 # SubSystem values:
4237 # 0 == not set
4238 # 1 == /SUBSYSTEM:CONSOLE
4239 # 2 == /SUBSYSTEM:WINDOWS
4240 # Most of the executables we'll ever create are tests
4241 # and utilities with console output.
4242 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554243 },
4244 'VCMIDLTool': {
4245 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094246 'TypeLibraryName': '$(InputName).tlb',
4247 'OutputDirectory': '$(IntDir)',
4248 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334249 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094250 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4251 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554252 },
4253 'VCResourceCompilerTool': {
4254 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384255 'AdditionalIncludeDirectories': [
4256 '<(DEPTH)',
4257 '<(SHARED_INTERMEDIATE_DIR)',
4258 ],
[email protected]2f80c312009-02-25 21:26:554259 },
4260 },
4261 },
4262 }],
[email protected]79e2336c2011-05-12 18:18:344263 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314264 'target_defaults': {
4265 'defines': [
4266 'DISABLE_NACL',
4267 ],
4268 },
4269 }],
[email protected]cfbf9bc2009-12-07 22:07:564270 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194271 'target_defaults': {
4272 'msvs_settings': {
4273 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194274 'DelayLoadDLLs': [
4275 'dbghelp.dll',
4276 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014277 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194278 'uxtheme.dll',
4279 ],
4280 },
4281 },
[email protected]ef4fa4072009-12-04 22:46:504282 'configurations': {
[email protected]5153767c2009-12-22 01:52:504283 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504284 'msvs_settings': {
4285 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164286 'AdditionalOptions': [
4287 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334288 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164289 '/ignore:4199',
4290 '/ignore:4221',
4291 '/nxcompat',
4292 ],
[email protected]ef4fa4072009-12-04 22:46:504293 },
4294 },
4295 },
[email protected]5153767c2009-12-22 01:52:504296 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504297 'msvs_settings': {
4298 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164299 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504300 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334301 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164302 '/ignore:4199',
4303 '/ignore:4221',
4304 '/nxcompat',
4305 ],
[email protected]ef4fa4072009-12-04 22:46:504306 },
4307 },
4308 },
4309 },
[email protected]48c7af72009-07-03 22:00:194310 },
4311 }],
[email protected]9821d0d2010-04-16 22:40:374312 ['enable_new_npdevice_api==1', {
4313 'target_defaults': {
4314 'defines': [
4315 'ENABLE_NEW_NPDEVICE_API',
4316 ],
4317 },
4318 }],
[email protected]5f683172013-04-27 01:53:194319 # Don't warn about the "typedef 'foo' locally defined but not used"
4320 # for gcc 4.8.
4321 # TODO: remove this flag once all builds work. See crbug.com/227506
4322 ['gcc_version>=48', {
4323 'target_defaults': {
4324 'cflags': [
4325 '-Wno-unused-local-typedefs',
4326 ],
4327 },
4328 }],
[email protected]220ea5932012-08-09 10:44:074329 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234330 'conditions': [
4331 ['OS=="android"', {
4332 # Android could use the goma with clang.
4333 'make_global_settings': [
4334 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4335 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4336 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4337 ['CC.host', '$(CC)'],
4338 ['CXX.host', '$(CXX)'],
4339 ['LINK.host', '$(LINK)'],
4340 ],
4341 }, {
4342 'make_global_settings': [
4343 ['CC', '<(make_clang_dir)/bin/clang'],
4344 ['CXX', '<(make_clang_dir)/bin/clang++'],
4345 ['LINK', '$(CXX)'],
4346 ['CC.host', '$(CC)'],
4347 ['CXX.host', '$(CXX)'],
4348 ['LINK.host', '$(LINK)'],
4349 ],
4350 }],
[email protected]34f40892011-09-06 21:53:304351 ],
4352 }],
[email protected]615fa6642012-08-14 19:17:074353 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274354 # Hardcode the compiler names in the Makefile so that
4355 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114356 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044357 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4358 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4359 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074360 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4361 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4362 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274363 ],
4364 }],
[email protected]23eea4a42013-04-27 04:10:264365 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464366 'make_global_settings': [
4367 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4368 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4369 ['LINK', '$(CXX)'],
4370 ['CC.host', '<!(which gcc)'],
4371 ['CXX.host', '<!(which g++)'],
4372 ['LINK.host', '<!(which g++)'],
4373 ],
4374 }],
[email protected]2f80c312009-02-25 21:26:554375 ],
4376 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504377 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4378 # This block adds *project-wide* configuration settings to each project
4379 # file. It's almost always wrong to put things here. Specify your
4380 # custom xcode_settings in target_defaults to add them to targets instead.
4381
[email protected]1e013672012-06-29 22:12:204382 'conditions': [
[email protected]fca3d812012-07-27 00:55:364383 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4384 # setting sets the SDK on a project-wide basis. In order to get the
4385 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4386 # here at the project level.
[email protected]2c261532012-10-06 00:46:294387 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364388 'conditions': [
[email protected]2c261532012-10-06 00:46:294389 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364390 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294391 }, {
4392 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364393 }],
4394 ],
[email protected]2c261532012-10-06 00:46:294395 }],
4396 ['OS=="ios"', {
4397 'conditions': [
4398 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404399 'conditions': [
4400 # TODO(justincohen): Ninja only supports simulator for now.
4401 ['"<(GENERATOR)"=="ninja"', {
4402 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
4403 }, {
4404 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4405 }],
4406 ],
[email protected]2c261532012-10-06 00:46:294407 }, {
4408 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4409 }],
4410 ],
[email protected]1e013672012-06-29 22:12:204411 }],
4412 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204413 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:444414 # Just build armv7, until armv7s is correctly tested.
4415 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204416 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:204417 # Target both iPhone and iPad.
4418 'TARGETED_DEVICE_FAMILY': '1,2',
4419 }],
[email protected]f9335b42013-01-24 21:00:234420 ['target_arch=="x64"', {
4421 'ARCHS': [
4422 'x86_64'
4423 ],
4424 }],
[email protected]1e013672012-06-29 22:12:204425 ],
[email protected]0c8ab452009-11-06 21:57:504426
[email protected]2f80c312009-02-25 21:26:554427 # The Xcode generator will look for an xcode_settings section at the root
4428 # of each dict and use it to apply settings on a file-wide basis. Most
4429 # settings should not be here, they should be in target-specific
4430 # xcode_settings sections, or better yet, should use non-Xcode-specific
4431 # settings in target dicts. SYMROOT is a special case, because many other
4432 # Xcode variables depend on it, including variables such as
4433 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4434 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4435 # files to appear (when present) in the UI as actual files and not red
4436 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4437 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164438 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554439 },
[email protected]ee28c9f2009-09-04 01:53:014440}