blob: 86d133de7b9d495a64a4c5733b895a65b51fd1d3 [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
[email protected]ff78e4e2013-05-03 19:19:1530 # Use a raw surface abstraction.
31 'use_ozone%': 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]ff78e4e2013-05-03 19:19:1537 'use_ozone%': '<(use_ozone)',
[email protected]e72e55b2011-01-06 22:19:3038
[email protected]3fa441d2011-09-18 17:28:5039 # Whether we are using Views Toolkit
40 'toolkit_views%': 0,
41
[email protected]e0b85a52011-10-06 03:30:4242 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
43 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2744
[email protected]7ddea9802012-02-22 23:08:0545 # Disable viewport meta tag by default.
46 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2447
48 # Enable HiDPI support.
49 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4050
[email protected]6155e702012-05-02 17:56:0651 # Enable touch optimized art assets and metrics.
52 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1853
[email protected]f1f362b42012-05-15 17:46:5854 # Override buildtype to select the desired build flavor.
55 # Dev - everyday build for development/testing
56 # Official - release build (generally implies additional processing)
57 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
58 # conversion is done), some of the things which are now controlled by
59 # 'branding', such as symbol generation, will need to be refactored
60 # based on 'buildtype' (i.e. we don't care about saving symbols for
61 # non-Official # builds).
62 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1163
[email protected]e2aaaac2013-05-08 07:20:0964 # Override branding to select the desired branding flavor.
65 'branding%': 'Chromium',
66
[email protected]8796d922012-08-07 01:23:1167 'conditions': [
[email protected]020648aa2013-06-08 17:16:4768 # ChromeOS implies ash.
69 ['chromeos==1', {
[email protected]8796d922012-08-07 01:23:1170 'use_ash%': 1,
71 'use_aura%': 1,
72 }],
[email protected]020648aa2013-06-08 17:16:4773
[email protected]e9c4c1c2013-02-06 06:46:4874 # For now, Windows builds that |use_aura| should also imply using
75 # ash. This rule should be removed for the future when Windows is
76 # using the aura windows without the ash interface.
77 ['use_aura==1 and OS=="win"', {
[email protected]8796d922012-08-07 01:23:1178 'use_ash%': 1,
79 }],
80 ['use_ash==1', {
81 'use_aura%': 1,
82 }],
[email protected]94cdbf42012-12-11 19:49:2283
84 # Compute the architecture that we're building on.
85 ['OS=="win" or OS=="mac" or OS=="ios"', {
86 'host_arch%': 'ia32',
87 }, {
88 # This handles the Unix platforms for which there is some support.
89 # Anything else gets passed through, which probably won't work
90 # very well; such hosts should pass an explicit target_arch to
91 # gyp.
92 'host_arch%':
93 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
94 }],
[email protected]8796d922012-08-07 01:23:1195 ],
[email protected]bb6aba32011-01-07 19:04:4396 },
97 # Copy conditionally-set variables out one scope.
98 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5899 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16100 'use_ash%': '<(use_ash)',
[email protected]ff78e4e2013-05-03 19:19:15101 'use_ozone%': '<(use_ozone)',
[email protected]e0b85a52011-10-06 03:30:42102 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05103 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24104 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06105 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:58106 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09107 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22108 'host_arch%': '<(host_arch)',
109
110 # Default architecture we're building for is the architecture we're
111 # building on.
112 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58113
[email protected]d999c3cb2013-03-12 10:22:36114 # This is set when building the Android WebView inside the Android
115 # build system, using the 'android' gyp backend. The WebView code is
116 # still built when this is unset, but builds using the normal chromium
117 # build system.
118 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53119
[email protected]55d92492013-01-31 05:03:39120 # Sets whether chrome is built for google tv device.
121 'google_tv%': 0,
122
[email protected]7d6763422013-04-26 12:06:54123 # Set ARM architecture version.
124 'arm_version%': 7,
125
[email protected]e72e55b2011-01-06 22:19:30126 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50127 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35128 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43129 'toolkit_views%': 1,
130 }, {
131 'toolkit_views%': 0,
132 }],
[email protected]1efbaaa2012-04-24 02:43:24133
[email protected]8796d922012-08-07 01:23:11134 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]1201dd0f2013-05-03 23:39:54135 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_ozone==0', {
[email protected]8796d922012-08-07 01:23:11136 'toolkit_uses_gtk%': 1,
137 }, {
138 'toolkit_uses_gtk%': 0,
139 }],
140
[email protected]3aa8a682012-08-11 00:04:29141 # Enable HiDPI on Mac OS and Chrome OS.
142 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24143 'enable_hidpi%': 1,
144 }],
[email protected]219c7312012-05-10 20:32:40145
[email protected]c71fe6402012-08-15 15:22:55146 # Enable touch UI on Metro.
147 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06148 'enable_touch_ui%': 1,
149 }],
[email protected]dc4e8b82012-11-15 03:58:16150
[email protected]b1a2b542013-01-10 07:33:09151 # Enable App Launcher only on ChromeOS, Windows and OSX.
152 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16153 'enable_app_list%': 1,
154 }, {
155 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09156 }],
157
[email protected]cb800562012-11-20 22:36:07158 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26159 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07160 }, {
161 'use_default_render_theme%': 0,
162 }],
[email protected]e2aaaac2013-05-08 07:20:09163
164 # TODO(thestig) Remove the linux_lsb_release check after all the
165 # official Ubuntu Lucid builder are gone.
166 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
167 'linux_lsb_release%': '<!(lsb_release -r -s)',
168 }, {
169 'linux_lsb_release%': '',
170 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e72e55b2011-01-06 22:19:30171 ],
172 },
173
174 # Copy conditionally-set variables out one scope.
175 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30176 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22177 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43178 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11179 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58180 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16181 'use_ash%': '<(use_ash)',
[email protected]ff78e4e2013-05-03 19:19:15182 'use_ozone%': '<(use_ozone)',
[email protected]e0b85a52011-10-06 03:30:42183 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05184 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24185 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06186 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]d999c3cb2013-03-12 10:22:36187 'android_webview_build%': '<(android_webview_build)',
[email protected]55d92492013-01-31 05:03:39188 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16189 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07190 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22191 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09192 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54193 'arm_version%': '<(arm_version)',
[email protected]e2aaaac2013-05-08 07:20:09194 'linux_lsb_release%': '<(linux_lsb_release)',
[email protected]e14a9f92009-08-05 19:26:07195
[email protected]c86fd472013-04-02 19:42:30196 # Set to 1 to enable fast builds. Set to 2 for even faster builds
197 # (it disables debug info for fastest compilation - only for use
198 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30199 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49200
[email protected]20960e072011-09-20 20:59:01201 # Set to 1 to enable dcheck in release without having to use the flag.
202 'dcheck_always_on%': 0,
203
[email protected]65b0819e2013-06-21 15:24:00204 # Set to 1 to make a build that logs like an official build, but is not
205 # necessarily an official build, ie DCHECK and DLOG are disabled and
206 # removed completely in release builds, to minimize binary footprint.
207 # Note: this setting is ignored if buildtype=="Official".
208 'logging_like_official_build%': 0,
209
[email protected]464750f2011-10-24 23:16:18210 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51211 'file_manager_extension%': 0,
212
[email protected]77a848262013-02-22 11:17:25213 # Disable image loader component extension by default.
214 'image_loader_extension%': 0,
215
[email protected]e72e55b2011-01-06 22:19:30216 # Python version.
[email protected]a43c5a02011-05-27 06:54:51217 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17218
[email protected]e72e55b2011-01-06 22:19:30219
[email protected]7d6763422013-04-26 12:06:54220 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30221 'arm_neon%': 1,
222
[email protected]7d6763422013-04-26 12:06:54223 # Detect NEON support at run-time.
224 'arm_neon_optional%': 0,
225
[email protected]e72e55b2011-01-06 22:19:30226 # The system root for cross-compiles. Default: none.
227 'sysroot%': '',
228
[email protected]945361a2011-09-30 04:38:43229 # The system libdir used for this ABI.
230 'system_libdir%': 'lib',
231
[email protected]e72e55b2011-01-06 22:19:30232 # On Linux, we build with sse2 for Chromium builds.
233 'disable_sse2%': 0,
234
235 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03236 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30237
[email protected]d9113542012-07-18 17:11:28238 # Use system libjpeg. Note that the system's libjepg will be used even if
239 # use_libjpeg_turbo is set.
240 'use_system_libjpeg%': 0,
241
[email protected]aa5e01fc2013-03-06 14:06:17242 # By default, component is set to static_library and it can be overriden
243 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53244 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30245
[email protected]bb6aba32011-01-07 19:04:43246 # Set to select the Title Case versions of strings in GRD files.
247 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21248
[email protected]98da0042011-02-02 00:10:27249 # Use translations provided by volunteers at launchpad.net. This
250 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19251 'use_third_party_translations%': 0,
252
[email protected]9a425422011-01-11 00:53:18253 # Remoting compilation is enabled by default. Set to 0 to disable.
254 'remoting%': 1,
255
[email protected]1ec68c42011-06-01 13:56:25256 # Configuration policy is enabled by default. Set to 0 to disable.
257 'configuration_policy%': 1,
258
[email protected]6c521fed2012-11-29 17:00:03259 # Variable safe_browsing is used to control the build time configuration
260 # for safe browsing feature. Safe browsing can be compiled in 3 different
261 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
262 # reporting features without enabling phishing and malware detection. This
263 # is useful to integrate a third party phishing/malware detection to
264 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56265 'safe_browsing%': 1,
266
[email protected]9eb100e2011-10-14 05:08:22267 # Speech input is compiled in by default. Set to 0 to disable.
268 'input_speech%': 1,
269
[email protected]7cce3232011-10-28 10:41:57270 # Notifications are compiled in by default. Set to 0 to disable.
271 'notifications%' : 1,
272
[email protected]970fd4e2012-12-19 11:09:37273 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
274 # regular builds and 1 for ASan builds.
275 'mac_want_real_dsym%': 'default',
276
[email protected]5d451ad2011-02-11 16:43:46277 # If this is set, the clang plugins used on the buildbot will be used.
278 # Run tools/clang/scripts/update.sh to make sure they are compiled.
279 # This causes 'clang_chrome_plugins_flags' to be set.
280 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08281 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46282
[email protected]2e82fa52012-11-27 23:41:44283 # Enable building with ASAN (Clang's -fsanitize=address option).
284 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06285 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
286 'asan%': 0,
287
[email protected]062522a2013-06-13 15:49:55288 # Enable building with LSan (Clang's -fsanitize=leak option).
289 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
290 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
291 'lsan%': 0,
292
[email protected]927a9d672012-11-09 11:28:20293 # Enable building with TSAN (Clang's -fsanitize=thread option).
294 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12295 # See http://clang.llvm.org/docs/ThreadSanitizer.html
296 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16297 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12298
[email protected]a10ddd2d2013-02-26 20:06:59299 # Enable building with MSAN (Clang's -fsanitize=memory option).
300 # MemorySanitizer only works with clang, but msan=1 implies clang=1
301 # See http://clang.llvm.org/docs/MemorySanitizer.html
302 'msan%': 0,
303
[email protected]7ce58b22012-09-26 05:17:25304 # Use a modified version of Clang to intercept allocated types and sizes
305 # for allocated objects. clang_type_profiler=1 implies clang=1.
306 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
307 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
308 'clang_type_profiler%': 0,
309
[email protected]8a6abd12012-05-16 10:04:44310 # Set to true to instrument the code with function call logger.
311 # See src/third_party/cygprofile/cyg-profile.cc for details.
312 'order_profiling%': 0,
313
[email protected]00b0a7f2012-01-25 15:30:46314 # Use the provided profiled order file to link Chrome image with it.
315 # This makes Chrome faster by better using CPU cache when executing code.
316 # This is known as PGO (profile guided optimization).
317 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
318 'order_text_section%' : "",
319
[email protected]1ad5a7b2011-06-24 03:15:13320 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
321 # libraries on linux x86-64 and arm, plus ASLR.
322 'linux_fpic%': 1,
323
[email protected]bd7b6fe2012-03-05 21:02:40324 # Whether one-click signin is enabled or not.
325 'enable_one_click_signin%': 0,
326
[email protected]6a3cd37e2012-04-17 17:13:34327 # Enable Chrome browser extensions
328 'enable_extensions%': 1,
329
[email protected]658677f2012-06-09 06:04:02330 # Enable browser automation.
331 'enable_automation%': 1,
332
[email protected]6ee43a72012-12-07 22:44:40333 # Enable Google Now.
334 'enable_google_now%': 1,
335
[email protected]703369a2012-11-05 20:40:31336 # Enable language detection.
337 'enable_language_detection%': 1,
338
[email protected]658677f2012-06-09 06:04:02339 # Enable printing support and UI.
340 'enable_printing%': 1,
341
[email protected]dda90ae2011-07-19 22:07:48342 # Webrtc compilation is enabled by default. Set to 0 to disable.
343 'enable_webrtc%': 1,
344
[email protected]cdb756ef2012-04-05 18:34:53345 # Enables use of the session service, which is enabled by default.
346 # Support for disabling depends on the platform.
347 'enable_session_service%': 1,
348
[email protected]6b40bb582012-03-15 20:50:38349 # Enables theme support, which is enabled by default. Support for
350 # disabling depends on the platform.
351 'enable_themes%': 1,
352
[email protected]57e67ac2013-02-22 03:37:22353 # Enables autofill dialog and associated features; disabled by default.
354 'enable_autofill_dialog%' : 0,
355
[email protected]066ab9882013-06-07 00:55:20356 # Uses spring wallpaper resources on Spring.
357 'use_spring_wallpaper%': 0,
358
[email protected]4ffe78a2012-10-04 20:55:15359 # Uses OEM-specific wallpaper resources on Chrome OS.
360 'use_oem_wallpaper%': 0,
361
[email protected]0acdd772012-04-05 22:53:00362 # Enables support for background apps.
363 'enable_background%': 1,
364
[email protected]44879ed2012-04-06 01:11:02365 # Enable the task manager by default.
366 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45367
[email protected]9bfe0ab2012-08-30 13:18:11368 # Enable FTP support by default.
369 'disable_ftp_support%': 0,
370
[email protected]22d6dd72012-05-15 07:29:55371 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
372 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
373 # the input value also defines the required XI2 minor minimum version.
374 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
375 'use_xi2_mt%': 0,
376
[email protected]9061bee82012-01-16 11:45:17377 # Use of precompiled headers on Windows.
378 #
[email protected]9061bee82012-01-16 11:45:17379 # This variable may be explicitly set to 1 (enabled) or 0
380 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
381 # This setting will override the default.
382 #
[email protected]c3340fb32012-12-20 20:45:39383 # See
[email protected]9061bee82012-01-16 11:45:17384 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
385 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16386 'chromium_win_pch%': 0,
387
[email protected]3bb37e62012-04-19 03:40:08388 # Set this to true when building with Clang.
389 # See http://code.google.com/p/chromium/wiki/Clang for details.
390 'clang%': 0,
391
[email protected]18e0f39b2012-01-17 16:47:34392 # Enable plug-in installation by default.
393 'enable_plugin_installation%': 1,
394
[email protected]6d17f6392012-12-05 05:24:54395 # Enable PPAPI and NPAPI by default.
396 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
397 # as PPAPI; see crbug.com/162667.
398 'enable_plugins%': 1,
399
[email protected]62424a52012-03-18 03:09:50400 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42401 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35402 # Chrome UI.
403 # TODO(asvitkine): Enable this on all platforms and delete this flag.
404 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50405 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35406
[email protected]a9318c72012-03-01 01:29:47407 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
408 # with one of those tools.
409 'build_for_tool%': '',
410
[email protected]37138132013-01-17 23:08:52411 # If no directory is specified then a temporary directory will be used.
412 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47413 # True if isolate should fail if the isolate files refer to files
414 # that are missing.
415 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56416
[email protected]740ebed2012-06-27 19:14:06417 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12418 'wix_path%': '<(DEPTH)/third_party/wix',
419
[email protected]0850e842013-01-19 03:44:31420 # Managed users are enabled by default.
421 'enable_managed_users%': 1,
422
[email protected]199def22013-02-21 17:52:29423 'spdy_proxy_auth_origin%' : '',
424 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25425 'spdy_proxy_auth_value%' : '',
[email protected]199def22013-02-21 17:52:29426
[email protected]bb6aba32011-01-07 19:04:43427 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34428 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37429 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34430 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37431 }, {
432 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34433 }],
434
[email protected]df9167b2011-11-14 19:15:25435 # A flag for BSD platforms
436 ['OS=="freebsd" or OS=="openbsd"', {
437 'os_bsd%': 1,
438 }, {
439 'os_bsd%': 0,
440 }],
441
[email protected]7d6763422013-04-26 12:06:54442 # Set armv7 for backward compatibility.
443 ['arm_version==7', {
444 'armv7': 1,
445 }, {
446 'armv7': 0,
447 }],
448
[email protected]c329adf82011-10-05 14:34:57449 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42450 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57451 'use_nss%': 1,
452 }, {
453 'use_nss%': 0,
454 }],
[email protected]e0b85a52011-10-06 03:30:42455
[email protected]c335f4802013-04-06 04:51:21456 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54457 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34458 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37459 }, {
[email protected]c49ab0c2011-05-18 17:25:37460 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34461 }],
[email protected]9a8175892012-03-20 02:11:58462
[email protected]26bade892013-05-23 21:44:15463 # Flags to use pango and glib on non-Mac POSIX platforms.
[email protected]c335f4802013-04-06 04:51:21464 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
465 'use_glib%': 0,
[email protected]26bade892013-05-23 21:44:15466 'use_pango%': 0,
[email protected]c335f4802013-04-06 04:51:21467 }, {
468 'use_glib%': 1,
[email protected]26bade892013-05-23 21:44:15469 'use_pango%': 1,
[email protected]c335f4802013-04-06 04:51:21470 }],
471
[email protected]efadeacf2011-10-27 19:01:00472 # We always use skia text rendering in Aura on Windows, since GDI
473 # doesn't agree with our BackingStore.
474 # TODO(beng): remove once skia text rendering is on by default.
475 ['use_aura==1 and OS=="win"', {
476 'enable_skia_text%': 1,
477 }],
[email protected]9edeb712011-09-20 21:20:33478
[email protected]63692212010-09-16 00:22:21479 # A flag to enable or disable our compile-time dependency
480 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
481 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49482 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50483 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21484 'use_gnome_keyring%': 0,
485 }, {
486 'use_gnome_keyring%': 1,
487 }],
[email protected]0afe5212010-10-01 18:56:11488
[email protected]8796d922012-08-07 01:23:11489 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20490 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43491 'use_titlecase_in_grd_files%': 1,
492 }],
493
[email protected]77a848262013-02-22 11:17:25494 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06495 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50496 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25497 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50498 }, {
[email protected]3d38d8e2011-04-16 20:48:51499 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25500 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51501 }],
[email protected]7de46352011-09-12 15:39:19502
[email protected]c79d1972013-02-06 18:47:29503 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01504 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51505 }],
506
[email protected]da1c8d692011-09-20 20:35:01507 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49508 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46509 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40510 'enable_google_now%': 0,
[email protected]7831e9a2013-02-20 13:54:12511 'enable_language_detection%': 1,
[email protected]55e02302012-08-21 00:50:46512 'enable_printing%': 0,
513 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46514 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58515 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54516 'arm_neon%': 0,
517 'arm_neon_optional%': 1,
[email protected]da1c8d692011-09-20 20:35:01518 }],
[email protected]839d5172011-10-13 17:18:11519
[email protected]57e67ac2013-02-22 03:37:22520 # Enable autofill dialog for Android and Views-enabled platforms for now.
[email protected]c2ecbcf2013-06-07 21:38:38521 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]57e67ac2013-02-22 03:37:22522 'enable_autofill_dialog%': 1
523 }],
524
[email protected]d999c3cb2013-03-12 10:22:36525 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43526 'enable_webrtc%': 1,
527 }],
528
529 # Disable WebRTC for building WebView as part of Android system.
530 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
531 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36532 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43533 'enable_webrtc%': 0,
534 }],
535
[email protected]0d16f292012-07-02 22:10:48536 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24537 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11538 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24539 'enable_automation%': 0,
540 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40541 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31542 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24543 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44544 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24545 'enable_themes%': 0,
546 'enable_webrtc%': 0,
547 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48548 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44549 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31550 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48551 }],
552
[email protected]839d5172011-10-13 17:18:11553 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27554 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01555 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33556 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11557 }, {
[email protected]1ee7c56c2011-10-19 14:51:33558 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11559 }],
[email protected]9061bee82012-01-16 11:45:17560
[email protected]c3340fb32012-12-20 20:45:39561 # Turn precompiled headers on by default.
562 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17563 'chromium_win_pch%': 1
564 }],
[email protected]18e0f39b2012-01-17 16:47:34565
[email protected]deb8b3cd2013-05-07 19:52:10566 ['chromeos==1 or OS=="android" or OS=="ios"', {
[email protected]18e0f39b2012-01-17 16:47:34567 'enable_plugin_installation%': 0,
568 }, {
569 'enable_plugin_installation%': 1,
570 }],
[email protected]b07806c12012-02-03 22:44:59571
[email protected]55d92492013-01-31 05:03:39572 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54573 'enable_plugins%': 0,
574 }, {
575 'enable_plugins%': 1,
576 }],
577
[email protected]8d726a42012-02-09 03:49:00578 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56579 # third_party/gold. Gold is not used for 32-bit linux builds
580 # as it runs out of address space.
581 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51582 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17583 }, {
[email protected]bd68ea52013-03-26 09:49:37584 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34585 }],
586
587 # linux_use_gold_flags: whether to use build flags that rely on gold.
588 # On by default for x64 Linux. Temporarily off for ChromeOS as
589 # it failed on a buildbot.
590 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
591 'linux_use_gold_flags%': 1,
592 }, {
[email protected]8d726a42012-02-09 03:49:00593 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59594 }],
[email protected]2e22e2f2012-03-15 21:53:10595
[email protected]9394a3a2012-12-19 19:22:39596 ['chromeos==1', {
597 'linux_use_libgps%': 1,
598 }, { # chromeos==0
599 # Do not use libgps on desktop Linux by default,
600 # see http://crbug.com/103751.
601 'linux_use_libgps%': 0,
602 }],
603
[email protected]a95d5302012-11-03 00:02:19604 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32605 'enable_captive_portal_detection%': 0,
606 }, {
607 'enable_captive_portal_detection%': 1,
608 }],
609
[email protected]3bd47e022012-03-22 04:19:12610 # Enable Skia UI text drawing incrementally on different platforms.
611 # http://crbug.com/105550
612 #
613 # On Aura, this allows per-tile painting to be used in the browser
614 # compositor.
[email protected]9197a9282012-05-30 14:12:32615 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12616 'use_canvas_skia%': 1,
617 }],
[email protected]adb44342012-07-23 13:36:12618
[email protected]0753ea42012-08-30 20:15:44619 ['chromeos==1', {
620 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
621 'use_libjpeg_turbo%': 0,
622 }],
623
[email protected]adb44342012-07-23 13:36:12624 ['OS=="android"', {
625 # When building as part of the Android system, use system libraries
626 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36627 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12628 }],
[email protected]8a46f5f2012-12-05 00:47:12629
[email protected]5be161f2013-06-18 11:09:33630 # Do not enable the Settings App on ChromeOS.
631 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12632 'enable_settings_app%': 1,
633 }, {
634 'enable_settings_app%': 0,
635 }],
[email protected]94cdbf42012-12-11 19:49:22636
637 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
638 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22639 'linux_breakpad%': 0,
640 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43641 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22642 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43643 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22644 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46645
[email protected]e2aaaac2013-05-08 07:20:09646 ['linux_lsb_release=="12.04"', {
647 'conditions': [
648 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43649 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09650 }],
651 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43652 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09653 }],
654 ],
655 }], # linux_lsb_release=="12.04"
656
[email protected]59e85f472013-06-28 18:20:44657 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07658 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28659 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46660 }],
[email protected]5b38a522013-03-20 17:00:47661
662 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01663 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47664 # e.g. base_unittests_run runs the target base_unittests. The test
665 # target always calls tools/swarm_client/isolate.py. See the script's
666 # --help for more information and the valid --mode values. Meant to be
667 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01668 # TODO(maruel): Remove the conditions as more configurations are
669 # supported.
[email protected]349f3062013-04-10 20:44:51670 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
671 # again.
[email protected]93fe4002013-04-10 00:17:01672 # NOTE: The check for disable_nacl==0 and component=="static_library"
673 # can't be used here because these variables are not defined yet, but it
674 # is still not supported.
[email protected]0dc310a32013-05-08 23:52:44675 ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47676 'test_isolation_mode%': 'check',
677 }, {
678 'test_isolation_mode%': 'noop',
679 }],
[email protected]5cbeb502013-04-23 19:25:27680 # Whether Android ARM build uses OpenMAX DL FFT.
[email protected]fc3ab0c2013-04-17 15:26:34681 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
[email protected]6558fd4f2013-04-17 18:51:38682 # Currently only supported on Android ARM, without webview.
683 # When enabled, this will also enable WebAudio on Android
[email protected]330f3a32013-04-23 05:47:58684 # ARM. Default is enabled.
685 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53686 }, {
687 'use_openmax_dl_fft%': 0,
688 }],
[email protected]b3f23ba2010-04-26 22:58:17689 ],
[email protected]2b113652012-09-17 17:01:39690
[email protected]a3a720f2013-04-25 19:35:42691 # Set this to 1 to enable use of concatenated impulse responses
692 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26693 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42694
[email protected]f2817cf2013-05-16 11:39:54695 # You can set the variable 'use_official_google_api_keys' to 1
696 # to use the Google-internal file containing official API keys
697 # for Google Chrome even in a developer build. Setting this
698 # variable explicitly to 1 will cause your build to fail if the
699 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39700 #
[email protected]f2817cf2013-05-16 11:39:54701 # The variable is documented here, but not handled in this file;
702 # see //google_apis/determine_use_official_keys.gypi for the
703 # implementation.
[email protected]2b113652012-09-17 17:01:39704 #
[email protected]f2817cf2013-05-16 11:39:54705 # Set the variable to 0 to not use the internal file, even when
706 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39707 #
[email protected]f2817cf2013-05-16 11:39:54708 # Leave it unset in your include.gypi to have the variable
709 # implicitly set to 1 if you have
710 # src/google_apis/internal/google_chrome_api_keys.h in your
711 # checkout, and implicitly set to 0 if not.
712 #
713 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39714 # was explicitly set to 1, i.e. they always use official keys,
715 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54716 #
717 # NOTE: You MUST NOT explicitly set the variable to 2 in your
718 # include.gypi or by other means. Due to subtleties of GYP, this
719 # is not the same as leaving the variable unset, even though its
720 # default value in
721 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39722
723 # Set these to bake the specified API keys and OAuth client
724 # IDs/secrets into your build.
725 #
726 # If you create a build without values baked in, you can instead
727 # set environment variables to provide the keys at runtime (see
728 # src/google_apis/google_api_keys.h for details). Features that
729 # require server-side APIs may fail to work if no keys are
730 # provided.
731 #
732 # Note that if you are building an official build or if
733 # use_official_google_api_keys has been set to 1 (explicitly or
734 # implicitly), these values will be ignored and the official
735 # keys will be used instead.
736 'google_api_key%': '',
737 'google_default_client_id%': '',
738 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07739 },
740
[email protected]e72e55b2011-01-06 22:19:30741 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07742 'branding%': '<(branding)',
743 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27744 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59745 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44746 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33747 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58748 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16749 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42750 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57751 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25752 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34753 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19754 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:15755 'use_pango%': '<(use_pango)',
[email protected]ff78e4e2013-05-03 19:19:15756 'use_ozone%': '<(use_ozone)',
[email protected]79e2336c2011-05-12 18:18:34757 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
758 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21759 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11760 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44761 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05762 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24763 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06764 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35765 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20766 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25767 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:54768 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01769 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]65b0819e2013-06-21 15:24:00770 'logging_like_official_build%': '<(logging_like_official_build)',
[email protected]a76fe1a2010-03-01 23:39:36771 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54772 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43773 'armv7%': '<(armv7)',
774 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54775 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23776 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43777 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52778 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43779 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17780 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18781 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40782 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48783 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16784 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25785 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56786 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22787 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57788 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46789 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37790 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06791 'asan%': '<(asan)',
[email protected]062522a2013-06-13 15:49:55792 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:59793 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12794 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16795 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25796 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44797 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46798 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34799 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34800 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54801 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53802 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38803 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22804 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]066ab9882013-06-07 00:55:20805 'use_spring_wallpaper%': '<(use_spring_wallpaper)',
[email protected]4ffe78a2012-10-04 20:55:15806 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00807 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59808 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00809 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39810 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50811 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33812 'test_isolation_mode%': '<(test_isolation_mode)',
813 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47814 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10815 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02816 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40817 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31818 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32819 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11820 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02821 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06822 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12823 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44824 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12825 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36826 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46827 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:07828 'create_standalone_apk%': 1,
[email protected]55d92492013-01-31 05:03:39829 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16830 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07831 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16832 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39833 'google_api_key%': '<(google_api_key)',
834 'google_default_client_id%': '<(google_default_client_id)',
835 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31836 'enable_managed_users%': '<(enable_managed_users)',
[email protected]199def22013-02-21 17:52:29837 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
838 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:25839 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]01971642012-03-07 14:39:56840
[email protected]46aa05cc42013-01-15 17:34:31841 # Use system mesa instead of bundled one.
842 'use_system_mesa%': 0,
843
[email protected]c486e4e2013-01-08 16:49:07844 # Use system nspr instead of the bundled one.
845 'use_system_nspr%': 0,
846
[email protected]2f325672012-10-31 23:29:37847 # Use system protobuf instead of bundled one.
848 'use_system_protobuf%': 0,
849
[email protected]371e1092011-10-12 20:37:36850 # Use system yasm instead of bundled one.
851 'use_system_yasm%': 0,
852
[email protected]ea02e962013-04-26 11:18:16853 # Use system ICU instead of bundled one.
854 'use_system_icu%' : 0,
855
[email protected]cd00bd862012-02-29 00:40:36856 # Default to enabled PIE; this is important for ASLR but we may need to be
857 # able to turn it off for various reasons.
858 'linux_disable_pie%': 0,
859
[email protected]caa95c82009-11-23 22:39:32860 # The release channel that this build targets. This is used to restrict
861 # channel-specific build options, like which installer packages to create.
862 # The default is 'all', which does no channel-specific filtering.
863 'channel%': 'all',
864
[email protected]b3fb8092009-03-12 19:09:24865 # Override chromium_mac_pch and set it to 0 to suppress the use of
866 # precompiled headers on the Mac. Prefix header injection may still be
867 # used, but prefix headers will not be precompiled. This is useful when
868 # using distcc to distribute a build to compile slaves that don't
869 # share the same compiler executable as the system driving the compilation,
870 # because precompiled headers rely on pointers into a specific compiler
871 # executable's image. Setting this to 0 is needed to use an experimental
872 # Linux-Mac cross compiler distcc farm.
873 'chromium_mac_pch%': 1,
874
[email protected]27b687ec42012-03-26 22:22:15875 # The default value for mac_strip in target_defaults. This cannot be
876 # set there, per the comment about variable% in a target_defaults.
877 'mac_strip_release%': 1,
878
[email protected]f5ecbba12009-04-03 04:35:18879 # Set to 1 to enable code coverage. In addition to build changes
880 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
881 # project file called "coverage".
882 # Currently ignored on Windows.
883 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49884
[email protected]9619e65d2012-05-23 19:06:52885 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
886 # This is useful for parallel compilation tools which can't support /Zi.
887 # Only used on Windows.
888 'win_z7%' : 0,
889
[email protected]7477ea6f2009-12-22 23:28:15890 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47891 # environment variable, the libcmt shim it uses sometimes gets in
892 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
893 # 'win_use_allocator_shim': 0,
894 # 'win_release_RuntimeLibrary': 2
895 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52896 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11897
[email protected]95ff8082009-11-13 22:21:01898 # Whether usage of OpenMAX is enabled.
899 'enable_openmax%': 0,
900
[email protected]d01120e62010-05-10 17:04:48901 # Whether proprietary audio/video codecs are assumed to be included with
902 # this build (only meaningful if branding!=Chrome).
903 'proprietary_codecs%': 0,
904
[email protected]e5b2eaa2009-04-14 01:39:12905 # TODO(bradnelson): eliminate this when possible.
906 # To allow local gyp files to prevent release.vsprops from being included.
907 # Yes(1) means include release.vsprops.
908 # Once all vsprops settings are migrated into gyp, this can go away.
909 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23910
[email protected]cbd5fd52009-08-26 00:14:27911 # TODO(bradnelson): eliminate this when possible.
912 # To allow local gyp files to override additional linker options for msvs.
913 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19914 'msvs_use_common_linker_extras%': 1,
915
[email protected]1ffb6502009-06-02 07:46:24916 # TODO(sgk): eliminate this if possible.
917 # It would be nicer to support this via a setting in 'target_defaults'
918 # in chrome/app/locales/locales.gypi overriding the setting in the
919 # 'Debug' configuration in the 'target_defaults' dict below,
920 # but that doesn't work as we'd like.
921 'msvs_debug_link_incremental%': '2',
922
[email protected]1f790ef2011-01-11 20:45:36923 # Needed for some of the largest modules.
924 'msvs_debug_link_nonincremental%': '1',
925
[email protected]6f390be2012-08-16 18:57:10926 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06927 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26928 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06929
[email protected]ac4d0ff2013-05-14 20:04:15930 # Experimental setting to break chrome.dll in to multiple parts (currently
931 # two, split primarily along browser/render lines).
[email protected]56c248b2013-05-08 17:51:02932 'chrome_split_dll%': '0',
933
[email protected]c54b41cb2012-08-24 20:58:24934 # The default settings for third party code for treating
935 # warnings-as-errors. Ideally, this would not be required, however there
936 # is some third party code that takes a long time to fix/roll. So, this
937 # flag allows us to have warnings as errors in general to prevent
938 # regressions in most modules, while working on the bits that are
939 # remaining.
940 'win_third_party_warn_as_error%': 'true',
941
[email protected]573136142009-07-15 22:48:37942 # This is the location of the sandbox binary. Chrome looks for this before
943 # running the zygote process. If found, and SUID, it will be used to
944 # sandbox the zygote process and, thus, all renderer processes.
945 'linux_sandbox_path%': '',
946
[email protected]3bb37e62012-04-19 03:40:08947 # Clang stuff.
948 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24949 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15950
[email protected]5e781232011-01-28 02:57:59951 # These two variables can be set in GYP_DEFINES while running
952 # |gclient runhooks| to let clang run a plugin in every compilation.
953 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
954 # Example:
[email protected]93120fe2011-02-03 20:46:42955 # 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:59956
957 'clang_load%': '',
958 'clang_add_plugin%': '',
959
[email protected]da1c8d692011-09-20 20:35:01960 # The default type of gtest.
961 'gtest_target_type%': 'executable',
962
[email protected]7664ab32011-02-01 23:35:25963 # Enable sampling based profiler.
964 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
965 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:58966 # Profile without optimizing out stack frames when profiling==1.
967 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:25968
[email protected]93b373502011-08-16 19:06:22969 # Enable strict glibc debug mode.
970 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10971 # Compile in Breakpad support by default so that it can be tested,
972 # even if it not enabled by default at runtime.
973 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01974 # And if we want to dump symbols for Breakpad-enabled builds.
975 'linux_dump_symbols%': 0,
976 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03977 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49978 # Strip the test binaries needed for Linux reliability tests.
979 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03980
[email protected]46ce5b562010-06-16 18:39:53981 # Enable TCMalloc.
982 'linux_use_tcmalloc%': 1,
[email protected]3c8fe5482013-05-22 15:17:03983 'android_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:24984
[email protected]d8b60602010-03-26 09:41:22985 # Disable TCMalloc's heapchecker.
986 'linux_use_heapchecker%': 0,
987
[email protected]64e2d4a42010-08-27 10:13:21988 # Disable shadow stack keeping used by heapcheck to unwind the stacks
989 # better.
990 'linux_keep_shadow_stacks%': 0,
991
[email protected]556c5d72010-06-10 05:45:01992 # Set to 1 to link against libgnome-keyring instead of using dlopen().
993 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35994 # Set to 1 to link against gsettings APIs instead of using dlopen().
995 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01996
[email protected]23eea4a42013-04-27 04:10:26997 # Default arch variant for MIPS.
998 'mips_arch_variant%': 'mips32r2',
999
[email protected]a63e8d22013-03-23 16:17:081000 # Enable use of OpenMAX DL FFT routines.
1001 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341002
[email protected]9821d0d2010-04-16 22:40:371003 # Enable new NPDevice API.
1004 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501005
1006 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:141007 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:501008
[email protected]6f51b27e2010-06-22 20:43:531009 # Enable a variable used elsewhere throughout the GYP files to determine
1010 # whether to compile in the sources for the GPU plugin / process.
1011 'enable_gpu%': 1,
1012
[email protected]e72e55b2011-01-06 22:19:301013 # .gyp files or targets should set chromium_code to 1 if they build
1014 # Chromium-specific code, as opposed to external code. This variable is
1015 # used to control such things as the set of warnings to enable, and
1016 # whether warnings are treated as errors.
1017 'chromium_code%': 0,
1018
[email protected]8d726a42012-02-09 03:49:001019 'release_valgrind_build%': 0,
1020
[email protected]b1eb341c2011-11-09 18:46:071021 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1022 'enable_wexit_time_destructors%': 0,
1023
[email protected]e72e55b2011-01-06 22:19:301024 # Set to 1 to compile with the built in pdf viewer.
1025 'internal_pdf%': 0,
1026
[email protected]9e1149d72012-07-24 01:27:171027 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1028 'internal_gles2_conform_tests%': 0,
1029
[email protected]e72e55b2011-01-06 22:19:301030 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1031 # so Cocoa is happy (http://crbug.com/20441).
1032 'locales': [
1033 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1034 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1035 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411036 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301037 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1038 'vi', 'zh-CN', 'zh-TW',
1039 ],
1040
[email protected]cc0322d2011-07-24 09:29:191041 # Pseudo locales are special locales which are used for testing and
1042 # debugging. They don't get copied to the final app. For more info,
1043 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1044 'pseudo_locales': [
1045 'fake-bidi',
1046 ],
1047
[email protected]bb6aba32011-01-07 19:04:431048 'grit_defines': [],
1049
[email protected]bd3bd442011-03-28 07:58:511050 # If debug_devtools is set to 1, JavaScript files for DevTools are
1051 # stored as is and loaded from disk. Otherwise, a concatenated file
1052 # is stored in resources.pak. It is still possible to load JS files
1053 # from disk by passing --debug-devtools cmdline switch.
1054 'debug_devtools%': 0,
1055
[email protected]464750f2011-10-24 23:16:181056 # The Java Bridge is not compiled in by default.
1057 'java_bridge%': 0,
1058
[email protected]1e013672012-06-29 22:12:201059 # Code signing for iOS binaries. The bots need to be able to disable this.
1060 'chromium_ios_signing%': 1,
1061
[email protected]33e1c372011-12-14 16:32:071062 # This flag is only used when disable_nacl==0 and disables all those
1063 # subcomponents which would require the installation of a native_client
1064 # untrusted toolchain.
1065 'disable_nacl_untrusted%': 0,
1066
[email protected]407dfa632011-12-23 11:59:351067 # Disable Dart by default.
1068 'enable_dart%': 0,
1069
[email protected]ff10b132012-02-29 22:53:301070 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1071 'msbuild_toolset%': '',
1072
[email protected]836285f22012-04-03 16:19:261073 # Native Client is enabled by default.
1074 'disable_nacl%': 0,
1075
[email protected]1e40ba002013-03-07 22:07:331076 # Portable Native Client is enabled by default.
1077 'disable_pnacl%': 0,
1078
[email protected]fa9d4e262012-08-21 04:39:001079 # Whether to build full debug version for Debug configuration on Android.
1080 # Compared to full debug version, the default Debug configuration on Android
1081 # has no full v8 debug, has size optimization and linker gc section, so that
1082 # we can build a debug version with acceptable size and performance.
1083 'android_full_debug%': 0,
1084
[email protected]65885272012-10-05 23:55:501085 # Sets the default version name and code for Android app, by default we
1086 # do a developer build.
1087 'android_app_version_name%': 'Developer Build',
1088 'android_app_version_code%': 0,
1089
[email protected]014d1ff12013-07-02 01:52:331090
1091 # Contains data about the attached devices for gyp_managed_install.
1092 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1093
[email protected]740ebed2012-06-27 19:14:061094 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121095 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1096
[email protected]1f8d9402012-07-06 22:47:561097 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1098 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051099
[email protected]fd6d8822012-12-08 06:56:111100 # Whether we are using the rlz library or not. Platforms like Android send
1101 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221102 'enable_rlz%': 0,
1103
[email protected]5cbeb502013-04-23 19:25:271104 # MDNS is disabled by default.
1105 'enable_mdns%' : 0,
1106
[email protected]912c55c2009-07-31 23:33:551107 'conditions': [
[email protected]5f683172013-04-27 01:53:191108 # The version of GCC in use, set later in platforms that use GCC and have
1109 # not explicitly chosen to build with clang. Currently, this means all
1110 # platforms except Windows, Mac and iOS.
1111 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1112 # it takes effect here.
[email protected]062522a2013-06-13 15:49:551113 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', {
[email protected]5f683172013-04-27 01:53:191114 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1115 }, {
1116 'gcc_version%': 0,
1117 }],
[email protected]1f8d9402012-07-06 22:47:561118 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1119 'windows_sdk_path%': '<(windows_sdk_default_path)',
1120 }, {
1121 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1122 }],
1123 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1124 'directx_sdk_path%': '<(directx_sdk_default_path)',
1125 }, {
1126 'directx_sdk_path%': '$(DXSDK_DIR)',
1127 }],
[email protected]54184ce72012-10-18 07:11:261128 ['OS=="win"', {
1129 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071130 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1131 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1132 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261133 }],
[email protected]1e013672012-06-29 22:12:201134 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231135 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431136 '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:271137 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461138 ['target_arch=="mipsel"', {
1139 'werror%': '',
1140 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461141 'nacl_untrusted_build%': 0,
1142 'linux_use_tcmalloc%': 0,
1143 'linux_breakpad%': 0,
[email protected]59e85f472013-06-28 18:20:441144 }],
1145 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461146 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281147 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461148 }],
[email protected]4c9cc6c2009-10-01 18:54:571149 # All Chrome builds have breakpad symbols, but only process the
1150 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081151 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571152 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571153 }],
[email protected]cbd5fd52009-08-26 00:14:271154 ],
[email protected]1e013672012-06-29 22:12:201155 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481156 ['OS=="ios"', {
1157 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191158 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151159 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071160 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351161 'icu_use_data_file_flag%': 1,
[email protected]4e3996f92012-07-17 10:41:131162 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471163 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411164 'locales==': [
1165 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
[email protected]6e9c15f2013-06-13 16:03:441166 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', 'nl',
1167 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
[email protected]b6fbd6742013-03-15 11:15:411168 'zh-CN', 'zh-TW',
1169 ],
[email protected]57871bc2012-08-20 16:28:121170
1171 # The Mac SDK is set for iOS builds and passed through to Mac
1172 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1173 # overridden from the command line the same way it is for a Mac build.
1174 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291175
1176 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1177 # what is required, but the value is left blank so when it is set in
1178 # the project files it will be the "current" iOS SDK. Forcing 5.0
1179 # even though it is "current" causes Xcode to spit out a warning for
1180 # every single project file for not using the "current" SDK.
1181 'ios_sdk%': '',
1182 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181183 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321184
1185 'conditions': [
1186 # ios_product_name is set to the name of the .app bundle as it should
1187 # appear on disk.
1188 ['branding=="Chrome"', {
1189 'ios_product_name%': 'Chrome',
1190 }, { # else: branding!="Chrome"
1191 'ios_product_name%': 'Chromium',
1192 }],
1193 ['branding=="Chrome" and buildtype=="Official"', {
1194 'ios_breakpad%': 1,
1195 }, { # else: branding!="Chrome" or buildtype!="Official"
1196 'ios_breakpad%': 0,
1197 }],
1198 ],
1199 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011200 ['OS=="android"', {
1201 # Location of Android NDK.
1202 'variables': {
1203 'variables': {
[email protected]5061d152013-01-16 17:45:571204 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1205 # they're passed to ant which uses a different relative path from
1206 # gyp.
1207 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1208 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1209 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041210 # Android API-level of the SDK used for compilation.
1211 'android_sdk_version%': '17',
[email protected]da1c8d692011-09-20 20:35:011212 },
[email protected]5061d152013-01-16 17:45:571213 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011214 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571215 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041216 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221217 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]5061d152013-01-16 17:45:571218
[email protected]e20a8ad2013-03-18 15:05:041219 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571220
[email protected]5cfec2b2013-03-05 20:54:331221 # Android API level 14 is ICS (Android 4.0) which is the minimum
1222 # platform requirement for Chrome on Android, we use it for native
1223 # code compilation.
[email protected]5061d152013-01-16 17:45:571224 'conditions': [
1225 ['target_arch == "ia32"', {
1226 'android_app_abi%': 'x86',
1227 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331228 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571229 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1230 }],
1231 ['target_arch=="arm"', {
1232 'conditions': [
[email protected]7d6763422013-04-26 12:06:541233 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571234 'android_app_abi%': 'armeabi',
1235 }, {
1236 'android_app_abi%': 'armeabi-v7a',
1237 }],
1238 ],
1239 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331240 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571241 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1242 }],
[email protected]23eea4a42013-04-27 04:10:261243 ['target_arch == "mipsel"', {
1244 'android_app_abi%': 'mips',
1245 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1246 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]7a956a62013-05-10 16:40:471247 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]23eea4a42013-04-27 04:10:261248 }],
[email protected]5061d152013-01-16 17:45:571249 ],
[email protected]da1c8d692011-09-20 20:35:011250 },
[email protected]5061d152013-01-16 17:45:571251 # Copy conditionally-set variables out one scope.
1252 'android_app_abi%': '<(android_app_abi)',
1253 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011254 'android_ndk_root%': '<(android_ndk_root)',
1255 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571256 'android_sdk_root%': '<(android_sdk_root)',
1257 'android_sdk_version%': '<(android_sdk_version)',
1258 'android_toolchain%': '<(android_toolchain)',
1259
[email protected]da1c8d692011-09-20 20:35:011260 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1261 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571262 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
[email protected]e20a8ad2013-03-18 15:05:041263 'android_sdk%': '<(android_sdk)',
1264 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011265
[email protected]225ec632013-04-03 18:20:221266 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221267 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221268 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]225ec632013-04-03 18:20:221269
[email protected]c0f76312012-08-16 13:52:041270 # Location of the "strip" binary, used by both gyp and scripts.
1271 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1272
[email protected]225ec632013-04-03 18:20:221273 # Location of the "readelf" binary.
1274 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1275
[email protected]ef7ed7a2012-05-29 23:19:131276 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1277 # to specify the output directory for Ant in the Android build.
1278 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1279
[email protected]d8621ce2013-02-22 00:37:331280 # Determines whether we should optimize JNI generation at the cost of
1281 # breaking assumptions in the build system that when inputs have changed
1282 # the outputs should always change as well. This is meant purely for
1283 # developer builds, to avoid spurious re-linking of native files.
1284 'optimize_jni_generation%': 0,
1285
[email protected]da1c8d692011-09-20 20:35:011286 # Always uses openssl.
1287 'use_openssl%': 1,
1288
1289 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021290 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071291 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011292 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221293 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021294 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181295 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581296 'build_ffmpegsumo%': 0,
1297 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021298
[email protected]ad17e342012-07-17 20:45:481299 # Disable Native Client.
1300 'disable_nacl%': 1,
1301
[email protected]58242012012-04-12 16:14:311302 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001303 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111304
[email protected]cdb756ef2012-04-05 18:34:531305 # Sessions are store separately in the Java side.
1306 'enable_session_service%': 0,
1307
[email protected]5fd2e842012-03-01 00:29:111308 # Set to 1 once we have a notification system for Android.
1309 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571310 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011311
[email protected]ad17e342012-07-17 20:45:481312 'p2p_apis%' : 0,
1313
[email protected]48de0fc2012-08-02 11:03:581314 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011315
1316 # Uses system APIs for decoding audio and video.
1317 'use_libffmpeg%': '0',
1318
[email protected]f1dc1e52012-12-12 21:39:001319 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011320 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011321
[email protected]adb44342012-07-23 13:36:121322 # When building as part of the Android system, use system libraries
1323 # where possible to reduce ROM size.
1324 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361325 'use_system_sqlite%': 0, # '<(android_webview_build)',
1326 'use_system_expat%': '<(android_webview_build)',
1327 'use_system_icu%': '<(android_webview_build)',
1328 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121329
[email protected]0850e842013-01-19 03:44:311330 'enable_managed_users%': 0,
1331
[email protected]da1c8d692011-09-20 20:35:011332 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361333 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011334 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121335 ['android_webview_build==1', {
1336 # When building the WebView in the Android tree, jarjar will remap all
1337 # the class names, so the JNI generator needs to know this.
1338 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1339 }],
[email protected]e14a9f92009-08-05 19:26:071340 ['OS=="mac"', {
[email protected]296bc452013-05-13 21:29:471341 # Enable clang on mac by default!
1342 'clang%': 1,
1343 }], # OS=="mac"
1344 ['OS=="mac" or OS=="ios"', {
[email protected]2c261532012-10-06 00:46:291345 'variables': {
1346 # Mac OS X SDK and deployment target support. The SDK identifies
1347 # the version of the system headers that will be used, and
1348 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1349 # macro. "Maximum allowed" refers to the operating system version
1350 # whose APIs are available in the headers. The deployment target
1351 # identifies the minimum system version that the built products are
1352 # expected to function on. It corresponds to the
1353 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1354 # macros are available, #include <AvailabilityMacros.h>. Additional
1355 # documentation on these macros is available at
1356 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1357 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1358 # deployment target to 10.6. Other projects, such as O3D, may
1359 # override these defaults.
1360
1361 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1362 # about that is at least the specified version. In official builds,
1363 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1364 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1365 # path to the SDK; when set to a non-empty string, SDK detection
1366 # based on mac_sdk_min will be bypassed entirely.
1367 'mac_sdk_min%': '10.6',
1368 'mac_sdk_path%': '',
1369
1370 'mac_deployment_target%': '10.6',
1371 },
1372
1373 'mac_sdk_min': '<(mac_sdk_min)',
1374 'mac_sdk_path': '<(mac_sdk_path)',
1375 'mac_deployment_target': '<(mac_deployment_target)',
1376
[email protected]794fb4782011-12-14 19:10:561377 # Compile in Breakpad support by default so that it can be
1378 # tested, even if it is not enabled by default at runtime.
1379 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071380 'conditions': [
1381 # mac_product_name is set to the name of the .app bundle as it should
1382 # appear on disk. This duplicates data from
1383 # chrome/app/theme/chromium/BRANDING and
1384 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1385 # these names into the build system.
1386 ['branding=="Chrome"', {
1387 'mac_product_name%': 'Google Chrome',
1388 }, { # else: branding!="Chrome"
1389 'mac_product_name%': 'Chromium',
1390 }],
1391
[email protected]e14a9f92009-08-05 19:26:071392 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291393 '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:561394 # Enable uploading crash dumps.
1395 'mac_breakpad_uploads%': 1,
1396 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071397 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561398 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071399 'mac_keystone%': 1,
1400 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291401 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561402 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071403 'mac_breakpad%': 0,
1404 'mac_keystone%': 0,
1405 }],
1406 ],
[email protected]296bc452013-05-13 21:29:471407 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551408 ['OS=="win"', {
1409 'conditions': [
[email protected]8974e042010-06-21 18:06:521410 ['component=="shared_library"', {
1411 'win_use_allocator_shim%': 0,
1412 }],
[email protected]fa0f16e2012-08-20 22:30:041413 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101414 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041415 # Not enabled for component=static_library because some targets
1416 # are too large and the toolchain fails due to the size of the
1417 # .obj files.
[email protected]6f390be2012-08-16 18:57:101418 'incremental_chrome_dll%': 1,
1419 }],
[email protected]10bb8c92009-08-07 21:16:031420 # Don't do incremental linking for large modules on 32-bit.
1421 ['MSVS_OS_BITS==32', {
1422 'msvs_large_module_debug_link_mode%': '1', # No
1423 },{
1424 'msvs_large_module_debug_link_mode%': '2', # Yes
1425 }],
[email protected]78764182013-01-23 20:32:511426 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501427 'msvs_express%': 1,
1428 'secure_atl%': 0,
1429 },{
1430 'msvs_express%': 0,
1431 'secure_atl%': 1,
1432 }],
[email protected]912c55c2009-07-31 23:33:551433 ],
[email protected]ef4fa4072009-12-04 22:46:501434 'nacl_win64_defines': [
1435 # This flag is used to minimize dependencies when building
1436 # Native Client loader for 64-bit Windows.
1437 'NACL_WIN64',
1438 ],
[email protected]912c55c2009-07-31 23:33:551439 }],
[email protected]bb6aba32011-01-07 19:04:431440
[email protected]a35aa362012-10-30 13:55:071441 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f492010-10-25 20:05:441442 'use_cups%': 1,
1443 }, {
1444 'use_cups%': 0,
1445 }],
[email protected]bb6aba32011-01-07 19:04:431446
[email protected]280755c2013-05-23 10:44:351447 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', {
1448 'enable_pepper_cdms%': 1,
1449 }, {
1450 'enable_pepper_cdms%': 0,
1451 }],
1452
[email protected]eb5f1672013-01-31 07:56:461453 # Native Client glibc toolchain is enabled
1454 # by default except on arm and mips.
1455 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321456 'disable_glibc%': 1,
1457 }, {
1458 'disable_glibc%': 0,
1459 }],
1460
[email protected]712c3da2012-09-24 21:31:241461 # Disable SSE2 when building for ARM or MIPS.
1462 ['target_arch=="arm" or target_arch=="mipsel"', {
1463 'disable_sse2%': 1,
1464 }, {
1465 'disable_sse2%': '<(disable_sse2)',
1466 }],
1467
[email protected]19fe8f0b2010-12-07 07:27:271468 # Set the relative path from this file to the GYP file of the JPEG
1469 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281470 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1471 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271472 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281473 }, {
1474 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1475 }],
[email protected]bb6aba32011-01-07 19:04:431476
[email protected]abcc9ac2011-05-16 20:04:351477 # Options controlling the use of GConf (the classic GNOME configuration
1478 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311479 ['chromeos==1', {
1480 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351481 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311482 }, {
1483 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351484 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311485 }],
1486
[email protected]4de39f82011-03-28 12:01:291487 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291488 ['branding=="Chrome"', {
1489 # TODO(mmoss) The .grd files look for _google_chrome, but for
1490 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291491 'grit_defines': ['-D', '_google_chrome',
1492 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291493 }, {
[email protected]4de39f82011-03-28 12:01:291494 'grit_defines': ['-D', '_chromium',
1495 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291496 }],
[email protected]bb6aba32011-01-07 19:04:431497 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131498 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431499 }],
1500 ['toolkit_views==1', {
1501 'grit_defines': ['-D', 'toolkit_views'],
1502 }],
[email protected]8dd791d2011-09-16 16:37:301503 ['use_aura==1', {
1504 'grit_defines': ['-D', 'use_aura'],
1505 }],
[email protected]ed329be2012-01-03 22:02:161506 ['use_ash==1', {
1507 'grit_defines': ['-D', 'use_ash'],
1508 }],
[email protected]c329adf82011-10-05 14:34:571509 ['use_nss==1', {
1510 'grit_defines': ['-D', 'use_nss'],
1511 }],
[email protected]ff78e4e2013-05-03 19:19:151512 ['use_ozone==1', {
1513 'grit_defines': ['-D', 'use_ozone'],
1514 }],
[email protected]e47c32032011-03-01 19:26:201515 ['file_manager_extension==1', {
1516 'grit_defines': ['-D', 'file_manager_extension'],
1517 }],
[email protected]77a848262013-02-22 11:17:251518 ['image_loader_extension==1', {
1519 'grit_defines': ['-D', 'image_loader_extension'],
1520 }],
[email protected]9a425422011-01-11 00:53:181521 ['remoting==1', {
1522 'grit_defines': ['-D', 'remoting'],
1523 }],
[email protected]bb6aba32011-01-07 19:04:431524 ['use_titlecase_in_grd_files==1', {
1525 'grit_defines': ['-D', 'use_titlecase'],
1526 }],
[email protected]00dc155832011-02-01 18:51:191527 ['use_third_party_translations==1', {
1528 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121529 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161530 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1531 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121532 ],
[email protected]00dc155832011-02-01 18:51:191533 }],
[email protected]da1c8d692011-09-20 20:35:011534 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171535 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571536 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]7a2ce042013-05-28 03:20:351537 'conditions': [
1538 ['google_tv==1', {
1539 'grit_defines': ['-D', 'google_tv'],
1540 }],
1541 ],
[email protected]da1c8d692011-09-20 20:35:011542 }],
[email protected]d39e3862012-06-26 22:38:231543 ['OS=="mac"', {
1544 'grit_defines': ['-D', 'scale_factors=2x'],
1545 }],
[email protected]ad563d02012-10-03 10:37:031546 ['OS == "ios"', {
1547 'grit_defines': [
1548 # define for iOS specific resources.
1549 '-D', 'ios',
1550 # iOS uses a whitelist to filter resources.
1551 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1552 ],
[email protected]b4530c82013-05-09 09:20:011553
1554 # Enable clang and host builds when generating with ninja-ios.
1555 'conditions': [
1556 ['"<(GENERATOR)"=="ninja"', {
1557 'clang%': 1,
1558 'host_os%': "mac",
1559 }]
1560 ],
[email protected]ad563d02012-10-03 10:37:031561 }],
[email protected]6a3cd37e2012-04-17 17:13:341562 ['enable_extensions==1', {
1563 'grit_defines': ['-D', 'enable_extensions'],
1564 }],
[email protected]658677f2012-06-09 06:04:021565 ['enable_printing==1', {
1566 'grit_defines': ['-D', 'enable_printing'],
1567 }],
[email protected]c2aad542012-07-31 20:40:331568 ['enable_themes==1', {
1569 'grit_defines': ['-D', 'enable_themes'],
1570 }],
[email protected]066ab9882013-06-07 00:55:201571 ['use_spring_wallpaper==1', {
1572 'grit_defines': ['-D', 'use_spring_wallpaper'],
1573 }],
[email protected]4ffe78a2012-10-04 20:55:151574 ['use_oem_wallpaper==1', {
1575 'grit_defines': ['-D', 'use_oem_wallpaper'],
1576 }],
[email protected]ef1dd5062012-12-17 06:41:331577 ['enable_app_list==1', {
1578 'grit_defines': ['-D', 'enable_app_list'],
1579 }],
[email protected]dc4e8b82012-11-15 03:58:161580 ['enable_settings_app==1', {
1581 'grit_defines': ['-D', 'enable_settings_app'],
1582 }],
[email protected]5411d8202013-01-30 01:32:151583 ['enable_google_now==1', {
1584 'grit_defines': ['-D', 'enable_google_now'],
1585 }],
[email protected]a3a720f2013-04-25 19:35:421586 ['use_concatenated_impulse_responses==1', {
1587 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1588 }],
[email protected]f66ddbd2013-06-27 14:17:041589 ['enable_webrtc==1', {
1590 'grit_defines': ['-D', 'enable_webrtc'],
1591 }],
[email protected]3bb37e62012-04-19 03:40:081592 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:071593 'clang_chrome_plugins_flags': [
1594 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311595 ],
[email protected]5d451ad2011-02-11 16:43:461596 }],
[email protected]cfa2e1102011-04-27 22:30:231597
[email protected]696de4e62012-11-21 21:18:541598 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061599 'clang%': 1,
1600 }],
[email protected]f5d8c222012-08-29 17:47:021601 ['asan==1 and OS=="mac"', {
[email protected]93064ee2013-02-11 19:25:091602 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
[email protected]2fccd422013-05-21 21:27:571603 # runtime is fully adopted. See http://crbug.com/242503.
[email protected]93064ee2013-02-11 19:25:091604 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021605 }],
[email protected]062522a2013-06-13 15:49:551606 ['lsan==1', {
1607 'clang%': 1,
1608 }],
[email protected]c9a829272012-07-04 07:51:121609 ['tsan==1', {
1610 'clang%': 1,
1611 }],
[email protected]a10ddd2d2013-02-26 20:06:591612 ['msan==1', {
1613 'clang%': 1,
1614 }],
[email protected]c9a829272012-07-04 07:51:121615
[email protected]7ce58b22012-09-26 05:17:251616 ['OS=="linux" and clang_type_profiler==1', {
1617 'clang%': 1,
1618 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321619 'conditions': [
1620 ['host_arch=="x64"', {
1621 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1622 }],
1623 ['host_arch=="ia32"', {
1624 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1625 # Clang in this directory at your own risk if needed for some
1626 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1627 # usage). Any failure by this compiler should not close the tree.
1628 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1629 }],
1630 ],
[email protected]7ce58b22012-09-26 05:17:251631 }],
1632
[email protected]a9318c72012-03-01 01:29:471633 # On valgrind bots, override the optimizer settings so we don't inline too
1634 # much and make the stacks harder to figure out.
1635 #
1636 # TODO(rnk): Kill off variables that no one else uses and just implement
1637 # them under a build_for_tool== condition.
1638 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1639 # gcc flags
1640 'mac_debug_optimization': '1',
1641 'mac_release_optimization': '1',
1642 'release_optimize': '1',
1643 'no_gc_sections': 1,
1644 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1645 '-fno-builtin -fno-optimize-sibling-calls',
1646 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1647 '-fno-builtin -fno-optimize-sibling-calls',
1648
1649 # MSVS flags for TSan on Pin and Windows.
1650 'win_debug_RuntimeChecks': '0',
1651 'win_debug_disable_iterator_debugging': '1',
1652 'win_debug_Optimization': '1',
1653 'win_debug_InlineFunctionExpansion': '0',
1654 'win_release_InlineFunctionExpansion': '0',
1655 'win_release_OmitFramePointers': '0',
1656
1657 'linux_use_tcmalloc': 1,
1658 'release_valgrind_build': 1,
1659 'werror': '',
1660 'component': 'static_library',
1661 'use_system_zlib': 0,
1662 }],
1663
1664 # Build tweaks for DrMemory.
1665 # TODO(rnk): Combine with tsan config to share the builder.
1666 # http://crbug.com/108155
1667 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471668 # These runtime checks force initialization of stack vars which blocks
1669 # DrMemory's uninit detection.
1670 'win_debug_RuntimeChecks': '0',
1671 # Iterator debugging is slow.
1672 'win_debug_disable_iterator_debugging': '1',
1673 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161674 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1675 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1676 # compiler bug, so we use /Ob1 instead.
1677 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471678 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501679 # Ditto for debug, to support bumping win_debug_Optimization.
1680 'win_debug_InlineFunctionExpansion': 0,
1681 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471682 # Keep the code under #ifndef NVALGRIND.
1683 'release_valgrind_build': 1,
1684 }],
[email protected]b6a5ac92012-10-29 18:17:221685
[email protected]f40a6912012-12-10 21:52:411686 # Enable RLZ on Win, Mac and ChromeOS.
1687 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221688 'enable_rlz%': 1,
1689 }],
[email protected]7d6763422013-04-26 12:06:541690
1691 # Set default compiler flags depending on ARM version.
1692 ['arm_version==5 and android_webview_build==0', {
1693 # Flags suitable for Android emulator
1694 'arm_arch%': 'armv5te',
1695 'arm_tune%': 'xscale',
1696 'arm_fpu%': '',
1697 'arm_float_abi%': 'soft',
1698 'arm_thumb%': 0,
1699 }],
1700 ['arm_version==6 and android_webview_build==0', {
1701 'arm_arch%': 'armv6',
1702 'arm_tune%': '',
1703 'arm_fpu%': '',
1704 'arm_float_abi%': 'soft',
1705 'arm_thumb%': 0,
1706 }],
1707 ['arm_version==7 and android_webview_build==0', {
1708 'arm_arch%': 'armv7-a',
1709 'arm_tune%': 'cortex-a8',
1710 'conditions': [
1711 ['arm_neon==1', {
1712 'arm_fpu%': 'neon',
1713 }, {
1714 'arm_fpu%': 'vfpv3-d16',
1715 }],
1716 ],
1717 'arm_float_abi%': 'softfp',
1718 'arm_thumb%': 1,
1719 }],
1720
1721 ['android_webview_build==1', {
1722 # The WebView build gets its cpu-specific flags from the Android build system.
1723 'arm_arch%': '',
1724 'arm_tune%': '',
1725 'arm_fpu%': '',
1726 'arm_float_abi%': '',
1727 'arm_thumb%': 0,
1728 }],
[email protected]912c55c2009-07-31 23:33:551729 ],
[email protected]a9318c72012-03-01 01:29:471730
[email protected]c91dc722013-06-12 22:53:011731
1732 # The path to the ANGLE library. TODO(apatrick): This is to help
1733 # transition to a new version of ANGLE at a new location. After the
1734 # transition is complete, this can be removed.
[email protected]a4f18a802013-06-24 10:40:261735 'angle_path': '<(DEPTH)/third_party/angle_dx11',
[email protected]c91dc722013-06-12 22:53:011736
[email protected]35958422011-09-28 02:03:591737 # List of default apps to install in new profiles. The first list contains
1738 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061739 # contains the destination location for each of the files. When a crx
1740 # is added or removed from the list, the chrome/browser/resources/
1741 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591742 'default_apps_list': [
1743 'browser/resources/default_apps/external_extensions.json',
1744 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061745 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591746 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001747 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231748 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591749 ],
1750 'default_apps_list_linux_dest': [
1751 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1752 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061753 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591754 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001755 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231756 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591757 ],
[email protected]2f80c312009-02-25 21:26:551758 },
1759 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261760 'variables': {
[email protected]a6e22132010-02-10 20:43:181761 # The condition that operates on chromium_code is in a target_conditions
1762 # section, and will not have access to the default fallback value of
1763 # chromium_code at the top of this file, or to the chromium_code
1764 # variable placed at the root variables scope of .gyp files, because
1765 # those variables are not set at target scope. As a workaround,
1766 # if chromium_code is not set at target scope, define it in target scope
1767 # to contain whatever value it has during early variable expansion.
1768 # That's enough to make it available during target conditional
1769 # processing.
1770 'chromium_code%': '<(chromium_code)',
1771
[email protected]7e0d664a2009-12-03 21:07:471772 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1773 'win_release_Optimization%': '2', # 2 = /Os
1774 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331775
1776 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241777 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111778 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241779 # Tri-state: blank is default, 1 on, 0 off
1780 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331781
[email protected]6b0507b2010-05-07 07:41:211782 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1783 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331784
[email protected]6b0507b2010-05-07 07:41:211785 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151786 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1787 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331788
[email protected]fac10d12010-11-08 16:00:311789 # VS inserts quite a lot of extra checks to algorithms like
1790 # std::partial_sort in Debug build which make them O(N^2)
1791 # instead of O(N*logN). This is particularly slow under memory
1792 # tools like ThreadSanitizer so we want it to be disablable.
1793 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1794 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471795
[email protected]ffd984b12009-09-11 19:37:001796 'release_extra_cflags%': '',
1797 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001798
1799 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521800
[email protected]ef5c5f1b2011-12-17 02:16:241801 # the non-qualified versions are widely assumed to be *nix-only
1802 'win_release_extra_cflags%': '',
1803 'win_debug_extra_cflags%': '',
1804
[email protected]b1eb341c2011-11-09 18:46:071805 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1806 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1807
[email protected]ef3326702011-10-06 18:06:441808 # Only used by Windows build for now. Can be used to build into a
1809 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1810 # output files in src/build/VS2010_{Debug,Release}.
1811 'build_dir_prefix%': '',
1812
[email protected]9ac2db692012-06-08 01:01:571813 # Targets are by default not nacl untrusted code.
1814 'nacl_untrusted_build%': 0,
1815
[email protected]9c55d9d2012-11-15 23:28:441816 'pnacl_compile_flags': [
1817 # pnacl uses the clang compiler so we need to supress all the
1818 # same warnings as we do for clang.
1819 # TODO(sbc): Remove these if/when they are removed from the clang
1820 # build.
1821 '-Wno-unused-function',
1822 '-Wno-char-subscripts',
1823 '-Wno-c++11-extensions',
1824 '-Wno-unnamed-type-template-args',
1825 ],
1826
[email protected]8974e042010-06-21 18:06:521827 'conditions': [
1828 ['OS=="win" and component=="shared_library"', {
1829 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161830 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1831 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521832 }, {
1833 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1834 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1835 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1836 }],
[email protected]1e013672012-06-29 22:12:201837 ['OS=="ios"', {
1838 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1839 'mac_release_optimization%': 's', # Use -Os unless overridden
1840 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1841 }, {
1842 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1843 'mac_release_optimization%': '3', # Use -O3 unless overridden
1844 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1845 }],
[email protected]8974e042010-06-21 18:06:521846 ],
[email protected]1c966092009-08-20 21:19:261847 },
[email protected]c91dc722013-06-12 22:53:011848 'defines': [
1849 # Set this to use the new DX11 version of ANGLE.
1850 # TODO(apatrick): Remove this when the transition is complete.
[email protected]a4f18a802013-06-24 10:40:261851 'ANGLE_DX11',
[email protected]c91dc722013-06-12 22:53:011852 ],
[email protected]32aa8cc2009-03-04 21:36:391853 'conditions': [
[email protected]d808e212013-03-12 14:06:161854 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311855 'dependencies': [
1856 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1857 ],
1858 }],
[email protected]7ce58b22012-09-26 05:17:251859 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1860 'cflags_cc!': ['-fno-rtti'],
1861 'cflags_cc+': [
1862 '-frtti',
1863 '-gline-tables-only',
1864 '-fintercept-allocation-functions',
1865 ],
1866 'defines': ['TYPE_PROFILING'],
1867 'dependencies': [
1868 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1869 ],
1870 }],
[email protected]56c248b2013-05-08 17:51:021871 ['chrome_split_dll', {
[email protected]ac4d0ff2013-05-14 20:04:151872 'variables': {
1873 'chrome_split_dll': '<!(python <(DEPTH)/tools/win/split_link/check_installed.py)',
1874 },
[email protected]56c248b2013-05-08 17:51:021875 'defines': ['CHROME_SPLIT_DLL'],
1876 }],
[email protected]b0c45722013-01-23 04:47:321877 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1878 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1879 # See http://crbug.com/162818.
1880 'cflags+': ['-Wno-sentinel'],
1881 }],
[email protected]ff10b132012-02-29 22:53:301882 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1883 'msbuild_toolset': '<(msbuild_toolset)',
1884 }],
[email protected]32aa8cc2009-03-04 21:36:391885 ['branding=="Chrome"', {
1886 'defines': ['GOOGLE_CHROME_BUILD'],
1887 }, { # else: branding!="Chrome"
1888 'defines': ['CHROMIUM_BUILD'],
1889 }],
[email protected]286d9a12012-05-30 16:20:381890 ['OS=="mac" and component=="shared_library"', {
1891 'xcode_settings': {
1892 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1893 'LD_RUNPATH_SEARCH_PATHS': [
1894 # For unbundled binaries.
1895 '@loader_path/.',
1896 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1897 '@loader_path/../../..',
1898 ],
1899 },
1900 }],
[email protected]b6a5ac92012-10-29 18:17:221901 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171902 'defines': ['ENABLE_RLZ'],
1903 }],
[email protected]63e39a282011-07-13 20:41:281904 ['component=="shared_library"', {
1905 'defines': ['COMPONENT_BUILD'],
1906 }],
[email protected]06c756182010-04-27 18:31:311907 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171908 'defines': ['TOOLKIT_VIEWS=1'],
1909 }],
[email protected]1ee7c56c2011-10-19 14:51:331910 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111911 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1912 }],
[email protected]41423092011-08-25 15:39:581913 ['use_aura==1', {
1914 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351915 }],
[email protected]ed329be2012-01-03 22:02:161916 ['use_ash==1', {
1917 'defines': ['USE_ASH=1'],
1918 }],
[email protected]ff78e4e2013-05-03 19:19:151919 ['use_ozone==1', {
1920 'defines': ['USE_OZONE=1'],
1921 }],
[email protected]cb800562012-11-20 22:36:071922 ['use_default_render_theme==1', {
1923 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1924 }],
[email protected]e190d272012-08-30 17:36:441925 ['use_libjpeg_turbo==1', {
1926 'defines': ['USE_LIBJPEG_TURBO=1'],
1927 }],
[email protected]c329adf82011-10-05 14:34:571928 ['use_nss==1', {
1929 'defines': ['USE_NSS=1'],
1930 }],
[email protected]2fa2f2d82013-04-29 18:13:121931 ['use_x11==1', {
1932 'defines': ['USE_X11=1'],
1933 }],
[email protected]bd7b6fe2012-03-05 21:02:401934 ['enable_one_click_signin==1', {
1935 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1936 }],
[email protected]a47aa892011-11-22 03:12:311937 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1938 # TODO(erg): We are progressively sealing up use of deprecated features
1939 # in gtk in preparation for an eventual porting to gtk3.
1940 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1941 }],
[email protected]fdc5bed2010-01-09 01:16:571942 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291943 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501944 }],
[email protected]55d92492013-01-31 05:03:391945 ['google_tv==1', {
1946 'defines': ['GOOGLE_TV=1'],
1947 }],
[email protected]f56797b2011-09-25 00:04:351948 ['use_xi2_mt!=0', {
1949 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1950 }],
[email protected]e47c32032011-03-01 19:26:201951 ['file_manager_extension==1', {
1952 'defines': ['FILE_MANAGER_EXTENSION=1'],
1953 }],
[email protected]77a848262013-02-22 11:17:251954 ['image_loader_extension==1', {
1955 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1956 }],
[email protected]7664ab32011-02-01 23:35:251957 ['profiling==1', {
1958 'defines': ['ENABLE_PROFILING=1'],
1959 }],
[email protected]93b373502011-08-16 19:06:221960 ['OS=="linux" and glibcxx_debug==1', {
1961 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591962 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221963 }],
[email protected]542bf24a2010-06-11 23:08:171964 ['remoting==1', {
1965 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001966 }],
[email protected]5b87e782012-02-09 18:19:321967 ['enable_webrtc==1', {
1968 'defines': ['ENABLE_WEBRTC=1'],
1969 }],
[email protected]d01120e62010-05-10 17:04:481970 ['proprietary_codecs==1', {
1971 'defines': ['USE_PROPRIETARY_CODECS'],
1972 }],
[email protected]7ddea9802012-02-22 23:08:051973 ['enable_viewport==1', {
1974 'defines': ['ENABLE_VIEWPORT'],
1975 }],
[email protected]280755c2013-05-23 10:44:351976 ['enable_pepper_cdms==1', {
1977 'defines': ['ENABLE_PEPPER_CDMS'],
1978 }],
[email protected]f31e2e52011-07-14 16:01:191979 ['configuration_policy==1', {
1980 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1981 }],
[email protected]9eb100e2011-10-14 05:08:221982 ['input_speech==1', {
1983 'defines': ['ENABLE_INPUT_SPEECH'],
1984 }],
[email protected]7cce3232011-10-28 10:41:571985 ['notifications==1', {
1986 'defines': ['ENABLE_NOTIFICATIONS'],
1987 }],
[email protected]1efbaaa2012-04-24 02:43:241988 ['enable_hidpi==1', {
1989 'defines': ['ENABLE_HIDPI=1'],
1990 }],
[email protected]9c1949e2009-10-02 19:59:541991 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:311992 'xcode_settings': {
1993 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1994 },
[email protected]9c1949e2009-10-02 19:59:541995 'conditions': [
[email protected]7df38122012-11-05 23:54:431996 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:301997 # Clang creates chubby debug information, which makes linking very
1998 # slow. For now, don't create debug information with clang. See
1999 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432000 'conditions': [
2001 ['OS=="linux"', {
2002 'variables': {
2003 'debug_extra_cflags': '-g0',
2004 },
2005 }],
2006 # Android builds symbols on release by default, disable them.
2007 ['OS=="android"', {
2008 'variables': {
2009 'debug_extra_cflags': '-g0',
2010 'release_extra_cflags': '-g0',
2011 },
2012 }],
2013 ],
2014 }, { # else clang!=1
2015 'conditions': [
[email protected]c86fd472013-04-02 19:42:302016 ['OS=="win" and fastbuild==2', {
2017 # Completely disable debug information.
2018 'msvs_settings': {
2019 'VCLinkerTool': {
2020 'GenerateDebugInformation': 'false',
2021 },
2022 'VCCLCompilerTool': {
2023 'DebugInformationFormat': '0',
2024 },
2025 },
2026 }],
2027 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432028 'msvs_settings': {
2029 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312030 # This tells the linker to generate .pdbs, so that
2031 # we can get meaningful stack traces.
2032 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432033 },
2034 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312035 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432036 'DebugInformationFormat': '0',
2037 },
2038 },
2039 }],
[email protected]c86fd472013-04-02 19:42:302040 ['OS=="linux" and fastbuild==2', {
2041 'variables': {
2042 'debug_extra_cflags': '-g0',
2043 },
2044 }],
2045 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432046 'variables': {
2047 'debug_extra_cflags': '-g1',
2048 },
2049 }],
[email protected]c86fd472013-04-02 19:42:302050 ['OS=="android" and fastbuild==2', {
2051 'variables': {
2052 'debug_extra_cflags': '-g0',
2053 'release_extra_cflags': '-g0',
2054 },
2055 }],
2056 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432057 'variables': {
2058 'debug_extra_cflags': '-g1',
2059 'release_extra_cflags': '-g1',
2060 },
2061 }],
2062 ],
2063 }], # clang!=1
2064 ],
[email protected]9c1949e2009-10-02 19:59:542065 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012066 ['dcheck_always_on!=0', {
2067 'defines': ['DCHECK_ALWAYS_ON=1'],
2068 }], # dcheck_always_on!=0
[email protected]65b0819e2013-06-21 15:24:002069 ['logging_like_official_build!=0', {
2070 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2071 }], # logging_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472072 ['win_use_allocator_shim==0', {
2073 'conditions': [
2074 ['OS=="win"', {
2075 'defines': ['NO_TCMALLOC'],
2076 }],
2077 ],
2078 }],
[email protected]43f28f832010-02-03 02:28:482079 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:152080 'defines': [
2081 'ENABLE_GPU=1',
2082 ],
2083 }],
[email protected]b1c2a5542010-10-08 12:44:402084 ['use_openssl==1', {
2085 'defines': [
2086 'USE_OPENSSL=1',
2087 ],
2088 }],
[email protected]ed154592010-04-29 00:18:502089 ['enable_eglimage==1', {
2090 'defines': [
2091 'ENABLE_EGLIMAGE=1',
2092 ],
2093 }],
[email protected]696de4e62012-11-21 21:18:542094 ['asan==1 and OS=="win"', {
2095 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2096 # produce appropriate pdbs.
2097 'msvs_settings': {
2098 'VCLinkerTool': {
2099 'Profile': 'true',
2100 },
2101 },
[email protected]2f047202013-06-14 06:36:392102 'defines': [
[email protected]bba0fea32013-06-14 12:29:352103 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:392104 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2105 ],
[email protected]696de4e62012-11-21 21:18:542106 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:182107 ['coverage!=0', {
2108 'conditions': [
[email protected]fc642ec2012-10-12 19:07:032109 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:182110 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:042111 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2112 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:472113 },
[email protected]fc642ec2012-10-12 19:07:032114 }],
2115 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:432116 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:102117 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:432118 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:182119 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:432120 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:182121 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:472122 }],
2123 ],
2124 }],
[email protected]da1c8d692011-09-20 20:35:012125 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:182126 'cflags': [ '-ftest-coverage',
2127 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:002128 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:182129 }],
[email protected]e8f6ff42009-07-07 18:20:532130 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:072131 'variables': {
2132 # Disable incremental linking for all modules.
2133 # 0: inherit, 1: disabled, 2: enabled.
2134 'msvs_debug_link_incremental': '1',
2135 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:292136 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2137 # binaries for now.
2138 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:072139 },
2140 'defines': [
2141 # Disable iterator debugging (huge speed boost without any
2142 # change in coverage results).
2143 '_HAS_ITERATOR_DEBUGGING=0',
2144 ],
[email protected]e8f6ff42009-07-07 18:20:532145 'msvs_settings': {
2146 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:072147 # Enable profile information (necessary for coverage
2148 # instrumentation). This is incompatible with incremental
2149 # linking.
[email protected]e8f6ff42009-07-07 18:20:532150 'Profile': 'true',
2151 },
[email protected]e8f6ff42009-07-07 18:20:532152 }
2153 }], # OS==win
2154 ], # conditions for coverage
2155 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382156 ['OS=="win"', {
2157 'defines': [
2158 '__STD_C',
2159 '_CRT_SECURE_NO_DEPRECATE',
2160 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102161 # This define is required to pull in the new Win8 interfaces from
2162 # system headers like ShObjIdl.h.
2163 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382164 ],
2165 'include_dirs': [
2166 '<(DEPTH)/third_party/wtl/include',
2167 ],
[email protected]9619e65d2012-05-23 19:06:522168 'conditions': [
2169 ['win_z7!=0', {
2170 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092171 # Generates debug info when win_z7=1
2172 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2173 'VCLinkerTool': {
2174 'GenerateDebugInformation': 'true',
2175 },
[email protected]9619e65d2012-05-23 19:06:522176 'VCCLCompilerTool': {
2177 'DebugInformationFormat': '1',
2178 }
2179 }
2180 }],
[email protected]45a77072012-11-17 00:28:422181 ['"<(GENERATOR)"=="msvs"', {
2182 'msvs_settings': {
2183 'VCLinkerTool': {
2184 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2185 # have foo.pdb. The ninja generator already defaults to this and
2186 # can't handle the $(TargetPath) macro.
2187 'ProgramDatabaseFile': '$(TargetPath).pdb',
2188 }
2189 },
2190 }],
[email protected]9619e65d2012-05-23 19:06:522191 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382192 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022193 ['enable_task_manager==1', {
2194 'defines': [
2195 'ENABLE_TASK_MANAGER=1',
2196 ],
2197 }],
[email protected]6a3cd37e2012-04-17 17:13:342198 ['enable_extensions==1', {
2199 'defines': [
2200 'ENABLE_EXTENSIONS=1',
2201 ],
2202 }],
[email protected]13eb97d2012-01-05 01:07:122203 ['OS=="win" and branding=="Chrome"', {
2204 'defines': ['ENABLE_SWIFTSHADER'],
2205 }],
[email protected]407dfa632011-12-23 11:59:352206 ['enable_dart==1', {
2207 'defines': ['WEBKIT_USING_DART=1'],
2208 }],
[email protected]18e0f39b2012-01-17 16:47:342209 ['enable_plugin_installation==1', {
2210 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2211 }],
[email protected]6d17f6392012-12-05 05:24:542212 ['enable_plugins==1', {
2213 'defines': ['ENABLE_PLUGINS=1'],
2214 }],
[email protected]cdb756ef2012-04-05 18:34:532215 ['enable_session_service==1', {
2216 'defines': ['ENABLE_SESSION_SERVICE=1'],
2217 }],
[email protected]6b40bb582012-03-15 20:50:382218 ['enable_themes==1', {
2219 'defines': ['ENABLE_THEMES=1'],
2220 }],
[email protected]57e67ac2013-02-22 03:37:222221 ['enable_autofill_dialog==1', {
2222 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2223 }],
[email protected]0acdd772012-04-05 22:53:002224 ['enable_background==1', {
2225 'defines': ['ENABLE_BACKGROUND=1'],
2226 }],
[email protected]2e22e2f2012-03-15 21:53:102227 ['enable_automation==1', {
2228 'defines': ['ENABLE_AUTOMATION=1'],
2229 }],
[email protected]6ee43a72012-12-07 22:44:402230 ['enable_google_now==1', {
2231 'defines': ['ENABLE_GOOGLE_NOW=1'],
2232 }],
[email protected]703369a2012-11-05 20:40:312233 ['enable_language_detection==1', {
2234 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
2235 }],
[email protected]658677f2012-06-09 06:04:022236 ['enable_printing==1', {
2237 'defines': ['ENABLE_PRINTING=1'],
2238 }],
[email protected]e6026962012-06-14 21:28:322239 ['enable_captive_portal_detection==1', {
2240 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2241 }],
[email protected]dc4e8b82012-11-15 03:58:162242 ['enable_app_list==1', {
2243 'defines': ['ENABLE_APP_LIST=1'],
2244 }],
2245 ['enable_settings_app==1', {
2246 'defines': ['ENABLE_SETTINGS_APP=1'],
2247 }],
[email protected]9bfe0ab2012-08-30 13:18:112248 ['disable_ftp_support==1', {
2249 'defines': ['DISABLE_FTP_SUPPORT=1'],
2250 }],
[email protected]0850e842013-01-19 03:44:312251 ['enable_managed_users==1', {
2252 'defines': ['ENABLE_MANAGED_USERS=1'],
2253 }],
[email protected]199def22013-02-21 17:52:292254 ['spdy_proxy_auth_origin != ""', {
2255 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2256 }],
2257 ['spdy_proxy_auth_property != ""', {
2258 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2259 }],
[email protected]f37e9412013-05-27 23:18:252260 ['spdy_proxy_auth_value != ""', {
2261 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2262 }],
[email protected]5cbeb502013-04-23 19:25:272263 ['enable_mdns==1', {
2264 'defines': ['ENABLE_MDNS=1'],
2265 }]
[email protected]a6e22132010-02-10 20:43:182266 ], # conditions for 'target_defaults'
2267 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072268 ['enable_wexit_time_destructors==1', {
2269 'conditions': [
2270 [ 'clang==1', {
2271 'cflags': [
2272 '-Wexit-time-destructors',
2273 ],
2274 'xcode_settings': {
2275 'WARNING_CFLAGS': [
2276 '-Wexit-time-destructors',
2277 ],
2278 },
2279 }],
2280 ],
2281 }],
[email protected]c14d8e772010-02-09 22:06:152282 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282283 'conditions': [
[email protected]1e013672012-06-29 22:12:202284 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332285 # We don't want to get warnings from third-party code,
2286 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282287 'cflags!': [
2288 '-Wall',
2289 '-Wextra',
[email protected]d8543312010-02-10 17:43:282290 ],
[email protected]167ec822011-10-24 22:05:272291 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002292 # Don't warn about hash_map in third-party code.
2293 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272294 ],
2295 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332296 # Don't warn about printf format problems.
2297 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222298 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002299 ],
[email protected]d16bd642011-07-25 23:59:182300 'cflags_cc!': [
2301 # TODO(fischman): remove this.
2302 # http://code.google.com/p/chromium/issues/detail?id=90453
2303 '-Wsign-compare',
2304 ]
[email protected]d8543312010-02-10 17:43:282305 }],
[email protected]82dd5eb32012-08-18 04:24:322306 # TODO: Fix all warnings on chromeos too.
2307 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2308 'cflags!': [
2309 '-Werror',
2310 ],
2311 }],
[email protected]bc073c062012-01-13 06:28:032312 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112313 'cflags': [
2314 # Don't warn about ignoring the return value from e.g. close().
2315 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032316 # BSD systems do not support this option, since they are usually
2317 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112318 '-Wno-unused-result',
2319 ],
2320 }],
[email protected]d8543312010-02-10 17:43:282321 [ 'OS=="win"', {
2322 'defines': [
2323 '_CRT_SECURE_NO_DEPRECATE',
2324 '_CRT_NONSTDC_NO_WARNINGS',
2325 '_CRT_NONSTDC_NO_DEPRECATE',
2326 '_SCL_SECURE_NO_DEPRECATE',
2327 ],
2328 'msvs_disabled_warnings': [4800],
2329 'msvs_settings': {
2330 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112331 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242332 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282333 'Detect64BitPortabilityProblems': 'false',
2334 },
2335 },
[email protected]c54b41cb2012-08-24 20:58:242336 'conditions': [
2337 ['buildtype=="Official"', {
2338 'msvs_settings': {
2339 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2340 }
2341 }],
2342 ],
[email protected]d8543312010-02-10 17:43:282343 }],
[email protected]0915c3b2012-11-22 17:24:072344 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422345 [ 'OS=="win" and component=="shared_library"', {
2346 'msvs_disabled_warnings': [
2347 4251, # class 'std::xx' needs to have dll-interface.
2348 ],
2349 }],
[email protected]1e013672012-06-29 22:12:202350 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282351 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062352 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282353 },
[email protected]3a352c362012-05-08 19:45:492354 'conditions': [
2355 ['buildtype=="Official"', {
2356 'xcode_settings': {
2357 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2358 },
2359 }],
2360 ],
[email protected]d8543312010-02-10 17:43:282361 }],
[email protected]1e013672012-06-29 22:12:202362 [ 'OS=="ios"', {
2363 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222364 # TODO(ios): Fix remaining warnings in third-party code, then
2365 # remove this; the Mac cleanup didn't get everything that's
2366 # flagged in an iOS build.
2367 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202368 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2369 },
2370 }],
[email protected]c14d8e772010-02-09 22:06:152371 ],
2372 }, {
[email protected]a5c598152012-01-27 04:55:132373 'includes': [
2374 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2375 'filename_rules.gypi',
2376 ],
[email protected]41af4f82012-11-08 00:09:312377 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152378 # C99 macros on Mac and Linux.
2379 'defines': [
[email protected]41af4f82012-11-08 00:09:312380 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152381 '__STDC_FORMAT_MACROS',
2382 ],
2383 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152384 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072385 # turn on warnings for signed/unsigned mismatch on chromium code.
2386 'msvs_settings': {
2387 'VCCLCompilerTool': {
2388 'AdditionalOptions': ['/we4389'],
2389 },
2390 },
[email protected]c14d8e772010-02-09 22:06:152391 }],
[email protected]63e39a282011-07-13 20:41:282392 ['OS=="win" and component=="shared_library"', {
2393 'msvs_disabled_warnings': [
2394 4251, # class 'std::xx' needs to have dll-interface.
2395 ],
2396 }],
[email protected]c14d8e772010-02-09 22:06:152397 ],
2398 }],
[email protected]a6e22132010-02-10 20:43:182399 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552400 'default_configuration': 'Debug',
2401 'configurations': {
[email protected]5153767c2009-12-22 01:52:502402 # VCLinkerTool LinkIncremental values below:
2403 # 0 == default
2404 # 1 == /INCREMENTAL:NO
2405 # 2 == /INCREMENTAL
2406 # Debug links incremental, Release does not.
2407 #
[email protected]7b99801e2010-11-03 17:26:232408 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502409 #
2410 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562411 'abstract': 1,
2412 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512413 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562414 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2415 'CharacterSet': '1',
2416 },
[email protected]f59e1302013-02-15 13:48:402417 # Add the default import libs.
2418 'msvs_settings':{
2419 'VCLinkerTool': {
2420 'AdditionalDependencies': [
2421 'kernel32.lib',
2422 'gdi32.lib',
2423 'winspool.lib',
2424 'comdlg32.lib',
2425 'advapi32.lib',
2426 'shell32.lib',
2427 'ole32.lib',
2428 'oleaut32.lib',
2429 'user32.lib',
2430 'uuid.lib',
2431 'odbc32.lib',
2432 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392433 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402434 ],
2435 },
2436 },
[email protected]5153767c2009-12-22 01:52:502437 },
2438 'x86_Base': {
2439 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502440 'msvs_settings': {
2441 'VCLinkerTool': {
2442 'TargetMachine': '1',
2443 },
2444 },
[email protected]2fa40782009-11-01 21:17:342445 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562446 },
[email protected]5153767c2009-12-22 01:52:502447 'x64_Base': {
2448 'abstract': 1,
2449 'msvs_configuration_platform': 'x64',
2450 'msvs_settings': {
2451 'VCLinkerTool': {
2452 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502453 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052454 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502455 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052456 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362457 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2458 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502459 },
[email protected]d26b4418ab2010-03-24 22:06:352460 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502461 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052462 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502463 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052464 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502465 },
2466 },
[email protected]5153767c2009-12-22 01:52:502467 },
2468 'Debug_Base': {
2469 'abstract': 1,
[email protected]14339762011-04-05 07:36:582470 'defines': [
2471 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2472 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2473 ],
[email protected]1c966092009-08-20 21:19:262474 'xcode_settings': {
2475 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292476 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492477 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492478 '<@(debug_extra_cflags)',
2479 ],
[email protected]1c966092009-08-20 21:19:262480 },
[email protected]bb05e452009-10-29 21:24:562481 'msvs_settings': {
2482 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472483 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562484 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212485 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472486 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152487 'conditions': [
2488 # According to MSVS, InlineFunctionExpansion=0 means
2489 # "default inlining", not "/Ob0".
2490 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2491 ['win_debug_InlineFunctionExpansion==0', {
2492 'AdditionalOptions': ['/Ob0'],
2493 }],
2494 ['win_debug_InlineFunctionExpansion!=""', {
2495 'InlineFunctionExpansion':
2496 '<(win_debug_InlineFunctionExpansion)',
2497 }],
[email protected]fac10d12010-11-08 16:00:312498 ['win_debug_disable_iterator_debugging==1', {
2499 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2500 }],
[email protected]ef5c5f1b2011-12-17 02:16:242501
2502 # if win_debug_OmitFramePointers is blank, leave as default
2503 ['win_debug_OmitFramePointers==1', {
2504 'OmitFramePointers': 'true',
2505 }],
2506 ['win_debug_OmitFramePointers==0', {
2507 'OmitFramePointers': 'false',
2508 # The above is not sufficient (http://crbug.com/106711): it
2509 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2510 # perform FPO regardless, so we must explicitly disable.
2511 # We still want the false setting above to avoid having
2512 # "/Oy /Oy-" and warnings about overriding.
2513 'AdditionalOptions': ['/Oy-'],
2514 }],
[email protected]2ae6e022010-05-07 13:19:152515 ],
[email protected]ef5c5f1b2011-12-17 02:16:242516 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562517 },
2518 'VCLinkerTool': {
2519 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332520 # ASLR makes debugging with windbg difficult because Chrome.exe and
2521 # Chrome.dll share the same base name. As result, windbg will
2522 # name the Chrome.dll module like chrome_<base address>, where
2523 # <base address> typically changes with each launch. This in turn
2524 # means that breakpoints in Chrome.dll don't stick from one launch
2525 # to the next. For this reason, we turn ASLR off in debug builds.
2526 # Note that this is a three-way bool, where 0 means to pick up
2527 # the default setting, 1 is off and 2 is on.
2528 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562529 },
2530 'VCResourceCompilerTool': {
2531 'PreprocessorDefinitions': ['_DEBUG'],
2532 },
2533 },
[email protected]2f80c312009-02-25 21:26:552534 'conditions': [
[email protected]78204c92012-09-14 04:42:552535 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542536 'target_conditions': [
2537 ['_toolset=="target"', {
2538 'cflags': [
2539 '<@(debug_extra_cflags)',
2540 ],
2541 }],
[email protected]bb05e452009-10-29 21:24:562542 ],
[email protected]2f80c312009-02-25 21:26:552543 }],
[email protected]1e013672012-06-29 22:12:202544 # Disabled on iOS because it was causing a crash on startup.
2545 # TODO(michelea): investigate, create a reduced test and possibly
2546 # submit a radar.
2547 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352548 'xcode_settings': {
2549 'OTHER_CFLAGS': [
2550 '-fstack-protector-all', # Implies -fstack-protector
2551 ],
2552 },
2553 }],
[email protected]2f80c312009-02-25 21:26:552554 ],
2555 },
[email protected]5153767c2009-12-22 01:52:502556 'Release_Base': {
2557 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552558 'defines': [
2559 'NDEBUG',
2560 ],
[email protected]1c966092009-08-20 21:19:262561 'xcode_settings': {
2562 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2563 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002564 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262565 },
[email protected]bb05e452009-10-29 21:24:562566 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472567 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472568 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152569 'conditions': [
[email protected]2212d272011-12-20 21:37:372570 # In official builds, each target will self-select
2571 # an optimization level.
2572 ['buildtype!="Official"', {
2573 'Optimization': '<(win_release_Optimization)',
2574 },
2575 ],
[email protected]2ae6e022010-05-07 13:19:152576 # According to MSVS, InlineFunctionExpansion=0 means
2577 # "default inlining", not "/Ob0".
2578 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2579 ['win_release_InlineFunctionExpansion==0', {
2580 'AdditionalOptions': ['/Ob0'],
2581 }],
2582 ['win_release_InlineFunctionExpansion!=""', {
2583 'InlineFunctionExpansion':
2584 '<(win_release_InlineFunctionExpansion)',
2585 }],
[email protected]626d2d22011-10-11 15:47:332586
[email protected]ef5c5f1b2011-12-17 02:16:242587 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332588 ['win_release_OmitFramePointers==1', {
2589 'OmitFramePointers': 'true',
2590 }],
2591 ['win_release_OmitFramePointers==0', {
2592 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242593 # The above is not sufficient (http://crbug.com/106711): it
2594 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2595 # perform FPO regardless, so we must explicitly disable.
2596 # We still want the false setting above to avoid having
2597 # "/Oy /Oy-" and warnings about overriding.
2598 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332599 }],
[email protected]2ae6e022010-05-07 13:19:152600 ],
[email protected]ef5c5f1b2011-12-17 02:16:242601 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472602 },
[email protected]bb05e452009-10-29 21:24:562603 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342604 # LinkIncremental is a tri-state boolean, where 0 means default
2605 # (i.e., inherit from parent solution), 1 means false, and
2606 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562607 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342608 # This corresponds to the /PROFILE flag which ensures the PDB
2609 # file contains FIXUP information (growing the PDB file by about
2610 # 5%) but does not otherwise alter the output binary. This
2611 # information is used by the Syzygy optimization tool when
2612 # decomposing the release image.
2613 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562614 },
2615 },
[email protected]2f80c312009-02-25 21:26:552616 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162617 ['msvs_use_common_release', {
2618 'includes': ['release.gypi'],
2619 }],
[email protected]7bdd7d7c2012-11-01 10:36:162620 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582621 'defines': [
2622 'NVALGRIND',
2623 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2624 ],
[email protected]ee857512010-05-14 08:24:422625 }, {
[email protected]14339762011-04-05 07:36:582626 'defines': [
[email protected]2f047202013-06-14 06:36:392627 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:582628 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2629 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2630 ],
[email protected]92822e82009-09-18 14:26:562631 }],
[email protected]7e0d664a2009-12-03 21:07:472632 ['win_use_allocator_shim==0', {
2633 'defines': ['NO_TCMALLOC'],
2634 }],
[email protected]37305ae2012-12-11 01:54:582635 ['os_posix==1 and chromium_code==1', {
2636 # Non-chromium code is not guaranteed to compile cleanly
2637 # with _FORTIFY_SOURCE. Also, fortified build may fail
2638 # when optimizations are disabled, so only do that for Release
2639 # build.
2640 'defines': [
2641 '_FORTIFY_SOURCE=2',
2642 ],
2643 }],
[email protected]7df38122012-11-05 23:54:432644 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542645 'target_conditions': [
2646 ['_toolset=="target"', {
2647 'cflags': [
2648 '<@(release_extra_cflags)',
2649 ],
2650 }],
[email protected]bb05e452009-10-29 21:24:562651 ],
2652 }],
[email protected]b64ec822013-05-23 12:57:412653 ['OS=="ios"', {
2654 'defines': [
2655 'NS_BLOCK_ASSERTIONS=1',
2656 ],
2657 }],
[email protected]2f80c312009-02-25 21:26:552658 ],
2659 },
[email protected]5153767c2009-12-22 01:52:502660 #
2661 # Concrete configurations
2662 #
2663 'Debug': {
2664 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2665 },
2666 'Release': {
2667 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502668 },
[email protected]f926fa0a2009-08-04 22:50:132669 'conditions': [
2670 [ 'OS=="win"', {
2671 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502672 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502673 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302674 },
2675 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502676 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302677 },
[email protected]f926fa0a2009-08-04 22:50:132678 }],
2679 ],
[email protected]2f80c312009-02-25 21:26:552680 },
2681 },
2682 'conditions': [
[email protected]43539ec2012-11-20 22:35:252683 ['os_posix==1', {
2684 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252685 'ldflags': [
2686 '-Wl,-z,now',
2687 '-Wl,-z,relro',
2688 ],
[email protected]43539ec2012-11-20 22:35:252689 },
2690 }],
[email protected]d2ca75c2013-02-01 05:47:172691 ['os_posix==1 and chromeos==0', {
2692 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2693 # and we want to avoid overriding this, so stack-protector is only
2694 # enabled when not building on Chrome OS.
2695 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2696 # supports it.
2697 'target_defaults': {
2698 'cflags': [
2699 '-fstack-protector',
2700 '--param=ssp-buffer-size=4',
2701 ],
2702 },
2703 }],
[email protected]1e013672012-06-29 22:12:202704 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262705 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272706 # Enable -Werror by default, but put it in a variable so it can
2707 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2708 'variables': {
[email protected]cbbb3472012-01-25 18:32:312709 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202710 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272711 },
[email protected]6863896f2012-01-25 17:51:362712 'defines': [
2713 '_FILE_OFFSET_BITS=64',
2714 ],
[email protected]9d384032009-03-20 23:13:262715 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162716 '<(werror)', # See note above about the werror variable.
2717 '-pthread',
2718 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292719 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162720 '-Wall',
[email protected]0fa17082010-03-26 00:48:052721 # TODO(evan): turn this back on once all the builds work.
2722 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202723 # Don't warn about unused function params. We use those everywhere.
2724 '-Wno-unused-parameter',
2725 # Don't warn about the "struct foo f = {0};" initialization pattern.
2726 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122727 # Don't export any symbols (for example, to plugins we dlopen()).
2728 # Note: this is *required* to make some plugins work.
2729 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352730 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242731 ],
2732 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222733 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242734 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362735 # Make inline functions have hidden visiblity by default.
2736 # Surprisingly, not covered by -fvisibility=hidden.
2737 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172738 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2739 # so we specify it explicitly.
2740 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182741 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172742 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262743 ],
[email protected]a6cf87e2009-04-03 04:07:382744 'ldflags': [
[email protected]138241f2010-03-30 23:53:102745 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262746 ],
[email protected]1e013672012-06-29 22:12:202747 'libraries' : [
2748 '<(libraries_for_target)',
2749 ],
[email protected]3aacaf952009-04-02 15:34:092750 'configurations': {
[email protected]5153767c2009-12-22 01:52:502751 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312752 'variables': {
2753 'debug_optimize%': '0',
2754 },
[email protected]3aacaf952009-04-02 15:34:092755 'defines': [
2756 '_DEBUG',
2757 ],
2758 'cflags': [
[email protected]95ad2032012-08-24 00:49:252759 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092760 '-g',
2761 ],
[email protected]da1c8d692011-09-20 20:35:012762 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342763 ['OS=="android"', {
2764 # Only link with needed input sections. This is to avoid getting
2765 # undefined reference to __cxa_bad_typeid in the CDU library.
2766 'ldflags': [
2767 '-Wl,--gc-sections',
2768 ],
2769 }],
[email protected]fa9d4e262012-08-21 04:39:002770 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552771 # Some configurations are copied from Release_Base to reduce
2772 # the binary size.
2773 'variables': {
2774 'debug_optimize%': 's',
2775 },
[email protected]da1c8d692011-09-20 20:35:012776 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552777 '-fomit-frame-pointer',
2778 '-fdata-sections',
2779 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012780 ],
[email protected]8a37e4502012-08-14 22:42:552781 'ldflags': [
2782 '-Wl,-O1',
2783 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552784 ],
[email protected]da1c8d692011-09-20 20:35:012785 }],
[email protected]d4c0ec5b2013-03-10 03:07:452786 ['OS=="linux" and target_arch=="ia32"', {
2787 'ldflags': [
2788 '-Wl,--no-as-needed',
2789 ],
2790 }],
[email protected]da1c8d692011-09-20 20:35:012791 ],
[email protected]5315f2842009-04-28 00:43:272792 },
[email protected]5153767c2009-12-22 01:52:502793 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012794 'variables': {
2795 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512796 # Binaries become big and gold is unable to perform GC
2797 # and remove unused sections for some of test targets
2798 # on 32 bit platform.
2799 # (This is currently observed only in chromeos valgrind bots)
2800 # The following flag is to disable --gc-sections linker
2801 # option for these bots.
2802 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122803
2804 # TODO(bradnelson): reexamine how this is done if we change the
2805 # expansion of configurations
2806 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012807 },
[email protected]3aacaf952009-04-02 15:34:092808 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182809 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532810 # Don't emit the GCC version ident directives, they just end up
2811 # in the .comment section taking up binary size.
2812 '-fno-ident',
2813 # Put data and code in their own sections, so that unused symbols
2814 # can be removed at link time with --gc-sections.
2815 '-fdata-sections',
2816 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092817 ],
[email protected]c902f2c2010-08-06 20:04:182818 'ldflags': [
2819 # Specifically tell the linker to perform optimizations.
2820 # See http://lwn.net/Articles/192624/ .
2821 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222822 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182823 ],
[email protected]1dd529642010-05-15 01:02:512824 'conditions' : [
2825 ['no_gc_sections==0', {
2826 'ldflags': [
2827 '-Wl,--gc-sections',
2828 ],
2829 }],
[email protected]da1c8d692011-09-20 20:35:012830 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582831 'variables': {
2832 'release_optimize%': 's',
2833 },
[email protected]da1c8d692011-09-20 20:35:012834 'cflags': [
2835 '-fomit-frame-pointer',
2836 ],
2837 }],
[email protected]ecf7b6482010-10-13 09:15:202838 ['clang==1', {
2839 'cflags!': [
2840 '-fno-ident',
2841 ],
2842 }],
[email protected]7664ab32011-02-01 23:35:252843 ['profiling==1', {
2844 'cflags': [
2845 '-fno-omit-frame-pointer',
2846 '-g',
2847 ],
[email protected]0358c4832013-06-23 14:17:582848 'conditions' : [
2849 ['profiling_full_stack_frames==1', {
2850 'cflags': [
2851 '-fno-inline',
2852 '-fno-optimize-sibling-calls',
2853 ],
2854 }],
2855 ],
[email protected]7664ab32011-02-01 23:35:252856 }],
[email protected]bdbe3d22013-02-22 04:10:352857 # Can be omitted to reduce output size. Does not seem to affect
2858 # crash reporting.
2859 ['target_arch=="ia32"', {
2860 'cflags': [
2861 '-fno-unwind-tables',
2862 '-fno-asynchronous-unwind-tables',
2863 ],
2864 }],
[email protected]8d726a42012-02-09 03:49:002865 ],
[email protected]3aacaf952009-04-02 15:34:092866 },
2867 },
[email protected]601b540222009-04-03 21:32:042868 'variants': {
2869 'coverage': {
2870 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2871 'ldflags': ['-fprofile-arcs'],
2872 },
2873 'profile': {
2874 'cflags': ['-pg', '-g'],
2875 'ldflags': ['-pg'],
2876 },
2877 'symbols': {
2878 'cflags': ['-g'],
2879 },
2880 },
[email protected]606116d22009-05-06 22:38:232881 'conditions': [
[email protected]04b482602011-09-14 02:36:212882 ['target_arch=="ia32"', {
2883 'target_conditions': [
2884 ['_toolset=="target"', {
2885 'asflags': [
2886 # Needed so that libs with .s files (e.g. libicudata.a)
2887 # are compatible with the general 32-bit-ness.
2888 '-32',
2889 ],
2890 # All floating-point computations on x87 happens in 80-bit
2891 # precision. Because the C and C++ language standards allow
2892 # the compiler to keep the floating-point values in higher
2893 # precision than what's specified in the source and doing so
2894 # is more efficient than constantly rounding up to 64-bit or
2895 # 32-bit precision as specified in the source, the compiler,
2896 # especially in the optimized mode, tries very hard to keep
2897 # values in x87 floating-point stack (in 80-bit precision)
2898 # as long as possible. This has important side effects, that
2899 # the real value used in computation may change depending on
2900 # how the compiler did the optimization - that is, the value
2901 # kept in 80-bit is different than the value rounded down to
2902 # 64-bit or 32-bit. There are possible compiler options to
2903 # make this behavior consistent (e.g. -ffloat-store would keep
2904 # all floating-values in the memory, thus force them to be
2905 # rounded to its original precision) but they have significant
2906 # runtime performance penalty.
2907 #
2908 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2909 # which keep floating-point values in SSE registers in its
2910 # native precision (32-bit for single precision, and 64-bit
2911 # for double precision values). This means the floating-point
2912 # value used during computation does not change depending on
2913 # how the compiler optimized the code, since the value is
2914 # always kept in its specified precision.
2915 'conditions': [
2916 ['branding=="Chromium" and disable_sse2==0', {
2917 'cflags': [
2918 '-march=pentium4',
2919 '-msse2',
2920 '-mfpmath=sse',
2921 ],
2922 }],
2923 # ChromeOS targets Pinetrail, which is sse3, but most of the
2924 # benefit comes from sse2 so this setting allows ChromeOS
2925 # to build on other CPUs. In the future -march=atom would
2926 # help but requires a newer compiler.
2927 ['chromeos==1 and disable_sse2==0', {
2928 'cflags': [
2929 '-msse2',
2930 ],
2931 }],
[email protected]0a0063c52013-03-29 06:36:212932 # Use gold linker for Android ia32 target.
2933 ['OS=="android"', {
2934 'cflags': [
2935 '-fuse-ld=gold',
2936 ],
2937 'ldflags': [
2938 '-fuse-ld=gold',
2939 ],
2940 }],
[email protected]04b482602011-09-14 02:36:212941 # Install packages have started cropping up with
2942 # different headers between the 32-bit and 64-bit
2943 # versions, so we have to shadow those differences off
2944 # and make sure a 32-bit-on-64-bit build picks up the
2945 # right files.
[email protected]32594022012-05-10 03:22:282946 # For android build, use NDK headers instead of host headers
2947 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212948 'include_dirs+': [
2949 '/usr/include32',
2950 ],
2951 }],
2952 ],
2953 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2954 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062955 'cflags': [
[email protected]04b482602011-09-14 02:36:212956 '-m32',
2957 '-mmmx',
2958 ],
2959 'ldflags': [
2960 '-m32',
[email protected]ffde7932009-05-29 00:39:062961 ],
2962 }],
[email protected]606116d22009-05-06 22:38:232963 ],
2964 }],
[email protected]3dda8a962009-08-10 18:58:072965 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292966 'target_conditions': [
2967 ['_toolset=="target"', {
2968 'cflags_cc': [
2969 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2970 # has changed whenever it encounters a varargs function. This
2971 # silences those warnings, as they are not helpful and
2972 # clutter legitimate warnings.
2973 '-Wno-abi',
2974 ],
2975 'conditions': [
[email protected]7d6763422013-04-26 12:06:542976 ['arm_arch!=""', {
2977 'cflags': [
2978 '-march=<(arm_arch)',
2979 ],
2980 }],
2981 ['arm_tune!=""', {
2982 'cflags': [
2983 '-mtune=<(arm_tune)',
2984 ],
2985 }],
2986 ['arm_fpu!=""', {
2987 'cflags': [
2988 '-mfpu=<(arm_fpu)',
2989 ],
2990 }],
2991 ['arm_float_abi!=""', {
2992 'cflags': [
2993 '-mfloat-abi=<(arm_float_abi)',
2994 ],
2995 }],
2996 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292997 'cflags': [
2998 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292999 ]
3000 }],
[email protected]da1c8d692011-09-20 20:35:013001 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533002 # Most of the following flags are derived from what Android
3003 # uses by default when building for arm, reference for which
3004 # can be found in the following file in the Android NDK:
3005 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3006 'cflags': [
3007 # The tree-sra optimization (scalar replacement for
3008 # aggregates enabling subsequent optimizations) leads to
3009 # invalid code generation when using the Android NDK's
3010 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433011 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533012 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483013 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:533014 '-Wno-psabi',
3015 ],
[email protected]ad17e342012-07-17 20:45:483016 # Android now supports .relro sections properly.
3017 # NOTE: While these flags enable the generation of .relro
3018 # sections, the generated libraries can still be loaded on
3019 # older Android platform versions.
3020 'ldflags': [
3021 '-Wl,-z,relro',
3022 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483023 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483024 ],
[email protected]da1c8d692011-09-20 20:35:013025 'conditions': [
[email protected]7d6763422013-04-26 12:06:543026 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223027 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013028 }],
[email protected]4c48ef102012-11-29 22:00:383029 ['profiling==1', {
3030 'cflags': [
3031 '-marm', # Probably reduntant, but recommend by "perf" docs.
3032 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3033 ],
3034 }],
[email protected]220ea5932012-08-09 10:44:073035 ['clang==1', {
3036 'cflags!': [
3037 # Clang does not support the following options.
3038 '-mthumb-interwork',
3039 '-finline-limit=64',
3040 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483041 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073042 '-Wno-psabi',
3043 ],
3044 }],
[email protected]da1c8d692011-09-20 20:35:013045 ],
3046 }],
[email protected]3dda8a962009-08-10 18:58:073047 ],
3048 }],
3049 ],
3050 }],
[email protected]23eea4a42013-04-27 04:10:263051 ['target_arch=="mipsel"', {
3052 'target_conditions': [
3053 ['_toolset=="target"', {
3054 'conditions': [
[email protected]3a626e02013-06-27 12:58:343055 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263056 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343057 }],
3058 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263059 'cflags': ['-mips32', '-Wa,-mips32'],
3060 }],
3061 ],
3062 'cflags': [
3063 '-EL',
3064 '-mhard-float',
3065 ],
3066 'ldflags': [
3067 '-EL',
3068 '-Wl,--no-keep-memory'
3069 ],
3070 'cflags_cc': [
3071 '-Wno-uninitialized',
3072 ],
3073 }],
3074 ],
3075 }],
[email protected]2fb843b2010-08-12 02:11:083076 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583077 'cflags': [
3078 '-fPIC',
3079 ],
[email protected]d3f692b32011-12-14 19:04:353080 'ldflags': [
3081 '-fPIC',
3082 ],
[email protected]c76723a2010-01-25 23:10:583083 }],
[email protected]ee28c9f2009-09-04 01:53:013084 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573085 'target_conditions': [
3086 ['_toolset=="target"', {
3087 'cflags': [
3088 '--sysroot=<(sysroot)',
3089 ],
3090 'ldflags': [
3091 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153092 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573093 ],
3094 }]]
[email protected]ee28c9f2009-09-04 01:53:013095 }],
[email protected]58680ce2010-09-18 00:09:153096 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123097 'cflags': [
3098 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073099
[email protected]7ddcb1d2013-04-19 04:52:533100 # Don't die on dtoa code that uses a char as an array index.
3101 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073102
3103 # Clang spots more unused functions.
3104 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103105
3106 # Warns on switches on enums that cover all enum values but
3107 # also contain a default: branch. Chrome is full of that.
3108 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513109
3110 # Warns when a const char[] is converted to bool.
3111 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:123112 ],
3113 'cflags!': [
3114 # Clang doesn't seem to know know this flag.
3115 '-mfpmath=sse',
3116 ],
[email protected]58680ce2010-09-18 00:09:153117 }],
[email protected]bca3e082013-05-30 21:13:443118 ['clang==1 and OS!="android"', {
[email protected]8dec02e2013-04-30 21:40:073119 # Turn on C++11.
3120 'cflags': [
3121 # This warns on using ints as initializers for floats in
3122 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3123 # which happens in several places in chrome code. Not sure if
3124 # this is worth fixing.
3125 '-Wno-c++11-narrowing',
3126
3127 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3128 # user-defined literals, this is now a string literal with a UD
3129 # suffix. However, this is used heavily in NaCl code, so disable
3130 # the warning for now.
3131 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243132
3133 # Clang considers the `register` keyword as deprecated, but e.g.
3134 # code generated by flex (used in angle) contains that keyword.
3135 # http://crbug.com/255186
3136 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073137 ],
3138 'cflags_cc': [
3139 # See the comment in the Mac section for what it takes to move
3140 # this to -std=c++11.
3141 '-std=gnu++11',
3142 ],
3143 }],
[email protected]bca3e082013-05-30 21:13:443144 ['clang==1 and OS=="android"', {
[email protected]8dec02e2013-04-30 21:40:073145 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
3146 # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
3147 # Doesn't work with asan for some reason either: crbug.com/233464
3148 'cflags': [
[email protected]296bc452013-05-13 21:29:473149 # Especially needed for gtest macros using enum values from Mac
3150 # system headers.
3151 # TODO(pkasting): In C++11 this is legal, so this should be
3152 # removed when we change to that. (This is also why we don't
3153 # bother fixing all these cases today.)
3154 '-Wno-unnamed-type-template-args',
3155 # This (rightfully) complains about 'override', which we use
3156 # heavily.
[email protected]8dec02e2013-04-30 21:40:073157 '-Wno-c++11-extensions',
3158 ],
3159 }],
[email protected]5d451ad2011-02-11 16:43:463160 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263161 'cflags': [
[email protected]c872dc52012-05-19 06:36:313162 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263163 ],
[email protected]5d451ad2011-02-11 16:43:463164 }],
[email protected]4a9ac22e2011-12-02 03:41:533165 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263166 'cflags': [
3167 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533168 ],
3169 }],
3170 ['clang==1 and clang_add_plugin!=""', {
3171 'cflags': [
[email protected]d23720682011-08-11 00:16:263172 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3173 ],
[email protected]5e781232011-01-28 02:57:593174 }],
[email protected]49110f02013-04-22 22:51:343175 ['clang==1 and target_arch=="ia32"', {
3176 'cflags': [
3177 # Else building libyuv gives clang's register allocator issues,
3178 # see llvm.org/PR15798 / crbug.com/233709
3179 '-momit-leaf-frame-pointer',
3180 ],
3181 }],
[email protected]2616d45d2012-01-19 03:15:483182 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3183 'cflags': [
3184 # See http://crbug.com/110262
3185 '-fcolor-diagnostics',
3186 ],
3187 }],
[email protected]062522a2013-06-13 15:49:553188 # Common options for AddressSanitizer, LeakSanitizer,
3189 # ThreadSanitizer and MemorySanitizer.
3190 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543191 'target_conditions': [
3192 ['_toolset=="target"', {
3193 'cflags': [
3194 '-fno-omit-frame-pointer',
3195 '-gline-tables-only',
3196 ],
[email protected]49110f02013-04-22 22:51:343197 'ldflags!': [
3198 # Functions interposed by the sanitizers can make ld think
3199 # that some libraries aren't needed when they actually are,
3200 # http://crbug.com/234010. As workaround, disable --as-needed.
3201 '-Wl,--as-needed',
3202 ],
[email protected]2f047202013-06-14 06:36:393203 'defines': [
3204 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3205 ],
[email protected]cf351c22013-04-19 13:00:543206 }],
[email protected]a26740dd2013-05-28 11:50:493207 ['_toolset=="target" and OS=="linux"', {
3208 'ldflags': [
3209 # http://crbug.com/234010.
3210 '-lrt',
3211 ],
3212 }],
[email protected]cf351c22013-04-19 13:00:543213 ],
3214 }],
[email protected]92799b632011-08-15 14:33:063215 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423216 'target_conditions': [
3217 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453218 'cflags': [
[email protected]48688df02012-11-27 21:04:563219 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563220 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453221 ],
3222 'ldflags': [
[email protected]48688df02012-11-27 21:04:563223 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453224 ],
3225 'defines': [
3226 'ADDRESS_SANITIZER',
3227 ],
[email protected]1ffc3b3962012-05-16 14:08:423228 }],
[email protected]921c7b52011-11-25 10:34:353229 ],
[email protected]1d3bc322013-04-12 14:26:373230 'conditions': [
3231 ['OS=="mac"', {
3232 'cflags': [
3233 '-mllvm -asan-globals=0', # http://crbug.com/196561
3234 ],
3235 }],
3236 ],
[email protected]92799b632011-08-15 14:33:063237 }],
[email protected]062522a2013-06-13 15:49:553238 ['lsan==1', {
3239 'target_conditions': [
3240 ['_toolset=="target"', {
3241 'cflags': [
3242 '-fsanitize=leak',
3243 ],
3244 'ldflags': [
3245 '-fsanitize=leak',
3246 ],
3247 'defines': [
3248 'LEAK_SANITIZER',
3249 ],
3250 }],
3251 ],
3252 }],
[email protected]c9a829272012-07-04 07:51:123253 ['tsan==1', {
3254 'target_conditions': [
3255 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453256 'cflags': [
[email protected]927a9d672012-11-09 11:28:203257 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293258 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203259 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453260 ],
3261 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203262 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453263 ],
3264 'defines': [
3265 'THREAD_SANITIZER',
3266 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163267 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453268 ],
3269 'target_conditions': [
3270 ['_type=="executable"', {
3271 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123272 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453273 ],
3274 }],
3275 ],
[email protected]c9a829272012-07-04 07:51:123276 }],
3277 ],
3278 }],
[email protected]a10ddd2d2013-02-26 20:06:593279 ['msan==1', {
3280 'target_conditions': [
3281 ['_toolset=="target"', {
3282 'cflags': [
3283 '-fsanitize=memory',
3284 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593285 '-fPIC',
3286 ],
3287 'ldflags': [
3288 '-fsanitize=memory',
3289 ],
3290 'defines': [
3291 'MEMORY_SANITIZER',
3292 ],
3293 'target_conditions': [
3294 ['_type=="executable"', {
3295 'ldflags': [
3296 '-pie',
3297 ],
3298 }],
3299 ],
3300 }],
3301 ],
3302 }],
[email protected]8a48f3f2012-12-04 20:14:043303 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443304 'target_conditions' : [
3305 ['_toolset=="target"', {
3306 'cflags': [
3307 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453308 # Allow mmx intrinsics to inline, so that the
3309 # compiler can expand the intrinsics.
3310 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443311 ],
3312 }],
3313 ],
3314 }],
[email protected]cbd5fd52009-08-26 00:14:273315 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:273316 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:103317 }],
3318 ['linux_dump_symbols==1', {
3319 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253320 'conditions': [
[email protected]791262fe2013-02-21 17:20:153321 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253322 'target_conditions': [
3323 ['_toolset=="target"', {
3324 'ldflags': [
[email protected]567370a32013-03-01 00:11:233325 # Workaround for linker OOM.
3326 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253327 ],
3328 }],
3329 ],
3330 }],
3331 ],
[email protected]cbd5fd52009-08-26 00:14:273332 }],
[email protected]d8b60602010-03-26 09:41:223333 ['linux_use_heapchecker==1', {
3334 'variables': {'linux_use_tcmalloc%': 1},
[email protected]2f047202013-06-14 06:36:393335 'defines': [
[email protected]bba0fea32013-06-14 12:29:353336 'USE_HEAPCHECKER',
[email protected]2f047202013-06-14 06:36:393337 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3338 ],
[email protected]272ef0b2013-05-14 12:32:453339 'conditions': [
3340 ['component=="shared_library"', {
3341 # See crbug.com/112389
3342 # TODO(glider): replace with --dynamic-list or something
3343 'ldflags': ['-rdynamic'],
3344 }],
3345 ],
[email protected]d8b60602010-03-26 09:41:223346 }],
[email protected]3c8fe5482013-05-22 15:17:033347 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083348 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243349 }],
[email protected]64e2d4a42010-08-27 10:13:213350 ['linux_keep_shadow_stacks==1', {
3351 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513352 'cflags': [
3353 '-finstrument-functions',
3354 # Allow mmx intrinsics to inline, so that the compiler can expand
3355 # the intrinsics.
3356 '-finstrument-functions-exclude-file-list=mmintrin.h',
3357 ],
[email protected]64e2d4a42010-08-27 10:13:213358 }],
[email protected]8d726a42012-02-09 03:49:003359 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:323360 'ldflags': [
3361 # Experimentation found that using four linking threads
3362 # saved ~20% of link time.
3363 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3364 '-Wl,--threads',
3365 '-Wl,--thread-count=4',
3366 ],
[email protected]8d726a42012-02-09 03:49:003367 'conditions': [
3368 ['release_valgrind_build==0', {
3369 'target_conditions': [
3370 ['_toolset=="target"', {
3371 'ldflags': [
3372 # There seems to be a conflict of --icf and -pie
3373 # in gold which can generate crashy binaries. As
3374 # a security measure, -pie takes precendence for
3375 # now.
3376 #'-Wl,--icf=safe',
3377 '-Wl,--icf=none',
3378 ],
3379 }],
3380 ],
3381 }],
3382 ],
3383 }],
[email protected]b07806c12012-02-03 22:44:593384 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593385 'ldflags': [
3386 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443387 # We pass the path to gold to the compiler. gyp leaves
3388 # unspecified what the cwd is when running the compiler,
3389 # so the normal gyp path-munging fails us. This hack
3390 # gets the right path.
3391 '-B<(PRODUCT_DIR)/../../third_party/gold',
[email protected]b07806c12012-02-03 22:44:593392 ],
3393 }],
[email protected]606116d22009-05-06 22:38:233394 ],
[email protected]9d384032009-03-20 23:13:263395 },
3396 }],
[email protected]c51e8d52009-12-11 20:04:063397 # FreeBSD-specific options; note that most FreeBSD options are set above,
3398 # with Linux.
3399 ['OS=="freebsd"', {
3400 'target_defaults': {
3401 'ldflags': [
3402 '-Wl,--no-keep-memory',
3403 ],
3404 },
3405 }],
[email protected]da1c8d692011-09-20 20:35:013406 # Android-specific options; note that most are set above with Linux.
3407 ['OS=="android"', {
3408 'variables': {
[email protected]25036722012-12-11 10:36:173409 # This is a unique identifier for a given build. It's used for
3410 # identifying various build artifacts corresponding to a particular
3411 # build of chrome (e.g. where to find archived symbols).
3412 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013413 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013414 # Use shared stlport library when system one used.
3415 # Figure this out early since it needs symbols from libgcc.a, so it
3416 # has to be before that in the set of libraries.
3417 ['use_system_stlport==1', {
3418 'android_stlport_library': 'stlport',
3419 }, {
[email protected]806b5232012-11-19 21:19:043420 'conditions': [
3421 ['component=="shared_library"', {
3422 'android_stlport_library': 'stlport_shared',
3423 }, {
3424 'android_stlport_library': 'stlport_static',
3425 }],
3426 ],
[email protected]da1c8d692011-09-20 20:35:013427 }],
3428 ],
3429
3430 # Placing this variable here prevents from forking libvpx, used
3431 # by remoting. Remoting is off, so it needn't built,
3432 # so forking it's deps seems like overkill.
3433 # But this variable need defined to properly run gyp.
3434 # A proper solution is to have an OS==android conditional
3435 # in third_party/libvpx/libvpx.gyp to define it.
3436 'libvpx_path': 'lib/linux/arm',
3437 },
3438 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013439 'variables': {
3440 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593441 'conditions': [
3442 # If we're using the components build, append "cr" to all shared
3443 # libraries to avoid naming collisions with android system library
3444 # versions with the same name (e.g. skia, icu).
3445 ['component=="shared_library"', {
3446 'android_product_extension': 'cr.so',
3447 }, {
3448 'android_product_extension': 'so',
3449 } ],
3450 ],
[email protected]8a37e4502012-08-14 22:42:553451 },
[email protected]da1c8d692011-09-20 20:35:013452 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593453 ['_type=="shared_library"', {
3454 'product_extension': '<(android_product_extension)',
3455 }],
3456
[email protected]da1c8d692011-09-20 20:35:013457 # Settings for building device targets using Android's toolchain.
3458 # These are based on the setup.mk file from the Android NDK.
3459 #
3460 # The NDK Android executable link step looks as follows:
3461 # $LDFLAGS
3462 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3463 # $(PRIVATE_OBJECTS) <-- The .o that we built
3464 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3465 # $(TARGET_LIBGCC) <-- libgcc.a
3466 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3467 # $(PRIVATE_LDLIBS) <-- System .so
3468 # $(TARGET_CRTEND_O) <-- crtend.o
3469 #
3470 # For now the above are approximated for executables by adding
3471 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3472 # of 'libraries'.
3473 #
3474 # The NDK Android shared library link step looks as follows:
3475 # $LDFLAGS
3476 # $(PRIVATE_OBJECTS) <-- The .o that we built
3477 # -l,--whole-archive
3478 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3479 # -l,--no-whole-archive
3480 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3481 # $(TARGET_LIBGCC) <-- libgcc.a
3482 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3483 # $(PRIVATE_LDLIBS) <-- System .so
3484 #
[email protected]ad17e342012-07-17 20:45:483485 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013486 #
3487 # For both executables and shared libraries, add the proper
3488 # libgcc.a to the start of libraries which puts it in the
3489 # proper spot after .o and .a files get linked in.
3490 #
3491 # TODO: The proper thing to do longer-tem would be proper gyp
3492 # support for a custom link command line.
3493 ['_toolset=="target"', {
3494 'cflags!': [
3495 '-pthread', # Not supported by Android toolchain.
3496 ],
3497 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013498 '-ffunction-sections',
3499 '-funwind-tables',
3500 '-g',
3501 '-fstack-protector',
3502 '-fno-short-enums',
3503 '-finline-limit=64',
3504 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013505 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013506 ],
3507 'defines': [
3508 'ANDROID',
3509 '__GNU_SOURCE=1', # Necessary for clone()
3510 'USE_STLPORT=1',
3511 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173512 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013513 ],
3514 'ldflags!': [
3515 '-pthread', # Not supported by Android toolchain.
3516 ],
3517 'ldflags': [
3518 '-nostdlib',
3519 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013520 # Don't export symbols from statically linked libraries.
3521 '-Wl,--exclude-libs=ALL',
3522 ],
[email protected]a0e48b02011-11-22 07:53:013523 'libraries': [
3524 '-l<(android_stlport_library)',
3525 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043526 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013527 '-lc',
3528 '-ldl',
3529 '-lstdc++',
3530 '-lm',
[email protected]da1c8d692011-09-20 20:35:013531 ],
3532 'conditions': [
[email protected]806b5232012-11-19 21:19:043533 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473534 'ldflags!': [
3535 '-Wl,--exclude-libs=ALL',
3536 ],
[email protected]806b5232012-11-19 21:19:043537 }],
[email protected]220ea5932012-08-09 10:44:073538 ['clang==1', {
3539 'cflags': [
3540 # Work around incompatibilities between bionic and clang
3541 # headers.
3542 '-D__compiler_offsetof=__builtin_offsetof',
3543 '-Dnan=__builtin_nan',
3544 ],
3545 'conditions': [
3546 ['target_arch=="arm"', {
3547 'cflags': [
3548 '-target arm-linux-androideabi',
3549 '-mllvm -arm-enable-ehabi',
3550 ],
3551 'ldflags': [
3552 '-target arm-linux-androideabi',
3553 ],
3554 }],
3555 ['target_arch=="ia32"', {
3556 'cflags': [
3557 '-target x86-linux-androideabi',
3558 ],
3559 'ldflags': [
3560 '-target x86-linux-androideabi',
3561 ],
3562 }],
3563 ],
3564 }],
[email protected]ed70ed1862012-11-07 12:11:253565 ['asan==1', {
3566 'cflags': [
3567 # Android build relies on -Wl,--gc-sections removing
3568 # unreachable code. ASan instrumentation for globals inhibits
3569 # this and results in a library with unresolvable relocations.
3570 # TODO(eugenis): find a way to reenable this.
3571 '-mllvm -asan-globals=0',
3572 ],
3573 }],
[email protected]d999c3cb2013-03-12 10:22:363574 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463575 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573576 # The NDK has these things, but doesn't define the constants
3577 # to say that it does. Define them here instead.
3578 'HAVE_SYS_UIO_H',
3579 ],
3580 'cflags': [
3581 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463582 ],
[email protected]da1c8d692011-09-20 20:35:013583 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523584 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013585 ],
3586 }],
[email protected]d999c3cb2013-03-12 10:22:363587 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083588 'include_dirs': [
3589 # OpenAL headers from the Android tree.
3590 '<(android_src)/frameworks/wilhelm/include',
3591 ],
3592 'cflags': [
[email protected]04882132012-11-21 12:40:453593 # Android predefines this as 1; undefine it here so Chromium
3594 # can redefine it later to be 2 for chromium code and unset
3595 # for third party code. This works because cflags are added
3596 # before defines.
3597 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553598 # Disable any additional warnings enabled by the Android build system but which
3599 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083600 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553601 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3602 '-Wno-ignored-qualifiers',
3603 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083604 ],
3605 'cflags_cc': [
3606 # Disabling c++0x-compat should be handled in WebKit, but
3607 # this currently doesn't work because gcc_version is not set
3608 # correctly when building with the Android build system.
3609 # TODO(torne): Fix this in WebKit.
3610 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163611 # Other things unrelated to -Wextra:
3612 '-Wno-non-virtual-dtor',
3613 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083614 ],
3615 }],
[email protected]d999c3cb2013-03-12 10:22:363616 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083617 'cflags': [
3618 # There is a class of warning which:
3619 # 1) Android always enables and also treats as errors
3620 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163621 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553622 '-Wno-address',
3623 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553624 '-Wno-return-type',
3625 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083626 ],
[email protected]2f34a202013-03-11 13:59:163627 'cflags_cc': [
3628 '-Wno-non-virtual-dtor',
3629 ]
[email protected]0d7291e2012-10-04 19:16:083630 }],
[email protected]febd3572012-05-03 09:17:453631 ['target_arch == "arm"', {
3632 'ldflags': [
3633 # Enable identical code folding to reduce size.
3634 '-Wl,--icf=safe',
3635 ],
3636 }],
[email protected]da1c8d692011-09-20 20:35:013637 # NOTE: The stlport header include paths below are specified in
3638 # cflags rather than include_dirs because they need to come
3639 # after include_dirs. Think of them like system headers, but
3640 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3641 # toolchain (circa Gingerbread) will exhibit strange errors.
3642 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513643 ['use_system_stlport==1', {
3644 'cflags': [
3645 # For libstdc++/include, which is used by stlport.
3646 '-I<(android_src)/bionic',
3647 '-I<(android_src)/external/stlport/stlport',
3648 ],
3649 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013650 'cflags': [
[email protected]225ec632013-04-03 18:20:223651 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013652 ],
[email protected]225ec632013-04-03 18:20:223653 'ldflags': [
3654 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013655 ],
3656 }],
3657 ['target_arch=="ia32"', {
3658 # The x86 toolchain currently has problems with stack-protector.
3659 'cflags!': [
3660 '-fstack-protector',
3661 ],
3662 'cflags': [
3663 '-fno-stack-protector',
3664 ],
3665 }],
3666 ],
3667 'target_conditions': [
3668 ['_type=="executable"', {
3669 'ldflags': [
3670 '-Bdynamic',
3671 '-Wl,-dynamic-linker,/system/bin/linker',
3672 '-Wl,--gc-sections',
3673 '-Wl,-z,nocopyreloc',
3674 # crtbegin_dynamic.o should be the last item in ldflags.
3675 '<(android_ndk_lib)/crtbegin_dynamic.o',
3676 ],
3677 'libraries': [
3678 # crtend_android.o needs to be the last item in libraries.
3679 # Do not add any libraries after this!
3680 '<(android_ndk_lib)/crtend_android.o',
3681 ],
[email protected]63a131fd2012-11-06 16:01:213682 'conditions': [
3683 ['asan==1', {
3684 'cflags': [
3685 '-fPIE',
3686 ],
3687 'ldflags': [
3688 '-pie',
3689 ],
3690 }],
3691 ],
[email protected]da1c8d692011-09-20 20:35:013692 }],
[email protected]f5c7758a2012-07-25 16:17:573693 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013694 'ldflags': [
3695 '-Wl,-shared,-Bsymbolic',
3696 ],
[email protected]d093fe8b2013-04-30 18:00:233697 'conditions': [
3698 ['android_webview_build==0', {
3699 'ldflags': [
3700 # crtbegin_so.o should be the last item in ldflags.
3701 '<(android_ndk_lib)/crtbegin_so.o',
3702 ],
3703 'libraries': [
3704 # crtend_so.o needs to be the last item in libraries.
3705 # Do not add any libraries after this!
3706 '<(android_ndk_lib)/crtend_so.o',
3707 ],
3708 }],
[email protected]a08029b42012-04-25 03:18:463709 ],
[email protected]da1c8d692011-09-20 20:35:013710 }],
[email protected]7b1eac42013-05-09 20:55:133711 # ndk-build copies .a's around the filesystem, breaking
3712 # relative paths in thin archives. Disable using thin
3713 # archives to avoid problems until one of these is fixed:
3714 # http://code.google.com/p/android/issues/detail?id=40302
3715 # http://code.google.com/p/android/issues/detail?id=40303
3716 ['_type=="static_library"', {
3717 'standalone_static_library': 1,
3718 }],
[email protected]da1c8d692011-09-20 20:35:013719 ],
3720 }],
3721 # Settings for building host targets using the system toolchain.
3722 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123723 'cflags!': [
3724 # Due to issues in Clang build system, using ASan on 32-bit
3725 # binaries on x86_64 host is problematic.
3726 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563727 '-fsanitize=address',
3728 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123729 ],
[email protected]da1c8d692011-09-20 20:35:013730 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443731 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013732 '-Wl,-z,noexecstack',
3733 '-Wl,--gc-sections',
3734 '-Wl,-O1',
3735 '-Wl,--as-needed',
3736 ],
[email protected]965b6b22011-09-29 16:07:283737 'sources/': [
3738 ['exclude', '_android(_unittest)?\\.cc$'],
3739 ['exclude', '(^|/)android/']
3740 ],
[email protected]da1c8d692011-09-20 20:35:013741 }],
[email protected]0ccf578f2013-03-13 11:13:393742 # Settings for building host targets on mac.
3743 ['_toolset=="host" and host_os=="mac"', {
3744 'ldflags!': [
3745 '-Wl,-z,now',
3746 '-Wl,-z,relro',
3747 ],
3748 }],
[email protected]da1c8d692011-09-20 20:35:013749 ],
3750 },
3751 }],
[email protected]93f21e42010-04-01 00:35:153752 ['OS=="solaris"', {
3753 'cflags!': ['-fvisibility=hidden'],
3754 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3755 }],
[email protected]1e013672012-06-29 22:12:203756 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553757 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423758 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553759 'xcode_settings': {
3760 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243761 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3762 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043763 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3764 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043765 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3766 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3767 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253768 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3769 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043770 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3771 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3772 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3773 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553774 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043775 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553776 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043777 'WARNING_CFLAGS': [
3778 '-Wall',
3779 '-Wendif-labels',
3780 '-Wextra',
3781 # Don't warn about unused function parameters.
3782 '-Wno-unused-parameter',
3783 # Don't warn about the "struct foo f = {0};" initialization
3784 # pattern.
3785 '-Wno-missing-field-initializers',
3786 ],
[email protected]b3fb8092009-03-12 19:09:243787 'conditions': [
3788 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593789 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3790 ],
[email protected]2936b8c2012-10-29 10:57:313791 # Note that the prebuilt Clang binaries should not be used for iOS
3792 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283793 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303794 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3795 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383796
[email protected]6c648f12011-12-24 07:50:433797 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533798 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433799 # override keyword is used via the OVERRIDE macro from
3800 # base/compiler_specific.h.
3801 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443802 # Warn if automatic synthesis is triggered with
3803 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533804 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303805 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283806 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073807 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523808
3809 # This warns on using ints as initializers for floats in
3810 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3811 # which happens in several places in chrome code. Not sure if
3812 # this is worth fixing.
3813 '-Wno-c++11-narrowing',
3814
3815 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3816 # user-defined literals, this is now a string literal with a UD
3817 # suffix. However, this is used heavily in NaCl code, so disable
3818 # the warning for now.
3819 '-Wno-reserved-user-defined-literal',
3820
[email protected]66733172010-09-22 00:09:283821 # Don't die on dtoa code that uses a char as an array index.
3822 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3823 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073824
[email protected]25d3bb722010-11-22 14:31:453825 # Clang spots more unused functions.
3826 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103827
3828 # Warns on switches on enums that cover all enum values but
3829 # also contain a default: branch. Chrome is full of that.
3830 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513831
3832 # Warns when a const char[] is converted to bool.
3833 '-Wstring-conversion',
[email protected]361b47c2013-07-02 15:13:243834
3835 # Clang considers the `register` keyword as deprecated, but e.g.
3836 # code generated by flex (used in angle) contains that keyword.
3837 # http://crbug.com/255186
3838 '-Wno-deprecated-register',
[email protected]66733172010-09-22 00:09:283839 ],
[email protected]c67e8ca2012-12-04 16:01:523840 'OTHER_CPLUSPLUSFLAGS': [
[email protected]a7cd1a52013-05-09 00:27:443841 # gnu++11 instead of c++11 is needed because some code uses
3842 # typeof() (a GNU extension).
[email protected]c67e8ca2012-12-04 16:01:523843 # TODO(thakis): Eventually switch this to c++11 instead of
3844 # gnu++11 (once typeof can be removed, which is blocked on c++11
3845 # being available everywhere).
[email protected]a7cd1a52013-05-09 00:27:443846 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3847 # bots use xcode 4 -- http://crbug.com/147515).
[email protected]c67e8ca2012-12-04 16:01:523848 '$(inherited)', '-std=gnu++11',
3849 ],
[email protected]66733172010-09-22 00:09:283850 }],
[email protected]2fccd422013-05-21 21:27:573851 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:463852 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313853 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463854 ],
3855 }],
[email protected]4a9ac22e2011-12-02 03:41:533856 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593857 'OTHER_CFLAGS': [
3858 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533859 ],
3860 }],
3861 ['clang==1 and clang_add_plugin!=""', {
3862 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593863 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3864 ],
3865 }],
[email protected]2616d45d2012-01-19 03:15:483866 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3867 'OTHER_CFLAGS': [
3868 # See http://crbug.com/110262
3869 '-fcolor-diagnostics',
3870 ],
3871 }],
[email protected]b3fb8092009-03-12 19:09:243872 ],
[email protected]2f80c312009-02-25 21:26:553873 },
[email protected]34f40892011-09-06 21:53:303874 'conditions': [
3875 ['clang==1', {
3876 'variables': {
3877 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3878 },
3879 }],
[email protected]921c7b52011-11-25 10:34:353880 ['asan==1', {
3881 'xcode_settings': {
3882 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563883 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373884 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563885 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353886 ],
[email protected]921c7b52011-11-25 10:34:353887 },
3888 'defines': [
3889 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:393890 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:353891 ],
3892 }],
[email protected]34f40892011-09-06 21:53:303893 ],
[email protected]2f80c312009-02-25 21:26:553894 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553895 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463896 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083897 'conditions': [
3898 ['asan==1', {
3899 'xcode_settings': {
3900 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443901 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083902 ],
3903 },
3904 }],
3905 ],
[email protected]5d7dc972009-04-16 15:30:463906 }],
3907 ['_mac_bundle', {
3908 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313909 'target_conditions': [
3910 ['_type=="executable"', {
3911 'conditions': [
3912 ['asan==1', {
3913 'postbuilds': [
3914 {
3915 'variables': {
3916 # Define copy_asan_dylib_path in a variable ending in
3917 # _path so that gyp understands it's a path and
3918 # performs proper relativization during dict merging.
3919 'copy_asan_dylib_path':
3920 'mac/copy_asan_runtime_dylib.sh',
3921 },
3922 'postbuild_name': 'Copy ASan runtime dylib',
3923 'action': [
3924 '<(copy_asan_dylib_path)',
3925 ],
3926 },
3927 ],
3928 }],
3929 ],
3930 }],
3931 ],
[email protected]87fde4a2009-02-28 00:50:083932 }],
[email protected]2936b8c2012-10-29 10:57:313933 ], # target_conditions
3934 }, # target_defaults
3935 }], # OS=="mac" or OS=="ios"
3936 ['OS=="mac"', {
3937 'target_defaults': {
3938 'variables': {
3939 # These should end with %, but there seems to be a bug with % in
3940 # variables that are intended to be set to different values in
3941 # different targets, like these.
3942 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313943 # Strip debugging symbols from the target.
3944 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373945 'conditions': [
3946 ['asan==1', {
3947 'conditions': [
3948 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353949 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373950 }, {
3951 'mac_real_dsym': '<(mac_want_real_dsym)'
3952 }],
3953 ],
3954 }, {
3955 'conditions': [
3956 ['mac_want_real_dsym=="default"', {
3957 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3958 }, {
3959 'mac_real_dsym': '<(mac_want_real_dsym)'
3960 }],
3961 ],
3962 }],
3963 ],
[email protected]2936b8c2012-10-29 10:57:313964 },
3965 'xcode_settings': {
3966 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3967 # (Equivalent to -fPIC)
3968 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3969 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3970 # Keep pch files below xcodebuild/.
3971 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3972 'OTHER_CFLAGS': [
3973 '-fno-strict-aliasing', # See http://crbug.com/32204
3974 ],
3975 },
3976 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103977 ['_type=="executable"', {
3978 'postbuilds': [
3979 {
3980 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363981 # code execution when running on Mac OS X 10.7 ("Lion"), and
3982 # ensures that the position-independent executable (PIE) bit
3983 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103984 'variables': {
[email protected]8c40f322011-08-24 03:33:363985 # Define change_mach_o_flags in a variable ending in _path
3986 # so that GYP understands it's a path and performs proper
3987 # relativization during dict merging.
3988 'change_mach_o_flags_path':
3989 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173990 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133991 ],
3992 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173993 ['mac_pie==0 or release_valgrind_build==1', {
3994 # Don't enable PIE if it's unwanted. It's unwanted if
3995 # the target specifies mac_pie=0 or if building for
3996 # Valgrind, because Valgrind doesn't understand slide.
3997 # See the similar mac_pie/release_valgrind_build check
3998 # below.
[email protected]081c0342011-08-24 14:59:133999 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134000 '--no-pie',
4001 ],
4002 }],
4003 ],
[email protected]6303fed2011-08-11 01:12:104004 },
[email protected]8c40f322011-08-24 03:33:364005 'postbuild_name': 'Change Mach-O Flags',
4006 'action': [
4007 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134008 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364009 ],
[email protected]6303fed2011-08-11 01:12:104010 },
4011 ],
[email protected]5a5d97aa2011-09-02 15:34:004012 'conditions': [
4013 ['asan==1', {
4014 'variables': {
4015 'asan_saves_file': 'asan.saves',
4016 },
4017 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:564018 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:004019 },
4020 }],
4021 ],
[email protected]162407f2011-09-08 15:33:174022 'target_conditions': [
4023 ['mac_pie==1 and release_valgrind_build==0', {
4024 # Turn on position-independence (ASLR) for executables. When
4025 # PIE is on for the Chrome executables, the framework will
4026 # also be subject to ASLR.
4027 # Don't do this when building for Valgrind, because Valgrind
4028 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4029 # understand slide, and get rid of the Valgrind check.
4030 'xcode_settings': {
4031 'OTHER_LDFLAGS': [
4032 '-Wl,-pie', # Position-independent executable (MH_PIE)
4033 ],
4034 },
4035 }],
4036 ],
[email protected]6a0242bc2011-07-01 00:34:464037 }],
[email protected]9a5e72862010-09-02 16:16:584038 ['(_type=="executable" or _type=="shared_library" or \
4039 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204040 'target_conditions': [
4041 ['mac_real_dsym == 1', {
4042 # To get a real .dSYM bundle produced by dsymutil, set the
4043 # debug information format to dwarf-with-dsym. Since
4044 # strip_from_xcode will not be used, set Xcode to do the
4045 # stripping as well.
4046 'configurations': {
[email protected]5153767c2009-12-22 01:52:504047 'Release_Base': {
[email protected]24700642009-06-01 16:01:204048 'xcode_settings': {
4049 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4050 'DEPLOYMENT_POSTPROCESSING': 'YES',
4051 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074052 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254053 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074054 # The Xcode default is to strip debugging symbols
4055 # only (-S). Local symbols should be stripped as
4056 # well, which will be handled by -x. Xcode will
4057 # continue to insert -S when stripping even when
4058 # additional flags are added with STRIPFLAGS.
4059 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404060 }], # _type=="shared_library" or _type=="loadable_module"
4061 ['_type=="executable"', {
4062 'conditions': [
4063 ['asan==1', {
4064 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4065 }]
4066 ],
4067 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074068 ], # target_conditions
4069 }, # xcode_settings
4070 }, # configuration "Release"
4071 }, # configurations
[email protected]24700642009-06-01 16:01:204072 }, { # mac_real_dsym != 1
4073 # To get a fast fake .dSYM bundle, use a post-build step to
4074 # produce the .dSYM and strip the executable. strip_from_xcode
4075 # only operates in the Release configuration.
4076 'postbuilds': [
4077 {
4078 'variables': {
4079 # Define strip_from_xcode in a variable ending in _path
4080 # so that gyp understands it's a path and performs proper
4081 # relativization during dict merging.
4082 'strip_from_xcode_path': 'mac/strip_from_xcode',
4083 },
4084 'postbuild_name': 'Strip If Needed',
4085 'action': ['<(strip_from_xcode_path)'],
4086 },
[email protected]e14a9f92009-08-05 19:26:074087 ], # postbuilds
4088 }], # mac_real_dsym
4089 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584090 }], # (_type=="executable" or _type=="shared_library" or
4091 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074092 ], # target_conditions
4093 }, # target_defaults
4094 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204095 ['OS=="ios"', {
4096 'target_defaults': {
4097 'xcode_settings' : {
4098 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4099
4100 # This next block is mostly common with the 'mac' section above,
4101 # but keying off (or setting) 'clang' isn't valid for iOS as it
4102 # also seems to mean using the custom build of clang.
4103
[email protected]e31ef5b2013-05-21 11:08:494104 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4105 # section above).
4106 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]1e013672012-06-29 22:12:204107 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:534108 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:204109 # override keyword is used via the OVERRIDE macro from
4110 # base/compiler_specific.h.
4111 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:444112 # Warn if automatic synthesis is triggered with
4113 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534114 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204115 'WARNING_CFLAGS': [
4116 '-Wheader-hygiene',
4117 # Don't die on dtoa code that uses a char as an array index.
4118 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4119 '-Wno-char-subscripts',
4120 # Clang spots more unused functions.
4121 '-Wno-unused-function',
4122 # See comments on this flag higher up in this file.
4123 '-Wno-unnamed-type-template-args',
[email protected]e31ef5b2013-05-21 11:08:494124 # Match OS X clang C++11 warning settings.
4125 '-Wno-c++11-narrowing',
4126 '-Wno-reserved-user-defined-literal',
[email protected]1e013672012-06-29 22:12:204127 ],
4128 },
4129 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474130 ['_toolset=="host"', {
4131 'xcode_settings': {
4132 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4133 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4134 },
4135 }],
4136 ['_toolset=="target"', {
4137 'xcode_settings': {
4138 # This section should be for overriding host settings. But,
4139 # since we can't negate the iphone deployment target above, we
4140 # instead set it here for target only.
4141 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4142 },
4143 }],
[email protected]1e013672012-06-29 22:12:204144 ['_type=="executable"', {
4145 'configurations': {
4146 'Release_Base': {
4147 'xcode_settings': {
4148 'DEPLOYMENT_POSTPROCESSING': 'YES',
4149 'STRIP_INSTALLED_PRODUCT': 'YES',
4150 },
4151 },
[email protected]3c6aa862012-11-05 17:11:444152 'Debug_Base': {
4153 'xcode_settings': {
4154 # Remove dSYM to reduce build time.
4155 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4156 },
4157 },
[email protected]1e013672012-06-29 22:12:204158 },
[email protected]0286b6f2013-05-03 11:06:404159 'conditions': [
[email protected]8dec8fc52013-05-23 23:05:054160 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404161 'xcode_settings': {
[email protected]8dec8fc52013-05-23 23:05:054162 # TODO(justincohen): ninja builds don't support signing yet.
[email protected]0286b6f2013-05-03 11:06:404163 'conditions': [
4164 ['chromium_ios_signing', {
4165 # iOS SDK wants everything for device signed.
4166 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4167 }, {
4168 'CODE_SIGNING_REQUIRED': 'NO',
4169 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4170 }],
4171 ],
4172 },
4173 }],
[email protected]8dec8fc52013-05-23 23:05:054174 ['"<(GENERATOR)"=="xcode" and clang!=1', {
4175 'xcode_settings': {
4176 # It is necessary to link with the -fobjc-arc flag to use
4177 # subscripting on iOS < 6.
4178 'OTHER_LDFLAGS': [
4179 '-fobjc-arc',
4180 ],
4181 },
4182 }],
4183 ['clang==1', {
4184 'target_conditions': [
4185 ['_toolset=="target"', {
4186 'variables': {
4187 'developer_dir': '<!(xcode-select -print-path)',
4188 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc',
4189 },
4190 # It is necessary to force load libarclite from Xcode for
4191 # third_party/llvm-build because libarclite_* is only
4192 # distributed by Xcode.
4193 'conditions': [
4194 ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', {
4195 'xcode_settings': {
4196 'OTHER_LDFLAGS': [
4197 '-force_load',
4198 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4199 ],
4200 },
4201 }],
4202 ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', {
4203 'xcode_settings': {
4204 'OTHER_LDFLAGS': [
4205 '-force_load',
4206 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4207 ],
4208 },
4209 }],
4210 # Xcode sets target_arch at compile-time.
4211 ['"<(GENERATOR)"=="xcode"', {
4212 'xcode_settings': {
4213 'OTHER_LDFLAGS[arch=armv7]': [
[email protected]86671442013-06-11 13:25:124214 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054215 '-force_load',
4216 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4217 ],
4218 'OTHER_LDFLAGS[arch=i386]': [
[email protected]86671442013-06-11 13:25:124219 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054220 '-force_load',
4221 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4222 ],
4223 },
4224 }],
4225 ],
4226 }],
4227 ],
4228 }],
[email protected]0286b6f2013-05-03 11:06:404229 ],
[email protected]1e013672012-06-29 22:12:204230 }],
4231 ], # target_conditions
4232 }, # target_defaults
4233 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554234 ['OS=="win"', {
4235 'target_defaults': {
4236 'defines': [
[email protected]8e345da2012-07-01 22:10:304237 '_WIN32_WINNT=0x0602',
4238 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554239 'WIN32',
4240 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554241 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284242 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554243 '_CRT_RAND_S',
4244 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4245 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274246 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554247 ],
[email protected]8974e042010-06-21 18:06:524248 'conditions': [
[email protected]2212d272011-12-20 21:37:374249 ['buildtype=="Official"', {
4250 # In official builds, targets can self-select an optimization
4251 # level by defining a variable named 'optimize', and setting it
4252 # to one of
4253 # - "size", optimizes for minimal code size - the default.
4254 # - "speed", optimizes for speed over code size.
4255 # - "max", whole program optimization and link-time code
4256 # generation. This is very expensive and should be used
4257 # sparingly.
4258 'variables': {
4259 'optimize%': 'size',
4260 },
4261 'target_conditions': [
4262 ['optimize=="size"', {
4263 'msvs_settings': {
4264 'VCCLCompilerTool': {
4265 # 1, optimizeMinSpace, Minimize Size (/O1)
4266 'Optimization': '1',
4267 # 2, favorSize - Favor small code (/Os)
4268 'FavorSizeOrSpeed': '2',
4269 },
4270 },
4271 },
4272 ],
4273 ['optimize=="speed"', {
4274 'msvs_settings': {
4275 'VCCLCompilerTool': {
4276 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4277 'Optimization': '2',
4278 # 1, favorSpeed - Favor fast code (/Ot)
4279 'FavorSizeOrSpeed': '1',
4280 },
4281 },
4282 },
4283 ],
4284 ['optimize=="max"', {
4285 'msvs_settings': {
4286 'VCCLCompilerTool': {
4287 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4288 'Optimization': '2',
4289 # 1, favorSpeed - Favor fast code (/Ot)
4290 'FavorSizeOrSpeed': '1',
4291 # This implies link time code generation.
4292 'WholeProgramOptimization': 'true',
4293 },
4294 },
4295 },
4296 ],
4297 ],
4298 },
4299 ],
[email protected]8974e042010-06-21 18:06:524300 ['component=="static_library"', {
4301 'defines': [
4302 '_HAS_EXCEPTIONS=0',
4303 ],
4304 }],
[email protected]3e2648a2011-03-21 20:58:504305 ['secure_atl', {
4306 'defines': [
4307 '_SECURE_ATL',
4308 ],
4309 }],
[email protected]54184ce72012-10-18 07:11:264310 ['msvs_express', {
4311 'configurations': {
4312 'x86_Base': {
4313 'msvs_settings': {
4314 'VCLinkerTool': {
4315 'AdditionalLibraryDirectories':
4316 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4317 },
4318 'VCLibrarianTool': {
4319 'AdditionalLibraryDirectories':
4320 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4321 },
4322 },
4323 },
4324 'x64_Base': {
4325 'msvs_settings': {
4326 'VCLibrarianTool': {
4327 'AdditionalLibraryDirectories':
4328 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4329 },
4330 'VCLinkerTool': {
4331 'AdditionalLibraryDirectories':
4332 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4333 },
4334 },
4335 },
4336 },
4337 'msvs_settings': {
4338 'VCLinkerTool': {
4339 # Explicitly required when using the ATL with express
4340 'AdditionalDependencies': ['atlthunk.lib'],
4341
4342 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4343 # almost eight hundred LNK4254 and LNK4078 warnings:
4344 # - warning LNK4254: section 'ATL' (50000040) merged into
4345 # '.rdata' (40000040) with different attributes
4346 # - warning LNK4078: multiple 'ATL' sections found with
4347 # different attributes
4348 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4349 },
4350 },
4351 'msvs_system_include_dirs': [
4352 '<(windows_driver_kit_path)/inc/atl71',
4353 '<(windows_driver_kit_path)/inc/mfc42',
4354 ],
4355 }],
[email protected]8974e042010-06-21 18:06:524356 ],
[email protected]5b5ca7cb2009-07-20 23:00:204357 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054358 '<(windows_sdk_path)/Include/shared',
4359 '<(windows_sdk_path)/Include/um',
4360 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554361 '$(VSInstallDir)/VC/atlmfc/include',
4362 ],
[email protected]a8d99cef2009-08-26 20:47:494363 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004364 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114365 # TODO(maruel): These warnings are level 4. They will be slowly
4366 # removed as code is fixed.
4367 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004368 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4369 4706,
[email protected]942c3a60f2011-05-03 02:04:114370 ],
[email protected]2f80c312009-02-25 21:26:554371 'msvs_settings': {
4372 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444373 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554374 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554375 'BufferSecurityCheck': 'true',
4376 'EnableFunctionLevelLinking': 'true',
4377 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114378 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554379 'WarnAsError': 'true',
4380 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584381 'conditions': [
[email protected]8974e042010-06-21 18:06:524382 ['component=="shared_library"', {
4383 'ExceptionHandling': '1', # /EHsc
4384 }, {
4385 'ExceptionHandling': '0',
4386 }],
[email protected]3fef6e62009-07-31 19:58:584387 ],
[email protected]2f80c312009-02-25 21:26:554388 },
4389 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164390 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374391 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054392 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374393 ],
[email protected]2f80c312009-02-25 21:26:554394 },
4395 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554396 'AdditionalDependencies': [
4397 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504398 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554399 'version.lib',
4400 'msimg32.lib',
4401 'ws2_32.lib',
4402 'usp10.lib',
4403 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084404 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484405 'winmm.lib',
4406 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554407 ],
[email protected]a78da50e2010-06-09 21:31:374408 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054409 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374410 ],
[email protected]2f80c312009-02-25 21:26:554411 'GenerateDebugInformation': 'true',
4412 'MapFileName': '$(OutDir)\\$(TargetName).map',
4413 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554414 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484415 # SubSystem values:
4416 # 0 == not set
4417 # 1 == /SUBSYSTEM:CONSOLE
4418 # 2 == /SUBSYSTEM:WINDOWS
4419 # Most of the executables we'll ever create are tests
4420 # and utilities with console output.
4421 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554422 },
4423 'VCMIDLTool': {
4424 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094425 'TypeLibraryName': '$(InputName).tlb',
4426 'OutputDirectory': '$(IntDir)',
4427 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334428 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094429 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4430 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554431 },
4432 'VCResourceCompilerTool': {
4433 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384434 'AdditionalIncludeDirectories': [
4435 '<(DEPTH)',
4436 '<(SHARED_INTERMEDIATE_DIR)',
4437 ],
[email protected]2f80c312009-02-25 21:26:554438 },
4439 },
4440 },
4441 }],
[email protected]79e2336c2011-05-12 18:18:344442 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314443 'target_defaults': {
4444 'defines': [
4445 'DISABLE_NACL',
4446 ],
4447 },
4448 }],
[email protected]cfbf9bc2009-12-07 22:07:564449 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194450 'target_defaults': {
4451 'msvs_settings': {
4452 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194453 'DelayLoadDLLs': [
4454 'dbghelp.dll',
4455 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014456 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194457 'uxtheme.dll',
4458 ],
4459 },
4460 },
[email protected]ef4fa4072009-12-04 22:46:504461 'configurations': {
[email protected]5153767c2009-12-22 01:52:504462 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504463 'msvs_settings': {
4464 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164465 'AdditionalOptions': [
4466 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334467 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164468 '/ignore:4199',
4469 '/ignore:4221',
4470 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:434471 ],
4472 'conditions': [
4473 ['asan==0', {
4474 'AdditionalOptions': ['/largeaddressaware'],
4475 }],
[email protected]1f9471a2010-01-04 06:40:164476 ],
[email protected]ef4fa4072009-12-04 22:46:504477 },
4478 },
4479 },
[email protected]5153767c2009-12-22 01:52:504480 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504481 'msvs_settings': {
4482 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164483 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504484 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334485 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164486 '/ignore:4199',
4487 '/ignore:4221',
4488 '/nxcompat',
4489 ],
[email protected]ef4fa4072009-12-04 22:46:504490 },
4491 },
4492 },
4493 },
[email protected]48c7af72009-07-03 22:00:194494 },
4495 }],
[email protected]9821d0d2010-04-16 22:40:374496 ['enable_new_npdevice_api==1', {
4497 'target_defaults': {
4498 'defines': [
4499 'ENABLE_NEW_NPDEVICE_API',
4500 ],
4501 },
4502 }],
[email protected]5f683172013-04-27 01:53:194503 # Don't warn about the "typedef 'foo' locally defined but not used"
4504 # for gcc 4.8.
4505 # TODO: remove this flag once all builds work. See crbug.com/227506
4506 ['gcc_version>=48', {
4507 'target_defaults': {
4508 'cflags': [
4509 '-Wno-unused-local-typedefs',
4510 ],
4511 },
4512 }],
[email protected]220ea5932012-08-09 10:44:074513 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234514 'conditions': [
4515 ['OS=="android"', {
4516 # Android could use the goma with clang.
4517 'make_global_settings': [
4518 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4519 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4520 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4521 ['CC.host', '$(CC)'],
4522 ['CXX.host', '$(CXX)'],
4523 ['LINK.host', '$(LINK)'],
4524 ],
4525 }, {
4526 'make_global_settings': [
4527 ['CC', '<(make_clang_dir)/bin/clang'],
4528 ['CXX', '<(make_clang_dir)/bin/clang++'],
4529 ['LINK', '$(CXX)'],
4530 ['CC.host', '$(CC)'],
4531 ['CXX.host', '$(CXX)'],
4532 ['LINK.host', '$(LINK)'],
4533 ],
4534 }],
[email protected]34f40892011-09-06 21:53:304535 ],
4536 }],
[email protected]615fa6642012-08-14 19:17:074537 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274538 # Hardcode the compiler names in the Makefile so that
4539 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114540 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044541 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4542 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4543 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074544 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4545 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4546 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274547 ],
4548 }],
[email protected]23eea4a42013-04-27 04:10:264549 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464550 'make_global_settings': [
4551 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4552 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4553 ['LINK', '$(CXX)'],
4554 ['CC.host', '<!(which gcc)'],
4555 ['CXX.host', '<!(which g++)'],
4556 ['LINK.host', '<!(which g++)'],
4557 ],
4558 }],
[email protected]2f80c312009-02-25 21:26:554559 ],
4560 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504561 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4562 # This block adds *project-wide* configuration settings to each project
4563 # file. It's almost always wrong to put things here. Specify your
4564 # custom xcode_settings in target_defaults to add them to targets instead.
4565
[email protected]1e013672012-06-29 22:12:204566 'conditions': [
[email protected]fca3d812012-07-27 00:55:364567 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4568 # setting sets the SDK on a project-wide basis. In order to get the
4569 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4570 # here at the project level.
[email protected]2c261532012-10-06 00:46:294571 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364572 'conditions': [
[email protected]2c261532012-10-06 00:46:294573 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364574 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294575 }, {
4576 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364577 }],
4578 ],
[email protected]2c261532012-10-06 00:46:294579 }],
4580 ['OS=="ios"', {
4581 'conditions': [
4582 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404583 'conditions': [
4584 # TODO(justincohen): Ninja only supports simulator for now.
4585 ['"<(GENERATOR)"=="ninja"', {
4586 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
4587 }, {
4588 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4589 }],
4590 ],
[email protected]2c261532012-10-06 00:46:294591 }, {
4592 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4593 }],
4594 ],
[email protected]1e013672012-06-29 22:12:204595 }],
4596 ['OS=="ios"', {
[email protected]3c6aa862012-11-05 17:11:444597 # Just build armv7, until armv7s is correctly tested.
4598 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204599 # Target both iPhone and iPad.
4600 'TARGETED_DEVICE_FAMILY': '1,2',
4601 }],
[email protected]f9335b42013-01-24 21:00:234602 ['target_arch=="x64"', {
4603 'ARCHS': [
4604 'x86_64'
4605 ],
4606 }],
[email protected]1e013672012-06-29 22:12:204607 ],
[email protected]0c8ab452009-11-06 21:57:504608
[email protected]2f80c312009-02-25 21:26:554609 # The Xcode generator will look for an xcode_settings section at the root
4610 # of each dict and use it to apply settings on a file-wide basis. Most
4611 # settings should not be here, they should be in target-specific
4612 # xcode_settings sections, or better yet, should use non-Xcode-specific
4613 # settings in target dicts. SYMROOT is a special case, because many other
4614 # Xcode variables depend on it, including variables such as
4615 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4616 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4617 # files to appear (when present) in the UI as actual files and not red
4618 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4619 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164620 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554621 },
[email protected]ee28c9f2009-09-04 01:53:014622}