blob: c57f6c2d97842081d8d9bd966e82f95639013053 [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]8e553f42010-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"', {
[email protected]3f05e912013-04-11 20:38:342764 'ldflags': [
[email protected]933d0722013-07-03 04:32:492765 '-Wl,--fatal-warnings',
2766 # Only link with needed input sections. This is to avoid
2767 # getting undefined reference to __cxa_bad_typeid in the CDU
2768 # library.
[email protected]3f05e912013-04-11 20:38:342769 '-Wl,--gc-sections',
[email protected]933d0722013-07-03 04:32:492770 # Warn in case of text relocations.
2771 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:342772 ],
2773 }],
[email protected]fa9d4e262012-08-21 04:39:002774 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552775 # Some configurations are copied from Release_Base to reduce
2776 # the binary size.
2777 'variables': {
2778 'debug_optimize%': 's',
2779 },
[email protected]da1c8d692011-09-20 20:35:012780 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552781 '-fomit-frame-pointer',
2782 '-fdata-sections',
2783 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012784 ],
[email protected]8a37e4502012-08-14 22:42:552785 'ldflags': [
2786 '-Wl,-O1',
2787 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552788 ],
[email protected]da1c8d692011-09-20 20:35:012789 }],
[email protected]d4c0ec5b2013-03-10 03:07:452790 ['OS=="linux" and target_arch=="ia32"', {
2791 'ldflags': [
2792 '-Wl,--no-as-needed',
2793 ],
2794 }],
[email protected]da1c8d692011-09-20 20:35:012795 ],
[email protected]5315f2842009-04-28 00:43:272796 },
[email protected]5153767c2009-12-22 01:52:502797 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012798 'variables': {
2799 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512800 # Binaries become big and gold is unable to perform GC
2801 # and remove unused sections for some of test targets
2802 # on 32 bit platform.
2803 # (This is currently observed only in chromeos valgrind bots)
2804 # The following flag is to disable --gc-sections linker
2805 # option for these bots.
2806 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122807
2808 # TODO(bradnelson): reexamine how this is done if we change the
2809 # expansion of configurations
2810 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012811 },
[email protected]3aacaf952009-04-02 15:34:092812 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182813 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532814 # Don't emit the GCC version ident directives, they just end up
2815 # in the .comment section taking up binary size.
2816 '-fno-ident',
2817 # Put data and code in their own sections, so that unused symbols
2818 # can be removed at link time with --gc-sections.
2819 '-fdata-sections',
2820 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092821 ],
[email protected]c902f2c2010-08-06 20:04:182822 'ldflags': [
2823 # Specifically tell the linker to perform optimizations.
2824 # See http://lwn.net/Articles/192624/ .
2825 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222826 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182827 ],
[email protected]1dd529642010-05-15 01:02:512828 'conditions' : [
2829 ['no_gc_sections==0', {
2830 'ldflags': [
2831 '-Wl,--gc-sections',
2832 ],
2833 }],
[email protected]da1c8d692011-09-20 20:35:012834 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582835 'variables': {
2836 'release_optimize%': 's',
2837 },
[email protected]da1c8d692011-09-20 20:35:012838 'cflags': [
2839 '-fomit-frame-pointer',
2840 ],
[email protected]933d0722013-07-03 04:32:492841 'ldflags': [
2842 '-Wl,--fatal-warnings',
2843 # Warn in case of text relocations.
2844 '-Wl,--warn-shared-textrel',
2845 ],
[email protected]da1c8d692011-09-20 20:35:012846 }],
[email protected]ecf7b6482010-10-13 09:15:202847 ['clang==1', {
2848 'cflags!': [
2849 '-fno-ident',
2850 ],
2851 }],
[email protected]7664ab32011-02-01 23:35:252852 ['profiling==1', {
2853 'cflags': [
2854 '-fno-omit-frame-pointer',
2855 '-g',
2856 ],
[email protected]0358c4832013-06-23 14:17:582857 'conditions' : [
2858 ['profiling_full_stack_frames==1', {
2859 'cflags': [
2860 '-fno-inline',
2861 '-fno-optimize-sibling-calls',
2862 ],
2863 }],
2864 ],
[email protected]7664ab32011-02-01 23:35:252865 }],
[email protected]bdbe3d22013-02-22 04:10:352866 # Can be omitted to reduce output size. Does not seem to affect
2867 # crash reporting.
2868 ['target_arch=="ia32"', {
2869 'cflags': [
2870 '-fno-unwind-tables',
2871 '-fno-asynchronous-unwind-tables',
2872 ],
2873 }],
[email protected]8d726a42012-02-09 03:49:002874 ],
[email protected]3aacaf952009-04-02 15:34:092875 },
2876 },
[email protected]601b540222009-04-03 21:32:042877 'variants': {
2878 'coverage': {
2879 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2880 'ldflags': ['-fprofile-arcs'],
2881 },
2882 'profile': {
2883 'cflags': ['-pg', '-g'],
2884 'ldflags': ['-pg'],
2885 },
2886 'symbols': {
2887 'cflags': ['-g'],
2888 },
2889 },
[email protected]606116d22009-05-06 22:38:232890 'conditions': [
[email protected]04b482602011-09-14 02:36:212891 ['target_arch=="ia32"', {
2892 'target_conditions': [
2893 ['_toolset=="target"', {
2894 'asflags': [
2895 # Needed so that libs with .s files (e.g. libicudata.a)
2896 # are compatible with the general 32-bit-ness.
2897 '-32',
2898 ],
2899 # All floating-point computations on x87 happens in 80-bit
2900 # precision. Because the C and C++ language standards allow
2901 # the compiler to keep the floating-point values in higher
2902 # precision than what's specified in the source and doing so
2903 # is more efficient than constantly rounding up to 64-bit or
2904 # 32-bit precision as specified in the source, the compiler,
2905 # especially in the optimized mode, tries very hard to keep
2906 # values in x87 floating-point stack (in 80-bit precision)
2907 # as long as possible. This has important side effects, that
2908 # the real value used in computation may change depending on
2909 # how the compiler did the optimization - that is, the value
2910 # kept in 80-bit is different than the value rounded down to
2911 # 64-bit or 32-bit. There are possible compiler options to
2912 # make this behavior consistent (e.g. -ffloat-store would keep
2913 # all floating-values in the memory, thus force them to be
2914 # rounded to its original precision) but they have significant
2915 # runtime performance penalty.
2916 #
2917 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2918 # which keep floating-point values in SSE registers in its
2919 # native precision (32-bit for single precision, and 64-bit
2920 # for double precision values). This means the floating-point
2921 # value used during computation does not change depending on
2922 # how the compiler optimized the code, since the value is
2923 # always kept in its specified precision.
2924 'conditions': [
2925 ['branding=="Chromium" and disable_sse2==0', {
2926 'cflags': [
2927 '-march=pentium4',
2928 '-msse2',
2929 '-mfpmath=sse',
2930 ],
2931 }],
2932 # ChromeOS targets Pinetrail, which is sse3, but most of the
2933 # benefit comes from sse2 so this setting allows ChromeOS
2934 # to build on other CPUs. In the future -march=atom would
2935 # help but requires a newer compiler.
2936 ['chromeos==1 and disable_sse2==0', {
2937 'cflags': [
2938 '-msse2',
2939 ],
2940 }],
[email protected]0a0063c52013-03-29 06:36:212941 # Use gold linker for Android ia32 target.
2942 ['OS=="android"', {
2943 'cflags': [
2944 '-fuse-ld=gold',
2945 ],
2946 'ldflags': [
2947 '-fuse-ld=gold',
2948 ],
2949 }],
[email protected]04b482602011-09-14 02:36:212950 # Install packages have started cropping up with
2951 # different headers between the 32-bit and 64-bit
2952 # versions, so we have to shadow those differences off
2953 # and make sure a 32-bit-on-64-bit build picks up the
2954 # right files.
[email protected]32594022012-05-10 03:22:282955 # For android build, use NDK headers instead of host headers
2956 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212957 'include_dirs+': [
2958 '/usr/include32',
2959 ],
2960 }],
2961 ],
2962 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2963 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062964 'cflags': [
[email protected]04b482602011-09-14 02:36:212965 '-m32',
2966 '-mmmx',
2967 ],
2968 'ldflags': [
2969 '-m32',
[email protected]ffde7932009-05-29 00:39:062970 ],
2971 }],
[email protected]606116d22009-05-06 22:38:232972 ],
2973 }],
[email protected]3dda8a962009-08-10 18:58:072974 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292975 'target_conditions': [
2976 ['_toolset=="target"', {
2977 'cflags_cc': [
2978 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2979 # has changed whenever it encounters a varargs function. This
2980 # silences those warnings, as they are not helpful and
2981 # clutter legitimate warnings.
2982 '-Wno-abi',
2983 ],
2984 'conditions': [
[email protected]7d6763422013-04-26 12:06:542985 ['arm_arch!=""', {
2986 'cflags': [
2987 '-march=<(arm_arch)',
2988 ],
2989 }],
2990 ['arm_tune!=""', {
2991 'cflags': [
2992 '-mtune=<(arm_tune)',
2993 ],
2994 }],
2995 ['arm_fpu!=""', {
2996 'cflags': [
2997 '-mfpu=<(arm_fpu)',
2998 ],
2999 }],
3000 ['arm_float_abi!=""', {
3001 'cflags': [
3002 '-mfloat-abi=<(arm_float_abi)',
3003 ],
3004 }],
3005 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293006 'cflags': [
3007 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:293008 ]
3009 }],
[email protected]da1c8d692011-09-20 20:35:013010 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533011 # Most of the following flags are derived from what Android
3012 # uses by default when building for arm, reference for which
3013 # can be found in the following file in the Android NDK:
3014 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3015 'cflags': [
3016 # The tree-sra optimization (scalar replacement for
3017 # aggregates enabling subsequent optimizations) leads to
3018 # invalid code generation when using the Android NDK's
3019 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433020 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533021 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483022 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:533023 '-Wno-psabi',
3024 ],
[email protected]ad17e342012-07-17 20:45:483025 # Android now supports .relro sections properly.
3026 # NOTE: While these flags enable the generation of .relro
3027 # sections, the generated libraries can still be loaded on
3028 # older Android platform versions.
3029 'ldflags': [
3030 '-Wl,-z,relro',
3031 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483032 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483033 ],
[email protected]da1c8d692011-09-20 20:35:013034 'conditions': [
[email protected]7d6763422013-04-26 12:06:543035 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223036 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013037 }],
[email protected]4c48ef102012-11-29 22:00:383038 ['profiling==1', {
3039 'cflags': [
3040 '-marm', # Probably reduntant, but recommend by "perf" docs.
3041 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3042 ],
3043 }],
[email protected]220ea5932012-08-09 10:44:073044 ['clang==1', {
3045 'cflags!': [
3046 # Clang does not support the following options.
3047 '-mthumb-interwork',
3048 '-finline-limit=64',
3049 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483050 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073051 '-Wno-psabi',
3052 ],
3053 }],
[email protected]da1c8d692011-09-20 20:35:013054 ],
3055 }],
[email protected]3dda8a962009-08-10 18:58:073056 ],
3057 }],
3058 ],
3059 }],
[email protected]23eea4a42013-04-27 04:10:263060 ['target_arch=="mipsel"', {
3061 'target_conditions': [
3062 ['_toolset=="target"', {
3063 'conditions': [
[email protected]3a626e02013-06-27 12:58:343064 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263065 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343066 }],
3067 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263068 'cflags': ['-mips32', '-Wa,-mips32'],
3069 }],
3070 ],
3071 'cflags': [
3072 '-EL',
3073 '-mhard-float',
3074 ],
3075 'ldflags': [
3076 '-EL',
3077 '-Wl,--no-keep-memory'
3078 ],
3079 'cflags_cc': [
3080 '-Wno-uninitialized',
3081 ],
3082 }],
3083 ],
3084 }],
[email protected]2fb843b2010-08-12 02:11:083085 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583086 'cflags': [
3087 '-fPIC',
3088 ],
[email protected]d3f692b32011-12-14 19:04:353089 'ldflags': [
3090 '-fPIC',
3091 ],
[email protected]c76723a2010-01-25 23:10:583092 }],
[email protected]ee28c9f2009-09-04 01:53:013093 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573094 'target_conditions': [
3095 ['_toolset=="target"', {
3096 'cflags': [
3097 '--sysroot=<(sysroot)',
3098 ],
3099 'ldflags': [
3100 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153101 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573102 ],
3103 }]]
[email protected]ee28c9f2009-09-04 01:53:013104 }],
[email protected]58680ce2010-09-18 00:09:153105 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123106 'cflags': [
3107 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073108
[email protected]7ddcb1d2013-04-19 04:52:533109 # Don't die on dtoa code that uses a char as an array index.
3110 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073111
3112 # Clang spots more unused functions.
3113 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103114
3115 # Warns on switches on enums that cover all enum values but
3116 # also contain a default: branch. Chrome is full of that.
3117 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513118
3119 # Warns when a const char[] is converted to bool.
3120 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:123121 ],
3122 'cflags!': [
3123 # Clang doesn't seem to know know this flag.
3124 '-mfpmath=sse',
3125 ],
[email protected]58680ce2010-09-18 00:09:153126 }],
[email protected]bca3e082013-05-30 21:13:443127 ['clang==1 and OS!="android"', {
[email protected]8dec02e2013-04-30 21:40:073128 # Turn on C++11.
3129 'cflags': [
3130 # This warns on using ints as initializers for floats in
3131 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3132 # which happens in several places in chrome code. Not sure if
3133 # this is worth fixing.
3134 '-Wno-c++11-narrowing',
3135
3136 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3137 # user-defined literals, this is now a string literal with a UD
3138 # suffix. However, this is used heavily in NaCl code, so disable
3139 # the warning for now.
3140 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243141
3142 # Clang considers the `register` keyword as deprecated, but e.g.
3143 # code generated by flex (used in angle) contains that keyword.
3144 # http://crbug.com/255186
3145 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073146 ],
3147 'cflags_cc': [
3148 # See the comment in the Mac section for what it takes to move
3149 # this to -std=c++11.
3150 '-std=gnu++11',
3151 ],
3152 }],
[email protected]bca3e082013-05-30 21:13:443153 ['clang==1 and OS=="android"', {
[email protected]8dec02e2013-04-30 21:40:073154 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
3155 # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
3156 # Doesn't work with asan for some reason either: crbug.com/233464
3157 'cflags': [
[email protected]296bc452013-05-13 21:29:473158 # Especially needed for gtest macros using enum values from Mac
3159 # system headers.
3160 # TODO(pkasting): In C++11 this is legal, so this should be
3161 # removed when we change to that. (This is also why we don't
3162 # bother fixing all these cases today.)
3163 '-Wno-unnamed-type-template-args',
3164 # This (rightfully) complains about 'override', which we use
3165 # heavily.
[email protected]8dec02e2013-04-30 21:40:073166 '-Wno-c++11-extensions',
3167 ],
3168 }],
[email protected]5d451ad2011-02-11 16:43:463169 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263170 'cflags': [
[email protected]c872dc52012-05-19 06:36:313171 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263172 ],
[email protected]5d451ad2011-02-11 16:43:463173 }],
[email protected]4a9ac22e2011-12-02 03:41:533174 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263175 'cflags': [
3176 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533177 ],
3178 }],
3179 ['clang==1 and clang_add_plugin!=""', {
3180 'cflags': [
[email protected]d23720682011-08-11 00:16:263181 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3182 ],
[email protected]5e781232011-01-28 02:57:593183 }],
[email protected]49110f02013-04-22 22:51:343184 ['clang==1 and target_arch=="ia32"', {
3185 'cflags': [
3186 # Else building libyuv gives clang's register allocator issues,
3187 # see llvm.org/PR15798 / crbug.com/233709
3188 '-momit-leaf-frame-pointer',
3189 ],
3190 }],
[email protected]2616d45d2012-01-19 03:15:483191 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3192 'cflags': [
3193 # See http://crbug.com/110262
3194 '-fcolor-diagnostics',
3195 ],
3196 }],
[email protected]062522a2013-06-13 15:49:553197 # Common options for AddressSanitizer, LeakSanitizer,
3198 # ThreadSanitizer and MemorySanitizer.
3199 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543200 'target_conditions': [
3201 ['_toolset=="target"', {
3202 'cflags': [
3203 '-fno-omit-frame-pointer',
3204 '-gline-tables-only',
3205 ],
[email protected]49110f02013-04-22 22:51:343206 'ldflags!': [
3207 # Functions interposed by the sanitizers can make ld think
3208 # that some libraries aren't needed when they actually are,
3209 # http://crbug.com/234010. As workaround, disable --as-needed.
3210 '-Wl,--as-needed',
3211 ],
[email protected]2f047202013-06-14 06:36:393212 'defines': [
3213 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3214 ],
[email protected]cf351c22013-04-19 13:00:543215 }],
[email protected]a26740dd2013-05-28 11:50:493216 ['_toolset=="target" and OS=="linux"', {
3217 'ldflags': [
3218 # http://crbug.com/234010.
3219 '-lrt',
3220 ],
3221 }],
[email protected]cf351c22013-04-19 13:00:543222 ],
3223 }],
[email protected]92799b632011-08-15 14:33:063224 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423225 'target_conditions': [
3226 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453227 'cflags': [
[email protected]48688df02012-11-27 21:04:563228 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563229 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453230 ],
3231 'ldflags': [
[email protected]48688df02012-11-27 21:04:563232 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453233 ],
3234 'defines': [
3235 'ADDRESS_SANITIZER',
3236 ],
[email protected]1ffc3b3962012-05-16 14:08:423237 }],
[email protected]921c7b52011-11-25 10:34:353238 ],
[email protected]1d3bc322013-04-12 14:26:373239 'conditions': [
3240 ['OS=="mac"', {
3241 'cflags': [
3242 '-mllvm -asan-globals=0', # http://crbug.com/196561
3243 ],
3244 }],
3245 ],
[email protected]92799b632011-08-15 14:33:063246 }],
[email protected]062522a2013-06-13 15:49:553247 ['lsan==1', {
3248 'target_conditions': [
3249 ['_toolset=="target"', {
3250 'cflags': [
3251 '-fsanitize=leak',
3252 ],
3253 'ldflags': [
3254 '-fsanitize=leak',
3255 ],
3256 'defines': [
3257 'LEAK_SANITIZER',
3258 ],
3259 }],
3260 ],
3261 }],
[email protected]c9a829272012-07-04 07:51:123262 ['tsan==1', {
3263 'target_conditions': [
3264 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453265 'cflags': [
[email protected]927a9d672012-11-09 11:28:203266 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293267 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203268 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453269 ],
3270 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203271 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453272 ],
3273 'defines': [
3274 'THREAD_SANITIZER',
3275 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163276 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453277 ],
3278 'target_conditions': [
3279 ['_type=="executable"', {
3280 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123281 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453282 ],
3283 }],
3284 ],
[email protected]c9a829272012-07-04 07:51:123285 }],
3286 ],
3287 }],
[email protected]a10ddd2d2013-02-26 20:06:593288 ['msan==1', {
3289 'target_conditions': [
3290 ['_toolset=="target"', {
3291 'cflags': [
3292 '-fsanitize=memory',
3293 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593294 '-fPIC',
3295 ],
3296 'ldflags': [
3297 '-fsanitize=memory',
3298 ],
3299 'defines': [
3300 'MEMORY_SANITIZER',
3301 ],
3302 'target_conditions': [
3303 ['_type=="executable"', {
3304 'ldflags': [
3305 '-pie',
3306 ],
3307 }],
3308 ],
3309 }],
3310 ],
3311 }],
[email protected]8a48f3f2012-12-04 20:14:043312 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443313 'target_conditions' : [
3314 ['_toolset=="target"', {
3315 'cflags': [
3316 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453317 # Allow mmx intrinsics to inline, so that the
3318 # compiler can expand the intrinsics.
3319 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443320 ],
3321 }],
3322 ],
3323 }],
[email protected]cbd5fd52009-08-26 00:14:273324 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:273325 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:103326 }],
3327 ['linux_dump_symbols==1', {
3328 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253329 'conditions': [
[email protected]791262fe2013-02-21 17:20:153330 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253331 'target_conditions': [
3332 ['_toolset=="target"', {
3333 'ldflags': [
[email protected]567370a32013-03-01 00:11:233334 # Workaround for linker OOM.
3335 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253336 ],
3337 }],
3338 ],
3339 }],
3340 ],
[email protected]cbd5fd52009-08-26 00:14:273341 }],
[email protected]d8b60602010-03-26 09:41:223342 ['linux_use_heapchecker==1', {
3343 'variables': {'linux_use_tcmalloc%': 1},
[email protected]2f047202013-06-14 06:36:393344 'defines': [
[email protected]bba0fea32013-06-14 12:29:353345 'USE_HEAPCHECKER',
[email protected]2f047202013-06-14 06:36:393346 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3347 ],
[email protected]272ef0b2013-05-14 12:32:453348 'conditions': [
3349 ['component=="shared_library"', {
3350 # See crbug.com/112389
3351 # TODO(glider): replace with --dynamic-list or something
3352 'ldflags': ['-rdynamic'],
3353 }],
3354 ],
[email protected]d8b60602010-03-26 09:41:223355 }],
[email protected]3c8fe5482013-05-22 15:17:033356 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083357 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243358 }],
[email protected]64e2d4a42010-08-27 10:13:213359 ['linux_keep_shadow_stacks==1', {
3360 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513361 'cflags': [
3362 '-finstrument-functions',
3363 # Allow mmx intrinsics to inline, so that the compiler can expand
3364 # the intrinsics.
3365 '-finstrument-functions-exclude-file-list=mmintrin.h',
3366 ],
[email protected]64e2d4a42010-08-27 10:13:213367 }],
[email protected]8d726a42012-02-09 03:49:003368 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:323369 'ldflags': [
3370 # Experimentation found that using four linking threads
3371 # saved ~20% of link time.
3372 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3373 '-Wl,--threads',
3374 '-Wl,--thread-count=4',
3375 ],
[email protected]8d726a42012-02-09 03:49:003376 'conditions': [
3377 ['release_valgrind_build==0', {
3378 'target_conditions': [
3379 ['_toolset=="target"', {
3380 'ldflags': [
3381 # There seems to be a conflict of --icf and -pie
3382 # in gold which can generate crashy binaries. As
3383 # a security measure, -pie takes precendence for
3384 # now.
3385 #'-Wl,--icf=safe',
3386 '-Wl,--icf=none',
3387 ],
3388 }],
3389 ],
3390 }],
3391 ],
3392 }],
[email protected]b07806c12012-02-03 22:44:593393 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593394 'ldflags': [
3395 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443396 # We pass the path to gold to the compiler. gyp leaves
3397 # unspecified what the cwd is when running the compiler,
3398 # so the normal gyp path-munging fails us. This hack
3399 # gets the right path.
3400 '-B<(PRODUCT_DIR)/../../third_party/gold',
[email protected]b07806c12012-02-03 22:44:593401 ],
3402 }],
[email protected]606116d22009-05-06 22:38:233403 ],
[email protected]9d384032009-03-20 23:13:263404 },
3405 }],
[email protected]c51e8d52009-12-11 20:04:063406 # FreeBSD-specific options; note that most FreeBSD options are set above,
3407 # with Linux.
3408 ['OS=="freebsd"', {
3409 'target_defaults': {
3410 'ldflags': [
3411 '-Wl,--no-keep-memory',
3412 ],
3413 },
3414 }],
[email protected]da1c8d692011-09-20 20:35:013415 # Android-specific options; note that most are set above with Linux.
3416 ['OS=="android"', {
3417 'variables': {
[email protected]25036722012-12-11 10:36:173418 # This is a unique identifier for a given build. It's used for
3419 # identifying various build artifacts corresponding to a particular
3420 # build of chrome (e.g. where to find archived symbols).
3421 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013422 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013423 # Use shared stlport library when system one used.
3424 # Figure this out early since it needs symbols from libgcc.a, so it
3425 # has to be before that in the set of libraries.
3426 ['use_system_stlport==1', {
3427 'android_stlport_library': 'stlport',
3428 }, {
[email protected]806b5232012-11-19 21:19:043429 'conditions': [
3430 ['component=="shared_library"', {
3431 'android_stlport_library': 'stlport_shared',
3432 }, {
3433 'android_stlport_library': 'stlport_static',
3434 }],
3435 ],
[email protected]da1c8d692011-09-20 20:35:013436 }],
3437 ],
3438
3439 # Placing this variable here prevents from forking libvpx, used
3440 # by remoting. Remoting is off, so it needn't built,
3441 # so forking it's deps seems like overkill.
3442 # But this variable need defined to properly run gyp.
3443 # A proper solution is to have an OS==android conditional
3444 # in third_party/libvpx/libvpx.gyp to define it.
3445 'libvpx_path': 'lib/linux/arm',
3446 },
3447 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013448 'variables': {
3449 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593450 'conditions': [
3451 # If we're using the components build, append "cr" to all shared
3452 # libraries to avoid naming collisions with android system library
3453 # versions with the same name (e.g. skia, icu).
3454 ['component=="shared_library"', {
3455 'android_product_extension': 'cr.so',
3456 }, {
3457 'android_product_extension': 'so',
3458 } ],
3459 ],
[email protected]8a37e4502012-08-14 22:42:553460 },
[email protected]da1c8d692011-09-20 20:35:013461 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593462 ['_type=="shared_library"', {
3463 'product_extension': '<(android_product_extension)',
3464 }],
3465
[email protected]da1c8d692011-09-20 20:35:013466 # Settings for building device targets using Android's toolchain.
3467 # These are based on the setup.mk file from the Android NDK.
3468 #
3469 # The NDK Android executable link step looks as follows:
3470 # $LDFLAGS
3471 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3472 # $(PRIVATE_OBJECTS) <-- The .o that we built
3473 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3474 # $(TARGET_LIBGCC) <-- libgcc.a
3475 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3476 # $(PRIVATE_LDLIBS) <-- System .so
3477 # $(TARGET_CRTEND_O) <-- crtend.o
3478 #
3479 # For now the above are approximated for executables by adding
3480 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3481 # of 'libraries'.
3482 #
3483 # The NDK Android shared library link step looks as follows:
3484 # $LDFLAGS
3485 # $(PRIVATE_OBJECTS) <-- The .o that we built
3486 # -l,--whole-archive
3487 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3488 # -l,--no-whole-archive
3489 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3490 # $(TARGET_LIBGCC) <-- libgcc.a
3491 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3492 # $(PRIVATE_LDLIBS) <-- System .so
3493 #
[email protected]ad17e342012-07-17 20:45:483494 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013495 #
3496 # For both executables and shared libraries, add the proper
3497 # libgcc.a to the start of libraries which puts it in the
3498 # proper spot after .o and .a files get linked in.
3499 #
3500 # TODO: The proper thing to do longer-tem would be proper gyp
3501 # support for a custom link command line.
3502 ['_toolset=="target"', {
3503 'cflags!': [
3504 '-pthread', # Not supported by Android toolchain.
3505 ],
3506 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013507 '-ffunction-sections',
3508 '-funwind-tables',
3509 '-g',
3510 '-fstack-protector',
3511 '-fno-short-enums',
3512 '-finline-limit=64',
3513 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013514 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013515 ],
3516 'defines': [
3517 'ANDROID',
3518 '__GNU_SOURCE=1', # Necessary for clone()
3519 'USE_STLPORT=1',
3520 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173521 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013522 ],
3523 'ldflags!': [
3524 '-pthread', # Not supported by Android toolchain.
3525 ],
3526 'ldflags': [
3527 '-nostdlib',
3528 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013529 # Don't export symbols from statically linked libraries.
3530 '-Wl,--exclude-libs=ALL',
3531 ],
[email protected]a0e48b02011-11-22 07:53:013532 'libraries': [
3533 '-l<(android_stlport_library)',
3534 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043535 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013536 '-lc',
3537 '-ldl',
3538 '-lstdc++',
3539 '-lm',
[email protected]da1c8d692011-09-20 20:35:013540 ],
3541 'conditions': [
[email protected]806b5232012-11-19 21:19:043542 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473543 'ldflags!': [
3544 '-Wl,--exclude-libs=ALL',
3545 ],
[email protected]806b5232012-11-19 21:19:043546 }],
[email protected]220ea5932012-08-09 10:44:073547 ['clang==1', {
3548 'cflags': [
3549 # Work around incompatibilities between bionic and clang
3550 # headers.
3551 '-D__compiler_offsetof=__builtin_offsetof',
3552 '-Dnan=__builtin_nan',
3553 ],
3554 'conditions': [
3555 ['target_arch=="arm"', {
3556 'cflags': [
3557 '-target arm-linux-androideabi',
3558 '-mllvm -arm-enable-ehabi',
3559 ],
3560 'ldflags': [
3561 '-target arm-linux-androideabi',
3562 ],
3563 }],
3564 ['target_arch=="ia32"', {
3565 'cflags': [
3566 '-target x86-linux-androideabi',
3567 ],
3568 'ldflags': [
3569 '-target x86-linux-androideabi',
3570 ],
3571 }],
3572 ],
3573 }],
[email protected]ed70ed1862012-11-07 12:11:253574 ['asan==1', {
3575 'cflags': [
3576 # Android build relies on -Wl,--gc-sections removing
3577 # unreachable code. ASan instrumentation for globals inhibits
3578 # this and results in a library with unresolvable relocations.
3579 # TODO(eugenis): find a way to reenable this.
3580 '-mllvm -asan-globals=0',
3581 ],
3582 }],
[email protected]d999c3cb2013-03-12 10:22:363583 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463584 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573585 # The NDK has these things, but doesn't define the constants
3586 # to say that it does. Define them here instead.
3587 'HAVE_SYS_UIO_H',
3588 ],
3589 'cflags': [
3590 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463591 ],
[email protected]da1c8d692011-09-20 20:35:013592 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523593 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013594 ],
3595 }],
[email protected]d999c3cb2013-03-12 10:22:363596 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083597 'include_dirs': [
3598 # OpenAL headers from the Android tree.
3599 '<(android_src)/frameworks/wilhelm/include',
3600 ],
3601 'cflags': [
[email protected]04882132012-11-21 12:40:453602 # Android predefines this as 1; undefine it here so Chromium
3603 # can redefine it later to be 2 for chromium code and unset
3604 # for third party code. This works because cflags are added
3605 # before defines.
3606 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553607 # Disable any additional warnings enabled by the Android build system but which
3608 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083609 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553610 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3611 '-Wno-ignored-qualifiers',
3612 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083613 ],
3614 'cflags_cc': [
3615 # Disabling c++0x-compat should be handled in WebKit, but
3616 # this currently doesn't work because gcc_version is not set
3617 # correctly when building with the Android build system.
3618 # TODO(torne): Fix this in WebKit.
3619 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163620 # Other things unrelated to -Wextra:
3621 '-Wno-non-virtual-dtor',
3622 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083623 ],
3624 }],
[email protected]d999c3cb2013-03-12 10:22:363625 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083626 'cflags': [
3627 # There is a class of warning which:
3628 # 1) Android always enables and also treats as errors
3629 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163630 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553631 '-Wno-address',
3632 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553633 '-Wno-return-type',
3634 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083635 ],
[email protected]2f34a202013-03-11 13:59:163636 'cflags_cc': [
3637 '-Wno-non-virtual-dtor',
3638 ]
[email protected]0d7291e2012-10-04 19:16:083639 }],
[email protected]febd3572012-05-03 09:17:453640 ['target_arch == "arm"', {
3641 'ldflags': [
3642 # Enable identical code folding to reduce size.
3643 '-Wl,--icf=safe',
3644 ],
3645 }],
[email protected]da1c8d692011-09-20 20:35:013646 # NOTE: The stlport header include paths below are specified in
3647 # cflags rather than include_dirs because they need to come
3648 # after include_dirs. Think of them like system headers, but
3649 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3650 # toolchain (circa Gingerbread) will exhibit strange errors.
3651 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513652 ['use_system_stlport==1', {
3653 'cflags': [
3654 # For libstdc++/include, which is used by stlport.
3655 '-I<(android_src)/bionic',
3656 '-I<(android_src)/external/stlport/stlport',
3657 ],
3658 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013659 'cflags': [
[email protected]225ec632013-04-03 18:20:223660 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013661 ],
[email protected]225ec632013-04-03 18:20:223662 'ldflags': [
3663 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013664 ],
3665 }],
3666 ['target_arch=="ia32"', {
3667 # The x86 toolchain currently has problems with stack-protector.
3668 'cflags!': [
3669 '-fstack-protector',
3670 ],
3671 'cflags': [
3672 '-fno-stack-protector',
3673 ],
3674 }],
3675 ],
3676 'target_conditions': [
3677 ['_type=="executable"', {
3678 'ldflags': [
3679 '-Bdynamic',
3680 '-Wl,-dynamic-linker,/system/bin/linker',
3681 '-Wl,--gc-sections',
3682 '-Wl,-z,nocopyreloc',
3683 # crtbegin_dynamic.o should be the last item in ldflags.
3684 '<(android_ndk_lib)/crtbegin_dynamic.o',
3685 ],
3686 'libraries': [
3687 # crtend_android.o needs to be the last item in libraries.
3688 # Do not add any libraries after this!
3689 '<(android_ndk_lib)/crtend_android.o',
3690 ],
[email protected]63a131fd2012-11-06 16:01:213691 'conditions': [
3692 ['asan==1', {
3693 'cflags': [
3694 '-fPIE',
3695 ],
3696 'ldflags': [
3697 '-pie',
3698 ],
3699 }],
3700 ],
[email protected]da1c8d692011-09-20 20:35:013701 }],
[email protected]f5c7758a2012-07-25 16:17:573702 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013703 'ldflags': [
3704 '-Wl,-shared,-Bsymbolic',
3705 ],
[email protected]d093fe8b2013-04-30 18:00:233706 'conditions': [
3707 ['android_webview_build==0', {
3708 'ldflags': [
3709 # crtbegin_so.o should be the last item in ldflags.
3710 '<(android_ndk_lib)/crtbegin_so.o',
3711 ],
3712 'libraries': [
3713 # crtend_so.o needs to be the last item in libraries.
3714 # Do not add any libraries after this!
3715 '<(android_ndk_lib)/crtend_so.o',
3716 ],
3717 }],
[email protected]a08029b42012-04-25 03:18:463718 ],
[email protected]da1c8d692011-09-20 20:35:013719 }],
[email protected]7b1eac42013-05-09 20:55:133720 # ndk-build copies .a's around the filesystem, breaking
3721 # relative paths in thin archives. Disable using thin
3722 # archives to avoid problems until one of these is fixed:
3723 # http://code.google.com/p/android/issues/detail?id=40302
3724 # http://code.google.com/p/android/issues/detail?id=40303
3725 ['_type=="static_library"', {
3726 'standalone_static_library': 1,
3727 }],
[email protected]da1c8d692011-09-20 20:35:013728 ],
3729 }],
3730 # Settings for building host targets using the system toolchain.
3731 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123732 'cflags!': [
3733 # Due to issues in Clang build system, using ASan on 32-bit
3734 # binaries on x86_64 host is problematic.
3735 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563736 '-fsanitize=address',
3737 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123738 ],
[email protected]da1c8d692011-09-20 20:35:013739 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443740 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013741 '-Wl,-z,noexecstack',
3742 '-Wl,--gc-sections',
3743 '-Wl,-O1',
3744 '-Wl,--as-needed',
3745 ],
[email protected]965b6b22011-09-29 16:07:283746 'sources/': [
3747 ['exclude', '_android(_unittest)?\\.cc$'],
3748 ['exclude', '(^|/)android/']
3749 ],
[email protected]da1c8d692011-09-20 20:35:013750 }],
[email protected]0ccf578f2013-03-13 11:13:393751 # Settings for building host targets on mac.
3752 ['_toolset=="host" and host_os=="mac"', {
3753 'ldflags!': [
3754 '-Wl,-z,now',
3755 '-Wl,-z,relro',
3756 ],
3757 }],
[email protected]da1c8d692011-09-20 20:35:013758 ],
3759 },
3760 }],
[email protected]93f21e42010-04-01 00:35:153761 ['OS=="solaris"', {
3762 'cflags!': ['-fvisibility=hidden'],
3763 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3764 }],
[email protected]1e013672012-06-29 22:12:203765 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553766 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423767 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553768 'xcode_settings': {
3769 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243770 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3771 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043772 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3773 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043774 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3775 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3776 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253777 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3778 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043779 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3780 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3781 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3782 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553783 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043784 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553785 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043786 'WARNING_CFLAGS': [
3787 '-Wall',
3788 '-Wendif-labels',
3789 '-Wextra',
3790 # Don't warn about unused function parameters.
3791 '-Wno-unused-parameter',
3792 # Don't warn about the "struct foo f = {0};" initialization
3793 # pattern.
3794 '-Wno-missing-field-initializers',
3795 ],
[email protected]b3fb8092009-03-12 19:09:243796 'conditions': [
3797 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593798 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3799 ],
[email protected]2936b8c2012-10-29 10:57:313800 # Note that the prebuilt Clang binaries should not be used for iOS
3801 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283802 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303803 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3804 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383805
[email protected]6c648f12011-12-24 07:50:433806 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533807 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433808 # override keyword is used via the OVERRIDE macro from
3809 # base/compiler_specific.h.
3810 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443811 # Warn if automatic synthesis is triggered with
3812 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533813 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303814 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283815 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073816 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523817
3818 # This warns on using ints as initializers for floats in
3819 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3820 # which happens in several places in chrome code. Not sure if
3821 # this is worth fixing.
3822 '-Wno-c++11-narrowing',
3823
3824 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3825 # user-defined literals, this is now a string literal with a UD
3826 # suffix. However, this is used heavily in NaCl code, so disable
3827 # the warning for now.
3828 '-Wno-reserved-user-defined-literal',
3829
[email protected]66733172010-09-22 00:09:283830 # Don't die on dtoa code that uses a char as an array index.
3831 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3832 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073833
[email protected]25d3bb722010-11-22 14:31:453834 # Clang spots more unused functions.
3835 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103836
3837 # Warns on switches on enums that cover all enum values but
3838 # also contain a default: branch. Chrome is full of that.
3839 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513840
3841 # Warns when a const char[] is converted to bool.
3842 '-Wstring-conversion',
[email protected]361b47c2013-07-02 15:13:243843
3844 # Clang considers the `register` keyword as deprecated, but e.g.
3845 # code generated by flex (used in angle) contains that keyword.
3846 # http://crbug.com/255186
3847 '-Wno-deprecated-register',
[email protected]66733172010-09-22 00:09:283848 ],
[email protected]c67e8ca2012-12-04 16:01:523849 'OTHER_CPLUSPLUSFLAGS': [
[email protected]a7cd1a52013-05-09 00:27:443850 # gnu++11 instead of c++11 is needed because some code uses
3851 # typeof() (a GNU extension).
[email protected]c67e8ca2012-12-04 16:01:523852 # TODO(thakis): Eventually switch this to c++11 instead of
3853 # gnu++11 (once typeof can be removed, which is blocked on c++11
3854 # being available everywhere).
[email protected]a7cd1a52013-05-09 00:27:443855 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3856 # bots use xcode 4 -- http://crbug.com/147515).
[email protected]c67e8ca2012-12-04 16:01:523857 '$(inherited)', '-std=gnu++11',
3858 ],
[email protected]66733172010-09-22 00:09:283859 }],
[email protected]2fccd422013-05-21 21:27:573860 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:463861 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313862 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463863 ],
3864 }],
[email protected]4a9ac22e2011-12-02 03:41:533865 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593866 'OTHER_CFLAGS': [
3867 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533868 ],
3869 }],
3870 ['clang==1 and clang_add_plugin!=""', {
3871 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593872 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3873 ],
3874 }],
[email protected]2616d45d2012-01-19 03:15:483875 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3876 'OTHER_CFLAGS': [
3877 # See http://crbug.com/110262
3878 '-fcolor-diagnostics',
3879 ],
3880 }],
[email protected]b3fb8092009-03-12 19:09:243881 ],
[email protected]2f80c312009-02-25 21:26:553882 },
[email protected]34f40892011-09-06 21:53:303883 'conditions': [
3884 ['clang==1', {
3885 'variables': {
3886 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3887 },
3888 }],
[email protected]921c7b52011-11-25 10:34:353889 ['asan==1', {
3890 'xcode_settings': {
3891 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563892 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373893 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563894 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353895 ],
[email protected]921c7b52011-11-25 10:34:353896 },
3897 'defines': [
3898 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:393899 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:353900 ],
3901 }],
[email protected]34f40892011-09-06 21:53:303902 ],
[email protected]2f80c312009-02-25 21:26:553903 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553904 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463905 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083906 'conditions': [
3907 ['asan==1', {
3908 'xcode_settings': {
3909 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443910 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083911 ],
3912 },
3913 }],
3914 ],
[email protected]5d7dc972009-04-16 15:30:463915 }],
3916 ['_mac_bundle', {
3917 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313918 'target_conditions': [
3919 ['_type=="executable"', {
3920 'conditions': [
3921 ['asan==1', {
3922 'postbuilds': [
3923 {
3924 'variables': {
3925 # Define copy_asan_dylib_path in a variable ending in
3926 # _path so that gyp understands it's a path and
3927 # performs proper relativization during dict merging.
3928 'copy_asan_dylib_path':
3929 'mac/copy_asan_runtime_dylib.sh',
3930 },
3931 'postbuild_name': 'Copy ASan runtime dylib',
3932 'action': [
3933 '<(copy_asan_dylib_path)',
3934 ],
3935 },
3936 ],
3937 }],
3938 ],
3939 }],
3940 ],
[email protected]87fde4a2009-02-28 00:50:083941 }],
[email protected]2936b8c2012-10-29 10:57:313942 ], # target_conditions
3943 }, # target_defaults
3944 }], # OS=="mac" or OS=="ios"
3945 ['OS=="mac"', {
3946 'target_defaults': {
3947 'variables': {
3948 # These should end with %, but there seems to be a bug with % in
3949 # variables that are intended to be set to different values in
3950 # different targets, like these.
3951 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313952 # Strip debugging symbols from the target.
3953 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373954 'conditions': [
3955 ['asan==1', {
3956 'conditions': [
3957 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353958 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373959 }, {
3960 'mac_real_dsym': '<(mac_want_real_dsym)'
3961 }],
3962 ],
3963 }, {
3964 'conditions': [
3965 ['mac_want_real_dsym=="default"', {
3966 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3967 }, {
3968 'mac_real_dsym': '<(mac_want_real_dsym)'
3969 }],
3970 ],
3971 }],
3972 ],
[email protected]2936b8c2012-10-29 10:57:313973 },
3974 'xcode_settings': {
3975 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3976 # (Equivalent to -fPIC)
3977 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3978 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3979 # Keep pch files below xcodebuild/.
3980 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3981 'OTHER_CFLAGS': [
3982 '-fno-strict-aliasing', # See http://crbug.com/32204
3983 ],
3984 },
3985 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103986 ['_type=="executable"', {
3987 'postbuilds': [
3988 {
3989 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363990 # code execution when running on Mac OS X 10.7 ("Lion"), and
3991 # ensures that the position-independent executable (PIE) bit
3992 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103993 'variables': {
[email protected]8c40f322011-08-24 03:33:363994 # Define change_mach_o_flags in a variable ending in _path
3995 # so that GYP understands it's a path and performs proper
3996 # relativization during dict merging.
3997 'change_mach_o_flags_path':
3998 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173999 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:134000 ],
4001 'target_conditions': [
[email protected]162407f2011-09-08 15:33:174002 ['mac_pie==0 or release_valgrind_build==1', {
4003 # Don't enable PIE if it's unwanted. It's unwanted if
4004 # the target specifies mac_pie=0 or if building for
4005 # Valgrind, because Valgrind doesn't understand slide.
4006 # See the similar mac_pie/release_valgrind_build check
4007 # below.
[email protected]081c0342011-08-24 14:59:134008 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134009 '--no-pie',
4010 ],
4011 }],
4012 ],
[email protected]6303fed2011-08-11 01:12:104013 },
[email protected]8c40f322011-08-24 03:33:364014 'postbuild_name': 'Change Mach-O Flags',
4015 'action': [
4016 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134017 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364018 ],
[email protected]6303fed2011-08-11 01:12:104019 },
4020 ],
[email protected]5a5d97aa2011-09-02 15:34:004021 'conditions': [
4022 ['asan==1', {
4023 'variables': {
4024 'asan_saves_file': 'asan.saves',
4025 },
4026 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:564027 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:004028 },
4029 }],
4030 ],
[email protected]162407f2011-09-08 15:33:174031 'target_conditions': [
4032 ['mac_pie==1 and release_valgrind_build==0', {
4033 # Turn on position-independence (ASLR) for executables. When
4034 # PIE is on for the Chrome executables, the framework will
4035 # also be subject to ASLR.
4036 # Don't do this when building for Valgrind, because Valgrind
4037 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4038 # understand slide, and get rid of the Valgrind check.
4039 'xcode_settings': {
4040 'OTHER_LDFLAGS': [
4041 '-Wl,-pie', # Position-independent executable (MH_PIE)
4042 ],
4043 },
4044 }],
4045 ],
[email protected]6a0242bc2011-07-01 00:34:464046 }],
[email protected]9a5e72862010-09-02 16:16:584047 ['(_type=="executable" or _type=="shared_library" or \
4048 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204049 'target_conditions': [
4050 ['mac_real_dsym == 1', {
4051 # To get a real .dSYM bundle produced by dsymutil, set the
4052 # debug information format to dwarf-with-dsym. Since
4053 # strip_from_xcode will not be used, set Xcode to do the
4054 # stripping as well.
4055 'configurations': {
[email protected]5153767c2009-12-22 01:52:504056 'Release_Base': {
[email protected]24700642009-06-01 16:01:204057 'xcode_settings': {
4058 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4059 'DEPLOYMENT_POSTPROCESSING': 'YES',
4060 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074061 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254062 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074063 # The Xcode default is to strip debugging symbols
4064 # only (-S). Local symbols should be stripped as
4065 # well, which will be handled by -x. Xcode will
4066 # continue to insert -S when stripping even when
4067 # additional flags are added with STRIPFLAGS.
4068 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404069 }], # _type=="shared_library" or _type=="loadable_module"
4070 ['_type=="executable"', {
4071 'conditions': [
4072 ['asan==1', {
4073 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4074 }]
4075 ],
4076 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074077 ], # target_conditions
4078 }, # xcode_settings
4079 }, # configuration "Release"
4080 }, # configurations
[email protected]24700642009-06-01 16:01:204081 }, { # mac_real_dsym != 1
4082 # To get a fast fake .dSYM bundle, use a post-build step to
4083 # produce the .dSYM and strip the executable. strip_from_xcode
4084 # only operates in the Release configuration.
4085 'postbuilds': [
4086 {
4087 'variables': {
4088 # Define strip_from_xcode in a variable ending in _path
4089 # so that gyp understands it's a path and performs proper
4090 # relativization during dict merging.
4091 'strip_from_xcode_path': 'mac/strip_from_xcode',
4092 },
4093 'postbuild_name': 'Strip If Needed',
4094 'action': ['<(strip_from_xcode_path)'],
4095 },
[email protected]e14a9f92009-08-05 19:26:074096 ], # postbuilds
4097 }], # mac_real_dsym
4098 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584099 }], # (_type=="executable" or _type=="shared_library" or
4100 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074101 ], # target_conditions
4102 }, # target_defaults
4103 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204104 ['OS=="ios"', {
4105 'target_defaults': {
4106 'xcode_settings' : {
4107 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4108
4109 # This next block is mostly common with the 'mac' section above,
4110 # but keying off (or setting) 'clang' isn't valid for iOS as it
4111 # also seems to mean using the custom build of clang.
4112
[email protected]e31ef5b2013-05-21 11:08:494113 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4114 # section above).
4115 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]1e013672012-06-29 22:12:204116 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:534117 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:204118 # override keyword is used via the OVERRIDE macro from
4119 # base/compiler_specific.h.
4120 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:444121 # Warn if automatic synthesis is triggered with
4122 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534123 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204124 'WARNING_CFLAGS': [
4125 '-Wheader-hygiene',
4126 # Don't die on dtoa code that uses a char as an array index.
4127 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4128 '-Wno-char-subscripts',
4129 # Clang spots more unused functions.
4130 '-Wno-unused-function',
4131 # See comments on this flag higher up in this file.
4132 '-Wno-unnamed-type-template-args',
[email protected]e31ef5b2013-05-21 11:08:494133 # Match OS X clang C++11 warning settings.
4134 '-Wno-c++11-narrowing',
4135 '-Wno-reserved-user-defined-literal',
[email protected]1e013672012-06-29 22:12:204136 ],
4137 },
4138 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474139 ['_toolset=="host"', {
4140 'xcode_settings': {
4141 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4142 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4143 },
4144 }],
4145 ['_toolset=="target"', {
4146 'xcode_settings': {
4147 # This section should be for overriding host settings. But,
4148 # since we can't negate the iphone deployment target above, we
4149 # instead set it here for target only.
4150 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4151 },
4152 }],
[email protected]1e013672012-06-29 22:12:204153 ['_type=="executable"', {
4154 'configurations': {
4155 'Release_Base': {
4156 'xcode_settings': {
4157 'DEPLOYMENT_POSTPROCESSING': 'YES',
4158 'STRIP_INSTALLED_PRODUCT': 'YES',
4159 },
4160 },
[email protected]3c6aa862012-11-05 17:11:444161 'Debug_Base': {
4162 'xcode_settings': {
4163 # Remove dSYM to reduce build time.
4164 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4165 },
4166 },
[email protected]1e013672012-06-29 22:12:204167 },
[email protected]0286b6f2013-05-03 11:06:404168 'conditions': [
[email protected]8dec8fc52013-05-23 23:05:054169 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404170 'xcode_settings': {
[email protected]8dec8fc52013-05-23 23:05:054171 # TODO(justincohen): ninja builds don't support signing yet.
[email protected]0286b6f2013-05-03 11:06:404172 'conditions': [
4173 ['chromium_ios_signing', {
4174 # iOS SDK wants everything for device signed.
4175 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4176 }, {
4177 'CODE_SIGNING_REQUIRED': 'NO',
4178 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4179 }],
4180 ],
4181 },
4182 }],
[email protected]8dec8fc52013-05-23 23:05:054183 ['"<(GENERATOR)"=="xcode" and clang!=1', {
4184 'xcode_settings': {
4185 # It is necessary to link with the -fobjc-arc flag to use
4186 # subscripting on iOS < 6.
4187 'OTHER_LDFLAGS': [
4188 '-fobjc-arc',
4189 ],
4190 },
4191 }],
4192 ['clang==1', {
4193 'target_conditions': [
4194 ['_toolset=="target"', {
4195 'variables': {
4196 'developer_dir': '<!(xcode-select -print-path)',
4197 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc',
4198 },
4199 # It is necessary to force load libarclite from Xcode for
4200 # third_party/llvm-build because libarclite_* is only
4201 # distributed by Xcode.
4202 'conditions': [
4203 ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', {
4204 'xcode_settings': {
4205 'OTHER_LDFLAGS': [
4206 '-force_load',
4207 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4208 ],
4209 },
4210 }],
4211 ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', {
4212 'xcode_settings': {
4213 'OTHER_LDFLAGS': [
4214 '-force_load',
4215 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4216 ],
4217 },
4218 }],
4219 # Xcode sets target_arch at compile-time.
4220 ['"<(GENERATOR)"=="xcode"', {
4221 'xcode_settings': {
4222 'OTHER_LDFLAGS[arch=armv7]': [
[email protected]86671442013-06-11 13:25:124223 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054224 '-force_load',
4225 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4226 ],
4227 'OTHER_LDFLAGS[arch=i386]': [
[email protected]86671442013-06-11 13:25:124228 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054229 '-force_load',
4230 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4231 ],
4232 },
4233 }],
4234 ],
4235 }],
4236 ],
4237 }],
[email protected]0286b6f2013-05-03 11:06:404238 ],
[email protected]1e013672012-06-29 22:12:204239 }],
4240 ], # target_conditions
4241 }, # target_defaults
4242 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554243 ['OS=="win"', {
4244 'target_defaults': {
4245 'defines': [
[email protected]8e345da2012-07-01 22:10:304246 '_WIN32_WINNT=0x0602',
4247 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554248 'WIN32',
4249 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554250 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284251 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554252 '_CRT_RAND_S',
4253 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4254 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274255 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554256 ],
[email protected]8974e042010-06-21 18:06:524257 'conditions': [
[email protected]2212d272011-12-20 21:37:374258 ['buildtype=="Official"', {
4259 # In official builds, targets can self-select an optimization
4260 # level by defining a variable named 'optimize', and setting it
4261 # to one of
4262 # - "size", optimizes for minimal code size - the default.
4263 # - "speed", optimizes for speed over code size.
4264 # - "max", whole program optimization and link-time code
4265 # generation. This is very expensive and should be used
4266 # sparingly.
4267 'variables': {
4268 'optimize%': 'size',
4269 },
4270 'target_conditions': [
4271 ['optimize=="size"', {
4272 'msvs_settings': {
4273 'VCCLCompilerTool': {
4274 # 1, optimizeMinSpace, Minimize Size (/O1)
4275 'Optimization': '1',
4276 # 2, favorSize - Favor small code (/Os)
4277 'FavorSizeOrSpeed': '2',
4278 },
4279 },
4280 },
4281 ],
4282 ['optimize=="speed"', {
4283 'msvs_settings': {
4284 'VCCLCompilerTool': {
4285 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4286 'Optimization': '2',
4287 # 1, favorSpeed - Favor fast code (/Ot)
4288 'FavorSizeOrSpeed': '1',
4289 },
4290 },
4291 },
4292 ],
4293 ['optimize=="max"', {
4294 'msvs_settings': {
4295 'VCCLCompilerTool': {
4296 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4297 'Optimization': '2',
4298 # 1, favorSpeed - Favor fast code (/Ot)
4299 'FavorSizeOrSpeed': '1',
4300 # This implies link time code generation.
4301 'WholeProgramOptimization': 'true',
4302 },
4303 },
4304 },
4305 ],
4306 ],
4307 },
4308 ],
[email protected]8974e042010-06-21 18:06:524309 ['component=="static_library"', {
4310 'defines': [
4311 '_HAS_EXCEPTIONS=0',
4312 ],
4313 }],
[email protected]3e2648a2011-03-21 20:58:504314 ['secure_atl', {
4315 'defines': [
4316 '_SECURE_ATL',
4317 ],
4318 }],
[email protected]54184ce72012-10-18 07:11:264319 ['msvs_express', {
4320 'configurations': {
4321 'x86_Base': {
4322 'msvs_settings': {
4323 'VCLinkerTool': {
4324 'AdditionalLibraryDirectories':
4325 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4326 },
4327 'VCLibrarianTool': {
4328 'AdditionalLibraryDirectories':
4329 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4330 },
4331 },
4332 },
4333 'x64_Base': {
4334 'msvs_settings': {
4335 'VCLibrarianTool': {
4336 'AdditionalLibraryDirectories':
4337 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4338 },
4339 'VCLinkerTool': {
4340 'AdditionalLibraryDirectories':
4341 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4342 },
4343 },
4344 },
4345 },
4346 'msvs_settings': {
4347 'VCLinkerTool': {
4348 # Explicitly required when using the ATL with express
4349 'AdditionalDependencies': ['atlthunk.lib'],
4350
4351 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4352 # almost eight hundred LNK4254 and LNK4078 warnings:
4353 # - warning LNK4254: section 'ATL' (50000040) merged into
4354 # '.rdata' (40000040) with different attributes
4355 # - warning LNK4078: multiple 'ATL' sections found with
4356 # different attributes
4357 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4358 },
4359 },
4360 'msvs_system_include_dirs': [
4361 '<(windows_driver_kit_path)/inc/atl71',
4362 '<(windows_driver_kit_path)/inc/mfc42',
4363 ],
4364 }],
[email protected]8974e042010-06-21 18:06:524365 ],
[email protected]5b5ca7cb2009-07-20 23:00:204366 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054367 '<(windows_sdk_path)/Include/shared',
4368 '<(windows_sdk_path)/Include/um',
4369 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554370 '$(VSInstallDir)/VC/atlmfc/include',
4371 ],
[email protected]a8d99cef2009-08-26 20:47:494372 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004373 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114374 # TODO(maruel): These warnings are level 4. They will be slowly
4375 # removed as code is fixed.
4376 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004377 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4378 4706,
[email protected]942c3a60f2011-05-03 02:04:114379 ],
[email protected]2f80c312009-02-25 21:26:554380 'msvs_settings': {
4381 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444382 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554383 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554384 'BufferSecurityCheck': 'true',
4385 'EnableFunctionLevelLinking': 'true',
4386 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114387 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554388 'WarnAsError': 'true',
4389 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584390 'conditions': [
[email protected]8974e042010-06-21 18:06:524391 ['component=="shared_library"', {
4392 'ExceptionHandling': '1', # /EHsc
4393 }, {
4394 'ExceptionHandling': '0',
4395 }],
[email protected]3fef6e62009-07-31 19:58:584396 ],
[email protected]2f80c312009-02-25 21:26:554397 },
4398 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164399 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374400 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054401 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374402 ],
[email protected]2f80c312009-02-25 21:26:554403 },
4404 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554405 'AdditionalDependencies': [
4406 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504407 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554408 'version.lib',
4409 'msimg32.lib',
4410 'ws2_32.lib',
4411 'usp10.lib',
4412 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084413 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484414 'winmm.lib',
4415 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554416 ],
[email protected]a78da50e2010-06-09 21:31:374417 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054418 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374419 ],
[email protected]2f80c312009-02-25 21:26:554420 'GenerateDebugInformation': 'true',
4421 'MapFileName': '$(OutDir)\\$(TargetName).map',
4422 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554423 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484424 # SubSystem values:
4425 # 0 == not set
4426 # 1 == /SUBSYSTEM:CONSOLE
4427 # 2 == /SUBSYSTEM:WINDOWS
4428 # Most of the executables we'll ever create are tests
4429 # and utilities with console output.
4430 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554431 },
4432 'VCMIDLTool': {
4433 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094434 'TypeLibraryName': '$(InputName).tlb',
4435 'OutputDirectory': '$(IntDir)',
4436 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334437 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094438 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4439 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554440 },
4441 'VCResourceCompilerTool': {
4442 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384443 'AdditionalIncludeDirectories': [
4444 '<(DEPTH)',
4445 '<(SHARED_INTERMEDIATE_DIR)',
4446 ],
[email protected]2f80c312009-02-25 21:26:554447 },
4448 },
4449 },
4450 }],
[email protected]79e2336c2011-05-12 18:18:344451 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314452 'target_defaults': {
4453 'defines': [
4454 'DISABLE_NACL',
4455 ],
4456 },
4457 }],
[email protected]cfbf9bc2009-12-07 22:07:564458 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194459 'target_defaults': {
4460 'msvs_settings': {
4461 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194462 'DelayLoadDLLs': [
4463 'dbghelp.dll',
4464 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014465 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194466 'uxtheme.dll',
4467 ],
4468 },
4469 },
[email protected]ef4fa4072009-12-04 22:46:504470 'configurations': {
[email protected]5153767c2009-12-22 01:52:504471 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504472 'msvs_settings': {
4473 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164474 'AdditionalOptions': [
4475 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334476 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164477 '/ignore:4199',
4478 '/ignore:4221',
4479 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:434480 ],
4481 'conditions': [
4482 ['asan==0', {
4483 'AdditionalOptions': ['/largeaddressaware'],
4484 }],
[email protected]1f9471a2010-01-04 06:40:164485 ],
[email protected]ef4fa4072009-12-04 22:46:504486 },
4487 },
4488 },
[email protected]5153767c2009-12-22 01:52:504489 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504490 'msvs_settings': {
4491 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164492 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504493 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334494 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164495 '/ignore:4199',
4496 '/ignore:4221',
4497 '/nxcompat',
4498 ],
[email protected]ef4fa4072009-12-04 22:46:504499 },
4500 },
4501 },
4502 },
[email protected]48c7af72009-07-03 22:00:194503 },
4504 }],
[email protected]9821d0d2010-04-16 22:40:374505 ['enable_new_npdevice_api==1', {
4506 'target_defaults': {
4507 'defines': [
4508 'ENABLE_NEW_NPDEVICE_API',
4509 ],
4510 },
4511 }],
[email protected]5f683172013-04-27 01:53:194512 # Don't warn about the "typedef 'foo' locally defined but not used"
4513 # for gcc 4.8.
4514 # TODO: remove this flag once all builds work. See crbug.com/227506
4515 ['gcc_version>=48', {
4516 'target_defaults': {
4517 'cflags': [
4518 '-Wno-unused-local-typedefs',
4519 ],
4520 },
4521 }],
[email protected]220ea5932012-08-09 10:44:074522 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234523 'conditions': [
4524 ['OS=="android"', {
4525 # Android could use the goma with clang.
4526 'make_global_settings': [
4527 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4528 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4529 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4530 ['CC.host', '$(CC)'],
4531 ['CXX.host', '$(CXX)'],
4532 ['LINK.host', '$(LINK)'],
4533 ],
4534 }, {
4535 'make_global_settings': [
4536 ['CC', '<(make_clang_dir)/bin/clang'],
4537 ['CXX', '<(make_clang_dir)/bin/clang++'],
4538 ['LINK', '$(CXX)'],
4539 ['CC.host', '$(CC)'],
4540 ['CXX.host', '$(CXX)'],
4541 ['LINK.host', '$(LINK)'],
4542 ],
4543 }],
[email protected]34f40892011-09-06 21:53:304544 ],
4545 }],
[email protected]615fa6642012-08-14 19:17:074546 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274547 # Hardcode the compiler names in the Makefile so that
4548 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114549 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044550 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4551 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4552 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074553 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4554 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4555 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274556 ],
4557 }],
[email protected]23eea4a42013-04-27 04:10:264558 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464559 'make_global_settings': [
4560 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4561 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4562 ['LINK', '$(CXX)'],
4563 ['CC.host', '<!(which gcc)'],
4564 ['CXX.host', '<!(which g++)'],
4565 ['LINK.host', '<!(which g++)'],
4566 ],
4567 }],
[email protected]2f80c312009-02-25 21:26:554568 ],
4569 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504570 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4571 # This block adds *project-wide* configuration settings to each project
4572 # file. It's almost always wrong to put things here. Specify your
4573 # custom xcode_settings in target_defaults to add them to targets instead.
4574
[email protected]1e013672012-06-29 22:12:204575 'conditions': [
[email protected]fca3d812012-07-27 00:55:364576 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4577 # setting sets the SDK on a project-wide basis. In order to get the
4578 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4579 # here at the project level.
[email protected]2c261532012-10-06 00:46:294580 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364581 'conditions': [
[email protected]2c261532012-10-06 00:46:294582 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364583 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294584 }, {
4585 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364586 }],
4587 ],
[email protected]2c261532012-10-06 00:46:294588 }],
4589 ['OS=="ios"', {
4590 'conditions': [
4591 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404592 'conditions': [
4593 # TODO(justincohen): Ninja only supports simulator for now.
4594 ['"<(GENERATOR)"=="ninja"', {
4595 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
4596 }, {
4597 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4598 }],
4599 ],
[email protected]2c261532012-10-06 00:46:294600 }, {
4601 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4602 }],
4603 ],
[email protected]1e013672012-06-29 22:12:204604 }],
4605 ['OS=="ios"', {
[email protected]3c6aa862012-11-05 17:11:444606 # Just build armv7, until armv7s is correctly tested.
4607 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204608 # Target both iPhone and iPad.
4609 'TARGETED_DEVICE_FAMILY': '1,2',
4610 }],
[email protected]f9335b42013-01-24 21:00:234611 ['target_arch=="x64"', {
4612 'ARCHS': [
4613 'x86_64'
4614 ],
4615 }],
[email protected]1e013672012-06-29 22:12:204616 ],
[email protected]0c8ab452009-11-06 21:57:504617
[email protected]2f80c312009-02-25 21:26:554618 # The Xcode generator will look for an xcode_settings section at the root
4619 # of each dict and use it to apply settings on a file-wide basis. Most
4620 # settings should not be here, they should be in target-specific
4621 # xcode_settings sections, or better yet, should use non-Xcode-specific
4622 # settings in target dicts. SYMROOT is a special case, because many other
4623 # Xcode variables depend on it, including variables such as
4624 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4625 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4626 # files to appear (when present) in the UI as actual files and not red
4627 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4628 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164629 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554630 },
[email protected]ee28c9f2009-09-04 01:53:014631}